summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordawes <dawes>2004-04-26 15:39:47 +0000
committerdawes <dawes>2004-04-26 15:39:47 +0000
commita7ac5435523a5cfafdd694a1435fade85bb9c92e (patch)
tree73a3c30d5bccfc6f18b4504ef4ba6036392aeef9
parent981c6a428a856f9062d3bd362727813a8c98b133 (diff)
FreeType 2.1.8freetype
-rw-r--r--extras/freetype2/ChangeLog4227
-rw-r--r--extras/freetype2/Jamfile85
-rw-r--r--extras/freetype2/Jamrules4
-rw-r--r--extras/freetype2/README35
-rw-r--r--extras/freetype2/builds/ansi/ansi-def.mk13
-rw-r--r--extras/freetype2/builds/ansi/ansi.mk1
-rw-r--r--extras/freetype2/builds/atari/ATARI.H16
-rw-r--r--extras/freetype2/builds/atari/FNames.SIC37
-rw-r--r--extras/freetype2/builds/atari/FREETYPE.PRJ33
-rw-r--r--extras/freetype2/builds/atari/README.TXT51
-rw-r--r--extras/freetype2/builds/beos/beos-def.mk13
-rw-r--r--extras/freetype2/builds/beos/beos.mk2
-rw-r--r--extras/freetype2/builds/beos/detect.mk11
-rw-r--r--extras/freetype2/builds/compiler/ansi-cc.mk11
-rw-r--r--extras/freetype2/builds/compiler/bcc-dev.mk12
-rw-r--r--extras/freetype2/builds/compiler/bcc.mk12
-rw-r--r--extras/freetype2/builds/compiler/emx.mk81
-rw-r--r--extras/freetype2/builds/compiler/gcc-dev.mk10
-rw-r--r--extras/freetype2/builds/compiler/gcc.mk11
-rw-r--r--extras/freetype2/builds/compiler/intelc.mk8
-rw-r--r--extras/freetype2/builds/compiler/unix-lcc.mk8
-rw-r--r--extras/freetype2/builds/compiler/visualage.mk8
-rw-r--r--extras/freetype2/builds/compiler/visualc.mk8
-rw-r--r--extras/freetype2/builds/compiler/watcom.mk12
-rw-r--r--extras/freetype2/builds/compiler/win-lcc.mk8
-rw-r--r--extras/freetype2/builds/detect.mk42
-rw-r--r--extras/freetype2/builds/dos/detect.mk22
-rw-r--r--extras/freetype2/builds/dos/dos-def.mk17
-rw-r--r--extras/freetype2/builds/dos/dos-emx.mk21
-rw-r--r--extras/freetype2/builds/dos/dos-gcc.mk5
-rw-r--r--extras/freetype2/builds/dos/dos-wat.mk17
-rw-r--r--extras/freetype2/builds/freetype.mk105
-rw-r--r--extras/freetype2/builds/link_dos.mk1
-rw-r--r--extras/freetype2/builds/link_std.mk1
-rw-r--r--extras/freetype2/builds/modules.mk11
-rw-r--r--extras/freetype2/builds/os2/detect.mk13
-rw-r--r--extras/freetype2/builds/os2/os2-def.mk18
-rw-r--r--extras/freetype2/builds/os2/os2-dev.mk6
-rw-r--r--extras/freetype2/builds/os2/os2-gcc.mk3
-rw-r--r--extras/freetype2/builds/toplevel.mk8
-rw-r--r--extras/freetype2/builds/unix/.cvsignore1
-rw-r--r--extras/freetype2/builds/unix/aclocal.m47207
-rw-r--r--extras/freetype2/builds/unix/config.guess184
-rw-r--r--extras/freetype2/builds/unix/config.sub128
-rwxr-xr-xextras/freetype2/builds/unix/configure17987
-rw-r--r--extras/freetype2/builds/unix/configure.ac188
-rw-r--r--extras/freetype2/builds/unix/detect.mk17
-rw-r--r--extras/freetype2/builds/unix/freetype-config.in86
-rw-r--r--extras/freetype2/builds/unix/freetype2.in11
-rw-r--r--extras/freetype2/builds/unix/freetype2.m4267
-rw-r--r--extras/freetype2/builds/unix/ft-munmap.m442
-rw-r--r--extras/freetype2/builds/unix/ft2unix.h23
-rw-r--r--extras/freetype2/builds/unix/ftconfig.in113
-rw-r--r--extras/freetype2/builds/unix/ftsystem.c79
-rw-r--r--extras/freetype2/builds/unix/install-sh315
-rw-r--r--extras/freetype2/builds/unix/install.mk13
-rw-r--r--extras/freetype2/builds/unix/ltmain.sh3016
-rwxr-xr-xextras/freetype2/builds/unix/mkinstalldirs69
-rw-r--r--extras/freetype2/builds/unix/unix-cc.in26
-rw-r--r--extras/freetype2/builds/unix/unix-def.in17
-rw-r--r--extras/freetype2/builds/unix/unix-dev.mk5
-rw-r--r--extras/freetype2/builds/unix/unix-lcc.mk1
-rw-r--r--extras/freetype2/builds/unix/unix.mk12
-rw-r--r--extras/freetype2/builds/unix/unixddef.mk11
-rw-r--r--extras/freetype2/builds/vms/ftconfig.h155
-rw-r--r--extras/freetype2/builds/win32/detect.mk18
-rw-r--r--extras/freetype2/builds/win32/visualc/freetype.dsp16
-rw-r--r--extras/freetype2/builds/win32/visualc/freetype.sln33
-rw-r--r--extras/freetype2/builds/win32/visualc/freetype.vcproj1717
-rw-r--r--extras/freetype2/builds/win32/visualc/index.html37
-rw-r--r--extras/freetype2/builds/win32/w32-bcc.mk4
-rw-r--r--extras/freetype2/builds/win32/w32-bccd.mk7
-rw-r--r--extras/freetype2/builds/win32/w32-dev.mk7
-rw-r--r--extras/freetype2/builds/win32/w32-gcc.mk7
-rw-r--r--extras/freetype2/builds/win32/w32-icc.mk1
-rw-r--r--extras/freetype2/builds/win32/w32-intl.mk4
-rw-r--r--extras/freetype2/builds/win32/w32-mingw32.mk7
-rw-r--r--extras/freetype2/builds/win32/w32-vcc.mk4
-rw-r--r--extras/freetype2/builds/win32/w32-wat.mk7
-rw-r--r--extras/freetype2/builds/win32/win32-def.mk20
-rwxr-xr-xextras/freetype2/configure24
-rw-r--r--extras/freetype2/devel/ft2build.h20
-rw-r--r--extras/freetype2/devel/ftoption.h151
-rw-r--r--extras/freetype2/docs/CHANGES1452
-rw-r--r--extras/freetype2/docs/CUSTOMIZE134
-rw-r--r--extras/freetype2/docs/DEBUG76
-rw-r--r--extras/freetype2/docs/INSTALL74
-rw-r--r--extras/freetype2/docs/INSTALL.ANY129
-rw-r--r--extras/freetype2/docs/INSTALL.GNU160
-rw-r--r--extras/freetype2/docs/INSTALL.UNX190
-rw-r--r--extras/freetype2/docs/INSTALL.VMS15
-rw-r--r--extras/freetype2/docs/TODO22
-rw-r--r--extras/freetype2/docs/TRUETYPE17
-rw-r--r--extras/freetype2/docs/UPGRADE.UNX109
-rw-r--r--extras/freetype2/docs/VERSION.DLL131
-rw-r--r--extras/freetype2/docs/license.txt42
-rw-r--r--extras/freetype2/docs/raster.txt624
-rw-r--r--extras/freetype2/docs/reference/.cvsignore1
-rw-r--r--extras/freetype2/docs/reference/README2
-rw-r--r--extras/freetype2/docs/release32
-rw-r--r--extras/freetype2/include/freetype/cache/ftccache.h328
-rw-r--r--extras/freetype2/include/freetype/cache/ftccmap.h12
-rw-r--r--extras/freetype2/include/freetype/cache/ftcglyph.h290
-rw-r--r--extras/freetype2/include/freetype/cache/ftcimage.h304
-rw-r--r--extras/freetype2/include/freetype/cache/ftcmanag.h135
-rw-r--r--extras/freetype2/include/freetype/cache/ftcmru.h246
-rw-r--r--extras/freetype2/include/freetype/cache/ftcsbits.h263
-rw-r--r--extras/freetype2/include/freetype/config/ftconfig.h61
-rw-r--r--extras/freetype2/include/freetype/config/ftheader.h61
-rw-r--r--extras/freetype2/include/freetype/config/ftoption.h144
-rw-r--r--extras/freetype2/include/freetype/config/ftstdlib.h28
-rw-r--r--extras/freetype2/include/freetype/freetype.h423
-rw-r--r--extras/freetype2/include/freetype/ftbbox.h8
-rw-r--r--extras/freetype2/include/freetype/ftbdf.h84
-rw-r--r--extras/freetype2/include/freetype/ftcache.h505
-rw-r--r--extras/freetype2/include/freetype/fterrdef.h4
-rw-r--r--extras/freetype2/include/freetype/ftglyph.h104
-rw-r--r--extras/freetype2/include/freetype/ftgzip.h56
-rw-r--r--extras/freetype2/include/freetype/ftimage.h63
-rw-r--r--extras/freetype2/include/freetype/ftincrem.h21
-rw-r--r--extras/freetype2/include/freetype/ftlist.h8
-rw-r--r--extras/freetype2/include/freetype/ftlzw.h99
-rw-r--r--extras/freetype2/include/freetype/ftmac.h44
-rw-r--r--extras/freetype2/include/freetype/ftmm.h15
-rw-r--r--extras/freetype2/include/freetype/ftmodapi.h319
-rw-r--r--extras/freetype2/include/freetype/ftmoderr.h41
-rw-r--r--extras/freetype2/include/freetype/ftoutln.h76
-rw-r--r--extras/freetype2/include/freetype/ftpfr.h102
-rw-r--r--extras/freetype2/include/freetype/ftsizes.h12
-rw-r--r--extras/freetype2/include/freetype/ftsnames.h8
-rw-r--r--extras/freetype2/include/freetype/ftstroke.h686
-rw-r--r--extras/freetype2/include/freetype/ftsynth.h8
-rw-r--r--extras/freetype2/include/freetype/fttrigon.h24
-rw-r--r--extras/freetype2/include/freetype/ftwinfnt.h146
-rw-r--r--extras/freetype2/include/freetype/ftxf86.h11
-rw-r--r--extras/freetype2/include/freetype/internal/ftcalc.h38
-rw-r--r--extras/freetype2/include/freetype/internal/ftdebug.h50
-rw-r--r--extras/freetype2/include/freetype/internal/ftdriver.h22
-rw-r--r--extras/freetype2/include/freetype/internal/ftgloadr.h16
-rw-r--r--extras/freetype2/include/freetype/internal/ftmemory.h17
-rw-r--r--extras/freetype2/include/freetype/internal/ftobjs.h181
-rw-r--r--extras/freetype2/include/freetype/internal/ftrfork.h184
-rw-r--r--extras/freetype2/include/freetype/internal/ftserv.h260
-rw-r--r--extras/freetype2/include/freetype/internal/ftstream.h13
-rw-r--r--extras/freetype2/include/freetype/internal/fttrace.h17
-rw-r--r--extras/freetype2/include/freetype/internal/internal.h14
-rw-r--r--extras/freetype2/include/freetype/internal/pcftypes.h2
-rw-r--r--extras/freetype2/include/freetype/internal/psaux.h38
-rw-r--r--extras/freetype2/include/freetype/internal/pshints.h18
-rw-r--r--extras/freetype2/include/freetype/internal/services/svbdf.h57
-rw-r--r--extras/freetype2/include/freetype/internal/services/svgldict.h60
-rw-r--r--extras/freetype2/include/freetype/internal/services/svmm.h68
-rw-r--r--extras/freetype2/include/freetype/internal/services/svpfr.h65
-rw-r--r--extras/freetype2/include/freetype/internal/services/svpostnm.h58
-rw-r--r--extras/freetype2/include/freetype/internal/services/svpscmap.h113
-rw-r--r--extras/freetype2/include/freetype/internal/services/svpsinfo.h55
-rw-r--r--extras/freetype2/include/freetype/internal/services/svsfnt.h69
-rw-r--r--extras/freetype2/include/freetype/internal/services/svttcmap.h77
-rw-r--r--extras/freetype2/include/freetype/internal/services/svwinfnt.h50
-rw-r--r--extras/freetype2/include/freetype/internal/services/svxf86nm.h55
-rw-r--r--extras/freetype2/include/freetype/internal/sfnt.h176
-rw-r--r--extras/freetype2/include/freetype/internal/t1types.h28
-rw-r--r--extras/freetype2/include/freetype/internal/tttypes.h337
-rw-r--r--extras/freetype2/include/freetype/t1tables.h16
-rw-r--r--extras/freetype2/include/freetype/ttnameid.h32
-rw-r--r--extras/freetype2/include/freetype/tttables.h95
-rw-r--r--extras/freetype2/include/freetype/tttags.h6
-rw-r--r--extras/freetype2/include/freetype/ttunpat.h59
-rw-r--r--extras/freetype2/objs/.cvsignore1
-rw-r--r--extras/freetype2/src/autofit/Jamfile18
-rw-r--r--extras/freetype2/src/autofit/afangles.c214
-rw-r--r--extras/freetype2/src/autofit/afdummy.c35
-rw-r--r--extras/freetype2/src/autofit/afdummy.h18
-rw-r--r--extras/freetype2/src/autofit/afglobal.c236
-rw-r--r--extras/freetype2/src/autofit/afglobal.h41
-rw-r--r--extras/freetype2/src/autofit/afhints.c986
-rw-r--r--extras/freetype2/src/autofit/afhints.h246
-rw-r--r--extras/freetype2/src/autofit/aflatin.c1789
-rw-r--r--extras/freetype2/src/autofit/aflatin.h168
-rw-r--r--extras/freetype2/src/autofit/afloader.c441
-rw-r--r--extras/freetype2/src/autofit/afloader.h50
-rw-r--r--extras/freetype2/src/autofit/afmodule.c70
-rw-r--r--extras/freetype2/src/autofit/afmodule.h16
-rw-r--r--extras/freetype2/src/autofit/aftypes.h268
-rw-r--r--extras/freetype2/src/autofit/autofit.c9
-rw-r--r--extras/freetype2/src/autohint/ahglobal.c22
-rw-r--r--extras/freetype2/src/autohint/ahglobal.h16
-rw-r--r--extras/freetype2/src/autohint/ahglyph.c322
-rw-r--r--extras/freetype2/src/autohint/ahhint.c413
-rw-r--r--extras/freetype2/src/autohint/ahmodule.c4
-rw-r--r--extras/freetype2/src/autohint/ahtypes.h172
-rw-r--r--extras/freetype2/src/autohint/rules.mk35
-rw-r--r--extras/freetype2/src/base/Jamfile7
-rw-r--r--extras/freetype2/src/base/descrip.mms4
-rw-r--r--extras/freetype2/src/base/ftbase.c6
-rw-r--r--extras/freetype2/src/base/ftbbox.c6
-rw-r--r--extras/freetype2/src/base/ftbdf.c52
-rw-r--r--extras/freetype2/src/base/ftcalc.c111
-rw-r--r--extras/freetype2/src/base/ftdbgmem.c6
-rw-r--r--extras/freetype2/src/base/ftdebug.c67
-rw-r--r--extras/freetype2/src/base/ftgloadr.c25
-rw-r--r--extras/freetype2/src/base/ftglyph.c60
-rw-r--r--extras/freetype2/src/base/ftmac.c487
-rw-r--r--extras/freetype2/src/base/ftmm.c89
-rw-r--r--extras/freetype2/src/base/ftobjs.c1011
-rw-r--r--extras/freetype2/src/base/ftoutln.c151
-rw-r--r--extras/freetype2/src/base/ftpfr.c111
-rw-r--r--extras/freetype2/src/base/ftrfork.c717
-rw-r--r--extras/freetype2/src/base/ftstream.c8
-rw-r--r--extras/freetype2/src/base/ftstroke.c1906
-rw-r--r--extras/freetype2/src/base/ftsynth.c13
-rw-r--r--extras/freetype2/src/base/fttrigon.c28
-rw-r--r--extras/freetype2/src/base/fttype1.c55
-rw-r--r--extras/freetype2/src/base/ftwinfnt.c30
-rw-r--r--extras/freetype2/src/base/ftxf86.c51
-rw-r--r--extras/freetype2/src/base/rules.mk58
-rw-r--r--extras/freetype2/src/bdf/bdf.h8
-rw-r--r--extras/freetype2/src/bdf/bdfdrivr.c373
-rw-r--r--extras/freetype2/src/bdf/bdfdrivr.h6
-rw-r--r--extras/freetype2/src/bdf/bdflib.c45
-rw-r--r--extras/freetype2/src/bdf/rules.mk27
-rw-r--r--extras/freetype2/src/cache/Jamfile12
-rw-r--r--extras/freetype2/src/cache/descrip.mms5
-rw-r--r--extras/freetype2/src/cache/ftcache.c8
-rw-r--r--extras/freetype2/src/cache/ftcbasic.c425
-rw-r--r--extras/freetype2/src/cache/ftccache.c841
-rw-r--r--extras/freetype2/src/cache/ftccback.h82
-rw-r--r--extras/freetype2/src/cache/ftccmap.c406
-rw-r--r--extras/freetype2/src/cache/ftcglyph.c141
-rw-r--r--extras/freetype2/src/cache/ftcimage.c358
-rw-r--r--extras/freetype2/src/cache/ftcmanag.c652
-rw-r--r--extras/freetype2/src/cache/ftcmru.c355
-rw-r--r--extras/freetype2/src/cache/ftcsbits.c592
-rw-r--r--extras/freetype2/src/cache/rules.mk62
-rw-r--r--extras/freetype2/src/cff/Jamfile2
-rw-r--r--extras/freetype2/src/cff/cff.c2
-rw-r--r--extras/freetype2/src/cff/cffcmap.c60
-rw-r--r--extras/freetype2/src/cff/cffcmap.h3
-rw-r--r--extras/freetype2/src/cff/cffdrivr.c197
-rw-r--r--extras/freetype2/src/cff/cffgload.c280
-rw-r--r--extras/freetype2/src/cff/cffgload.h4
-rw-r--r--extras/freetype2/src/cff/cffload.c218
-rw-r--r--extras/freetype2/src/cff/cffload.h14
-rw-r--r--extras/freetype2/src/cff/cffobjs.c317
-rw-r--r--extras/freetype2/src/cff/cffobjs.h28
-rw-r--r--extras/freetype2/src/cff/cffparse.c11
-rw-r--r--extras/freetype2/src/cff/cffparse.h4
-rw-r--r--extras/freetype2/src/cff/cfftoken.h50
-rw-r--r--extras/freetype2/src/cff/cfftypes.h255
-rw-r--r--extras/freetype2/src/cff/rules.mk37
-rw-r--r--extras/freetype2/src/cid/cidgload.c69
-rw-r--r--extras/freetype2/src/cid/cidload.c288
-rw-r--r--extras/freetype2/src/cid/cidload.h10
-rw-r--r--extras/freetype2/src/cid/cidobjs.c164
-rw-r--r--extras/freetype2/src/cid/cidparse.c61
-rw-r--r--extras/freetype2/src/cid/cidparse.h13
-rw-r--r--extras/freetype2/src/cid/cidriver.c63
-rw-r--r--extras/freetype2/src/cid/cidtoken.h33
-rw-r--r--extras/freetype2/src/cid/rules.mk34
-rw-r--r--extras/freetype2/src/gzip/ftgzip.c289
-rw-r--r--extras/freetype2/src/gzip/infblock.c3
-rw-r--r--extras/freetype2/src/gzip/inffixed.h8
-rw-r--r--extras/freetype2/src/gzip/inftrees.c12
-rw-r--r--extras/freetype2/src/gzip/inftrees.h4
-rw-r--r--extras/freetype2/src/gzip/infutil.c2
-rw-r--r--extras/freetype2/src/gzip/infutil.h2
-rw-r--r--extras/freetype2/src/gzip/rules.mk27
-rw-r--r--extras/freetype2/src/gzip/zutil.h4
-rw-r--r--extras/freetype2/src/lzw/Jamfile9
-rw-r--r--extras/freetype2/src/lzw/ftlzw.c463
-rw-r--r--extras/freetype2/src/lzw/rules.mk70
-rw-r--r--extras/freetype2/src/lzw/zopen.c396
-rw-r--r--extras/freetype2/src/lzw/zopen.h114
-rw-r--r--extras/freetype2/src/otlayout/otlgsub.c8
-rw-r--r--extras/freetype2/src/pcf/Jamfile4
-rw-r--r--extras/freetype2/src/pcf/pcf.c4
-rw-r--r--extras/freetype2/src/pcf/pcf.h8
-rw-r--r--extras/freetype2/src/pcf/pcfdrivr.c621
-rw-r--r--extras/freetype2/src/pcf/pcfdrivr.h44
-rw-r--r--extras/freetype2/src/pcf/pcfread.c281
-rw-r--r--extras/freetype2/src/pcf/pcfread.h4
-rw-r--r--extras/freetype2/src/pcf/pcfutil.c93
-rw-r--r--extras/freetype2/src/pcf/pcfutil.h15
-rw-r--r--extras/freetype2/src/pcf/rules.mk36
-rw-r--r--extras/freetype2/src/pfr/Jamfile2
-rw-r--r--extras/freetype2/src/pfr/pfrdrivr.c132
-rw-r--r--extras/freetype2/src/pfr/pfrgload.c6
-rw-r--r--extras/freetype2/src/pfr/pfrload.c380
-rw-r--r--extras/freetype2/src/pfr/pfrobjs.c295
-rw-r--r--extras/freetype2/src/pfr/pfrobjs.h12
-rw-r--r--extras/freetype2/src/pfr/pfrsbit.c40
-rw-r--r--extras/freetype2/src/pfr/pfrtypes.h14
-rw-r--r--extras/freetype2/src/pfr/rules.mk34
-rw-r--r--extras/freetype2/src/psaux/psauxmod.c7
-rw-r--r--extras/freetype2/src/psaux/psobjs.c810
-rw-r--r--extras/freetype2/src/psaux/psobjs.h20
-rw-r--r--extras/freetype2/src/psaux/rules.mk29
-rw-r--r--extras/freetype2/src/psaux/t1cmap.c30
-rw-r--r--extras/freetype2/src/psaux/t1cmap.h19
-rw-r--r--extras/freetype2/src/psaux/t1decode.c49
-rw-r--r--extras/freetype2/src/psaux/t1decode.h3
-rw-r--r--extras/freetype2/src/pshinter/Jamfile4
-rw-r--r--extras/freetype2/src/pshinter/pshalgo.c2091
-rw-r--r--extras/freetype2/src/pshinter/pshalgo.h236
-rw-r--r--extras/freetype2/src/pshinter/pshglob.c51
-rw-r--r--extras/freetype2/src/pshinter/pshglob.h11
-rw-r--r--extras/freetype2/src/pshinter/pshinter.c6
-rw-r--r--extras/freetype2/src/pshinter/pshnterr.h40
-rw-r--r--extras/freetype2/src/pshinter/pshrec.c46
-rw-r--r--extras/freetype2/src/pshinter/pshrec.h6
-rw-r--r--extras/freetype2/src/pshinter/rules.mk32
-rw-r--r--extras/freetype2/src/psnames/psmodule.c113
-rw-r--r--extras/freetype2/src/psnames/pstables.h8836
-rw-r--r--extras/freetype2/src/psnames/rules.mk25
-rw-r--r--extras/freetype2/src/raster/ftraster.c10
-rw-r--r--extras/freetype2/src/raster/ftrend1.c26
-rw-r--r--extras/freetype2/src/raster/rules.mk53
-rw-r--r--extras/freetype2/src/sfnt/Jamfile4
-rw-r--r--extras/freetype2/src/sfnt/rules.mk34
-rw-r--r--extras/freetype2/src/sfnt/sfdriver.c111
-rw-r--r--extras/freetype2/src/sfnt/sfnt.c3
-rw-r--r--extras/freetype2/src/sfnt/sfobjs.c67
-rw-r--r--extras/freetype2/src/sfnt/ttcmap0.c287
-rw-r--r--extras/freetype2/src/sfnt/ttcmap0.h10
-rw-r--r--extras/freetype2/src/sfnt/ttload.c75
-rw-r--r--extras/freetype2/src/sfnt/ttpost.c10
-rw-r--r--extras/freetype2/src/sfnt/ttsbit.c52
-rw-r--r--extras/freetype2/src/sfnt/ttsbit.h19
-rw-r--r--extras/freetype2/src/smooth/ftgrays.c12
-rw-r--r--extras/freetype2/src/smooth/ftsmooth.c31
-rw-r--r--extras/freetype2/src/smooth/rules.mk27
-rw-r--r--extras/freetype2/src/tools/docmaker/.cvsignore1
-rwxr-xr-xextras/freetype2/src/tools/docmaker/content.py50
-rwxr-xr-xextras/freetype2/src/tools/docmaker/docbeauty.py109
-rwxr-xr-xextras/freetype2/src/tools/docmaker/docmaker.py52
-rwxr-xr-xextras/freetype2/src/tools/docmaker/formatter.py9
-rwxr-xr-xextras/freetype2/src/tools/docmaker/sources.py8
-rwxr-xr-xextras/freetype2/src/tools/docmaker/tohtml.py101
-rwxr-xr-xextras/freetype2/src/tools/docmaker/utils.py43
-rwxr-xr-xextras/freetype2/src/tools/glnames.py5376
-rw-r--r--extras/freetype2/src/truetype/rules.mk32
-rw-r--r--extras/freetype2/src/truetype/ttdriver.c73
-rw-r--r--extras/freetype2/src/truetype/ttgload.c439
-rw-r--r--extras/freetype2/src/truetype/ttgload.h6
-rw-r--r--extras/freetype2/src/truetype/ttinterp.c530
-rw-r--r--extras/freetype2/src/truetype/ttinterp.h3
-rw-r--r--extras/freetype2/src/truetype/ttobjs.c89
-rw-r--r--extras/freetype2/src/truetype/ttobjs.h11
-rw-r--r--extras/freetype2/src/type1/rules.mk36
-rw-r--r--extras/freetype2/src/type1/t1afm.c4
-rw-r--r--extras/freetype2/src/type1/t1driver.c162
-rw-r--r--extras/freetype2/src/type1/t1gload.c55
-rw-r--r--extras/freetype2/src/type1/t1gload.h4
-rw-r--r--extras/freetype2/src/type1/t1load.c989
-rw-r--r--extras/freetype2/src/type1/t1objs.c115
-rw-r--r--extras/freetype2/src/type1/t1parse.c205
-rw-r--r--extras/freetype2/src/type1/t1parse.h12
-rw-r--r--extras/freetype2/src/type1/t1tokens.h32
-rw-r--r--extras/freetype2/src/type42/rules.mk28
-rw-r--r--extras/freetype2/src/type42/t42drivr.c118
-rw-r--r--extras/freetype2/src/type42/t42error.h4
-rw-r--r--extras/freetype2/src/type42/t42objs.c93
-rw-r--r--extras/freetype2/src/type42/t42objs.h8
-rw-r--r--extras/freetype2/src/type42/t42parse.c895
-rw-r--r--extras/freetype2/src/type42/t42parse.h11
-rw-r--r--extras/freetype2/src/type42/t42types.h54
-rw-r--r--extras/freetype2/src/winfonts/rules.mk24
-rw-r--r--extras/freetype2/src/winfonts/winfnt.c397
-rw-r--r--extras/freetype2/src/winfonts/winfnt.h70
-rw-r--r--extras/freetype2/tests/gview.c784
-rw-r--r--extras/freetype2/vms_make.com549
371 files changed, 72488 insertions, 20447 deletions
diff --git a/extras/freetype2/ChangeLog b/extras/freetype2/ChangeLog
index 291703888..587f83ef1 100644
--- a/extras/freetype2/ChangeLog
+++ b/extras/freetype2/ChangeLog
@@ -1,188 +1,3701 @@
+2004-04-21 David Turner <david@freetype.org>
+
+ * src/cff/cffobjs.c (cff_face_init): fixed a small memory leak
+
+ * src/autofit/afloader.c, src/autofit/afmodule.c, src/base/ftdebug.c:
+ removed compiler warnings
+
+ * src/autofit/aftypes.h, src/lzw/zopen.c, src/pcf/pcfdrivr.c,
+ src/pcf/pcfread.c, src/psaux/psobjs.c, src/type42/t42drivr.c:
+ changed data arrays to "const" to avoid populating the ".data"
+ segment
+
+2004-04-20 Werner Lemberg <wl@gnu.org>
+
+ * src/psaux/psobjs.c (T1Radix): Renamed to...
+ (ps_radix): This.
+ Update current cursor position.
+
+ * docs/CHANGES: Updated.
+
+2004-04-18 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c, src/truetype/ttgload.h (TT_Load_Glyph),
+ src/ttdriver.c (Load_Glyph): Change type of `glyph_index' to
+ FT_UInt. From Lex Warners.
+
+2004-04-17 Chisato Yamauchi <cyamauch@a.phys.nagoya-u.ac.jp>
+
+ * src/sfnt/ttload.c (tt_face_load_sfnt_header): Really fix change
+ from 2004-03-19.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Use `ft_strlen'.
+
+ * src/pcf/pcfutil.c, src/pcf/pcfutil.h: Decorate functions with
+ `static.'.
+ Remove unused function `RepadBitmap'.
+ * src/pcf/pcfdrivr.c: Don't include pcfutil.h.
+
+2004-04-16 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/freetype-config.in (usage): Fix and improve usage
+ information.
+
+2004-04-15 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/ftconfig.in, builds/vms/ftconfig.h: Define
+ FT_CHAR_BIT.
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Don't apply autohinting if
+ glyph is vertically distorted or mirrored.
+
+ * src/cff/cffgload.c (cff_slot_load): Handle zero `size' properly
+ for embedded bitmaps.
+
+ * docs/CHANGES: Updated.
+
+2004-04-15 bytesoftware <bytesoftware@btinternet.com>
+
+ * include/freetype/config/ftconfig.h, src/base/ftstream.c
+ (FT_Stream_ReadFields): More fixes using FT_CHAR_BIT.
+
+2004-04-14 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftconfig.h (FT_CHAR_BIT): New macro.
+
+2004-04-14 Alex Strelnikov <ptktyrf@mail.ru>
+
+ * src/cache/ftcsbits.c (ftc_snode_load): Initialize `*asize' in case
+ of error.
+
+2004-04-14 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftmac.c [__GNUC__]: Define OS_INLINE.
+ * builds/unix/configure.ac: Don't try to remove `-ansi' compilation
+ switch on the Mac.
+
+ * builds/unix/ltmain.sh: Regenerated with `libtoolize --force
+ --copy' from libtool 1.5.6.
+ * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from
+ automake 1.8a.
+ * builds/unix/configure: Regenerated with autoconf 2.59a.
+
+2004-04-13 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftconfig.h: Use CHAR_BIT to define
+ size of FT_SIZEOF_xxx.
+
+2004-04-12 Chisato Yamauchi <cyamauch@a.phys.nagoya-u.ac.jp>
+
+ * include/freetype/internal/sfnt.h (TT_Find_SBit_Image_Func,
+ TT_Load_SBit_Metrics_Func): New typedefs.
+ (SFNT_Interface): Add find_sbit_image and load_sbit_metrics.
+
+ * src/sfnt/sfdriver.c (sfnt_interface): Updated.
+ * src/sfnt/ttsbit.h (tt_find_sbit_image, tt_load_sbit_metrics): New
+ declarations.
+ * src/sfnt/ttsbit.c (find_sbit_image): Renamed to...
+ (tt_find_sbit_image): This.
+ Updated all callers.
+ (load_sbit_metrics): Renamed to...
+ (tt_load_sbit_metrics): This.
+ Updated all callers.
+
+2004-04-12 Werner Lemberg <wl@gnu.org>
+
+ * configure: Accept makepp also.
+
+ * builds/unix/detect.mk: Use proper path to unix-def.mk.
+ * builds/unix/unix-def.in (BUILD_DIR, PLATFORM): Remove.
+ * builds/unix/unix.mk (BUILD_DIR, PLATFORM): Define.
+ Use BUILD_DIR.
+
+ * docs/INSTALL, docs/INSTALL.GNU, docs/INSTALL.UNX: Update
+ documentation on makepp.
+
+2004-04-11 Werner Lemberg <wl@gnu.org>
+
+ * src/lzw/zopen.c: Don't include sys/param.h and sys/stat.h.
+
+2004-04-10 Werner Lemberg <wl@gnu.org>
+
+ * src/lzw/ftlzw.c: Include zopen.h dependent on
+ FT_CONFIG_OPTION_USE_LZW.
+
+ * src/base/ftdebug.c: s/index/idx/ to avoid compiler warnings.
+
+2004-04-02 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/ltmain.sh: Regenerated with `libtoolize --force
+ --copy' from libtool 1.5.2.
+ * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from
+ automake 1.8a.
+ * builds/unix/configure: Regenerated with autoconf 2.59a.
+
+2004-04-01 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/ft-munmap.m4 (FT_MUNMAP_PARAM): Fix arguments of
+ AC_COMPILE_IFELSE.
+ * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from
+ automake 1.8a.
+ * builds/unix/configure: Regenerated with autoconf 2.59a.
+ * builds/unix/config.guess, builds/unix/config.sub: Updated from
+ `config' CVS module at subversions.gnu.org
+ * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
+ `texinfo' CVS module at subversions.gnu.org.
+ * builds/freetype.mk (refdoc): Updated.
+
+2004-03-31 Werner Lemberg <wl@gnu.org>
+
+ Handle broken FNT files which don't have a trailing NULL byte
+ in the face name string.
+
+ * src/winfnt/winfnt.h (FNT_FontRec): New member `family_name'.
+ * src/winfnt/winfnt.c (fnt_font_done): Free font->family_name.
+ (FNT_Face_Init): Append a final zero byte to the font face name.
+
+2004-03-30 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttload.c (tt_face_load_sfnt_header): Fix change from
+ 2004-03-19.
+
+2004-03-27 Werner Lemberg <wl@gnu.org>
+
+ * src/base/descrip.mms (OBJS): Add ftbbox.obj.
+
+2004-03-26 George Williams <gww@silcom.com>
+
+ Add vertical phantom points.
+
+ * include/freetype/internal/tttypes.h (TT_LoaderRec): Add
+ `top_bearing', `vadvance', `pp3, and `pp4'.
+
+ * src/autofit/afloader.c (af_loader_load_g): Handle two more points.
+
+ * src/autohint/ahhint.c (ah_hinter_load): Handle two more points.
+ * src/truetype/ttgload.c (Get_VMetrics): New function.
+ (TT_Load_Simple_Glyph, TT_Process_Simple_Glyph): Handle two more
+ points.
+ (load_truetype_glyph): Use Get_VMetrics.
+ Handle two more points.
+ (compute_glyph_metrics): Thanks to vertical phantom points we now
+ can always compute `advance_height' and `top_bearing'.
+ * src/truetype/ttobjs.h (TT_SubglyphRec): Add vertical phantom
+ points.
+
+
+ * src/autohint/ahglyph.c (ah_outline_load): Fix allocation of
+ `news'.
+
+2004-03-21 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Fix left side bearing.
+
+2004-03-20 Steve Hartwell <shspamsink@comcast.net>
+
+ * src/cache/ftcmru.c (FTC_MruList_RemoveSelection): Handle a NULL
+ value for `selection' as `select all'.
+
+2004-03-19 Steve Hartwell <shspamsink@comcast.net>
+
+ * src/sfnt/ttload.c (tt_face_load_sfnt_header): Reject face_index
+ values > 0 if loading non-TTC fonts.
+
+ * src/base/ftmac.c (open_face_from_buffer): Set positive face_index
+ to zero before calling FT_Open_Face.
+
+ * docs/CHANGES: Updated.
+
+2004-03-04 Werner Lemberg <wl@gnu.org>
+
+ * Jamfile, vms_make.com, builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype/vcproj, include/freetype/ftmoderr.h:
+ Add LZW module.
+
+ * Jamfile.in: Removed.
+
+ * docs/CHANGES: Updated.
+
+ * include/freetype/internal/ftobjs.h: s/MIN/FT_MIN/, s/MAX/FT_MAX/,
+ s/ABS/FT_ABS/. Updated all callers.
+
+ * src/type1/t1load.c (parse_dict), src/pcf/pcfdrivr.c
+ (PCF_Face_Init): Use FT_ERROR_BASE.
+
+2004-03-04 Albert Chin <china@thewrittenword.com>
+
+ Add support for PCF fonts compressed with LZW (extension .pcf.Z,
+ created with `compress').
+
+ * include/freetype/config/ftoption.h, devel/ftoption.h
+ (FT_CONFIG_OPTION_USE_LZW): New macro.
+
+ * include/freetype/ftlzw.h: New file.
+ * include/freetype/config/ftheader.h (FT_LZW_H): New macro for
+ ftlzw.h.
+
+ * src/lzw/*: New files.
+
+ * src/pcf/pcfdrivr.c: Include FT_LZW_H.
+ (PCF_Face_Init): Try LZW also.
+
+ * src/gzip/ftgzip.c: s/0/Gzip_Err_Ok/ where appropriate.
+ Beautify.
+
+2004-03-03 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshalgo.c (psh_hint_table_init): Simplify code.
+
+2004-03-02 Werner Lemberg <wl@gnu.org>
+
+ Add embedded bitmap support to CFF driver.
+
+ * src/cff/cffobjs.h (CFF_SizeRec): New structure.
+
+ * src/cff/cffgload.c (cff_builder_init): Updated.
+ (cff_slot_load): Updated.
+ [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Load sbit.
+
+ * src/cff/cffobjs.c (sbit_size_reset)
+ [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: New function.
+ (cff_size_get_globals_funcs, cff_size_done, cff_size_init): Updated.
+ (cff_size_reset): Updated.
+ [TT_CONFIG_OPTION_EMBEDDED_BITMAPS]: Call sbit_size_reset.
+
+ * src/cff/cffdrivr.c (Load_Glyph): Updated.
+ (cff_driver_class): Use CFF_SizeRec.
+
+ * docs/CHANGES: Updated.
+
+2004-03-01 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshglob.c (psh_globals_scale_widths): Don't use
+ FT_RoundFix but FT_PIX_ROUND.
+ (psh_blues_snap_stem): Don't use blue_shift but blue_threshold.
+
+ * src/pshinter/pshalgo.c (PSH_STRONG_THRESHOLD_MAXIMUM): New macro.
+ (psh_glyph_find_string_points): Use PSH_STRONG_THRESHOLD_MAXIMUM.
+ (psh_glyph_find_blue_points): New function. Needed for fonts like
+ p052003l.pfb (URW Palladio L Roman) which have flex curves at the
+ base line within blue zones, but the flex curves aren't covered by
+ hints.
+ (ps_hints_apply): Use psh_glyph_find_blue_points.
+
+2004-02-27 Garrick Meeker <garrick@digitalanarchy.com>
+
+ * builds/unix/configure.ac: Fix compiler flags for
+ `--with-old-mac-fonts'.
+ * builds/unix/configure: Regenerated.
+
+ * src/base/ftmac.c: s/TARGET_API_MAC_CARBON/!TARGET_API_MAC_OS8/.
+ (FT_New_Face_From_Resource): New function.
+ (FT_New_Face): Use FT_New_Face_From_Resource.
+ (FT_New_Face_From_FSSpec): Use FT_New_Face_From_Resource.
+ [__MWERKS__]: Don't include FSp_fopen.h.
+
+2004-02-26 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshglob.c (psh_globals_new): Fix value of
+ `dim->stdw.count'.
+ Don't assign default values to blue scale and blue shift.
+
+2004-02-25 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2004-02-25 Garrick Meeker <garrick@digitalanarchy.com>
+ Steve Hartwell <shspamsink@comcast.net>
+
+ Improve MacOS fond support. Provide a new API
+ `FT_New_Face_From_FSSpec' similar to `FT_New_Face'.
+
+ * src/base/ftmac.c [__MWERKS__]: Include FSp_fpopen.h.
+ STREAM_FILE [__MWERKS__]: New macro.
+ (ft_FSp_stream_close, ft_FSp_stream_io) [__MWERKS__]: New functions.
+ (file_spec_from_path) [__MWERKS__]: Updated #if statement.
+ (get_file_type, make_lwfn_spec): Use `const' for argument.
+ (is_dfont) [TARGET_API_MAC_CARBON]: Removed.
+ (count_face_sfnt, count_faces): New functions.
+ (parse_fond): Do some range checking.
+ (read_lwfn): Change type of second argument.
+ No longer call FSpOpenResFile.
+ (OpenFileAsResource): New function.
+ (FT_New_Face_From_LWFN): Use `const' for second argument.
+ Use OpenFileAsResource.
+ (FT_New_Face_From_Suitcase): Change type of second argument.
+ No longer call FSpOpenResFile.
+ Loop over all resource indices.
+ (FT_New_Face_From_dfont) [TARGET_API_MAC_CARBON]: Removed.
+ (FT_GetFile_From_Mac_Name): Use `const' for first argument.
+ (ResourceForkSize): Removed.
+ (FT_New_Face): Updated to use new functions.
+ (FT_New_Face_From_FSSpec): New function.
+
+ * include/freetype/ftmac.h: Updated.
+
+2004-02-24 Malcolm Taylor <mtaylor@clear.net.nz>
+
+ * src/autohint/ahhint.c (ah_hinter_load) <FT_GLYPH_FORMAT_OUTLINE>:
+ Handle case where outline->num_vedges is zero while computing hinted
+ metrics.
+
+2004-02-24 Gordon Childs <gchilds@quickcut.com.au>
+
+ * src/cff/cffcmap.c (cff_cmap_unicode_init): Provide correct value
+ for `count'.
+
+2004-02-24 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/t1tables.h (PS_PrivateRec): Add
+ `expansion_factor'.
+
+ * src/pshinter/pshglob (psh_blues_scale_zones): Fix computation
+ of blues->no_overshoots -- `blues_scale' is stored with a
+ magnification of 1000, and `scale' returns fractional pixels.
+
+ * src/type1/t1load.c (T1_Open_Face): Initialize `blue_shift',
+ `blue_fuzz', `expansion_factor', and `blue_scale' according to the
+ Type 1 specification.
+
+ * src/type1/t1tokens.h: Handle `ExpansionFactor'.
+
+ * docs/CHANGES: Updated.
+
+2004-02-24 Masatake YAMATO <jet@gyve.org>
+
+ Provide generic access to MacOS resource forks.
+
+ * src/base/ftrfork.c, include/freetype/internal/ftrfork.h: New
+ files.
+
+ * src/base/ftobjs.c: Include FT_INTERNAL_RFORK_H.
+ (Mac_Read_POST_Resource, Mac_Read_sfnt_Resource): Remove arguments
+ `resource_listoffset' and `resource_data' and adapt code
+ accordingly. These values are calculated outside of the function
+ now.
+ Add new argument `offsets'.
+ (IsMacResource): Use `FT_Raccess_Get_HeaderInfo' and
+ `FT_Raccess_Get_DataOffsets'.
+ (load_face_in_embedded_rfork): New function.
+ (load_mac_face): Use load_face_in_embedded_rfork.
+ (ft_input_stream_new): Renamed to...
+ (FT_Stream_New): This. Use FT_BASE_DEF. Updated all callers.
+ (ft_input_stream_free): Renamed to...
+ (FT_Stream_Free): This. Use FT_BASE_DEF. Updated all callers.
+
+ * src/base/ftbase.c: Include ftrfork.c.
+
+ * src/base/rules.mk (BASE_SRC), src/base/Jamfile: Updated.
+
+ * include/freetype/internal/internal.h (FT_INTERNAL_RFORK_H):
+ New macro.
+
+ * include/freetype/internal/fttrace.h: Added `rfork' as a new
+ trace definition.
+
+ * include/freetype/internal/ftstream.h: Declare FT_Stream_New and
+ FT_Stream_Free.
+
+ * include/freetype/config/ftoption.h, devel/ftoption.h
+ (FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK): New option.
+
+ * include/freetype/config/ftstdlib.h (ft_strrchr): New macro.
+
+2004-02-23 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+ * include/freetype/internal/ftdebug.h: Include FT_FREETYPE_H.
+
+2004-02-23 Masatake YAMATO <jet@gyve.org>
+
+ Provide a simple API to control FreeType's tracing levels.
+
+ * include/freetype/internal/ftdebug.h (FT_Trace_Get_Count,
+ FT_Trace_Get_Name): New declarations.
+
+ * src/base/ftdebug.c (FT_Trace_Get_Count, FT_Trace_Get_Name): New
+ functions.
+
+2004-02-23 David Turner <david@freetype.org>
+
+ * src/autofit/afhints.c, src/autofit/afhints.h,
+ src/autofit/aflatin.c, src/autofit/afloader.c, src/types.h: Grave
+ bugs have been fixed. The auto-fitter works, doesn't crash, but
+ still produces unexpected results...
+
+2004-02-21 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshalgo.c (PSH_STRONG_THRESHOLD): Changed to hold
+ the accepted shift for strong points in fractional pixels (which
+ is a heuristic value).
+ (psh_glyph_find_strong_points): Compute threshold for
+ psh_hint_table_find_strong_points.
+ (psh_hint_table_find_strong_point): Add parameter to pass threshold.
+
+2004-02-20 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshrec.c (ps_mask_table_set_bits): Don't call
+ ps_mask_table_alloc but ps_mask_table_last.
+ (ps_hints_t2mask): Use correct position and number for vertical
+ and horizontal hinter mask bits.
+
+ * docs/CHANGES: Updated.
+
+2004-02-19 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftstroke.c (FT_Glyph_StrokeBorder): Fix enum handling.
+ * src/cff/cffdrivr.c (cff_get_cmap_info): Remove compiler warning.
+
+2004-02-18 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h: Document FT_LOAD_TARGET_XXX properly.
+
+ * src/base/ftglyph.c (ft_bitmap_glyph_class,
+ ft_outline_glyph_class): Tag with FT_CALLBACK_TABLE_DEF.
+
+ * src/smooth/ftsmooth.c (ft_smooth_render): Handle
+ FT_RENDER_MODE_LIGHT.
+
+2004-02-17 Werner Lemberg <wl@gnu.org>
+
+ Fix callback functions in cache module.
+
+ * src/cache/ftccback.h: New file for callback declarations.
+
+ * src/cache/ftcbasic.c (ftc_basic_family_compare,
+ ftc_basic_family_init, ftc_basic_family_get_count,
+ ftc_basic_family_load_bitmap, ftc_basic_family_load_glyph,
+ ftc_basic_gnode_compare_faceid): Use FT_CALLBACK_DEF.
+ (ftc_basic_image_family_class, ftc_basic_image_cache_class,
+ ftc_basic_sbit_family_class, ftc_basic_sbit_cache_class):
+ Use FT_CALLBACK_TABLE_DEF and local wrapper functions.
+
+ * src/cache/ftccache.c: Include ftccback.h.
+ (ftc_cache_init, ftc_cache_done): New wrapper functions which use
+ FT_LOCAL_DEF.
+
+ * src/cache/ftccmap.c: Include ftccback.h.
+ (ftc_cmap_cache_class): Use local wrapper functions.
+
+ * src/cache/ftcglyph.c: Include ftccback.h.
+ (ftc_gnode_compare, ftc_gcache_init, ftc_gcache_done): New wrapper
+ functions which use FT_LOCAL_DEF.
+
+ * src/cache/ftcimage.c: Include ftccback.h.
+ (ftc_inode_free, ftc_inode_new, ftc_inode_weight): New wrapper
+ functions which use FT_LOCAL_DEF.
+
+ * src/cache/ftcmanag.c (ftc_size_list_class, ftc_face_list_class):
+ Use FT_CALLBACK_TABLE_DEF.
+
+ * src/cache;/ftcsbits.c: Include ftccback.h.
+ (ftc_snode_free, ftc_snode_new, ftc_snode_weight,
+ ftc_snode_compare): New wrapper functions which use FT_LOCAL_DEF.
+
+ * src/cache/rules.mk (CACHE_DRV_H): Add ftccback.h.
+
+2004-02-17 Masatake YAMATO <jet@gyve.org>
+
+ * include/freetype/ftmac.h (FT_GetFile_From_Mac_Name): Fix a typo
+ (FT_EXPORT_DEF -> FT_EXPORT).
+
+ * include/freetype/ftxf86.h (FT_Get_X11_Font_Format): Ditto.
+
+2004-02-15 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Set_Char_Size): Fix typo.
+
+2004-02-14 Masatake YAMATO <jet@gyve.org>
+
+ * builds/unix/ftsystem.c: Include errno.h.
+ (ft_close_stream): Renamed to...
+ (ft_close_stream_by_munmap): This.
+ (ft_close_stream_by_free): New function.
+ (FT_Stream_Open): Use fallback method if mmap fails.
+ Use proper function for closing the stream.
+
+2004-02-14 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_dict): Initialize `start_binary'.
+
+2004-02-13 Robert Etheridge <roberte@stcc.cc.tx.us>
+
+ * src/type42/t42objs.c (T42_Face_Init), src/type1/t1objs.c
+ (T1_Face_Init), src/cid/cidobjs.c (cid_face_init): Fix computation
+ of underline_position and underline_thickness.
+
+2004-02-12 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Set_Char_Size): Return immediately if
+ ppem values don't change. Suggested by Graham Asher.
+
+2004-02-11 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidload.c (cid_face_open): Always allocate
+ face->cid_stream so that we can deallocate it safely.
+
+2004-02-10 Werner Lemberg <wl@gnu.org>
+
+ Make the PS parser more tolerant w.r.t. non-standard font data. In
+ general, an error is only reported in case of a syntax error; a
+ wrong type is now simply ignored (if possible). To be independent
+ of the order of various MM-specific keywords, the parse_shared_dict
+ routine has been removed -- the PS parser is now capable to skip
+ this data. It no longer fails on parsing e.g.
+
+ dup /WeightVector exch def
+
+ Since the token following /WeightVector isn't `[' (starting an
+ array) it is simply ignored.
+
+ * include/freetype/fterrdef.h: Define `FT_Err_Ignore' (0xA2) as a
+ new internal error value.
+
+ * src/type1/t1load.c (parse_blend_axis_types,
+ parse_blend_design_positions, parse_blend_design_map): Return
+ T1_Err_Ignore if no proper array is following the keyword.
+ (parse_weight_vector): Use T1_ToTokenArray, initializing `blend'
+ structure, if necessary.
+ Return T1_Err_Ignore if no proper array is following the keyword.
+ (parse_shared_dict): Removed.
+ (parse_encoding): Set parser->root.error to return T1_Err_Ignore
+ if no result can be obtained.
+ Check for errors before accessing `elements' array.
+ (t1_keywords): Remove /shareddict.
+ (parse_dict): Reset error if t1_load_keyword returns T1_Err_Ignore.
+ Set keyword_flag only in case of success.
+ Check error code if skipping an unrecognized token.
+ (T1_Open_Face) [!T1_CONFIG_OPTION_NO_MM_SUPPORT]: Call T1_Done_Blend
+ if blend commands haven't set up a proper MM font.
+
+ * src/psaux/psobjs.c (ps_parser_load_field_table): Remove special
+ code for synthetic fonts.
+ Return PSaux_Err_Ignore if no proper value has been found.
+
+2004-02-09 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_endchar>: Preserve glyph width before calling
+ cff_operator_seac.
+
+2004-02-09 Martin Muskens <mmuskens@aurelon.com>
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings): Handle special
+ first argument for `hintmask' and `cntrmask' operators also.
+
+2004-02-08 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/configure.in: Call AC_SUBST for `enable_shared',
+ `hardcode_libdir_flag_spec', and `wl'.
+ * builds/unix/configure: Regenerated.
+
+ * builds/unix/freetype-config.in: Make --prefix and --exec-prefix
+ actually work.
+ Report a proper --rpath (or -R) value for --libs argument if a
+ shared library has been built.
+
+ * docs/CHANGES: Updated.
+
+2004-02-07 Keith Packard <keithp@keithp.com>
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init, BDF_Set_Pixel_Size): Fix
+ computation of various vertical and horizontal metric values.
+
+ * src/pcfdrivr.c (PCF_Set_Pixel_Size), src/pcfread (pcf_load_font):
+ Ditto.
+
+2004-02-07 Werner Lemberg <wl@gnu.org>
+
+ * builds/win32/visualc/index.html,
+ builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype.dsw, docs/CHANGES: Updated.
+
+2004-02-07 Vitaliy Pasternak <v_a_pasternak@mail.ru>
+
+ * builds/win32/visualc/freetype.sln,
+ builds/win32/visualc/freetype.vcproj: New files for VS.NET 2003.
+
+2004-02-03 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP):
+ Initialize `node'.
+ * src/type1/t1load.c (parse_dict): Initialize `have_integer'.
+
+2004-02-02 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_dict): Handle `RD' and `-|' commands
+ outside of /Subrs or /CharStrings. This can happen if there is
+ additional code manipulating those two arrays so that FreeType
+ doesn't recognize them properly.
+ (T1_Open_Face): Improve an error message.
+
+2004-02-01 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_charstrings): Exit immediately if
+ there are no elements in /CharStrings. This is needed for fonts
+ like Optima-Oblique which not only define /CharStrings but access it
+ also.
+
+2004-02-01 David Turner <david@freetype.org>
+
+ * src/sfnt/Jamfile: Removing `ttcmap' from the list of sources.
+
+ * include/freetype/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP)
+ <FTC_INLINE>: Provide macro version which doesn't use inline code.
+ * include/freetype/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP)
+ <FTC_INLINE>: Ditto.
+ Use FTC_MRULIST_LOOKUP_CMP.
+ * include/freetype/cache/ftcmru.h (FTC_MRULIST_LOOKUP_CMP): New
+ macro.
+ (FTC_MRULIST_LOOKUP): Use it.
+
+ * src/cache/Jamfile (_sources), src/cache/descrip.mms: Updated.
+ * src/cache/ftcbasic.c: Fix compiler warnings.
+ * src/cache/ftcmanag.c (FTC_Manager_LookupSize,
+ FTC_Manager_LookupFace) <FTC_INLINE>: Use FTC_MRULIST_LOOKUP_CMP.
+ * src/cache/ftcmru.c (FTC_MruList_Find): Fix a bug (found after
+ heavy testing).
+
+ * Jamfile: Updating `refdoc' target, and adding `autohint' to the
+ list of modules to build. Both the autohinter and autofitter will
+ be built by default. But which one will be used is determined by
+ the content of `ftmodule.h'.
+
+ * src/autofit/*: Many updates, but the code is still buggy...
+
+2004-01-31 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.c (cff_operator_seac): Fix magnitude of
+ accent offset.
+ Update code similarly to the seac support for Type 1 fonts.
+ (cff_decoder_parse_charstrings) <cff_op_endchar>: Fix magnitude
+ of accent offset.
+ Don't hint glyphs twice if seac is emulated.
+ <cff_op_flex>: Assign correct point tags.
+ * docs/CHANGES: Updated.
+
+2004-01-30 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1parse.c (T1_Get_Private_Dict): Use FT_MEM_MOVE, not
+ FT_MEM_COPY, for copying the private dict.
+
+ * src/type1/t1load.c (parse_subrs): Assign number of subrs only
+ in first run.
+ (parse_charstrings): Parse /CharStrings in second run without
+ assigning values.
+ (parse_dict): Skip all /CharStrings arrays but the first. We need
+ this for non-standard fonts like `Optima' which have different
+ outlines depending on the resolution. Note that there is no
+ guarantee that we get fitting /Subrs and /CharStrings arrays; this
+ can only be done by a real PS interpreter.
+
+2004-01-29 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
+
+ * builds/win32/visualc/index.html: New file, giving detailed
+ explanations about forcing CR+LF line endings for the VC++ project
+ files.
+
+2004-01-22 Garrick Meeker <garrick@digitalanarchy.com>
+
+ * src/cff/cffload.c (cff_subfont_load): Initialize `dict'.
+
+2004-01-22 Werner Lemberg <wl@gnu.org>
+
+ Add support for the hexadicimal representation of binary data
+ started with `StartData' in CID-keyed Type 1 fonts.
+
+ * include/freetype/internal/t1types.h (CID_FaceRec): Add new
+ members `binary_data' and `cid_stream'.
+
+ * src/cid/cidload.c (cid_read_subrs): Use `face->cid_stream'.
+ (cid_hex_to_binary): New auxiliary function.
+ (cid_face_open): Add new argument `face_index' to return quickly
+ if less than zero. Updated all callers.
+ Call `cid_hex_to_binary', then open and assign memory stream to
+ `face->cid_stream' if `parser->binary_length' is non-zero.
+ * src/cid/cidload.h: Updated.
+
+ * src/cid/cidobjs.c (cid_face_done): Free `binary_data' and
+ `cid_stream'.
+
+ * src/cid/cidparse.c (cid_parser_new): Check arguments to
+ `StartData' and set parser->binary_length accordingly.
+ * src/cid/cidparse.h (CID_Parser): New member `binary_length'.
+
+ * src/cid/cidgload.c (cid_load_glyph): Use `face->cid_stream'.
+
+ * docs/CHANGES: Updated.
+
+2004-01-21 Werner Lemberg <wl@gnu.org>
+
+ include/freetype/config/ftstdlib.h (ft_atoi): Replaced with...
+ (ft_atol): This.
+ * src/base/ftdbgmem.c: s/atol/ft_atol/.
+ * src/type42/t42drivr.c: s/ft_atoi/ft_atol/.
+
+2004-01-20 Masatake YAMATO <jet@gyve.org>
+
+ * include/freetype/ftcache.h: Delete duplicated definition of
+ FTC_FaceID.
+
+ * src/cff/cffdrivr.c (cff_get_cmap_info): Call sfnt module's TT CMap
+ Info service function if the cmap comes from sfnt. Return 0 if the
+ cmap is sythesized in cff module.
+
+2004-01-20 David Turner <david@freetype.org>
+
+ * src/cache/ftcmanag.c (ftc_size_node_compare): Call
+ FT_Activate_Size.
+
+2004-01-20 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1parse.c (T1_Get_Private_Dict): Skip exactly one
+ CR, LF, or CR/LF after `eexec'.
+
+2004-01-18 David Turner <david@freetype.org>
+
+ * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Remove compiler
+ warning.
+
+ * src/tools/docmaker/*: Updating beautifier tool.
+
+2004-01-15 David Turner <david@freetype.org>
+
+ * src/base/ftoutln.c (ft_orientation_extremum_compute): Fix
+ infinite loop bug.
+
+ * include/freetype/ftstroke.h: Include FT_GLYPH_H.
+ (FT_Stroker_Rewind, FT_Glyph_Stroke, FT_Glyph_StrokeBorder): New
+ declarations.
+
+ * src/base/ftstroke.c: Include FT_INTERNAL_OBJECTS_H.
+ (FT_Outline_GetOutsideBorder): Inverse result.
+ (FT_Stroker_Rewind, FT_Glyph_Stroke, FT_GlyphStrokeBorder): New
+ functions.
+ (FT_Stroker_EndSubPath): Close path if needed.
+ (FT_Stroker_Set, FT_Stroker_ParseOutline): Use FT_Stroker_Rewind.
+
+ * include/freetype/cache/ftcmanag.h (FTC_ScalerRec,
+ FTC_Manager_LookupSize): Moved to...
+ * include/freetype/ftcache.h (FTC_ScalerRec,
+ FTC_Manager_LookupSize): Here.
+
+ * src/tools/docmaker/docbeauty.py: New file to beautify the
+ documentation comments (e.g., to convert them to single block border
+ mode).
+ * src/tools/docmaker/docmaker.py (file_exists, make_file_list):
+ Moved to...
+ * src/tools/docmaker/utils.py (file_exists, make_file_list): Here.
+
+2004-01-14 David Turner <david@freetype.org>
+
+ * include/freetype/internal/ftmemory.h (FT_ARRAY_COPY,
+ FT_ARRAY_MOVE): New macros to make copying arrays easier.
+ Updated all relevant code to use them.
+
+2004-01-14 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffload.c (cff_font_load): Load charstrings_index earlier.
+ Use number of charstrings as argument to CFF_Load_FD_Select (as
+ documented in the CFF specs).
+
+2004-01-13 Graham Asher <graham.asher@btinternet.com>
+
+ * src/pshinter/pshalgo.c (psh_glyph_init): Move assignment of
+ `glyph->memory' up to free arrays properly in case of failure.
+
+2004-01-10 Masatake YAMATO <jet@gyve.org>
+
+ Make `FT_Get_CMap_Language_ID' work with CFF. Bug reported by
+ Steve Hartwell <shspamsink@comcast.net>.
+
+ * src/cff/cffdrivr.c: Include FT_SERVICE_TT_CMAP_H.
+ (cff_services): Added an entry for FT_SERVICE_ID_TT_CMAP.
+ (cff_get_cmap_info): New function.
+ (cff_service_get_cmap_info) New entry for cff_services.
+
+ * src/sfnt/ttcmap0.c: Exit loop after a format match has been found.
+ Suggested by Steve Hartwell <shspamsink@comcast.net>.
+
+2004-01-03 Masatake YAMATO <jet@gyve.org>
+
+ * src/base/ftobjs.c (destroy_charmaps): New function.
+ (destroy_face, open_face): Use `destroy_charmaps'.
+
+2004-01-01 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2004-01-01 Michael Jansson <mjan@em2-solutions.com>
+
+ * src/winfonts/winfnt.c (FNT_Size_Set_Pixels): Fix sign of
+ size->metrics.descender.
+
+2003-12-31 Wolfgang Domrse <porthos.domroese@harz.de>
+
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ [FT_DEBUG_LEVEL_TRACE]: Use `%ld' in FT_TRACE4.
+ <cff_op_flex1>: Change type of dx and dy to FT_Pos and remove
+ cast for accessing arguments.
+
+2003-12-31 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Revert previous
+ change. It's not necessary.
+
+2003-12-29 Smith Charles <smith.charles@free.fr>
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Handle `repeated
+ flags set' correctly.
+
+2003-12-29 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_face_init): Fix memory leak by deallocating
+ `full' and `weight' properly.
+ * src/cff/cffgload.c (cff_decoder_parse_charstrings)
+ <cff_op_hintmask> [FT_DEBUG_LEVEL_TRACE]: Use `0x' as prefix for
+ tracing output.
+
+2003-12-26 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/sfnt.h (TT_Set_SBit_Strike_Func):
+ Use FT_UInt for ppem values.
+ * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Use FT_UInt for
+ ppem values.
+ * src/sfnt/ttsbit.h: Updated.
+
+ * src/base/ftobjs.c (FT_Set_Pixel_Sizes): Don't allow ppem values
+ larger than -0FFFF.
+
+2003-12-25 Werner Lemberg <wl@gnu.org>
+
+ * src/base/fttrigon.c, src/base/ftgloadr.c: Inlude
+ FT_INTERNAL_OBJECTS_H.
+
+ * src/base/ftstroke.c (FT_Outline_GetInsideBorder,
+ FT_Outline_GetOutsideBorder): s/or/o/ to make it compile with
+ C++ compilers.
+
+ * src/cache/ftcmru.c, include/freetype/cache/ftcmru.h:
+ s/select/selection/ to avoid compiler warning.
+ * src/cff/cffload.h: s/select/ftselect/ to avoid potential
+ compiler warning.
+
+2003-12-24 Werner Lemberg <wl@gnu.org>
+
+ * src/cache/ftcsbits.c (FTC_SNode_Weight):
+ s/FTC_SBIT_ITEM_PER_NODE/FTC_SBIT_ITEMS_PER_NODE/.
+
+2003-12-24 David Turner <david@freetype.org>
+
+ * Fixed compilation problems in the cache sub-system.
+
+ * Partial updates to src/autofit.
+
+ * Jamfile (FT2_COMPONENTS): Add autofit module.
+
+2003-12-23 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffgload.c (cff_lookup_glyph_by_stdcharcode): Handle
+ CID-keyed fonts.
+
+2003-12-23 David Turner <david@freetype.org>
+
+ * include/freetype/internal/ftobjs.h (FT_PAD_FLOOR, FT_PAD_ROUND,
+ FT_PAD_CEIL, FT_PIX_FLOOR, FT_PIX_ROUND, FT_CEIL): New macros. They
+ are used to avoid compiler warnings with very pedantic compilers.
+ Note that `(x) & -64' causes a warning if (x) is not signed. Use
+ `(x) & ~63' instead!
+ Updated all related code.
+
+ Add support for extraction of `inside' and `outside' borders.
+
+ * src/base/ftstroke.c (FT_StrokerBorder): New enumeration.
+ (FT_Outline_GetInsideBorder, FT_Outline_GetOutsideBorder,
+ FT_Stroker_GetBorderCounts, FT_Stroker_ExportBorder): New functions.
+ (FT_StrokeBorderRec): New boolean member `valid'.
+ (ft_stroke_border_get_counts): Updated.
+ * include/freetype/ftstroke.h: Updated.
+
+2003-12-22 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftwinfnt.h (FT_WinFNT_ID_*): New definitions
+ to describe the `charset' field in FT_WinFNT_HeaderRec.
+ * src/winfonts/winfnt.c (FNT_Face_Init): Set encoding to
+ FT_ENCODING_NONE except for FT_WinFNT_ID_MAC.
+
+ * include/freetype/freetype.h (FT_Encoding): Improve comment,
+ based on work by Detlef Wrkner <TetiSoft@apg.lahn.de>.
+
+ * docs/CHANGES: Updated.
+
+2003-12-22 David Turner <david@freetype.org>
+
+ * include/freetype/ftcache.h,
+ include/freetype/cache/ftcmanag.h,
+ include/freetype/cache/ftccache.h,
+ include/freetype/cache/ftcmanag.h,
+ include/freetype/cache/ftcmru.h (added),
+ include/freetype/cache/ftlru.h (removed),
+ include/freetype/cache/ftcsbits.h,
+ include/freetype/cache/ftcimage.h,
+ include/freetype/cache/ftcglyph.h,
+ src/cache/ftcmru.c,
+ src/cache/ftcmanag.c,
+ src/cache/ftccache.c,
+ src/cache/ftcglyph.c,
+ src/cache/ftcimage.c,
+ src/cache/ftcsbits.c,
+ src/cache/ftccmap.c,
+ src/cache/ftcbasic.c (added),
+ src/cache/ftclru.c (removed):
+
+ *Complete* rewrite of the cache sub-system to `solve' the
+ following points:
+
+ - all public APIs have been moved to FT_CACHE_H, everything
+ under `include/freetype/cache' is only needed by client
+ applications that want to implement their own caches
+
+ - a new function named FTC_Manager_RemoveFaceID to deal
+ with the uninstallation of FaceIDs
+
+ - the image and sbit cache are now abstract classes, that
+ can be extended much more easily by client applications
+
+ - better performance in certain areas. Further optimizations
+ to come shortly anyway...
+
+ - the FTC_CMapCache_Lookup function has changed its signature,
+ charmaps can now only be retrieved by index
+
+ - FTC_Manager_Lookup_Face => FTC_Manager_LookupFace
+ FTC_Manager_Lookup_Size => FTC_Manager_LookupSize (still in
+ private header for the moment)
+
+2003-12-21 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_dict): Stop parsing if `eexec' keyword
+ is encountered.
+
+2003-12-19 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cfftypes.h (CFF_MAX_CID_FONTS): Increase to 32. For
+ example, the Japanese Hiragino font already contains 15 subfonts.
+
+ * src/cff/cffload.c (cff_font_load): Deallocate `sids' array for
+ CID-keyed fonts.
+
+ * devel/ftoption.h: Define FT_DEBUG_MEMORY.
+
+2003-12-18 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ttnameid.h (TT_ADOBE_ID_LATIN_1): New macro.
+ * src/type1/t1objs.c (T1_Face_Init): Use TT_ADOBE_ID* values.
+
+2003-12-18 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cfftypes.h (CFF_FontRecDictRec): Change type of
+ `cid_count' to `FT_ULong'.
+
+ * src/cff/cffgload.c (cff_slot_load): Take care of empty `cids'
+ array.
+
+ * src/cff/cffload.c (cff_charset_done): Free `cids' array.
+ (cff_font_load): Create cids array only for CID-keyed fonts which
+ are subsetted.
+
+ * src/cff/cffobjs.c (cff_face_init): Check the availability of
+ the PSNames modules for non-pure CFFs also.
+ Set FT_FACE_FLAG_GLYPH_NAMES for a non-pure CFF also if it isn't
+ CID-keyed.
+
+ * src/cff/rules.mk (CFF_DRV_H): Add cfftypes.h.
+
+2003-12-17 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (sfnt_init_face): Don't set
+ FT_FACE_FLAG_GLYPH_NAMES if the font contains a version 3.0 `post'
+ table.
+
+ * docs/CHANGES: Updated.
+
+2003-12-17 Masatake YAMATO <jet@gyve.org>
+
+ Add new function FT_Get_CMap_Language_ID to extract the language ID
+ for TrueType/sfnt fonts.
+
+ * include/freetype/internal/services/svttcmap.h: New file.
+ * include/freetype/internal/ftserv.h (FT_SERVICE_TT_CMAP_H): Add
+ svttcmap.h.
+
+ * src/sfnt/sfdriver.c: Include ttcmap0.h.
+ (tt_service_get_cmap_info): New service.
+ (sfnt_services): Updated.
+
+ * src/sfnt/ttcmap0.c (tt_cmap*_get_info): New functions.
+ (tt_cmap*_class_rec): Add tt_cmap*_get_info members.
+ (tt_get_cmap_info): New function.
+ * src/sfnt/ttcmap0.h: Include FT_SERVICE_TT_CMAP_H.
+ (TT_CMap_ClassRec): New field `get_cmap_info'.
+ (tt_get_cmap_info): New declaration.
+
+ * src/base/ftobjs.c: Include FT_SERVICE_TT_CMAP_H.
+ (FT_Get_CMap_Language_ID): New function implementation.
+ * include/freetype/tttables.h (FT_Get_CMap_Language_ID): New
+ function declaration.
+
+2003-12-16 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/ttcmap.c, src/sfnt/ttcmap.h: Removed. Obsolete.
+
+ * include/freetype/internal/sfnt.h (SFNT_Interface): Remove
+ obsolete fields `load_charmap' and `free_charmap'.
+ (TT_CharMap_Load_Func, TT_CharMap_Free_Func): Removed.
+ * src/sfnt/sfnt.c: Don't include ttcmap.c.
+ * src/sfnt/rules.mk (SFNT_DRV_SRC): Don't include ttcmap.c.
+ * src/sfnt/ttload.c: Don't include ttcmap.h.
+ * src/sfnt/sfdriver.c: Don't include ttcmap.h.
+ (sfnt_interface): Updated.
+
+ * include/freetype/internal/tttypes.h (TT_TableDirRec,
+ TT_CMapDirRec, TT_CMapDirEntryRec, TT_CMap0, TT_CMap2SubHeaderRec,
+ TT_CMap2Rec, TT_CMap4Segment, TT_CMap4Rec, TT_CMap6,
+ TT_CMapGroupRec, TT_CMap8_12Rec, TT_CMap10Rec, TT_CharMap_Func,
+ TT_CharNext_Func, TT_CMapTableRec, TT_CharMapRec): Removed.
+ Obsolete.
+ * src/cff/cffobjs.h (CFF_CharMapRec): Removed. Obsolete.
+
+2003-12-15 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2003-12-15 Wolfgang Domrse <porthos.domroese@harz.de>
+
+ * builds/atari/*: New directory for building FreeType 2 on Atari
+ with the PureC compiler.
+
+2003-12-12 Wolfgang Domrse <porthos.domroese@harz.de>
+
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Add
+ cast.
+ * src/cff/cffdrivr.c (cff_ps_has_glyph_names): Assure that return
+ value is either 0 or 1.
+
+2003-12-12 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffdrivr.c (cff_get_glyph_name): Improve error message.
+ (cff_get_name_index): Return if no PSNames service is available.
+ (cff_ps_has_glyph_names): Handle CID-keyed fonts correctly.
+ * src/cff/cfftypes.h (CFF_CharsetRec): New field `cids', used for
+ CID-keyed fonts. This is the inverse mapping of `sids'.
+ * src/cff/cffload.c (cff_charset_load): New argument `invert'.
+ Initialize charset->cids if `invert' is set.
+ (cff_font_load): In call to cff_charset_load, set `invert' to true
+ for CID-keyed fonts.
+ * src/cff/cffgload.c (cff_slot_load): Handle glyph index as CID
+ and map it to the real glyph index.
+
+ * docs/CHANGES: Updated.
+
+2003-12-11 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_face_init): Don't set
+ FT_FACE_FLAG_GLYPH_NAMES for CID-keyed fonts.
+ Don't construct a cmap for CID-keyed fonts.
+
+2003-12-10 Werner Lemberg <wl@gnu.org>
+
+ Use implementation specific SID value 0xFFFF to indicate that
+ a dictionary element is missing.
+
+ * src/cff/cffload.c (cff_subfont_load): Initialize all fields
+ which hold SIDs to 0xFFFF.
+ (cff_index_get_sid_string): Handle SID value 0xFFFF.
+ Handle case where `psnames' is zero.
+ (cff_font_load): Updated.
+ Don't load encoding for CID-keyed CFFs.
+
+ * src/cff/cffobjs.c (cff_face_init): Updated.
+ Don't check for PSNames module if font is CID-keyed.
+ Compute style name properly (using the same algorithm as in the
+ CID driver).
+ Fix computation of style flags.
+
+ * src/cff/cfftoken.h: Comment out handling of base_font_name.
+ Rename `postscript' field to `embedded_postscript'
+ * src/cff/cfftypes.h (CFF_FontRecDictRec): Remove `base_font_name'
+ and `postscript'.
+
+2003-12-10 Detlef Wrkner <TetiSoft@apg.lahn.de>
+
+ * src/pcf/pcfdrivr.c (pcf_get_charset_id): New function (a clone
+ of the similar BDF function).
+ (pcf_service_bdf): Use it.
+
+2003-12-09 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Set FT_FACE_FLAG_GLYPH_NAMES
+ only if a `post' table is present.
+
+2003-12-09 George Williams <gww@silcom.com>
+
+ * src/base/ftobjs.c (load_mac_face): Recent versions of Linux
+ support Mac's HFS+ file system, thus enable code to read /rsrc on
+ non-Macintosh platforms also.
+
+2003-12-08 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/psaux.h (PS_TableRec): Change type
+ of `lengths' to FT_PtrDist.
+ (T1_DecoderRec): Change type of `subrs_len' to FT_PtrDist.
+ * include/freetype/internal/t1types.h (T1_FontRec): Change type
+ of `subrs_len' and `charstrings_len' to FT_PtrDist.
+
+ * src/base/ftobjs.c (Mac_Read_POST_Resource): Replace `junk'
+ variable with better solution.
+ (IsMacResource): Remove unused variable `map_len'.
+ Replace `junk' variable with better solution.
+ (FT_Open_Face) [!FT_MACINTOSH]: Add conditional
+ FT_CONFIG_OPTION_MAC_FONTS.
+
+2003-12-08 Wolfgang Domrse <porthos.domroese@harz.de>
+
+ * src/autohint/ahhint.c (ah_hinter_hint_edges,
+ ah_hinter_align_strong_points): Add some casts.
+
+ * src/base/ftoutln.c (FT_OrientationExtremumRec): Change type
+ of `pos' to FT_Long.
+
+ * src/base/ftobjs.c (Mac_Read_POST_Resource,
+ Mac_Read_sfnt_Resource): Change type of `len' to FT_Long.
+
+ * src/type42/t42parse.c (t42_parse_dict): Add cast for `n_keywords'.
+
+2003-12-07 Werner Lemberg <wl@gnu.org>
+
+ * docs/raster.txt: New file, taken from FreeType 1 and completely
+ revised.
+
+2003-12-04 Masatake YAMATO <jet@gyve.org>
+
+ * src/type1/t1driver.c (Get_Interface): Remove FT_UNUSED for
+ t1_interface. t1_interface is used.
+
+2003-11-27 David Turner <david@freetype.org>
+
+ * src/pfr/pfrdrivr.c (pfr_get_metrics): Revert incorrect change of
+ 2003-11-23: For PFR fonts, metrics->x_scale and metrics->y_scale are
+ the scaling values for outline units, not for metric units.
+
+2003-11-25 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftcalc.c, include/freetype/internal/ftcalc.h
+ (FT_MulDiv_No_Round): Surround code with `#ifdef
+ TT_CONFIG_OPTION_BYTECODE_INTERPRETER ... #endif'.
+
+2003-11-23 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftcalc.c (FT_MulDiv_No_Round): New function (32 and
+ 64 bit version).
+ * include/freetype/internal/ftcalc.h: Updated.
+
+ * src/truetype/ttinterp.c (TT_MULDIV_NO_ROUND): New macro.
+ (TT_INT64): Removed.
+ (DO_DIV): Use TT_MULDIV_NO_ROUND.
+
+ * src/pfr/pfrdrivr.c (pfr_get_metrics): Directly use
+ metrics->x_scale and metrics->y_scale.
+
+2003-11-22 Rogier van Dalen <R.C.van.Dalen@umail.leidenuniv.nl>
+
+ * src/truetype/ttinterp.c (CUR_Func_move_orig): New macro.
+ (Direct_Move_Orig, Direct_Move_Orig_X, Direct_Move_Orig_Y): New
+ functions. Similar to Direct_Move, Direct_Move_X, and
+ Direct_Move_Y but without touching.
+ (Compute_Funcs): Use new functions.
+
+ (Round_None, Round_To_Grid, Round_To_Half_Grid, Round_Down_To_Grid,
+ Round_Up_To_Grid, Round_To_Double_Grid, Round_Super,
+ Round_Super_45): Fix rounding of value zero.
+
+ (DO_DIV): Don't use TT_MULDIV.
+
+ (Ins_SHC): This instruction actually touches the points.
+ (Ins_MSIRP): Fix undocumented behaviour.
+
+ * src/truetype/ttinterp.h (TT_ExecContextRec): Updated.
+
+2003-11-22 Werner Lemberg <wl@gnu.org>
+
+ * docs/VERSION.DLL, docs/CHANGES: Updated.
+
+ * src/base/ftobjs.c (FT_Set_Char_Size): Make metrics->x_scale and
+ metrics->y_scale really precise.
+
+ (FT_Load_Glyph): Update computation of linearHoriAdvance and
+ linearVertAdvance.
+
+ * src/true/type/ttinterp.c (Update_Max): Use FT_REALLOC.
+
+2003-11-22 David Turner <david@freetype.org>
+
+ * src/autofit/*: More updates.
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 8.
+ * builds/unix/configure.ac (version_info): Set to 9:6:3.
+ * README: Updated.
+
+2003-11-13 John A. Boyd Jr. <jaboydjr@netwalk.com>
+
+ * src/bdf/bdfdrivr.c (bdf_interpret_style), src/pcf/pcfread.c
+ (pcf_interpret_style): Replace spaces with dashes in properties
+ SETWIDTH_NAME and ADD_STYLE_NAME to simplify parsing.
+
+2003-11-11 Werner Lemberg <wl@gnu.org>
+
+ * docs/CHANGES: Updated.
+
+2003-11-11 John A. Boyd Jr. <jaboydjr@netwalk.com>
+
+ Handle SETWIDTH_NAME and ADD_STYLE_NAME properties for BDF and PCF
+ fonts.
+
+ * src/bdf/bdfdrivr.c (bdf_interpret_style): New auxiliary function.
+ (BDF_Face_Init): Don't handle style properties but call
+ bdf_interpret_style.
+
+ * src/pcf/pcfread.c (pcf_interpret_style): New auxiliary function.
+ (pcf_load_font): Don't handle style properties but call
+ pcf_interpret_style.
+
+2003-11-07 Werner Lemberg <wl@gnu.org>
+
+
+ * Version 2.1.7 released.
+ =========================
+
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 7.
+
+ * builds/unix/ft2unix.h: Fix comments.
+
+ * builds/unix/ftconfig.in: Synchronized with ANSI version.
+ Use `#undef' in templates as recommended in the autoconf
+ documentation.
+ Since real `#undef' lines don't survive during configuration, use
+ `/undef' instead; the postprocessing facility of the
+ AC_CONFIG_HEADERS autoconf macro converts them to `#undef'.
+
+ * builds/unix/install.mk (install): Install Unix version of
+ `ftconfig.h'.
+
+ * builds/unix/unix-cc.in (CFLAGS): Set FT_CONFIG_CONFIG_H macro
+ to include the correct `ftconfig.h' file.
+
+ * builds/unix/ft-munmap.m4 (FT_MUNMAP_DECL): Removed.
+ (FT_MUNMAP_PARAM): Updated syntax to autoconf 2.59.
+
+ * builds/unix/freetype2.m4: Updated syntax to autoconf 2.59.
+
+ * builds/unix/configure.ac: Use AC_CONFIG_HEADERS instead of
+ AC_CONFIG_HEADER to create ftconfig.h, and use second argument
+ to replace `/undef' with `#undef'.
+ Don't use FT_MUNMAP_DECL but AC_CHECK_DECLS to check for munmap.
+ Use AS_HELP_STRING in AC_ARG_WITH.
+ Update syntax to autoconf 2.59.
+
+ * builds/unix/ltmain.sh: Regenerated with `libtoolize --force
+ --copy' from libtool 1.5.
+ * builds/unix/aclocal.m4: Regenerated with `aclocal -I .' from
+ automake 1.7.8.
+ * builds/unix/configure: Regenerated with autoconf 2.59.
+ * builds/unix/config.guess, builds/unix/config.sub: Updated from
+ `config' CVS module at subversions.gnu.org
+ * builds/unix/install-sh, builds/unix/mkinstalldirs: Updated from
+ `texinfo' CVS module at subversions.gnu.org.
+
+ * builds/vms/ftconfig.h: Synchronized with ANSI version.
+
+ * docs/CUSTOMIZE: Fix documentation error.
+ * docs/CHANGES, docs/VERSION.DLL, docs/release: Updated.
+
+ * builds/freetype.mk (refdoc): Updated --title.
+
+2003-11-07 David Turner <david@freetype.org>
+
+
+ * Version 2.1.6 released.
+ =========================
+
+
+ * install: Removed. Obsolete.
+
+2003-11-04 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfdriver.c: Include FT_SERVICE_SFNT_H.
+ (sfnt_service_sfnt_table): New service.
+ (sfnt_services): Updated.
+
+ * docs/license.txt: Reworded.
+
+2003-11-03 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/*: Add a guard to all public header files which
+ load FT_FREETYPE_H to reject freetype.h from FreeType 1.
+
+2003-11-02 Patrick Welche <prlw1@newn.cam.ac.uk>
+
+ * builds/unix/freetype2.m4, builds/unix/ft-munmap.m4: Protect
+ first argument of AC_DEFUN with brackets to avoid possible
+ expansion.
+
+2003-11-02 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/cache/ftcglyph.h: Don't include stddef.h.
+
+ * include/freetype/freetype.h: Fix check for ft2build.h.
+
+2003-11-01 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h: Check that ft2build.h has been
+ loaded first.
+
+ * src/base/fttype1.c (FT_Get_PS_Font_Info): Fix incorrectly applied
+ patch.
+
+2003-10-31 Detlef Wrkner <TetiSoft@apg.lahn.de>
+
+ * src/base/fttype1.c (FT_Get_PS_Font_Info, FT_Has_PS_Glyph_Names):
+ Fix parameter order in calls to FT_FACE_FIND_SERVICE.
+
+2003-10-31 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftserv.h
+ (FT_SERVICE_POSTSCRIPT_NAMES_H): Removed. Unused.
+
+ * src/type42/t42drivr.c (t42_services): Updated.
+
+2003-10-29 David Turner <david@freetype.org>
+
+ * include/freetype/internal/bdftypes.h: Removed. Obsolete.
+ * src/base/ftbdf.c: Updated.
+
+ * include/freetype/internal/cfftypes.h: Moved to...
+ * src/cff/cfftypes.h: This place since no other module needs to
+ know about those types.
+
+ * include/freetype/internal/t42types.h: Moved to...
+ * src/type42/t42types.h: This place since no other module needs to
+ know about those types.
+
+ * include/freetype/internal/services/svbdf.h: Include FT_BDF_H.
+
+ * include/freetype/internal/services/svpsname.h: Renamed to...
+ * include/freetype/internal/services/svpscmap.h: This.
+ Updated `FT_Service_PsNames' -> `FT_Service_PsCMaps' and
+ `POSTSCRIPT_NAMES' -> `POSTSCRIPT_CMAPS' everywhere.
+
+ * include/freetype/internal/services/svpsinfo.h: New file, providing
+ PostScript info service.
+
+ * include/freetype/internal/ftserv.h (FT_SERVICE_POSTSCRIPT_CMAPS_H,
+ FT_SERVICE_POSTSCRIPT_INFO_H): New macros for svpscmap.h and
+ svpsinfo.h.
+ * include/freetype/internal/internal.h (FT_INTERNAL_TYPE42_TYPES_H,
+ FT_INTERNAL_CFF_TYPES_H, FT_INTERNAL_BDF_TYPES_H): Removed.
+
+ * src/base/fttype1.c: Don't include FT_INTERNAL_TYPE1_TYPES_H and
+ FT_INTERNAL_TYPE42_TYPES_H but FT_INTERNAL_SERVICE_H and
+ FT_SERVICE_POSTSCRIPT_INFO_H.
+ (FT_Get_PS_Font_Info, FT_Has_PS_Glyph_Names): Use new
+ POSTSCRIPT_INFO service.
+
+ * src/cff/cffdrivr.c: Include FT_SERVICE_POSTSCRIPT_INFO_H.
+ (cff_ps_has_glyph_names): New function.
+ (cff_service_ps_info): New service.
+ (cff_services): Updated.
+
+ * src/cff/cffload.h, src/cff/cffobjs.h, src/cff/cffparse.h: Don't
+ include FT_INTERNAL_CFF_TYPES_H but cfftypes.h directly.
+
+ * src/cif/cidriver.c: Include FT_SERVICE_POSTSCRIPT_INFO_H.
+ (cid_ps_get_font_info): New function.
+ (cid_service_ps_info): New service.
+ (cid_services): Updated.
+
+ * src/type1/t1driver.c: Include FT_SERVICE_POSTSCRIPT_INFO_H.
+ (t1_ps_get_font_info, t1_ps_has_glyph_names): New functions.
+ (t1_service_ps_info): New service.
+ (t1_services): Updated.
+
+ * src/type42/t42drivr.c: Include FT_SERVICE_POSTSCRIPT_INFO_H.
+ (t42_ps_get_font_info, t42_ps_has_glyph_names): New functions.
+ (t42_service_ps_info): New service.
+
+ * src/type42/t42objs.h: Don't include FT_INTERNAL_TYPE42_TYPES_H
+ but t42types.h directly.
+
+ * src/psnames/psmodule.c (psnames_interface, psnames_services):
+ Renamed to...
+ (pscmaps_interface, pscmaps_services): This.
+ Updated all users.
+
+
+ * src/gzip/infblock.c (inflate_blocks): Remove compiler warning.
+
+2003-10-22 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_encoding): Handle `/Encoding [ ... ]'.
+
+ * src/type1/t1parse.c (T1_Get_Private_Dict): Test whether `eexec'
+ is real.
+
+ * src/type42/t42parse.c (t42_parse_encoding): Improve boundary
+ checking while parsing.
+
+ * docs/CHANGES: Updated.
+
+2003-10-21 Josselin Mouette <joss@debian.org>
+
+ * include/freetype/internal/t1types.h (T1_FontRec): `paint_type'
+ and `stroke_width' aren't pointers.
+
+ * src/type42/t42objs.c (T42_Face_Done), src/type1/t1objs.c
+ (T1_Face_Done): Don't free `paint_type' and `stroke_width'.
+
+2003-10-20 Graham Asher <graham.asher@btinternet.com>
+
+ * src/winfonts/winfnt.c (fnt_cmap_class): Fix position of `const'.
+
+2003-10-19 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahhint.c (ah_hinter_load_glyph): Patch from
+ 2003-08-18 introduced a severe bug (FT_Render_Glyph was called
+ twice under some circumstances, causing strange results). This
+ is fixed now by clearing the FT_LOAD_RENDER bit of `load_flags'.
+
+ * src/base/ftpfr.c (FT_Get_PFR_Metrics): Initialize `error'.
+ * src/psaux/psobjs.c (ps_tobytes): Initialize `n'.
+ * src/type42/t42parse.c (t42_parse_sfnts): Initialize `string_size'.
+
+2003-10-16 Werner Lemberg <wl@gnu.org>
+
+ Completely revised Type 42 parser. It now handles both fonts
+ produced with ttftot42 (tested version 0.3.1) and
+ TrueTypeToType42.ps (tested version May 2001; it is necessary to
+ fix the broken header comment to be `%!PS-TrueTypeFont...').
+
+ * src/type42/t42objs.c (T42_GlyphSlot_Load): Change fourth
+ parameter to `FT_UInt'.
+ * src/type42/t42objs.h: Updated.
+
+ * src/type42/t42parse.h (T42_ParserRec): Change type of `in_memory'
+ to FT_Bool.
+ (T42_Loader): Change type of `num_chars' and `num_glyphs' to
+ FT_UInt.
+ Add `swap_table' element.
+ * src/type42/t42parse.c (T42_KEYWORD_COUNT, T1_ToFixed,
+ T1_ToCoordArray, T1_ToTokenArray): Removed.
+ (T1_ToBytes): New macro.
+ (t42_is_alpha, t42_hexval): Removed.
+ (t42_is_space): Handle `\0'.
+ (t42_parse_encoding): Updated to use new PostScript parser routines
+ from psaux.
+ Handle `/Encoding [ ... ]' also.
+ (T42_Load_Status): New enumeration.
+ (t42_parse_sfnts): Updated to use new PostScript parser routines
+ from psaux.
+ (t42_parse_charstrings): Updated to use new PostScript parser
+ routines from psaux.
+ Handle `/CharStrings << ... >>' also.
+ Don't expect that /.notdef is the first element in dictionary. Copy
+ code from type1 module to handle this.
+ (t42_parse_dict): Updated to use new PostScript parser routines
+ from psaux.
+ Remove code for synthetic fonts (which can't occur in Type 42
+ fonts).
+ (t42_loader_done): Release `swap_table'.
+
+ * src/psaux/psobjs.c (skip_string): Increase `cur' properly.
+
+ * src/type1/t1load.c (parse_charstrings): Make test for `.notdef'
+ faster.
+
+2003-10-15 Graham Asher <graham.asher@btinternet.com>
+
+ * src/autohint/ahglobal.c (blue_chars), src/winfonts/winfnt.c
+ (fnt_cmap_class_rec, fnt_cmap_class), src/bdf/bdflib.c (empty,
+ _num_bdf_properties), src/gzip/infutil.c (inflate_mask),
+ src/gzip/inffixed.h (fixed_bl, fixed_bd, fixed_tl, fixed_td),
+ src/gzip/inftrees.h (inflate_trees_fixed), srf/gzip/inftrees.c
+ (inflate_trees_fixed): Decorate with more `const' to avoid
+ writable global variables which are disallowed on ARM.
+
+2003-10-08 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_font_matrix, parse_charstrings): Remove
+ code specially for synthetic fonts; this is handled elsewhere.
+ (parse_encoding): Remove code specially for synthetic fonts; this is
+ handled elsewhere.
+ Improve boundary checking while parsing.
+ (parse_dict): Improve boundary checking while parsing.
+ Use ft_memcmp to simplify code.
+
+2003-10-07 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1load.c (parse_subrs, parse_dict): Handle synthetic
+ fonts properly.
+ (parse_charstrings): Copy correct number of characters into
+ `name_table'.
+
+2003-10-06 Werner Lemberg <wl@gnu.org>
+
+ Heavy modification of the PS parser to handle comments and strings
+ correctly. This doesn't slow down the loading of PS fonts
+ significantly since charstrings aren't affected.
+
+ * include/freetype/config/ftstdlib.h (ft_xdigit): Renamed to...
+ (ft_isxdigit): This. Updated all callers.
+ (ft_isdigit): New alias to `isdigit'.
+
+ * include/freetype/internal/psaux.h (PS_Parser_FuncsRec): Renamed
+ `skip_alpha' to `skip_PS_token'.
+ Add parameter to `to_bytes' and change some argument types.
+
+ * src/psaux/psauxmod.c (ps_parser_funcs): Updated.
+ * src/psaux/psobjs.c (ft_char_table): New array to map character
+ codes (ASCII and EBCDIC) of digits to numbers.
+ (OP): New auxiliary macro holding either `>=' or `<' depending on
+ the character encoding.
+ (skip_comment): New function.
+ (skip_spaces): Use it.
+ (skip_alpha): Removed.
+ (skip_literal_string, skip_string): New functions.
+ (ps_parser_skip_PS_token): New function. This is a better
+ replacement of...
+ (ps_parser_skip_alpha): Removed.
+ (ps_parser_to_token, ps_parser_to_token_array): Updated.
+ (T1Radix): Rewritten, using `ft_char_table'.
+ (t1_toint): Renamed to...
+ (ps_toint): This. Update all callers.
+ Use `ft_char_table'.
+ (ps_tobytes): Add parameter to handle delimiters and change some
+ argument types.
+ Use `ft_char_table'.
+ (t1_tofixed): Renamed to...
+ (ps_tofixed): This. Update all callers.
+ Use `ft_char_table'.
+ (t1_tocoordarray): Renamed and updated to...
+ (ps_tocoordarray): This. Update all callers.
+ (t1_tofixedarray): Renamed and updated to...
+ (ps_tofixedarray): This. Update all callers.
+ (t1_tobool): Renamed to...
+ (ps_tobool): This. Update all callers.
+ (ps_parser_load_field): Updated.
+ (ps_parser_load_field_table): Use `T1_MAX_TABLE_ELEMENTS'
+ everywhere.
+ (ps_parser_to_int, ps_parser_to_fixed, ps_parser_to_coord_array,
+ ps_parser_to_fixed_array): Skip spaces. Updated.
+ (ps_parser_to_bytes): Add parameter to handle delimiters and change
+ some argument types. Updated.
+ * src/psaux/psobjs.h: Updated.
+
+ * src/cid/cidload.c (cid_parse_dict): Updated.
+ * src/cid/cidparse.c (cid_parser_new): Check whether the `StartData'
+ token was really found.
+ * src/cid/cidparse.h (cid_parser_skip_alpha): Updated and renamed
+ to...
+ (cid_parser_skip_PS_token): This.
+
+ * src/type1/t1parse.h (T1_ParserRec): Use `FT_Bool' for boolean
+ fields.
+ (T1_Skip_Alpha): Replaced with...
+ (T1_Skip_PS_Token): This new macro.
+ * src/type1/t1parse.c (hexa_value): Removed.
+ (T1_Get_Private_Dict): Use `ft_isxdigit' and
+ `psaux->ps_parser_funcs_to_bytes' for handling ASCII hexadecimal
+ encoding.
+ After decrypting, replace the four random bytes at the beginning
+ with whitespace.
+ * src/type1/t1load.c (t1_allocate_blend): Use proper error values.
+ (parser_blend_design_positions, parse_blend_design_map,
+ parse_weight_vector): Updated.
+ (is_space): Handle `\f' also.
+ (is_name_char): Removed.
+ (read_binary_data): Updated.
+ (parse_encoding): Use `ft_isdigit'.
+ Updated.
+ (parse_subrs): Updated.
+ (TABLE_EXTEND): New macro.
+ (parse_charstrings): Updated.
+ Provide a workaround for buggy fonts which have more entries in the
+ /CharStrings dictionary then expected; the function now adds some
+ slots and skips entries which still exceed the new limit.
+ (parse_dict): Updated.
+ Terminate on the token `closefile'.
+
+ * src/type42/t42parse.c (T1_Skip_Alpha): Replaced with...
+ (T1_Skip_PS_Token): This new macro. Updated all callers.
+ (t42_parse_encoding): Use `ft_isdigit'.
+
+
+ * src/base/ftmm.c (ft_face_get_mm_service): Return FT_Err_OK if
+ success.
+
+2003-10-05 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftmodule.h: Renamed to...
+ * include/freetype/ftmodapi.h: This to avoid duplicate file names.
+ * include/freetype/config/ftheader.h (FT_MODULE_H): Updated.
+
+2003-10-04 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftoutln.c (FT_OrientationExtremumRec,
+ FT_Outline_Get_Orientation): Trivial typo fixes to make it compile.
+
+2003-10-02 Markus F.X.J. Oberhumer <markus@oberhumer.com>
+
+ * src/winfonts/winfnt.c (FT_WinFNT_HeaderRec): `color_table_offset'
+ has four bytes, not two.
+ Fix all users.
+ (fnt_font_load, FNT_Load_Glyph): Add more font validity tests.
+
+2003-10-01 David Turner <david@freetype.org>
+
+ * src/autofit/*: Adding first source files of the new multi-script
+ `auto-fitter'.
+
+ * include/freetype/ftoutln.h (FT_Orientation): New enumeration.
+ (FT_Outline_Get_Orientation): New declaration.
+
+ * src/base/ftoutln.c (FT_OrientationExtremumRec): New structure.
+ (ft_orientation_extremum_compute): New auxiliary function.
+ (FT_Outline_Get_Orientation): New function to compute the fill
+ orientation of a given glyph outline.
+
+ * include/freetype/internal/ftserv.h (FT_FACE_LOOKUP_SERVICE): Fixed
+ trivial bug which could crash the font engine when a cached service
+ pointer was retrieved.
+
+2003-09-30 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidload.c (cid_parse_dict): Skip token if no keyword is
+ found.
+
+ * src/type1/t1parse.c (IS_T1_WHITESPACE, IS_T1_LINESPACE,
+ IS_T1_SPACE): Removed.
+ (PFB_Tag): Removed.
+ (read_pfb_tag): Don't use PFB_Tag.
+
+ * src/type42/t42parse.c (t42_is_space): Handle `\f' also.
+ (t42_parse_encoding): Handle synthetic fonts.
+
+2003-09-29 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/t1types.h: Don't include
+ FT_INTERNAL_OBJECTS_H but FT_INTERNAL_SERVICE_H.
+ * src/truetype/ttobjs.c: Don't include
+ FT_SERVICE_POSTSCRIPT_NAMES_H.
+
+2003-09-29 David Turner <david@freetype.org>
+
+ Added new service to handle glyph name dictionaries, replacing the
+ old internal header named `psnames.h' by `services/svpsname.h'.
+ Note that this is different from `services/svpostnm.h' which only
+ handles the retrieval of PostScript font names for a given face.
+ (Should we merge these two services into a single header?)
+
+ * include/freetype/internal/psnames.h: Removed. Most of its
+ contents is moved to...
+ * include/freetype/internal/services/svpsname.h: New file.
+
+ * include/freetype/internal/services/svpostnm.h
+ (FT_SERVICE_ID_POSTSCRIPT_NAME): Replaced with...
+ (FT_SERVICE_ID_POSTSCRIPT_FONT_NAME): New macro.
+ (PsName): Service named changed to...
+ (PsFontName): This.
+ Updated `FT_Service_PsName' -> `FT_Service_PsFontName' and
+ `POSTSCRIPT_NAME' -> `POSTSCRIPT_FONT_NAME' everywhere.
+
+ * include/freetype/internal/internal.h
+ (FT_INTERNAL_POSTSCRIPT_NAMES_H): Removed.
+ * include/freetype/internal/psaux.h: Include
+ FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (T1_DecoderRec): Updated type of `psnames'.
+ * include/freetype/internal/t1types.h: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ Include FT_INTERNAL_OBJECTS_H.
+ * include/freetype/internal/t42types.h: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H.
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Updated.
+
+ * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE): Changed
+ order of parameters. All callers updated.
+ (FT_FACE_FIND_GLOBAL_SERVICE): New macro to look up a service
+ globally, checking all modules.
+ (FT_ServiceCacheRec): Updated.
+ (FT_SERVICE_POSTSCRIPT_NAMES_H): New macro for accessing
+ `svpsname.h'.
+
+ * include/freetype/internal/ftobjs.h, src/base/ftobjs.c
+ (ft_module_get_service): New function.
+
+ * src/cff/cffdrivr.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H
+ but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (cff_get_glyph_name, cff_get_name_index): Use new POSTSCRIPT_NAMES
+ service.
+ * src/cff/cffcmap.c (cff_cmap_unicode_init): Updated.
+ * src/cff/cffload.c, src/cff/cffload.h: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (cff_index_get_sid_string): Updated.
+ * src/cff/cffobjs.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H
+ but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (cff_face_init): Use new POSTSCRIPT_NAMES service.
+ * src/cff/cffobjs.h: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H
+ but FT_SERVICE_POSTSCRIPT_NAMES_H.
+
+ * src/cid/cidobjs.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H
+ but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (cid_face_init): Use new POSTSCRIPT_NAMES service.
+ * src/cid/cidriver.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H.
+
+ * src/psaux/t1cmap.c (t1_cmap_std_init, t1_cmap_unicode_init): Use
+ new POSTSCRIPT_NAMES service.
+ * src/psaux/t1decode.h (t1_lookup_glyph_by_stdcharcode,
+ t1_decode_init): Use new POSTSCRIPT_NAMES service.
+ * src/psaux/t1cmap.h, src/psaux/t1decode.h: Dont' include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H.
+
+ * src/psnames/psmodule.c: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (ps_build_unicode_table): Renamed to...
+ (ps_unicodes_init): This.
+ (ps_lookup_unicode): Renamed to...
+ (ps_unicodes_char_index): This.
+ (ps_next_unicode): Renamed to...
+ (ps_unicodes_char_next): This.
+ (psnames_interface): Updated.
+ (psnames_services): New services list.
+ (psnames_get_service): New function.
+ (psnames_module_class): Updated.
+
+ * src/sfnt/sfobjs.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H
+ but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (sfnt_init_face): Use new POSTSCRIPT_NAMES service.
+ * src/sfnt/ttpost.c: Don't include FT_INTERNAL_POSTSCRIPT_NAMES_H
+ but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (tt_face_get_ps_name): Updated.
+
+ * src/truetype/ttobjs.c: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H.
+
+ * src/type1/t1driver.c: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ * src/type1/t1objs.c: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H.
+ (T1_Face_Init): Use new POSTSCRIPT_NAMES service.
+
+ * src/type42/t42drivr.c (t42_get_ps_name): Renamed to...
+ (t42_get_ps_font_name): This.
+ (t42_service_ps_name): Renamed to...
+ (t42_service_ps_font_name): This.
+ (t42_services): Updated.
+ * src/type42/t42objs.c (T42_Face_Init): Use new POSTSCRIPT_NAMES
+ service.
+ * src/type42/t42objs.h: Don't include
+ FT_INTERNAL_POSTSCRIPT_NAMES_H but FT_SERVICE_POSTSCRIPT_NAMES_H.
+
+
+ * src/base/ftglyph.c (FT_Get_Glyph): Don't access `slot' before
+ testing its validity. Reported by Henry Maddocks
+ <maddocks@metservice.com>.
+
+2003-09-21 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE):
+ Fix compilation warning (s/pptr/Pptr/).
+
+ * include/freetype/internal/internal.h (FT_INTERNAL_PFR_H,
+ FT_INTERNAL_FNT_TYPES_H): Removed.
+
+2003-09-21 David Turner <david@freetype.org>
+
+ Migrating the PFR and WINFNT drivers to the new service-based
+ internal API.
+
+ * include/freetype/internal/fnttypes.h: Removed. Most of its data
+ are moved to winfnt.h and...
+ * include/freetype/internal/services/svwinfnt.h: New file.
+
+ * include/freetype/internal/pfr.h: Removed. Most of its data are
+ moved to...
+ * include/freetype/internal/services/svpfr.h: New file.
+
+ * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE,
+ FT_FACE_LOOKUP_SERVICE): Simplify fix of 2003-09-16 by removing
+ pointer type argument.
+ Updated all callers.
+ Update macro names of services header files.
+
+ * src/base/ftobjs.c (FT_Get_Name_Index): Simplified code.
+
+ * src/base/ftpfr.c: Include FT_SERVICE_PFR_H instead of
+ FT_INTERNAL_PFR_H.
+ (ft_pfr_check, FT_Get_PFR_Metrics, FT_Get_PFR_Kerning,
+ FT_Get_PFR_Advance): Use services provided in `PFR_METRICS'.
+
+ * src/base/ftwinfnt.c: Include FT_SERVICE_WINFNT_H instead of
+ FT_INTERNAL_FNT_TYPES_H.
+ (FT_Get_WinFNT_Header): Use service provided in `WINFNT'.
+
+ * src/pfr/pfrdrivr.c: Include FT_SERVICE_PFR_H and
+ FT_SERVICE_XFREE86_NAME_H instead of FT_INTERNAL_PFR_H.
+ (pfr_service_bdf): Updated.
+ (pfr_services): New services list.
+ (pfr_get_service): New function.
+ (pfr_driver_class): Updated.
+
+ * src/winfonts/winfnt.c: Include FT_SERVICE_WINFNT_H and
+ FT_SERVICE_XFREE86_NAME_H instead of FT_INTERNAL_FNT_TYPES_H.
+ (winfnt_get_header, winfnt_get_service): New functions.
+ (winfnt_service_rec): New structure providing WINFNT services.
+ (winfnt_services): New services list.
+ (winfnt_driver_class): Updated.
+ * src/winfonts/winfnt.h: Add most of the removed fnttypes.h data.
+
+ * src/sfnt/sfdriver.c (sfnt_service_ps_name): Fix typo.
+
+ * src/type1/t1driver.c (t1_service_ps_name): Fix typo.
+
+ * src/cff/cffobjs.c, src/cid/cidobjs.c, src/pfr/pfrsbit.c,
+ src/psaux/psobjs.c, src/sfnt/sfobjs.c, src/truetype/ttobjs.c,
+ src/type1/t1objs.c, src/type42/t42objs.c: Removing various compiler
+ warnings.
+
+2003-09-19 David Bevan <dbevan@emtex.com>
+
+ * src/type1/t1parse.c (pfb_tag_fields): Removed.
+ (read_pfb_tag): Fix code so that it doesn't fail on end-of-file
+ indicator (0x8003).
+ * docs/CHANGES: Updated.
+
+2003-09-16 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/ftserv.h (FT_FACE_FIND_SERVICE,
+ FT_FACE_LOOKUP_SERVICE): Add parameter to pass pointer type.
+ Ugly, I know, but this is needed for compilation with C++ --
+ maybe someone knows a better solution?
+ Updated all callers.
+
+ * src/base/ftobjs.c (FT_Get_Name_Index, FT_Get_Glyph_Name): Remove
+ C++ compiler warnings.
+
+ * src/base/ftbdf.c (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property):
+ Fix order of arguments passed to FT_FACE_FIND_SERVICE.
+
+2003-09-15 Werner Lemberg <wl@gnu.org>
+
+ Avoid header files with identical names.
+
+ * include/freetype/internal/services/bdf.h: Renamed to...
+ * include/freetype/internal/services/svbdf.h: This.
+ Add copyright notice.
+ * include/freetype/internal/services/glyfdict.h: Renamed to...
+ * include/freetype/internal/services/svgldict.h: This.
+ Add copyright notice.
+ * include/freetype/internal/services/multmast.h: Renamed to...
+ * include/freetype/internal/services/svmm.h: This.
+ Add copyright notice.
+ Add FT_BEGIN_HEADER and FT_END_HEADER.
+ * include/freetype/internal/services/sfnt.h: Renamed to...
+ * include/freetype/internal/services/svsfnt.h: This.
+ Add copyright notice.
+ * include/freetype/internal/services/postname.h: Renamed to...
+ * include/freetype/internal/services/svpostnm.h: This.
+ Add copyright notice.
+ * include/freetype/internal/services/xf86name.h: Renamed to...
+ * include/freetype/internal/services/svxf86nm.h: This.
+ Add copyright notice.
+
+ * include/freetype/internal/ftserv.h: Add FT_BEGIN_HEADER and
+ FT_END_HEADER.
+ Add copyright notice.
+ Update macro names of services header files.
+
+ * builds/freetype.mk (SERVICES_DIR): New variable.
+ (BASE_H): Add services header files.
+
+2003-09-11 Werner Lemberg <wl@gnu.org>
+
+ * builds/toplevel.mk (distclean): Remove `builds/unix/freetype2.pc'.
+
+ * src/cff/cffdrivr.c: Don't load headers twice.
+
+ * include/freetype/internal/ftserv.h (FT_SERVICE_SFNT_H): New macro.
+ * src/base/ftobjs.c: Include FT_SERVICE_SFNT_H.
+
+ * src/cff/cffcmap.c: Include `cfferrs.h'.
+ * src/pfr/pfrdrivr.c: Include `pfrerror.h'.
+ * src/sfnt/sfdriver.c: Include `sferrors.h'.
+ * src/psaux/psobjs.h: Add declaration for `ps_parser_to_bytes'.
+
+2003-09-11 David Turner <david@freetype.org>
+
+ Introducing the concept of `module services'. This is the first
+ step towards a massive simplification of the engine's internals, in
+ order to get rid of various numbers of hacks.
+
+ Note that these changes will break source & binary compatibility for
+ authors of external font drivers.
+
+ * include/freetype/config/ftconfig.h (FT_BEGIN_STMNT, FT_END_STMNT,
+ FT_DUMMY_STMNT): New macros.
+
+ * include/freetype/internal/ftserv.h: New file, containing the new
+ structures and macros to provide `services'.
+
+ * include/freetype/internal/internal.h (FT_INTERNAL_EXTENSION_H,
+ FT_INTERNAL_EXTEND_H, FT_INTERNAL_HASH_H, FT_INTERNAL_OBJECT_H):
+ Removed, obsolete.
+ (FT_INTERNAL_SERVICE_H): New macro for `ftserv.h'.
+
+ * include/freetype/internal/services/bdf.h,
+ include/freetype/internal/services/glyfdict.h,
+ include/freetype/internal/services/postname.h,
+ include/freetype/internal/services/xf86name.h: New files.
+
+ * include/freetype/ftmm.h (FT_Get_MM_Func, FT_Set_MM_Design_Func,
+ FT_Set_MM_Blend_Func): Function pointers moved (in modified form)
+ to...
+ * include/freetype/internal/services/multmast.h: New file.
+
+ * include/freetype/internal/sfnt.h (SFNT_Interface): `get_interface'
+ is now of type `FT_Module_Requester'.
+ (SFNT_Get_Interface_Func, SFNT_Load_Table_Func): Function pointers
+ moved (in modified form) to...
+ * include/freetype/internal/servies/sfnt.h: New file.
+
+ * include/freetype/tttables.h (FT_Get_Sfnt_Table_Func): Function
+ pointer moved (in modified form) to `services/sfnt.h'.
+
+ * include/freetype/ftmodule.h (FT_Module_Interface): Make it a
+ a typedef to `FT_Pointer'.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec): Add
+ `postscript_name'.
+ * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
+ `postscript_name'.
+ Add `services' element.
+ (FT_LibraryRec): Remove `meta_class'.
+
+ * src/base/ftbdf.c: Include FT_SERVICE_BDF_H.
+ (test_font_type): Removed.
+ (FT_Get_BDF_Charset_ID, FT_Get_BDF_Property): Use services
+ provided in `FT_SERVICE_ID_BDF'.
+
+ * src/base/ftmm.c: Include FT_SERVICE_MULTIPLE_MASTERS_H.
+ (ft_face_get_mm_service): New auxiliary function to get services
+ from `FT_SERVICE_ID_MULTI_MASTERS'.
+ (FT_Get_Multi_Master, FT_Set_MM_Design_Coordinates,
+ FT_Set_MM_Blend_Coordinates): Use `ft_face_get_mm_service'.
+
+ * src/base/ftobjs.c: Include FT_SERVICE_POSTSCRIPT_NAME_H and
+ FT_SERVICE_GLYPH_DICT_H.
+ (ft_service_list_lookup): New function to get a specific service.
+ (destroy_face): Updated.
+ (Mac_Read_POST_Resource): Simplify some code.
+ (IsMacResource): Fix warnings.
+ (FT_Get_Name_Index, FT_Get_Glyph_Name): Use services provided in
+ `FT_SERVICE_ID_GLYPH_DICT'.
+ (FT_Get_Postscript_Name): Use service provided in
+ `FT_SERVICE_ID_POSTSCRIPT_NAME'.
+ (FT_Get_Sfnt_Table, FT_Load_Sfnt_Table): Use services provided in
+ `FT_SERVICE_ID_SFNT_TABLE'.
+
+ * src/base/ftxf86.c: Include FT_SERVICE_XFREE86_NAME_H.
+ (FT_Get_X11_Font_Format): Use service provided in
+ `FT_SERVICE_ID_XF86_NAME'.
+
+ * src/bdf/bdfdrivr.c: Include FT_SERVICE_BDF_H and
+ FT_SERVICE_XFREE86_NAME_H.
+ (bdf_get_charset_id): New function.
+ (bdf_service_bdf): New structure providing BDF services.
+ (bdf_services): New services list.
+ (bdf_driver_requester): Use `ft_service_list_lookup'.
+
+ * src/cff/cffdrivr.c: Include FT_SERVICE_XFREE86_NAME_H and
+ FT_SERVICE_GLYPH_DICT_H.
+ (cff_service_glyph_dict): New structure providing CFF services.
+ (cff_services): New services list.
+ (cff_get_interface): Use `ft_service_list_lookup'.
+
+ * src/cid/cidriver.c: Include FT_SERVICE_POSTSCRIPT_NAME_H and
+ FT_SERVICE_XFREE86_NAME_H.
+ (cid_service_ps_name): New structure providing CID services.
+ (cid_services): New services list.
+ (cid_get_interface): Use `ft_service_list_lookup'.
+
+ * src/pcf/pcfdrivr.c: Include FT_SERVICE_BDF_H and
+ FT_SERVICE_XFREE86_NAME_H.
+ (pcf_service_bdf): New structure providing PCF services.
+ (pcf_services): New services list.
+ (pcf_driver_requester): Use `ft_service_list_lookup'.
+
+ * src/sfnt/sfdriver.c: Include FT_SERVICE_GLYPH_DICT_H and
+ FT_SERVICE_POSTSCRIPT_NAME_H.
+ (get_sfnt_glyph_name): Renamed to...
+ (sfnt_get_glyph_name): This.
+ (get_sfnt_postscript_name): Renamed to...
+ (sfnt_get_ps_name): This.
+ Updated.
+ (sfnt_service_glyph_dict, sfnt_service_ps_name): New structures
+ providing services.
+ (sfnt_services): New services list.
+ (sfnt_get_interface): Use `ft_service_list_lookup'.
+
+ * src/truetype/ttdriver.c: Include FT_SERVICE_XFREE86_NAME_H.
+ (tt_services): New services list.
+ (tt_get_interface): Use `ft_service_list_lookup'.
+
+ * src/type1/t1driver.c: Include FT_SERVICE_MULTIPLE_MASTERS_H,
+ FT_SERVICE_GLYPH_DICT_H, FT_SERVICE_XFREE86_NAME_H, and
+ FT_SERVICE_POSTSCRIPT_NAME_H.
+ (t1_service_glyph_dict, t1_service_ps_name,
+ t1_service_multi_masters): New structures providing Type 1 services.
+ (t1_services): New services list.
+ (Get_Interface): Use `ft_service_list_lookup'.
+
+ * src/type42/t42drivr.c: Include FT_SERVICE_XFREE86_NAME_H,
+ FT_SERVICE_GLYPH_DICT_H, and FT_SERVICE_POSTSCRIPT_NAME_H.
+ (t42_service_glyph_dict, t42_service_ps_name): New strucures
+ providing Type 42 services.
+ (t42_services): New services list.
+ (T42_Get_Interface): Use `ft_service_list_lookup'.
+
+
+ * README, docs/CHANGES: Updating version numbers for 2.1.6, and
+ removing obsolete warnings in the documentation.
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 6.
+ * builds/unix/configure.ac (version_info): Set to 9:5:3.
+ * builds/unix/configure: Regenerated.
+
+ * include/freetype/internal/ftcore.h,
+ include/freetype/internal/ftexcept.h,
+ include/freetype/internal/fthash.h,
+ include/freetype/internal/ftobject.h: Removed. Obsolete.
+
+2003-09-09 David Turner <david@freetype.org>
+
+ Fixing PFR kerning support. The tables within the font file contain
+ (charcode,charcode) kerning pairs, we need to convert them to
+ (gindex,gindex).
+
+ * src/base/ftpfr.c (ft_pfr_check): Fix serious typo.
+ * src/pfr/prfload.c: Remove dead code.
+ (pfr_get_gindex, pfr_compare_kern_pairs, pfr_sort_kerning_pairs):
+ New functions.
+ (pfr_phy_font_done): Free `kern_pairs'.
+ (pfr_phy_font_load): Call `pfr_sort_kerning_pairs'.
+ * src/pfr/pfrobjs.c (pfr_face_get_kerning): Fix kerning extraction.
+ * src/pfr/pfrtypes.h (PFR_KERN_PAIR_INDEX): New macro.
+ (PFR_KernPairRec): Make `kerning' an FT_Int.
+ (PFR_PhyFontRec): New element `kern_pairs'.
+ (PFR_KernFlags): Values of PFR_KERN_2BYTE_CHAR and
+ PFR_KERN_2BYTE_ADJ were erroneously reversed.
+
+ * include/freetype/ftoption.h: Commenting out the macro
+ TT_CONFIG_OPTION_BYTECODE_INTERPRETER.
+
+2003-09-02 David Turner <david@freetype.org>
+
+
+ * Version 2.1.5 released.
+ =========================
+
+
+2003-08-31 Manish Singh <yosh@gimp.org>
+
+ * src/bdf/bdflib.c (_bdf_readstream): Don't use FT_MEM_COPY but
+ FT_MEM_MOVE.
+
+2003-08-30 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h (FT_ENCODING_SJIS, FT_ENCODING_GB2312,
+ FT_ENCODING_BIG5, FT_ENCODING_WANSUNG, FT_ENCODING_JOHAB): New
+ enumerations of FT_Encoding. The FT_ENCODING_MS_* variants except
+ FT_ENCODING_MS_SYMBOL are now deprecated.
+ Updated all users.
+ * docs/CHANGES: Document it.
+
+2003-08-27 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Accept lowercase characters
+ for spacing.
+
+2003-08-27 Mike FABIAN <mfabian@suse.de>
+
+ * src/pcf/pcfread.c (pcf_load_font), src/bdf/bdfdrivr.c
+ (BDF_Face_Init): Accept lowercase characters for slant and weight.
+
+2003-08-18 David Turner <david@freetype.org>
+
+ * include/freetype/config/ftoption.h: Disabling TrueType bytecode
+ interpreter until the UNPATENTED_HINTING works as advertised.
+
+ * src/autohint/ahhint.c (ah_hinter_load_glyph): Use `|' for
+ setting `load_flags'.
+
+ * Jamfile: Adding the `refdoc' target to the Jamfile in order to
+ build the API Reference in `docs/reference' automatically.
+
+ * include/freetype/t1tables.h (PS_FontInfoRec), src/cid/cidtoken.h,
+ src/type1/t1tokens.h, src/type42/t42parse.c: Resetting the types of
+ `italic_angle', `underline_position', and `underline_thickness' to
+ their previous values (i.e., long, short, and ushort) in order to
+ avoid breaking binary compatibility.
+
+ * include/freetype/ttunpat.h: Fixing documentation comment.
+
+ * include/freetype/config/ftoption.h, devel/ftoption.h
+ (TT_CONFIG_OPTION_OPTION_COMPILE_UNPATENTED_HINTING): Replaced
+ with...
+ (TT_CONFIG_OPTION_UNPATENTED_HINTING): This. Updated all users.
+ (TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING): Removed.
+
+ * include/freetype/internal/ftobjs.h (FT_DEBUG_HOOK_TYPE1): Removed.
+ (FT_DEBUG_HOOK_UNPATENTED_HINTING): New macro. Use this with
+ `FT_Set_Debug_Hook' to get the same effect as the removed
+ TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING.
+
+ * src/truetype/ttobjs.c (tt_face_init): Use
+ `FT_DEBUG_HOOK_UNPATENTED_HINTING'.
+
+2003-08-06 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1gload.c (T1_Load_Glyph), src/cff/cffgload.c
+ (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph): Fix
+ previous change.
+
+2003-08-05 Werner Lemberg <wl@gnu.org>
+
+ * src/type1/t1gload.c (T1_Load_Glyph), src/cff/cffgload.c
+ (cff_slot_load), src/cid/cidgload.c (cid_slot_load_glyph): Apply
+ font matrix to advance width also.
+ * docs/CHANGES: Updated.
+
+2003-07-26 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/configure.ac (version_info): Set to 9:4:3.
+ * builds/unix/configure: Updated.
+ * docs/CHANGES, docs/VERSION.DLL: Updated.
+
+ * include/freetype/freetype.h (FT_GlyphSlot): Change 2003-06-16
+ also breaks binary compatibility. Reintroduce an unsigned integer
+ at the old position of `flags' called `reserved'.
+
+2003-07-25 Werner Lemberg <wl@gnu.org>
+
+ Make API reference valid HTML 4.01 transitional.
+
+ * src/tools/docmaker/tohtml.py (html_header_1): Add doctype
+ and charset.
+ (html_header_2): Fix style elements and add some more.
+ Fix syntax.
+ (block_header, block_footer, description_header, description_footer,
+ marker_header, marker_footer, source_header, source_footer,
+ chapter_header): Don't use <center>...</center> but `align=center'
+ table attribute.
+ (chapter_inter, chapter_footer): Add <li> and use special <ul>
+ class.
+ Use double quotes around table widths given in percent.
+ (keyword_prefix, keyword_suffix): Don't change font colour directly
+ but use a new <span> class.
+ (section_synopsis_header, section_synopsis_footer): Don't change
+ colour.
+ (code_header, code_footer): Don't change font colour directly but
+ use a special <pre> class.
+ (print_html_field): <tr> gets the `valign' attribute, not <table>.
+ (print_html_field_list): Ditto.
+ (index_exit): Don't use <center>...</center> but `align=center'
+ table attribute.
+ (section_enter): Ditto.
+ (toc_exit): Don't emit </table>.
+ (block_enter): Use <h4><a>, not <a><h4>.
+ (__init__): Fix tag order in self.html_footer.
+
+2003-07-25 David Turner <david@freetype.org>
+
+ This change reimplements fix from 2003-05-30 without breaking
+ binary compatibility.
+
+ * include/freetype/t1tables.h (PS_FontInfoRec): `italic_angle',
+ `is_fixed_pitch', `underline_position', `underline_thickness' are
+ reverted to be normal values.
+
+ * include/freetype/internal/psaux.h (T1_FieldType): Remove
+ `T1_FIELD_TYPE_BOOL_P', `T1_FIELD_TYPE_INTEGER_P',
+ `T1_FIELD_TYPE_FIXED_P', `T1_FIELD_TYPE_FIXED_1000_P'.
+ (T1_FIELD_TYPE_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P,
+ T1_FIELD_FIXED_1000_P): Removed.
+ (T1_FIELD_TYPE_BOOL): Renamed to...
+ (T1_FIELD_BOOL): New macro. Updated all callers.
+
+ * src/type42/t42parse.c: `italic_angle', `is_fixed_pitch',
+ `underline_position', `underline_thickness', `paint_type',
+ `stroke_width' are reverted to be normal values.
+ (T42_KEYWORD_COUNT): New macro.
+ (t42_parse_dict): New array `keyword_flags' to mark that a value has
+ already been assigned to a dictionary entry.
+ * src/type42/t42objs.c (T42_Face_Init, T42_Face_Done): Updated.
+
+ * src/cid/cidtoken.h: `italic_angle', `is_fixed_pitch',
+ `underline_position', `underline_thickness' are reverted to be
+ normal values.
+ * src/cid/cidobjs.c (cid_face_done, cid_face_init): Updated.
+
+ * src/psaux/psobjs.c (ps_parser_load_field): Updated.
+
+ * src/type1/t1tokens.h: `italic_angle', `is_fixed_pitch',
+ `underline_position', `underline_thickness', `paint_type',
+ `stroke_width' are reverted to be normal values.
+ * src/type1/t1objs.c (T1_Face_Done, T1_Face_Init): Updated.
+ * src/type1/t1load.c (T1_FIELD_COUNT): New macro.
+ (parse_dict): Add parameter for keyword flags.
+ Record only first instance of a field.
+ (T1_Open_Face): New array `keyword_flags'.
+
+2003-07-24 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 5.
+ * builds/unix/configure.ac (version_info): Set to 10:0:3.
+ * builds/unix/configure: Updated.
+ * builds/freetype.mk (refdoc): Fix --title.
+
+ * docs/CHANGES, docs/VERSION.DLL, README: Updated.
+
+ * src/tools/docmaker/sources.py (re_crossref): Fix regular
+ expression to handle trailing punctuation characters.
+ * src/tools/docmaker/tohtml.py (make_html_word): Updated.
+
+ * docs/release: New file.
+
+2003-07-23 YAMANO-UCHI Hidetoshi <mer@din.or.jp>
+
+ * include/freetype/internal/psaux.h (PS_Parser_FuncsRec): New
+ member function `to_bytes'.
+
+ * src/psaux/psauxmod.c (ps_parser_funcs): New member
+ `ps_parser_to_bytes'.
+ (psaux_module_class): Increase version to 0x20000L.
+
+ * src/psaux/psobjs.c (IS_T1_LINESPACE): Add \f.
+ (IS_T1_NULLSPACE): New macro.
+ (IS_T1_SPACE): Add it.
+ (skip_spaces, skip_alpha): New functions.
+ (ps_parser_skip_spaces, ps_parser_skip_alpha): Use them.
+ (ps_tobytes, ps_parser_to_bytes): New functions.
+
+2003-07-07 Werner Lemberg <wl@gnu.org>
+
+ * builds/freetype.mk (DOC_DIR): New variable.
+ (refdoc): Use *_DIR variables.
+ (distclean): Remove documentation files.
+
+ * builds/detect.mk (std_setup, dos_setup): Mention `make refdoc'.
+
+ * configure: Set DOC_DIR variable.
+
+2003-07-07 Patrik Hgglund <patrik.hagglund@bredband.net>
+
+ * builds/freetype.mk (refdoc): New target to build the
+ documentation.
+ (.PHONY): Updated.
+
+ * include/freetype/freetype.h: Improve documentation of FT_CharMap.
+ * include/freetype/ftimage,h: Fix documentation of FT_OUTLINE_FLAGS.
+ * include/freetype/tttables.h: Document FT_Sfnt_Tag.
+
+2003-07-06 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfread.c
+ (pcf_load_font): Fix computation of height if PIXEL_SIZE property is
+ missing.
+
+2003-07-01 Werner Lemberg <wl@gnu.org>
+
+ * src/cache/ftcsbits.c (ftc_sbit_node_compare): Only add `size' if
+ there is no error. Reported by Knut St. Osmundsen
+ <bird-freetype@anduin.net>.
+
+2003-06-30 Werner Lemberg <wl@gnu.org>
+
+ A new try to synchronize bitmap font access.
+
+ * include/freetype/freetype.h (FT_Bitmap_Size): `height' is now
+ defined to return the baseline-to-baseline distance. This was
+ already the value returned by the BDF and PCF drivers.
+
+ The `width' field now gives the average width. I wasn't able to
+ find something better. It should be taken as informative only.
+
+ New fields `size', `x_ppem', and `y_ppem'.
+
+ * src/pcf/pcfread.c (pcf_load_font): Updated to properly fill
+ FT_Bitmap_Size.
+ Do proper rounding and conversion from 72.27 to 72 points.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Updated to properly fill
+ FT_Bitmap_Size.
+ Do proper rounding and conversion from 72.27 to 72 points.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Updated to properly fill
+ FT_Bitmap_Size.
+
+ * src/winfonts/winfnt.c (FNT_Face_Init): Updated to properly fill
+ FT_Bitmap_Size.
+
+2003-06-29 Werner Lemberg <wl@gnu.org>
+
+ Redesigning the FNT driver to return multiple faces, not multiple
+ strikes. At least one font (app850.fon from WinME) contains
+ different FNT charmaps for its subfonts. Consequently, the previous
+ design of having multiple bitmap strikes in a single font face fails
+ since we have only one charmap per face.
+
+ * include/freetype/internal/fnttypes.h (FNT_Size_Rec): Removed.
+ (FNT_FaceRec): Remove `num_fonts' field and replace `fonts' with
+ `font'.
+
+ * src/base/ftwinfnt.c (FT_Get_WinFNT_Header): Updated.
+
+ * src/winfonts/winfnt.c (fnt_font_load): Don't set pixel_width equal
+ to pixel_height.
+ (fnt_face_done_fonts): Removed.
+ (fnt_face_get_dll_fonts): Renamed to...
+ (fnt_face_get_dll_font): This. Add second function argument to
+ select face index.
+ Updated to load just one subfont.
+ (fnt_font_done, FNT_Face_Done): Updated.
+ (FNT_Face_Init): Handle `face_index'.
+ Updated.
+ (FNT_Size_Set_Pixels): Simplified; similar to BDF and PCF, the
+ bitmap width is now ignored.
+ (FNT_Load_Glyph): Updated.
+ Fix glyph index computation.
+ (winfnt_driver_class): Updated.
+
+2003-06-25 Owen Taylor <otaylor@redhat.com>
+
+ * src/sfnt/ttload.c (tt_face_load_hdmx): Don't assign
+ num_records until we actually decide to load the table,
+ otherwise, we'll segfault in tt_face_free_hdmx.
+
+2003-06-24 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffdrivr.c (cff_get_glyph_name): Protect against zero
+ glyph name pointer. Reported by Mikey Anbary <manbary@vizrt.com>.
+
+2003-06-23 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/glnames.py: Updated to AGL 2.0.
+ * src/psnames/pstables.h: Regenerated.
+
+2003-06-22 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/cache/ftcglyph.h, include/freetype/ttnameid.h,
+ src/base/ftcalc.c, src/base/fttrigon.c, src/cff/cffgload.c,
+ src/otlayout/otlgsub.c, src/pshinter/pshrec.c,
+ src/psnames/psmodule.c, src/sfnt/sfobjs.c, src/truetype/ttdriver.c:
+ Decorate constants with `U' and `L' if appropriate.
+
+ * include/freetype/ftmoderr.h: Updated to include recent module
+ additions.
+
+ * src/pshinter/pshnterr.h (FT_ERR_BASE): Define as
+ `FT_Mod_Err_PShinter'.
+ * src/type42/t42error.h (FT_ERR_BASE): Define as
+ `FT_Mod_Err_Type42'.
+
+ * src/pshinter/pshrec.h (PS_HINTS_MAGIC): Removed. Not used.
+
+ * include/freetype/config/ftconfig.h [__MWERKS__]: Define FT_LONG64
+ and FT_INT64.
+
+2003-06-21 Werner Lemberg <wl@gnu.org>
+
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Use first_char in
+ computation of glyph_index.
+ (FNT_Size_Set_Pixels): To find a strike, first check pixel_height
+ only, then try to find a better hit by comparing pixel_width also.
+ Without this fix it isn't possible to access all strikes.
+ Also compute metrics.max_advance to be in sync with other bitmap
+ drivers.
+
+ * src/base/ftobjs.c (FT_Set_Char_Size): Remove redundant code.
+ (FT_Set_Pixel_Size): Assign value to `metrics' after validation of
+ arguments.
+
+2003-06-20 Werner Lemberg <wl@gnu.org>
+
+ Synchronize computation of height and width for bitmap strikes. The
+ `width' field in the FT_Bitmap_Size structure is now only useful to
+ enumerate different strikes. The `max_advance' field of the
+ FT_Size_Metrics structure should be used to get the (maximum) width
+ of a strike.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Don't use AVERAGE_WIDTH for
+ computing `available_sizes->width' but make it always equal to
+ `available_sizes->height'.
+
+ * src/pcf/pcfread.c (pcf_load_font): Don't use RESOLUTION_X for
+ computing `available_sizes->width' but make it always equal to
+ `available_sizes->height'.
+
+ * src/truetype/ttdriver.c (Set_Pixel_Sizes): Pass only single
+ argument to function.
+
+ * src/psnames/psmodule.c (ps_unicode_value): Handle `.' after
+ `uniXXXX' and `uXXXX[X[X]]'.
+
+2003-06-19 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdfdrivr.c: s/FT_Err_/BDF_Err/.
+ * src/cache/ftccache.c, src/cache/ftcsbits.c, src/cache/ftlru.c:
+ s/FT_Err_/FTC_Err_/.
+ * src/cff/cffcmap.c: s/FT_Err_/CFF_Err_/.
+ * src/pcf/pcfdrivr.c: s/FT_Err_/PCF_Err_/.
+ * src/psaux/t1cmap.c: Include psauxerr.h.
+ s/FT_Err_/PSaux_Err_/.
+ * src/pshinter/pshnterr.h: New file.
+ * src/pshinter/rules.mk: Updated.
+ * src/pshinter/pshalgo.c, src/pshinter/pshrec.c: Include pshnterr.h.
+ s/FT_Err_/PSH_Err_/.
+ * src/pfr/pfrdrivr.c, src/pfr/pfrobjs.c, src/pfr/pfrsbit.c:
+ s/FT_Err_/PFR_Err_/.
+ * src/sfnt/sfdriver.c, src/sfnt/sfobjs.c, src/sfnt/ttcmap0.c,
+ src/sfnt/ttload.c: s/FT_Err_/SFNT_Err_/.
+ * src/truetype/ttgload.c: s/FT_Err_/TT_Err_/.
+ * src/gzip/ftgzip.c: Load FT_MODULE_ERRORS_H and define
+ FT_ERR_PREFIX and FT_ERR_BASE.
+ s/FT_Err_/Gzip_Err_/.
+
+2003-06-19 Dirck Blaskey <listtarget@danbala.com>
+
+ * src/cff/cffload (cff_encoding_load): `nleft' must be FT_UInt,
+ otherwise adding 1 might wrap the result.
+
+2003-06-18 Werner Lemberg <wl@gnu.org>
+
+ * src/psnames/psmodule.c (ps_unicode_value): Add support to
+ recognize `uXXXX[X[X]]' glyph names.
+ Don't handle glyph names starting with `uni' which have more than
+ four digits.
+
+2003-06-16 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h (FT_Open_Flags): Replaced with
+ #defines for the constants.
+ (FT_Open_Args): Change type of `flags' to FT_UInt.
+ (FT_GlyphSlot): Move `flags' to FT_Slot_Internal.
+
+ * include/freetype/ftimage.h (FT_Outline_Flags, FT_Raster_Flag):
+ Replaced with #defines for the constants.
+
+ * include/freetype/internal/ftobjs.h (FT_Slot_Internal): New
+ field `flags' (from FT_GlyphSlot).
+ Updated all affected source files.
+ (FT_GLYPH_OWN_BITMAP): New macro (from ftgloadr.h).
+
+ * include/freetype/internal/ftgloadr.h (FT_GLYPH_OWN_BITMAP): Moved
+ to ftobjs.h.
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Use dummy
+ FT_GlyphSlot_Internal object.
+
+2003-06-15 Werner Lemberg <wl@gnu.org>
+
+ * builds/compiler/gcc.mk, builds/compiler/gcc-dev.mk (CFLAGS):
+ Add -fno-strict-aliasing to get rid of zillion warnings from gcc
+ version 3.3.
+
+2003-06-14 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftglyph.h (ft_glyph_bbox_unscaled,
+ ft_glyph_bbox_subpixels, ft_glyph_bbox_gridfit,
+ ft_glyph_bbox_truncate, ft_glyph_bbox_pixels): Replaced with
+ FT_GLYPH_BBOX_UNSCALED, FT_GLYPH_BBOX_SUBPIXELS,
+ FT_GLYPH_BBIX_GRIDFIT, FT_GLYPH_BBOX_TRUNCATE, FT_GLYPH_BBOX_PIXELS.
+ The lowercase variants are now (deprecated aliases) to the uppercase
+ versions.
+ Updated all other files.
+
+ * include/freetype/ftmodule.h (ft_module_font_driver,
+ ft_module_renderer, ft_module_hinter, ft_module_styler,
+ ft_module_driver_scalable, ft_module_driver_no_outlines,
+ ft_module_driver_has_hinter): Replaced with FT_MODULE_FONT_DRIVER,
+ FT_MODULE_RENDERER, FT_MODULE_HINTER, FT_MODULE_STYLER,
+ FT_MODULE_DRIVER_SCALABLE, FT_MODULE_DRIVER_NO_OUTLINES,
+ FT_MODULE_DRIVER_HAS_HINTER.
+ The lowercase variants are now (deprecated aliases) to the uppercase
+ versions.
+ Updated all other files.
+
+ * src/base/ftglyph.c (FT_Glyph_Get_CBox): Handle bbox_mode better
+ as enumeration.
+
+ * src/pcf/pcfdrivr.c (pcf_driver_class), src/winfonts/winfnt.c
+ (winfnt_driver_class), src/bdf/bdfdrivr.c (bdf_driver_class): Add
+ the FT_MODULE_DRIVER_NO_OUTLINES flag.
+
+2003-06-13 Detlef Wrkner <TetiSoft@apg.lahn.de>
+
+ * src/pfr/pfrobjs.c (pfr_slot_load): Apply font matrix.
+
+2003-06-13 Werner Lemberg <wl@gnu.org>
+
+ * builds/dos/detect.mk: Test not only for `Dos' but for `DOS' also.
+
+ * builds/dos/dos-emx.mk, builds/compiler/emx.mk: New files for
+ EMX gcc compiler.
+ * builds/dos/detect.mk: Add target `emx'.
+
+ * builds/compiler/watcom.mk (LINK_LIBRARY): GNU Make for DOS doesn't
+ like a trailing semicolon; add a dummy command.
+
+ * src/cid/cidload.c: Remove parse_font_bbox code (already enclosed
+ with #if 0 ... #endif).
+
+ * src/type1/t1tokens.h: Handle /FontName.
+ * src/type1/t1load.c (parse_font_name): Removed.
+ Remove parse_font_bbox code (already enclosed with #if 0 ...
+ #endif).
+
+ * src/type42/t42parse.c (t42_parse_font_name): Removed.
+ Remove t42_parse_font_bbox code (already enclosed with #if 0 ...
+ #endif).
+ (t42_keywords): Handle /FontName with T1_FIELD_KEY.
+
+2003-06-12 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/psaux.h (T1_FieldType): Add
+ T1_FIELD_TYPE_KEY.
+ (T1_FIELD_KEY): New macro.
+ * src/psaux/psobjs.c (ps_parser_load_field): Handle
+ T1_FIELD_TYPE_KEY.
+
+ * src/cid/cidtoken.h: Use T1_FIELD_KEY for /CIDFontName.
+
+2003-06-11 Alexander Malmberg <alexander@malmberg.org>
+
+ * src/cache/ftlru.c (FT_LruList_Remove_Selection): Decrease
+ number of nodes.
+ (FT_LruList_Lookup): Fix assertion for out-of-memory case.
+
+2003-06-11 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidload.c (cid_decrypt): Removed.
+ (cid_read_subrs): Use t1_decrypt from psaux module.
+ * src/cid/cidload.h: Updated.
+ * src/cid/cidgload.c (cid_load_glyph): Use t1_decrypt from psaux
+ module.
+
+2003-06-10 Werner Lemberg <wl@gnu.org>
+
+ * src/cid/cidobjs.c: Apply change 2003-05-31 from <Ron.Dev@gmx.de>.
+ Compute style flags.
+ Fix computation of root->height.
+ * src/cid/cidtoken.h: Handle FontBBox.
+ * src/cid/cidload.c (cid_load_keyword): Handle
+ T1_FIELD_LOCATION_BBOX.
+ (parse_font_bbox): Commented out.
+ (cid_field_record): Comment out element for parsing FontBBox.
+
+ * src/type42/t42parse.c (t42_parse_font_bbox): Commented out.
+ (t42_keywords): Handle FontBBox with T1_FIELD_BBOX, not with
+ T1_FIELD_CALLBACK.
+ (t42_parse_font_bbox): Commented out.
+ (t42_load_keyword): Handle T1_FIELD_LOCATION_BBOX.
+ * src/type42/t42objs.c (T42_Face_Init): Apply change 2003-05-31
+ from <Ron.Dev@gmx.de>.
+
+2003-06-09 George Williams <gww@silcom.com>
+
+ * src/truetype/ttinterp.c (SetSuperRound) <0x30>: Follow Apple's
+ TrueType specification.
+ (Ins_MDRP, Ins_MIRP): Fix single width cut-in test.
+
+2003-06-09 Detlef Wrkner <TetiSoft@apg.lahn.de>
+
+ * src/gzip/ftgzip.c: (inflate_mask): Replaced with...
+ (NO_INFLATE_MASK): This.
+ * src/gzip/infutil.h: Declare `inflate_mask' conditionally by
+ NO_INFLATE_MASK.
+
+2003-06-09 Alexis S. L. Carvalho <alexis@cecm.usp.br>
+
+ * src/gzip/ftgzip.c (ft_gzip_file_fill_output): Handle Z_STREAM_END
+ correctly.
+
+2003-06-09 Wolfgang Domrse <porthos.domroese@harz.de>
+
+ * src/pshinter/pshglob.c (psh_globals_new): Change calculation of
+ dim->stdw.count to avoid compiler problem.
+
+ * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Move the block
+ variables to the beginning of the function to avoid compiler
+ problems.
+ Add casts necessary for 16bit compilers.
+
+2003-06-09 Werner Lemberg <wl@gnu.org>
+
+ * src/pfr/rules.mk (PFR_DRV_SRC): Add pfrsbit.c.
+ (PFR_DRV_H): Add pfrtypes.h.
+
+ * include/freetype/config/ftconfig.h: s/__MWKS__/__MWERKS__/.
+
+2003-06-08 Karl Schultz <kschultz@rsinc.com>
+
+ * src/pfr/pfrsbit.c (pfr_bitwriter_init): Change type of third
+ argument to FT_Bool.
+ (pfr_lookup_bitmap_data): Change type of third and fourth argument
+ to FT_UInt. Updated caller.
+ (pfr_load_bitmap_bits): Change type of fourth argument to FT_Bool.
+
+2003-06-08 Werner Lemberg <wl@gnu.org>
+
+ Completely revised FreeType's make management.
+
+ . In all makefiles `/' is used as the path separator. The
+ conversion to the real path separators is done as late as
+ possible using $(subst ...).
+
+ . $(HOSTSEP) no longer exists. Now, $(SEP) gives the path separator
+ for the operating system, and the new $(COMPILER_SEP) the path
+ separator for the compiler tools.
+
+ . $(BUILD) has been renamed to $(BUILD_DIR). In general, all
+ directory variables end with `_DIR'. The variants ending in `_'
+ (like `BASE_' have been removed).
+
+ The following ChangeLog entries only describe changes which are
+ not related to the redesign.
+
+ * builds/beos/beos-def.mk (BUILD_DIR): Fix typo.
+ * builds/compiler/watcom.mk (LINK_LIBRARY): Fix linker call to avoid
+ overlong arguments as suggested by J. Ali Harlow
+ <ali@avrc.city.ac.uk>.
+ * builds/dos/dos-wat.mk: New file.
+ * builds/freetype.mk (FREETYPE_H): Include header files from the
+ `devel' subdirectory.
+
+ * builds/os2/os2-dev.mk, builds/unix/unixddef.mk,
+ builds/unix/unixddef.mk, builds/win32/w32-bccd.mk,
+ builds/win32/w32-dev.mk (BUILD_DIR): Fix path.
+
+ * builds/unix/configure.ac, builds/unic/configure: Updated.
+ * builds/unix/unix-def.in (DISTCLEAN): Add `freetype2.pc'.
+
+2003-06-07 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftmac.c (FT_New_Face_From_SFNT): s/rlen/sfnt_size/ to
+ make it compile.
+
+ * devel/ftoption.h: Updated.
+
+2003-06-07 Detlef Wrkner <TetiSoft@apg.lahn.de>
+
+ * include/freetype/internal/psaux.h, src/truetype/ttgload.h:
+ s/index/idx/ to fix compiler warnings.
+
+ * src/sfnt/ttcmap0.c (tt_face_build_cmaps): Use more `volatile' to
+ fix compiler warning.
+
+ * src/gzip/ftgzip.c (BUILDFIXED): Removed.
+ * src/gzip/inftrees.c (inflate_trees_fixed) [!BUILDFIXED]: Use
+ FT_UNUSED to remove compiler warning.
+
+2003-06-06 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/ftstroker.h: Renamed to...
+ * include/freetype/ftstroke.h: This.
+
+ * src/base/ftstroker.c: Renamed to...
+ * src/base/ftstroke.c: This.
+
+ * include/freetype/config/ftheader.h (FT_STROKER_H): Updated.
+
+ * src/base/descrip.mms, src/base/Jamfile, src/base/rules.mk:
+ Updated.
+
+ * src/pcf/pcfdriver.c: Renamed to...
+ * src/pcf/pcfdrivr.c: This.
+ * src/pcf/pcfdriver.h: Renamed to...
+ * src/pcf/pcfdrivr.h: This.
+
+ * src/pcf/Jamfile, src/pcf/rules.mk: Updated.
+
+2003-06-05 Wenlin Institute (Tom Bishop) <wenlin@wenlin.com>
+
+ * src/base/ftmac.c (file_spec_from_path) [TARGET_API_MAC_CARBON]:
+ Add `#if !defined(__MWERKS__)'.
+
+2003-06-05 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/internal/psaux.h (T1_FieldType): Add
+ T1_FIELD_TYPE_FIXED_1000 and T1_FIELD_TYPE_FIXED_1000_P.
+ (T1_FIELD_FIXED_1000, T1_FIELD_FIXED_1000_P): New macros.
+ * src/psaux/psobjs.c (ps_parser_load_field): Handle
+ T1_FIELD_TYPE_FIXED_1000 and T1_FIELD_TYPE_FIXED_1000_P.
+
+ * src/cff/cffparse.c (cff_kind_fixed_thousand): New enumeration.
+ (CFF_FIELD_FIXED_1000): New macro.
+ (cff_parser_run): Handle cff_kind_fixed_thousand.
+ * src/cff/cfftoken.h: Use CFF_FIELD_FIXED_1000 for blue_scale.
+ * src/cff/cffload (cff_subfont_load): Fix default values of
+ expansion_factor and blue_scale.
+
+ * src/cif/cidtoken.h, src/type1/t1tokens.h: Use T1_FIELD_FIXED_1000
+ for blue_scale.
+
+ * src/pshinter/pshglob.c (psh_globals_new): Fix default value of
+ blue_scale.
+
+2003-06-04 Wolfgang Domrse <porthos.domroese@harz.de>
+
+ * include/freetype/internal/ftdriver.h,
+ include/freetype/internal/ftobjs.h,
+ include/freetype/internal/psaux.h, src/cid/cidgload.c,
+ src/psaux/psobjs.c, src/psaux/t1decode.c, src/psaux/psobjs.h,
+ src/pshinter/pshrec.c, src/pshinter/pshalgo.c,
+ src/psnames/psmodule.c, src/raster/ftraster.c, src/sfnt/sfobjs.c,
+ src/smooth/ftgrays.c, src/smooth/ftsmooth.c, src/truetype/ttobjs.c,
+ src/truetype/ttdriver.c, src/truetype/ttgload.c, src/type1/t1afm.c,
+ src/type1/t1gload.c, src/type1/t1gload.h, src/type1/t1load.c,
+ src/type1/t1objs.c, src/type42/t42parse.c, src/type42/t42parse.h:
+ Many casts and slight argument type changes to make it work with
+ a 16bit compiler.
+
+2003-06-04 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftoption.h: Defining
+ TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING by default is a bad idea
+ since some fonts (e.g. Arial) produce worse results than without
+ hinting. Reverted.
+
+2003-06-04 Werner Lemberg <wl@gnu.org>
+
+ * src/truetype/ttgload.c (load_truetype_glyph)
+ [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Call
+ FT_GlyphLoader_CheckPoints before adding phantom points. This fixes
+ a segfault bug with fonts (e.g. htst3.ttf) which have nested
+ subglyphs more than one level deep. Reported by Anthony Fok.
+
+ * include/freetype/config/ftoption.h: Define
+ TT_CONFIG_OPTION_BYTECODE_INTERPRETER,
+ TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING, and
+ TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING to make it the new
+ default.
+
+2003-06-03 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahhint.c (ah_hinter_hint_edges): Removed. Just a
+ wrapper for ah_hint_edges.
+ (ah_hint_edges): Renamed to...
+ (ah_hinter_hint_edges): This.
+
+ * src/base/ftobjs.c (FT_Set_Hint_Flags): Removed. Unused.
+
+ * include/freetype/internal/ftobjs.h (FT_Face_InternalRec),
+ include/freetype/internal/psaux.h (T1_DecoderRec),
+ src/cff/cffgload.h (CFF_Builder): Remove `hint_flags' field.
+ Unused.
+
+ * src/cff/cffgload.c (cff_builder_init): Updated.
+ (cff_decoder_parse_charstrings) <cff_op_endchar>: Call hinter->apply
+ with decoder->hint_mode instead of builder->hint_flags.
+ * src/psaux/t1decode.c (t1_decoder_init): Updated.
+
+ * src/base/ftstroker.c (ft_stroke_border_export): s/index/idx/.
+
+ * src/sfnt/sfobjs.c (sfnt_load_face): Commented out code which
+ increased root->height by 15% if the line gap was zero. There exist
+ fonts (containing e.g. form drawing characters) which intentionally
+ have a zero line gap value.
+
+ * src/truetype/ttinterp.c (Free_Project, CUR_Func_freeProj):
+ Removed. Unused.
+ Updated all callers.
+
+2003-06-02 Werner Lemberg <wl@gnu.org>
+
+ * src/cff/cffobjs.c (cff_face_init): Use symbolic names for
+ Adobe specific encoding IDs (there was a wrong EID value for custom
+ encoding).
+
+ * src/cff/cffcmap.h (CFF_CMapStdRec): Remove `count'.
+ * src/cff/cffcmap.c (cff_cmap_encoding_init,
+ cff_cmap_encoding_done): Updated.
+ (cff_cmap_encoding_char_index, cff_cmap_encoding_char_next): Use
+ 256 as limit for character code.
+
+2003-06-01 Werner Lemberg <wl@gnu.org>
+
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Revert change from
+ 2003-03-20.
+
+2003-05-31 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/fttrigon.h (FT_Vector_Normalize): Removed.
+
+2003-05-31 <Ron.Dev@gmx.de>
+
+ * src/type1/t1objs.c (T1_Face_Init): Improve algorithm for guessing
+ the font style by ignoring spaces and hyphens.
+
+ * builds/unix/freetype2.in: Fix `Version' field.
+
+2003-05-30 Werner Lemberg <wl@gnu.org>
+
+ Avoid overwriting of numeric font dictionary entries for synthetic
+ fonts. Additionally, some entries were handled as `integer' instead
+ of `number'.
+
+ * include/freetype/internal/psaux.h (T1_FieldType): Add
+ T1_FIELD_TYPE_BOOL_P, T1_FIELD_TYPE_INTEGER_P, and
+ T1_FIELD_TYPE_FIXED_P.
+ (T1_FIELD_BOOL_P, T1_FIELD_NUM_P, T1_FIELD_FIXED_P): New macros.
+ * src/psaux/psobjs.c (ps_parser_load_field): Handle new field types.
+
+ * include/freetype/internal/cfftypes.h (CFF_FontRecDict),
+ src/cff/cfftoken.h: Change type of underline_position and
+ underline_thickness to FT_Fixed.
+ * src/cff/cffload.c (cff_subfont_load): Fix default values of
+ underline_position and underline_thickness.
+ * src/cff/cffobjs.c (cff_face_init): Set underline_position
+ and underline_thickness in `root'.
+
+ * include/freetype/internal/t1types.h (T1_Font): Change point_type
+ and stroke_width to pointers.
+ * include/freetype/t1tables.h (PS_FontInfo): Change italic_angle,
+ is_fixed_pitch, underline_position, and underline_thickness to
+ pointers.
+ * src/type1/t1tokens.h: Change italic_angle, is_fixed_pitch,
+ underline_position, and underline_thickness to pointers. Change
+ the type of the latter two to `fixed'.
+ Change type of stroke_width to `fixed' and make it a pointer.
+ Change paint_type to pointer.
+ * src/type1/t1objs.c (T1_Face_Done): Updated.
+ (T1_Face_Init): Updated.
+ Fix assignment of underline_position and underline_thickness.
+
+ * src/cid/cidtoken.h: Change italic_angle, is_fixed_pitch,
+ underline_position, and underline_thickness to pointers. Change
+ the type of the latter two to `fixed'.
+ Change type of stroke_width to `fixed'.
+ * src/cid/cidobjs.c (cid_face_done): Updated.
+ (cid_face_init): Updated.
+ Fix assignment of underline_position and underline_thickness.
+
+ * src/type42/t42parse.c: Change italic_angle, is_fixed_pitch,
+ underline_position, and underline_thickness to pointers. Change the
+ type of the latter two to `fixed'.
+ Change type of stroke_width to `fixed' and make it a pointer.
+ Change paint_type to pointer.
+ * src/type42/t42objs.c (T42_Face_Init): Updated.
+ Fix assignment of underline_position and underline_thickness.
+ (T42_Face_Done): Updated.
+
+ * src/base/ftobjs.c (open_face_from_buffer): Fix compiler warning.
+ * src/pshinter/pshglob.c, src/pshinter/pshglob.h
+ (psh_globals_set_scale): Make it a local function.
+
+ * test/gview.c: Fix renaming ps3->ps typo.
+ Formatting.
+
+2003-05-29 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshalgo1.[ch], src/pshinter/pshalgo2.[ch]: Removed.
+ * src/pshinter/pshalgo.h: Removed.
+
+ * src/pshinter/pshalgo3.[ch]: Renamed to...
+ * src/pshinter/pshalgo.[ch]: New files.
+ s/PSH3/PSH/.
+ s/psh3/psh/.
+ s/ps3/ps/.
+
+ * src/pshinter/pshrec.c, src/pshinter/pshinter.c: Updated.
+ * src/pshinter/rules.mk, src/pshinter/Jamfile: Updated.
+
+ * src/pshinter/pshglob.[ch] (psh_dimension_snap_width): Commented
+ out.
+
+ * tests/gview.c: Remove code for pshalgo1 and pshalgo2.
+ Updated.
+
+2003-05-28 Martin Zinser <zinser@decus.de>
+
+ * vms_make.com: Reworked support for shareable images on VMS. The
+ first version was kind of a hack; the current implementation of the
+ procedure to extract the required symbols is much cleaner.
+
+ Reworked creation of MMS files, avoiding a number of temporary files
+ which were created in the previous version.
+
+ Further work on creating descrip.mms files on the fly.
+
+ * builds/vms/descrip.mms, src/autohint/descrip.mms,
+ src/type1/descrip.mms: Removed.
+
+2003-05-28 Werner Lemberg <wl@gnu.org>
+
+ * src/pshinter/pshalgo3.c (psh3_glyph_compute_extrema): Skip
+ contours with only a single point to avoid segfault.
+
+ * src/base/ftglyph.c (FT_Glyph_To_Bitmap): Activate code for
+ handling `origin'.
+
+2003-05-24 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahtypes.h (AH_OPTION_NO_STRONG_INTERPOLATION):
+ Removed since unused.
+
+2003-05-21 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftstdlib.h (ft_strcat): New wrapper macro
+ for strcat.
+
+ * src/base/ftmac.c (create_lwfn_name): s/isupper/ft_isupper/.
+ (parse_font): s/memcpy/ft_memcpy/.
+ (is_dfont) [TARGET_API_MAC_CARBON]: s/memcmp/ft_memcmp/.
+ * src/base/ftobjs.c (load_mac_face) [FT_MACINTOSH]:
+ s/strlen/ft_strlen/.
+ s/strcat/ft_strcat/.
+ s/strcpy/ft_strcpy/.
+ * src/gzip/zutil.h: s/memset/ft_memset/.
+ s/memcmp/ft_memcmp/.
+
+ * src/bdf/bdfdrivr.c (BDF_Face_Init), src/pcf/pcfdriver.c
+ (PCF_Face_Init): Test for charset registry case-insensitively.
+
+ * src/gzip/ftgzip.c (ft_gzip_fil_io): Revert change from yesterday;
+ it has already been fixed differently.
+
+ * src/truetype/ttinterp.c (DO_SFVTL): Add missing braces around
+ if-clause.
+
+2003-05-21 Martin Zinser <zinser@decus.de>
+
+ * t1load.c (parse_blend_axis_types): Fix compiler warning.
+
+ * descrip.mms: Removed. Now created by...
+
+ * vms_make.com: New file.
+
+2003-05-21 Weiqi Gao <weiqigao@networkusa.net>
+
+ * src/gzip/ftgzip.c (ft_gzip_file_io): Avoid zero value of `delta'
+ to prevent infinite loop.
+
+2003-05-21 Lars Clausen <lrclause@cs.uiuc.edu>
+
+ * docs/VERSION.DLL: Provide better autoconf snippet to check
+ FreeType version.
+
+2003-05-21 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (open_face): Free `internal' not
+ `face->internal' in case of error to avoid possible segfault.
+
+ * src/pshinter/pshalgo3.c (ps3_hints_apply): Check whether we
+ actually have an outline.
+
+2003-05-20 David Chester <davidchester@qmx.net>
+
+ * src/pshinter/pshalgo3.c (ps3_hints_apply): Try to optimize
+ y_scale so that the top of non-capital letters is aligned on a pixel
+ boundary whenever possible.
+
+ * src/autohint/ahhint.c (ah_hint_edges): Make sure that lowercase
+ m's maintain their symmetry.
+
+2003-05-20 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahhint.c (ah_hinter_load_glyph): Oops! David's
+ patch from yesterday has been resolved already in a different
+ way. Reverted.
+
+2003-05-19 David Chester <davidchester@qmx.net>
+
+ * src/autohint/ahhint.c (ah_hinter_load_glyph): Don't scale
+ y_scale locally but face->size->metrics.y_scale.
+
+2003-05-19 David Turner <david@freetype.org>
+
+ * src/sfnt/ttcmap0.c (tt_cmap4_char_next): Select proper start
+ value for `hi' to avoid infinite loop.
+
+2003-05-18 Yong Sun <sunyong@njstar.com>
+
+ * src/raster/ftraster.c (Insert_Y_Turn): Fix overflow test.
+
+2003-05-18 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/config/ftoption.h [FT_CONFIG_OPTION_MAC_FONTS]:
+ New macro.
+ * src/base/ftobjs.c: Use it to control mac font support on non-mac
+ platforms.
+
+2003-05-17 George Williams <gww@silcom.com>
+
+ Implement partial support of Mac fonts on non-Mac platforms.
+
+ * src/base/ftobjs.c (memory_stream_close, new_memory_stream,
+ open_face_from_buffer, Mac_Read_POST_Resource,
+ Mac_Read_sfnt_Resource, IsMacResource, IsMacBinary, load_mac_face)
+ [!FT_MACINTOSH]: New functions.
+ (FT_Open_Face) [!FT_MACINTOSH]: Use load_mac_face.
+
+2003-05-17 Werner Lemberg <wl@gnu.org>
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Scale linear advance width only
+ if FT_FACE_FLAG_SCALABLE is set (otherwise we have a division by
+ zero since FNT and friends don't define `face->units_per_EM').
+
+2003-05-15 David Turner <david@freetype.org>
+
+ * src/base/fttrigon.c (FT_Vector_Rotate): Avoid rounding errors
+ for small values.
+
+2003-05-15 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahtypes.h (AH_PointRec): Remove unused `in_angle'
+ and `out_angle' fields.
+
+2003-05-14 George Williams <gww@silcom.com>
+
+ * src/base/ftmac.c (FT_New_Face_From_SFNT): Handle CFF files also.
+
+2003-05-14 Werner Lemberg <wl@gnu.org>
+
+ * include/freetype/freetype.h: Fix typo in comment
+ (FT_HAS_FIXED_SIZES).
+
+2003-05-10 Dan Williams <dan@bigw.org>
+
+ * builds/unix/aclocal.m4: Comment out definition of
+ `allow_undefined_flag' for Darwin 1.3.
+ * builds/unix/configure.ac: Add option --with-old-mac-fonts.
+ * builds/unix/ltmain.sh: Fix version numbering for Darwin 1.3.
+ * builds/unix/configure: Regenerated.
+
+ * include/freetype/config/ftconfig.h: Fix conditions for defining
+ `FT_MACINTOSH'.
+ * src/base/ftbase.c: Include `ftmac.c' conditionally.
+ * src/base/ftmac.c: Handle __GNUC__.
+
+2003-05-07 YAMANO-UCHI Hidetoshi <mer@din.or.jp>
+
+ * src/cid/cidload.c (is_alpha): Removed.
+ (cid_parse_dict): Use `cid_parser_skip_alpha' instead of `is_alpha'.
+
+2003-05-07 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahoptim.c, src/autohint/ahoptim.h: Obsolete, removed.
+
+2003-05-07 David Turner <david@freetype.org>
+
+ * src/autohint/ahglyph.c (ah_setup_uv): Exchange `for' loop and
+ `switch' statement to make it run faster.
+ (ah_outline_compute_segments): Reset `segment->score' and
+ `segment->link'.
+ (ah_outline_link_segments): Provide alternative code which does
+ the same but runs much faster.
+ Handle major direction also.
+ (ah_outline_compute_edges): Scale `edge_distance_threshold' down
+ after rounding instead of scaling comparison value in loop.
+
+ * src/autohint/ahhint.c (ah_hinter_align_stong_points): Provide
+ alternative code which runs faster.
+ Handle `before->scale == 0'.
+
+ * src/autohint/ahtypes.h (AH_SegmentRec): Move some fields down.
+ (AH_EdgeRec): Move some fields in structure.
+ New field `scale'.
+
+ * src/sfnt/ttcmap0.c (tt_cmap4_char_next): Use binary search.
+
+2003-05-02 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahoptim.c (LOG): Renamed to...
+ (AH_OPTIM_LOG): This.
+ (AH_Dump_Springs): Fix log message format.
+
+ * src/autohint/ahhint.c (ah_hint_edges_3): Renamed to...
+ (ah_hint_edges): This.
+
+2002-05-02 Keith Packard <keithp@keithp.com>
+
+ * src/bdf/bdfdrivr.c (BDF_Set_Pixel_Size): Initialize `max_advance'.
+
+2003-05-01 Werner Lemberg <wl@gnu.org>
+
+ * src/autohint/ahglyph.c (ah_test_extrema): Renamed to...
+ (ah_test_extremum): This.
+
+2003-04-28 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/configure.ac: Generate `freetype.pc' from
+ `freetype.in'.
+ * builds/unix/configure: Regenerated.
+ * builds/unix/install.mk (install, uninstall): Handle `freetype.pc'.
+
+2003-04-28 Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
+
+ * builds/unix/freetype2.in: New file. Contains building information
+ for the `pkg-config' package.
+
+2003-04-28 David Turner <david@freetype.org>
+
+ * src/base/ftobjs.c (FT_Load_Glyph): Fix boundary check for
+ `glyph_index'.
+
+2003-04-25: Graham Asher <graham.asher@btinternet.com>
+
+ Added the optional unpatented hinting system for TrueType. It
+ allows typefaces which need hinting to produce correct glyph forms
+ (e.g., Chinese typefaces from Dynalab) to work acceptably without
+ infringing Apple patents. This system is compiled only if
+ TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING is defined in
+ ftoption.h.
+
+ * include/freetype/ttunpat.h: New file. Defines
+ FT_PARAM_TAG_UNPATENTED_HINTING.
+
+ * include/freetype/config/ftheader.h (FT_TRUETYPE_UNPATENTED_H): New
+ macro to use when including ttunpat.h.
+
+ * include/freetype/config/ftoption.h
+ (TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING,
+ TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING): New configuration macros
+ (not defined, but in comments) for the unpatented hinting system.
+
+ * include/freetype/internal/tttypes.h (TT_FaceRec)
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: New element `FT_Bool
+ unpatented_hinting'.
+
+ * src/truetype/ttinterp.c (NO_APPLE_PATENT, APPLE_THRESHOLD):
+ Removed.
+ (GUESS_VECTOR): New macro.
+ (TT_Run_Context) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]:
+ Set `both_x_axis'.
+ (tt_default_graphics_state)
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Updated.
+ (Current_Ratio) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]:
+ Handle `unpatented_hinting'.
+ (Direct_Move) [NO_APPLE_PATENT]: Removed.
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Insert assertion.
+ (Project, FreeProject)
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Insert assertion.
+ (Compute_Funcs) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]:
+ Implement unpatented hinting.
+ (DO_SPVTCA, DO_SFVTCA, DO_SPVTL, DO_SFVTL, DO_SPVFS, DO_SFVFS,
+ Ins_SDPVTL): Call `GUESS_VECTOR'.
+ (DO_GPV, DO_GFV) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]:
+ Handle `unpatented_hinting'.
+ (Compute_Point_Displacement) [NO_APPLE_PATENT]: Removed.
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Implement unpatented
+ hinting.
+ (Move_Zp2_Point, Ins_SHPIX, Ins_DELTAP, Ins_DELTAC)
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Implement unpatented
+ hinting.
+ (TT_RunIns): Updated.
+
+ * src/truetype/ttobjs.c
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Include
+ FT_TRUETYPE_UNPATENTED_H.
+ (tt_face_init) [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING,
+ TT_CONFIG_OPTION_FORCE_UNPATENTED_HINTING]: Check
+ FT_PARAM_TAG_UNPATENTED_HINTING.
+
+ * src/truetype/ttobjs.h (TT_GraphicsState)
+ [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: Add `both_x_axis'.
+
+2003-04-25 Werner Lemberg <wl@gnu.org>
+
+ * src/bdf/bdflib.c (hash_bucket, hash_lookup): Use `const' for first
+ argument.
+ (bdf_get_font_property): Use `const' for third argument.
+ Updated all callers.
+ * src/bdf/bdfdrivr.c (BDF_Face_Init): Set pixel width and height
+ similar to the PCF driver.
+ * src/bdf/bdf.h (_hashnode): Use `const' for `key'.
+ Updated.
+
+ * src/gzip/ftgzip.c: C++ doesn't like that the array `inflate_mask'
+ is declared twice. It is perhaps better to modify the zlib source
+ files directly instead of this hack.
+ (zcalloc, zfree, ft_gzip_stream_close, ft_gzip_stream_io): Add casts
+ to make build with g++ successful.
+
+2003-04-24 Manish Singh <yosh@gimp.org>
+
+ * src/cid/cidobjs.c (cid_face_init), src/type1/t1objs.c
+ (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Split on `-'
+ also for searching the style name.
+
+2003-04-24 David Turner <david@freetype.org>
+
+ * src/pcf/pcfread.c (pcf_load_font): Fixed the computation of
+ face->num_glyphs. We must increase the value by 1 to respect the
+ convention that glyph index 0 always corresponds to the `missing
+ glyph'.
+
+2003-04-24 Werner Lemberg <wl@gnu.org>
+
+ * builds/unix/unix-cc.in (CFLAGS): Add @CPPFLAGS@.
+
+2003-04-24 Dieter Baron <dillo@netbsd.org>
+
+ * builds/unix/freetype-config.in (cflags): Emit FreeType 2's include
+ files first. Otherwise there are conflicts with FreeType 1
+ installed simultaneously.
+
+2003-04-23 Werner Lemberg <wl@gnu.org>
+
+ Fixing bugs reported by Nelson Beebe.
+
+ * src/base/ftstroker.c (FT_Stroker_ParseOutline): Remove unused
+ variable `in_path'.
+
+ * src/base/ftobjs (ft_glyphslot_set_bitmap): Change type of
+ second argument to `FT_Byte*'.
+ * include/freetype/internal/ftobjs.h: Updated.
+
+ * src/bdf/bdflib.c (_bdf_readstream): Remove unused variable `res'.
+ (_bdf_parse_glyphs): Remove unused variable `next'.
+ Mark `call_data' as unused.
+
+ * src/cache/ftlru.c (FT_LruList_Lookup): Remove unused variable
+ `plast'.
+
+ * src/pcf/pcfread.c (pcf_seek_to_table_type): Slight recoding to
+ actually use `error'.
+ (pcf_load_font): Remove unused variable `avgw'.
+
+ * src/pfr/pfrobjs.c (pfr_face_get_kerning): Change return type
+ to `void'.
+ Mark `error' as unused.
+ * src/pfr/pfrobjs.h: Updated.
+ * src/pfr/pfrdrivr.c (pfr_get_kerning): Updated.
+
+ * src/sfnt/ttload.c (sfnt_dir_check): Remove unused variable
+ `format_tag'.
+
+ * src/sfnt/ttcmap0.c (tt_cmap6_validate, tt_cmap10_validate): Remove
+ unused variable `start'.
+ (tt_cmap10_char_next): Remove unused variable `result'
+
+ * src/sfnt/sfobjs.c (tt_face_get_name): Mark `error' as unused.
+
+ * src/sfnt/sfdriver.c (get_sfnt_postscript_name): Mark `error' as
+ unused.
+
+ * src/type1/t1objs.c (T1_Face_Init): Remove unused variable
+ `pshinter'.
+
+ * src/type1/t1gload.c (T1_Load_Glyph): Use `glyph_data_loaded'
+ only for FT_CONFIG_OPTION_INCREMENTAL.
+
+2003-04-23 Akito Hirai <akito@kde.gr.jp>
+
+ * src/sfnt/ttcmap0.c (tt_cmap4_validate): Provide a weak variant
+ of the glyph ID bounding check if FT_VALIDATE_TIGHT is not active.
+ Without this change, many CJK fonts from Dynalab are rejected.
+
+2003-04-23 Joe Marcus Clarke <marcus@FreeBSD.org>
+
+ * src/base/ftbdf.c (FT_Get_BDF_Property): Check for valid
+ `get_interface'.
+
+2003-04-23 Paul Miller <paulm@profoundeffects.com>
+
+ * src/base/ftmac.c (parse_fond): Fix handling of style names.
+
+2003-04-23 Werner Lemberg <wl@gnu.org>
+
+ * src/pfr/pfrload.c (pfr_extra_item_load_font_id): Use FT_PtrDist
+ instead of FT_Uint for `len'.
+
+2003-04-22 Werner Lemberg <wl@gnu.org>
+
+ * src/gzip/ftgzip.c (zcalloc) [!FT_CONFIG_OPTION_SYSTEM_ZLIB]:
+ Convert K&R format to modern C usage.
+ (FT_Stream_OpenGzip): Use long constant.
+
+2003-04-21 Werner Lemberg <wl@gnu.org>
+
+ * src/cache/ftccache.c (ftc_cache_lookup): Remove shadow declaration
+ of `manager'.
+
+2003-04-20 Werner Lemberg <wl@gnu.org>
+
+ * doc/INSTALL.UNX: Cleaned up.
+
+2003-04-09 Torrey Lyons <torrey@mrcla.com>
+
+ * src/base/ftmac.c (open_face_from_buffer): Removed a double-free
+ bug that had nasty consequences when trying to open an `invalid'
+ font on a Mac.
+
+2003-04-09 Mike Fabian <mfabian@suse.de>
+
+ * src/bdf/bdfdrivr.h (BDF_encoding_el), src/pcf/pcf.h
+ (PCF_EncodingRec): Changed FT_Short to FT_UShort in order to be able
+ to access more than 32768 glyphs in fonts.
+
+2003-04-08 David Turner <david@freetype.org>
+
+
+ * Version 2.1.4 released.
+ =========================
+
+
+2003-04-03 Martin Muskens <mmuskens@aurelon.com>
+
+ * src/type1/t1load.c (T1_Open_Face): Fixed the code to make it
+ handle special cases where a font only contains a `.notdef' glyph
+ (happens in PDF-embedded fonts). Otherwise, FT_Panic was called.
+
2003-03-27 David Turner <david@freetype.org>
- * README: udpated
+ * README: Udpated.
- * README.UNX: removed (now replaced by docs/INSTALL.UNX)
+ * README.UNX: Removed (now replaced by docs/INSTALL.UNX).
- * src/pshinter/pshalgo3.c: the hinter now performs as in 2.1.3 and
- will ignore stem quantization only when FT_LOAD_TARGET_SMOOTH is used
+ * src/pshinter/pshalgo3.c: The hinter now performs as in 2.1.3 and
+ will ignore stem quantization only when FT_LOAD_TARGET_SMOOTH is
+ used.
+ (psh3_dimension_quantize_len): Enabled.
+ (psh3_hint_align): Enable commented code.
+ (psh3_hint_align_light): Commented out.
- * src/base/ftobjs.c: changed the default computations to include rounding
- in all cases, this is required to provide accurate kerning data when
- native TrueType hinting is enabled.
+ * src/base/ftobjs.c (FT_Set_Char_Size): Changed the default
+ computations to include rounding in all cases; this is required to
+ provide accurate kerning data when native TrueType hinting is
+ enabled.
- * src/type1/t1load.c: the Type 1 loader now accepts more general names
- according to the Postscript spec (the previous one was too restrictive)
+ * src/type1/t1load.c (is_name_char): The Type 1 loader now accepts
+ more general names according to the PostScript specification (the
+ previous one was too restrictive).
+ (parse_font_name, parse_encoding, parse_charstrings, parse_dict):
+ Use `is_name_char'.
+ (parse_subrs): Handle empty arrays.
2003-03-20 David Turner <david@freetype.org>
- * docs/*: serious rewriting of the documentation
+ Serious rewriting of the documentation.
+
+ * docs/BUGS, docs/BUILD: Removed.
+ * docs/DEBUG.TXT: Renamed to...
+ * docs/DEBUG: This.
+ * docs/CUSTOMIZE, docs/TRUETYPE, docs/UPGRADE.UNX: New files.
+ * docs/INSTALL.ANY, docs/INSTALL.UNX, docs/INSTALL.GNU New files,
+ containing platform specific information previously in INSTALL.
+ * docs/readme.vms: Renamed to...
+ * docs/INSTALL.VMS: This.
+
+ * docs/*: Updated.
+
+ Introduced three new functions to deal with glyph bitmaps within
+ FT_GlyphSlot objects:
+
+ ft_glyphslot_free_bitmap
+ ft_glyphslot_alloc_bitmap
+ ft_glyphslot_set_bitmap
- * include/freetype/internal/ftobjs.h, src/base/ftobjs.c, src/bdf/bdfdrivr.c,
- src/pcf/pcfdriver.c, src/pfr/pfrsbit.c, src/sfnt/ttsbit.c,
- src/type42/t42objs.c, src/winfonts/winfnt.c: introduced three new functions
- to deal with glyph bitmaps within FT_GlyphSlot objects. these are:
+ These functions are much more convenient to use than managing the
+ FT_GLYPH_OWN_BITMAP flag manually.
- ft_glyphslot_free_bitmap
- ft_glyphslot_alloc_bitmap
- ft_glyphslot_set_bitmap
+ * include/freetype/internal/ftobjs.h (ft_glyphslot_free_bitmap,
+ ft_glyphslot_alloc_bitmap, ft_glyphslot_set_bitmap): New functions.
+ * src/base/ftobjs.c: Implement them.
+ (ft_glyphslot_done): Use ft_glyphslot_free_bitmap.
- these are much more convenient to use than managing the FT_GLYPH_OWN_BITMAP
- flag manually. the font drivers have been modified to use them as well.
+ * src/bdf/bdfdrivr.c (BDF_Glyph_Load), src/pcf/pcfdriver.c
+ (PCF_Glyph_Load): Remove unused variable `memory'.
+ Use `ft_glyphslot_*' functions.
+ Don't set `FT_GLYPH_OWN_BITMAP'.
- * src/cache/ftlru.c: fixed an invalid assertion check
+ * src/pfr/pfrsbit.c (pfr_slot_load_bitmap): Use
+ `ft_glyphslot_alloc_bitmap'.
- * src/autohint/ahglyph.h, src/autohint/ahglyph.c, src/autohint/ahglobal.c,
- src/autohint/ahhint.c: fixed blue-scale problem
+ * src/sfnt/ttsbit.c (Load_SBit_Image): Change 5th argument to type
+ `FT_GlyphSlot'.
+ Adding argument `depth' to handle recursive calls.
+ Use `ft_glyphslot_alloc_bitmap'.
+ (tt_face_load_sbit_image): Remove unused variable `memory'.
+ Don't handle `FT_GLYPH_OWN_BITMAP'.
+ Update call to Load_SBit_Image.
- * src/cache/ftccache.c: fixed small bug that could crash the cache
- in rare circumstances (mostly with broken fonts)
+ * src/type42/t42objs.c (ft_glyphslot_clear): Renamed to...
+ (t42_glyphslot_clear): This. Updated caller.
+ Call `ft_glyphslot_free_bitmap'.
+ * src/winfonts/winfnt.c (FNT_Load_Glyph): Use
+ `ft_glyphslot_set_bitmap'.
+ Don't handle `FT_GLYPH_OWN_BITMAP'.
+
+ * src/cache/ftlru.c (FT_LruList_Lookup): Fixed an invalid assertion
+ check.
+
+ * src/autohint/ahglyph.c (ah_outline_load): Add two scaling
+ arguments.
+ * src/autohint/ahglyph.h: Updated.
+ * src/autohint/ahhint.c (ah_hinter_load): Updated.
+ * src/autohint/ahglobal.c (ah_hinter_compute_widths): Updated.
+
+ * src/cache/ftccache.c (ftc_family_done): Fixed small bug that could
+ crash the cache in rare circumstances (mostly with broken fonts).
2003-03-15 David Turner <david@freetype.org>
- * src/truetyoe/ttdriver.c (Set_Char_Sizes): fixed a small rounding bug.
- Actually, it seems that previous versions of FreeType didn't perform
- TrueType rounding exactly as appropriate.
+ * src/truetype/ttdriver.c (Set_Char_Sizes): Fixed a small rounding
+ bug. Actually, it seems that previous versions of FreeType didn't
+ perform TrueType rounding exactly as appropriate.
2003-03-14 David Turner <david@freetype.org>
- * src/truetype/ttdriver.c: fixing the small TrueType native rendering
- glitches, they came from a small rounding error.
+ * src/truetype/ttdriver.c (Set_Char_Sizes): Fixing the small
+ TrueType native rendering glitches; they came from a small rounding
+ error.
2003-03-13 David Turner <david@freetype.org>
- * src/base/ftdbgmem.c, docs/DEBUG.TXT: added new environment variables
- to control memory debugging with FreeType. See the description of
- "FT2_DEBUG_MEMORY", "FT2_ALLOC_TOTAL_MAX" and "FT2_ALLOC_COUNT_MAX"
- in DEBUG.TXT
+ Added new environment variables to control memory debugging with
+ FreeType. See the description of `FT2_DEBUG_MEMORY',
+ `FT2_ALLOC_TOTAL_MAX' and `FT2_ALLOC_COUNT_MAX' in DEBUG.TXT.
- * src/cache/ftccache.c, src/cache/ftccmap.c, src/cache/ftcsbits.c,
- ftlru.c: fixed the cache sub-system to correctly deal with out-of-memory
- conditions.
+ * src/base/ftdbgmem.c (FT_MemTableRec): Add `alloc_count',
+ `bound_total', `alloc_total_max', `bound_count', `alloc_count_max'.
+ (ft_mem_debug_alloc): Handle new variables.
+ (ft_mem_debug_init): s/FT_DEBUG_MEMORY/FT2_DEBUG_MEMORY/.
+ Handle new environment variables.
+ * docs/DEBUG.TXT: Updated.
- * src/pfr/pfrobjs.c, src/pfr/pfrsbits.c: fixing compiler warnings and a
- small memory leak
+ Fixed the cache sub-system to correctly deal with out-of-memory
+ conditions.
- * src/psaux/psobjs.c (t1_reallocate_table): fixed a bug (memory leak) that
- only happened when trying to resize an array would end in an OOM.
+ * src/cache/ftccache.c (ftc_node_destroy): Comment out generic
+ check.
+ (ftc_cache_lookup): Implement loop.
+ * src/cache/ftccmap.c: Define FT_COMPONENT.
+ * src/cache/ftcsbits.c (ftc_sbit_node_load): Handle
+ FT_Err_Out_Of_Memory.
+ * src/cache/ftlru.c: Include FT_INTERNAL_DEBUG_H.
+ (FT_LruList_Lookup): Implement loop.
- * src/smooth/ftgrays.c: removed compiler warnings / volatile bug
+ * src/pfr/pfrobjs.c (pfr_face_done): Fix memory leak.
+ (pfr_face_init): Fixing compiler warnings.
- * src/truetype/ttobjs.c: removed segmentation fault that happened in
- tight memory environments.
+ * src/psaux/psobjs.c (reallocate_t1_table): Fixed a bug (memory
+ leak) that only happened when a try to resize an array would end in
+ an out-of-memory condition.
+
+ * src/smooth/ftgrays.c (gray_convert_glyph): Removed compiler
+ warnings / volatile bug.
+
+ * src/truetype/ttobjs.c (tt_glyphzone_done): Removed segmentation
+ fault that happened in tight memory environments.
2003-02-28 Pixel <pixel@mandrakesoft.com>
- * src/gzip/ftgzip.c (ft_gzip_file_done): fixed memory leak, the ZLib
- stream was not properly finalized
+ * src/gzip/ftgzip.c (ft_gzip_file_done): Fixed memory leak: The ZLib
+ stream was not properly finalized.
2003-02-25 Anthony Fok <anthony@thizlinux.com>
- * src/cache/ftccmap.c: the cmap cache now supports UCS-4 charmaps
- when available in Asian fonts
+ * src/cache/ftccmap.c: Include FT_TRUETYPE_IDS_H.
+ (ftc_cmap_family_init): The cmap cache now
+ supports UCS-4 charmaps when available in Asian fonts.
- * src/sfnt/ttload.c, src/base/ftobjs.c: changed "asian" to "Asian" in
- comments
+ * src/sfnt/ttload.c, src/base/ftobjs.c: Changed `asian' to `Asian'
+ in comments.
2003-02-25 David Turner <david@freetype.org>
- * src/gzip/ftgzip.c: fixed a bug that caused FreeType to loop endlessly
- when trying to read certain compressed gzip files. The following test
- could be used to reveal the bug:
+ * src/gzip/ftgzip.c (ft_gzip_file_fill_output): Fixed a bug that
+ caused FreeType to loop endlessly when trying to read certain
+ compressed gzip files. The following test reveals the bug:
+
+ touch 0123456789 ; gzip 0123456789 ; ftdump 0123456789.gz
- touch 0123456789 ; gzip 0123456789 ; ftdump 0123456789.gz
+ Several fixes to the PFR font driver:
+ - The list of available embedded bitmaps was not correctly set in
+ the root FT_FaceRec structure describing the face.
- * src/pfr/pfrobjs.c, src/pfr/pfrload.c, src/pfr/pfrtypes.h: several
- fixes to the PFR font driver:
+ - The glyph loader always tried to load the outlines when
+ FT_LOAD_SBITS_ONLY was specified.
- - the list of available embedded bitmaps was not correctly set
- in the root FT_FaceRec structure describing the face
+ - The table loaded now scans for *undocumented* elements of a
+ physical font's auxiliary data record. This is necessary to
+ retrieve the `real' family and style names.
- - the glyph loader always tried to load the outlines when
- FT_LOAD_SBITS_ONLY was specified
+ NOTE THAT THESE CHANGES THE FAMILY NAME OF MANY PFR FONTS!
- - the table loaded now scans for *undocumented* elements of a
- physical font's auxiliary data record, this is necessary to
- retrieve the "real" family and style names.
+ * src/pfr/pfrload.c (pfr_aux_name_load): New function.
+ (pfr_phy_font_done): Free `family_name' and `style_name' also.
+ Remove unused variables.
+ (pfr_phy_font_load): Extract useful information from the auxiliary
+ bytes.
- NOTE THAT THIS CHANGES THE FAMILY NAME OF MANY PFR FONTS !!
+ * src/pfr/pfrobjs.c (pfr_face_done): Set pointers to NULL.
+ (pfr_face_init): Provide fallback values for `family_name' and
+ `style_name'.
+ Handle strikes.
+ (pfr_slot_load): Handle FT_LOAD_SBITS_ONLY.
+ * src/pfr/pfrtypes.h (PFR_PhyFontRec): Add fields `ascent',
+ `descent', `leading', `family_name', and `style_name'.
- * src/truetype/ttdriver.c (Set_Char_Sizes): fixed a rounding bug when
- computing the scale factors for a given character size in points with
- resolution.
+ * src/truetype/ttdriver.c (Set_Char_Sizes): Fixed a rounding bug
+ when computing the scale factors for a given character size in
+ points with resolution.
+ * devel/ft2build.h, devel/ftoption.h: New files (in a new directory)
+ which are special development versions of include/ft2build.h and
+ include/freetype/config/ftoption.h, respectively.
2003-02-18 David Turner <david@freetype.org>
- * src/truetype/ttdriver.c, src/truetype/ttobjs.h, src/truetype/ttobjs.c,
- src/truetype/ttinterp.c, src/base/ftobjs.c: fixing the slight distortion
- problem that occured due to the latest auto-hinter changes
+ Fixing the slight distortion problem that occurred due to the latest
+ auto-hinter changes.
+ * src/base/ftobjs.c (ft_recompute_scaled_metrics): Fix rounding.
- * src/autohint/ahhint.c: disabled the advance width "correction" which
- seemed to provide more trouble than benefits..
+ * src/truetype/ttdriver.c (Set_Char_Sizes): New variable `metrics2'.
+ [!TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Removed.
+
+ * src/truetype/ttobjs.h (TT_SizeRec): New field `metrics'.
+ * src/truetype/ttobjs.c (Reset_Outline_Size): Fix initialization of
+ `metrics'.
+ [FT_CONFIG_CHESTER_ASCENDER]: Code removed.
+ (Reset_SBit_Size): Fix initialization of `metrics'.
+
+ * src/truetype/ttinterp.c (TT_Load_Context): Fix initialization of
+ `exec->metrics'.
+
+ * src/autohint/ahhint.c (ah_hinter_load): Disabled the advance width
+ `correction' which seemed to provide more trouble than benefits.
2003-02-13 Graham Asher <graham.asher@btinternet.com>
- * include/freetype/ftincrem.h, src/cff/cffgload.c, src/cid/cidgload.c,
- src/truetype/ttgload.c, src/type1/t1gload.c
- [FT_CONFIG_OPTION_INCREMENTAL]: I have changed the incremental loading
- interface in a way that makes it simpler and allows glyph metrics to
- be changed (e.g., by adding a constant, as required by CFF fonts)
- rather than just overridden. This was required to make the GhsotScript-
- to-FreeType bridge work.
+ Changed the incremental loading interface in a way that makes it
+ simpler and allows glyph metrics to be changed (e.g., by adding a
+ constant, as required by CFF fonts) rather than just overridden.
+ This was required to make the GhostScript-to-FreeType bridge work.
+
+ * src/cff/cffgload.c (cff_slot_load) [FT_CONFIG_OPTION_INCREMENTAL]:
+ Allow metrics to be overridden.
+ * src/cid/cidgload.c (cid_load_glyph) [FT_CONFIG_OPTION_INCREMENTAL]:
+ Ditto.
+
+ * src/truetype/ttgload.c (load_truetype_glyph)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Simplify.
+ (compute_glyph_metrics) [FT_CONFIG_OPTION_INCREMENTAL]: Code block
+ moved down.
+
+ * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String)
+ [FT_CONFIG_OPTION_INCREMENTAL]: Updated.
+
+ * include/freetype/ftincrem.h: Updated.
2003-01-31 David Turner <david@freetype.org>
- * docs/CHANGES, docs/VERSION.DLL, docs/TODO: updating documentation for
- the 2.1.4 release
+ * docs/CHANGES, docs/VERSION.DLL, docs/TODO: Updating documentation
+ for the 2.1.4 release.
+
+ * builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/index.html: Updating the project file for
+ 2.1.4.
- * builds/win32/visualc/freetype.dsp, builds/win32/visualc/index.html:
- updating the project file for 2.1.4
+ * src/gzip/adler32.c, src/gzip/ftgzip.c, src/gzip/infblock.c,
+ src/gzip/infcodes.c, src/gzip/inflate.c, src/gzip/inftrees.c,
+ src/gzip/infutil.c: Removed old-style (K&R)function definitions.
+ This avoids warnings with Visual C++ at its most pedantic mode.
- * src/gzip/adler32.c, src/gzip/ftgzip.c, src/gzip/infblock.c,
- src/gzip/infcodes.c, src/gzip/inflate.c, src/gzip/inftrees.c,
- src/gzip/infutil.c: removed old-style (K&R)function definitions. This
- avoids warnings with Visual C++ at its most pedantic mode.
+ * src/pfr/pfrsbit.c: Removed compiler warnings.
- * src/pfr/pfrsbit.c: removed compiler warnings
+ * src/cache/ftccmap.c (ftc_cmap_family_init): Changed an FT_ERROR
+ into an FT_TRACE1 since it caused `ftview' and others to dump too
+ much junk when trying to display a waterfall with a font without a
+ Unicode charmap (e.g. SYMBOL.TTF).
- * src/cache/ftccmap.c: changed a FT_ERROR into a FT_TRACE1 since the
- it caused "ftview" and others to dump too much junk when trying to
- display a waterfall with a font without a Unicode charmap (e.g.
- SYMBOL.TTF)
+ Implemented FT_CONFIG_CHESTER_BLUE_SCALE, corresponding to the last
+ patch from David Chester, but with a much simpler (and saner)
+ implementation.
- * src/autohint/ahtypes.h, src/autohint/ahhint.c, src/base/ftobjs.c,
- src/truetype/ttobjs.c: implemented FT_CONFIG_CHESTER_BLUE_SCALE,
- corresponding to the last patch from David Chester, but with a
- much simpler (and saner) implementation.
+ * src/autohint/ahhint.c (ah_hinter_load_glyph)
+ [FT_CONFIG_CHESTER_BLUE_SCALE]: Try to optimize the y_scale so that
+ the top of non-capital letters is aligned on a pixel boundary
+ whenever possible.
- * src/pshinter/pshalgo3.c: improved the Postscript hinter. Getting rid
- of stem snapping seems to work well here (though the stems are still
- slightly moved to increase contrast).
+ * src/base/ftobjs.c (FT_Set_Char_Size)
+ [FT_CONFIG_CHESTER_BLUE_SCALE]: Round differently.
+ * src/truetype/ttdriver.c (Set_Char_Sizes)
+ [TT_CONFIG_OPTION_BYTECODE_INTERPRETER]: Do some rounding only
+ if this macro is defined.
- THIS IMPROVES ANTI-ALIASED RENDERING, BUT MONOCHROME AND LCD MODES
- STILL SUCK... I need to work this a bit
+ * src/truetype/ttobjs.c (Reset_Outline_Size)
+ [FT_CONFIG_CHESTER_ASCENDER]: Round differently.
+
+ * src/pshinter/pshalgo3.c: Improved the Postscript hinter. Getting
+ rid of stem snapping seems to work well here (though the stems are
+ still slightly moved to increase contrast).
+ (psh3_dimension_quantize_len): Commented out.
+ (psh3_hint_align_light): New function.
+ (psh3_hint_align): Comment out some code.
+
+ THIS IMPROVES ANTI-ALIASED RENDERING, BUT MONOCHROME AND LCD MODES
+ STILL SUCK.
2003-01-22 David Chester <davidchester@qmx.net>
- * src/autohint/ahhint.c: small fix to the stem width optimisation
+ * src/autohint/ahhint.c (ah_compute_stem_width): Small fix to the
+ stem width optimization.
2003-01-22 David Turner <david@freetype.org>
- * include/freetype/ftbdf.h, include/freetype/internal/bdftypes.h,
- src/base/ftbdf.c, src/bdf/bdfdrivr.c, src/pcf/pcfdrivr.c,
- src/pcf/pcfread.h:
+ Adding a new API `FT_Get_BDF_Property' to retrieve the BDF
+ properties of a given PCF or BDF font.
+
+ * include/freetype/ftbdf.h (FT_PropertyType): New enumeration.
+ (BDF_Property, BDF_PropertyRec): New structure.
+ FT_Get_BDF_Property): New function.
+ * include/freetype/internal/bdftypes.h: Include FT_BDF_H.
+ (BDF_GetPropertyFunc): New function pointer.
- adding a new API, named FT_Get_BDF_Property to retrieve the BDF
- properties of a given PCF or BDF font
+ * src/base/ftbdf.c (test_font_type): New helper function.
+ (FT_Get_BDF_Charset_ID): Use `test_font_type'.
+ (FT_Get_BDF_Property): New function.
- * src/sfnt/ttload.c (sfnt_dir_check): relaxed the "head" table size
- verification to accept a few broken fonts who pad the size incorrectly
- (the table should be padded, but its "size" field shouldn't per se
- the spec)
+ * src/bdf/bdfdrivr.c: Include FT_BDF_H.
+ (bdf_get_bdf_property, bdf_driver_requester): New functions.
+ (bdf_driver_class): Use `bdf_driver_requester'.
+
+ * src/pcf/pcfdrivr.c: Include FT_BDF_H.
+ (pcf_get_bdf_property, pdc_driver_requester): New functions
+ (pcf_driver_class): Use `pcf_driver_requester'.
+
+ * src/pcf/pcfread.c: Include `pcfread.h'.
+ (pcf_find_property): Decorate it with FT_LOCAL_DEF.
+ * src/pcf/pcfread.h: New file, providing `pcf_find_property'.
+
+ * src/sfnt/ttload.c (sfnt_dir_check): Relaxed the `head' table size
+ verification to accept a few broken fonts who pad the size
+ incorrectly (the table should be padded, but its `size' field
+ shouldn't according to the specification).
2003-01-18 Werner Lemberg <wl@gnu.org>
@@ -203,17 +3716,29 @@
2003-01-15 James Su <suzhe@turbolinux.com.cn>
- * src/gzip/ftgzip.c: Bugfix: couldn't read certain gzip-ed font
- files.
+ * src/gzip/ftgzip.c (ft_gzip_check_header): Bugfix: couldn't read
+ certain gzip-ed font files (typo: `&&' -> `&').
-2003-01-15 Huw D M Davies <h.davies1@physics.ox.ac.uk>
+2003-01-15 Huw D M Davies <h.davies1@physics.ox.ac.uk>
- * include/freetype/config/ftheader.h,
- include/freetype/internal/fnttypes.h, include/freetype/ftwinfnt.h,
- src/base/winfnt.c, src/winfonts/winfnt.c, src/base/Jamfile,
- src/base/rules.mk, src/base/descrip.mms: Added a Windows .FNT
- specific API (mostly for Wine). Also fixed a nasty bug in the
- header loader which would cause invalid memory overwrites.
+ Added a Windows .FNT specific API (mostly for Wine). Also fixed a
+ nasty bug in the header loader which would cause invalid memory
+ overwrites.
+
+ * include/freetype/config/ftheader.h (FT_WINFONTS_H): New macro
+ for ftwinfnt.h.
+ * include/freetype/internal/fnttypes.h: Include FT_WINFONTS_H.
+ (FNT_FontRec): Updated.
+ Move Windows FNT definition to...
+ * include/freetype/ftwinfnt.h: This new file.
+ (FT_WinFNT_HeaderRec): Rename `reserved2' to `reserved1'.
+ * src/base/ftwinfnt.c: New file, providing `FT_Get_WinFNT_Header'.
+ * src/winfonts/winfnt.c (winfnt_header_fields): Updated.
+ Rename `reserved2' to `reserved1'.
+ (fnt_font_load): Updated.
+
+ * src/base/Jamfile, src/base/descrip.mms, src/base/rules.mk:
+ Updated.
2003-01-14 Graham Asher <graham.asher@btinternet.com>
@@ -233,42 +3758,84 @@
2003-01-11 David Chester <davidchester@qmx.net>
- * include/freetype/config/ftoption.h, src/autohint/ahglobal.h,
- src/autohint/ahglobal.c, src/autohint/ahglyph.c,
- src/autohint/ahtypes.h: Patches to the auto-hinter in order to
- slightly improve the output. Note that everything is controlled
- through the new FT_CONFIG_OPTION_CHESTER_HINTS defined at the end of
- "ftoption.h". There are also individual FT_CONFIG_CHESTER_XXX
- macros to control individual "features".
+ Patches to the auto-hinter in order to slightly improve the output.
+ Note that everything is controlled through the new
+ FT_CONFIG_OPTION_CHESTER_HINTS defined in `ftoption.h'. There are
+ also individual FT_CONFIG_CHESTER_XXX macros to control individual
+ `features'.
Note that all improvements are enabled by default, but can be
tweaked for optimization and testing purposes. The configuration
macros will most likely disappear in the short future.
+ * include/freetype/config/ftoption.h
+ (FT_CONFIG_OPTION_CHESTER_HINTS): New macro.
+ (FT_CONFIG_CHESTER_{SMALL_F,ASCENDER,SERIF,STEM,BLUE_SCALE})
+ [FT_CONFIG_OPTION_CHESTER_HINTS]: New macros to control individual
+ features.
+
+ * src/autohint/ahglobal.c (blue_chars) [FT_CONFIG_CHESTER_SMALL_F]:
+ Add blue zone for `fijkdbh'.
+ * src/autohint/ahglobal.h (AH_IS_TOP_BLUE)
+ [FT_CONFIG_CHESTER_SMALL_F]: Use `AH_BLUE_SMALL_F_TOP'.
+ * src/autohint/ahglyph.c (ah_outline_compute_edges)
+ [FT_CONFIG_CHESTER_SERIF]: Use `AH_EDGE_SERIF'.
+ (ah_outline_compute_blue_edges) [FT_CONFIG_CHESTER_SMALL_F]:
+ Increase threshold for `best_dist'.
+ * src/autohint/ahhint.c (ah_compute_stem_width)
+ [FT_CONFIG_CHESTER_SERIF]: Provide new version for improved serif
+ handling.
+ (ah_align_linked_edge) [FT_CONFIG_CHESTER_SERIF]: Use special
+ version of `ah_compute_stem_width'.
+ (ah_hint_edges_3) [FT_CONFIG_CHESTER_STEM]: A new algorithm for stem
+ alignment when stem widths are less than 1.5 pixels wide centers the
+ stem slightly off-center of the center of a pixel (this increases
+ sharpness and consistency).
+ [FT_CONFIG_CHESTER_SERIF]: Use special version of
+ `ah_compute_stem_width'.
+ * src/autohint/ahtypes.h [FT_CONFIG_CHESTER_SMALL_F]: Add
+ `AH_BLUE_SMALL_F_TOP'.
+
2003-01-11 David Turner <david@freetype.org>
- * include/freetype/internal/fnttypes.h: Fixed a structure field
- definition to avoid memory overwrites.
+ * include/freetype/internal/fnttypes.h (WinFNT_HeaderRec): Increase
+ size of `reserved2' to avoid memory overwrites.
2003-01-08 Huw Dawies <huw@codeweavers.com>
- * src/winfonts/winfnt.c: Read 16 bytes into "reserved2", not
- "reserved".
+ * src/winfonts/winfnt.c (winfnt_header_fields): Read 16 bytes into
+ `reserved2', not `reserved'.
* src/base/ftobjs.c (find_unicode_charmap): Fixed the error code
returned when the font doesn't contain a Unicode charmap. This
- allows FT2 to load "symbol.ttf" and a few others correctly since the
+ allows FT2 to load `symbol.ttf' and a few others correctly since the
last release.
+ (open_face): Fix return value.
2003-01-08 Owen Taylor <owen@redhat.com>
- * src/autohint/ahtypes.h, src/autohint/ahhint.c,
- src/pshinter/pshalgo3.h, src/pshinter/pshalgo3.c: Implemented the
- FT_RENDER_MODE_LIGHT hinting mode in the auto and postscript
- hinters.
+ Implemented the FT_RENDER_MODE_LIGHT hinting mode in the auto and
+ postscript hinters.
+
+ * src/autohint/ahtypes.h (AH_HinterRec): Add `do_stem_adjust'.
+ * src/autohint/ahhint.c (ah_compute_stem_width): Handle
+ hinter->do_stem_adjust.
+ (ah_hinter_load_glyph): Set hinter->do_stem_adjust.
+
+ * src/pshinter/pshalgo3.h (PSH3_GlyphRec): Add `do_stem_adjust'.
+ * src/pshinter/pshalgo3.c (psh3_hint_align): Use `do_stem_adjust'.
+ (ps3_hints_apply): Handle FT_RENDER_MODE_LIGHT.
+
+ * include/freetype/freetype.h (FT_Render_Mode): Add
+ FT_RENDER_MODE_LIGHT.
* src/truetype/ttgload.c: Fixing the TrueType loader to handle
invalid composites correctly by limiting the recursion depth.
+ (TT_MAX_COMPOSITE_RECURSE): New macro.
+ (load_truetype_glyph): Add argument `recurse_count'.
+ Load a composite only if the numbers of contours is -1, emit error
+ otherwise.
+ (TT_Load_Glyph): Updated.
2003-01-08 David Turner <david@freetype.org>
@@ -280,16 +3847,21 @@
* src/base/ftstroker.c: Probably the last bug-fixes to the stroker;
the API is likely to change, however.
+ (ft_stroke_border_close): Don't record empty paths.
+ (ft_stroke_border_get_counts): Increase `num_points' also in for loop.
+ (ft_stroke_border_export): Don't increase `write' twice in for loops.
+ (ft_stroker_outside): Handle `phi' together with `theta'.
+ (FT_Stroker_ParseOutline): New function.
* src/base/fttrigon.c (FT_Angle_Diff): Fixing function: It returned
invalid values for large negative angle differences (resulting in
incorrect stroker computations, among other things).
- * src/cache/ftccache.c (ftc_node_unlink): Removing incorrect
+ * src/cache/ftccache.c (ftc_node_hash_unlink): Removing incorrect
assertion, and changing code to avoid hash table size contraction.
* src/base/Jamfile, src/base/rules.mk, src/base/descrip.mms: Adding
- "ftstroker.obj" to default build, as optional component.
+ `ftstroker' to default build, as optional component.
2002-12-26 David Turner <david@freetype.org>
@@ -298,26 +3870,41 @@
src/gzip/zutil.h: Updates to allow compilation without compiler
warnings with LCC-Win32.
- * include/freetype/freetype.h, docs/VERSION.DLL,
- builds/unix/configure.ac, builds/unix/configure: Updates for the
- upcoming 2.1.4 release.
+ * include/freetype/freetype.h (FREETYPE_PATCH): Set to 4.
+ * builds/unix/configure.ac (version_info): Increased to 9:3:3.
+ * builds/unix/configure: Regenerated.
+ * docs/VERSION.DLL: Updated.
2002-12-23 Anthony Fok <anthony@thizlinux.com>
- * builds/unix/configure.ac, builds/unix/unix-cc.in,
- builds/unix/unix-def.in: Small fix to configure sub-system on Unix
- to allow other programs to correctly link with zlib when needed.
+ * builds/unix/configure.ac, builds/unix/unix-cc.in (LINK_LIBRARY),
+ builds/unix/unix-def.in (SYSTEM_ZLIB): Small fix to configure
+ sub-system on Unix to allow other programs to correctly link with
+ zlib when needed.
+
+2002-12-19 David Turner <david@freetype.org>
+
+ * include/freetype/internal/sfnt.h (SFNT_Load_Table_Func): New
+ function pointer.
+
+ * include/freetype/tttables.h (FT_Load_Sfnt_Table): New function.
+ * src/base/ftobjs.c: Implement it.
+
+ * src/sfnt/sfdriver.c (sfnt_get_interface): Handle `load_sfnt'
+ module request.
2002-12-17 David Turner <david@freetype.org>
* src/base/ftobjs.c (find_unicode_charmap): Added some comments to
better explain what's happening there.
-
- * src/base/ftobjs.c (open_face): Included Graham Asher's fix to
- prevent faces without Unicode charmaps from loading.
+ (open_face): Included Graham Asher's fix to prevent faces without
+ Unicode charmaps from loading.
* src/winfonts/winfnt.c: Included George Williams's fix to support
version 2 fonts correctly.
+ (winfnt_header_fields): Updated.
+ (fnt_font_load): Handle version 2 fonts.
+ (FNT_Load_Glyph): Updated.
2002-12-16 David Turner <david@freetype.org>
@@ -333,34 +3920,39 @@
* src/base/ftobjs.c: Modified the logic to get Unicode charmaps.
Now it loads UCS-4 charmaps when there is one.
- * src/base/ftobjs.c (find_unicode_charmap): New function.
- * src/base/ftobjs.c (open_face): Refer to the above one.
- * src/base/ftobjs.c (FT_Select_Charmap): Idem.
+ (find_unicode_charmap): New function.
+ (open_face): Refer to the above one.
+ (FT_Select_Charmap): Idem.
2002-11-29 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
* include/freetype/ftgzip.h: Correct the name of the controlling
macro (was __FTXF86_H__ ...).
-2002-11-27 Vincent Caron <v.caron@zerodeux.net>
+2002-11-27 Vincent Caron <v.caron@zerodeux.net>
* builds/unix/unix-def.in, builds/unix/freetype-config.in,
- builds/unix/configure.ac, src/gzip/rules.mk, src/gzip/ftgzip.c:
- Adding support for system zlib installations if available on the
- target platform (Unix only).
+ builds/unix/configure.ac, src/gzip/rules.mk, src/gzip/ftgzip.c
+ [FT_CONFIG_OPTION_SYSTEM_ZLIB]: Adding support for system zlib
+ installations if available on the target platform (Unix only).
2002-11-23 David Turner <david@freetype.org>
- * src/cff/cffload.c (cff_charser_load): Modified charset loader to
- accept pre-defined charsets, even when the font contains fewer
- glyphs. Also enforced more checks to ensure that we never overflow
- the character codes array in the encoding.
+ * src/cff/cffload.c (cff_charset_load, cff_encoding_load): Modified
+ charset loader to accept pre-defined charsets, even when the font
+ contains fewer glyphs. Also enforced more checks to ensure that we
+ never overflow the character codes array in the encoding.
+
+2002-11-22 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
+
+ * include/freetype/ttnameid.h: Updated to latest OpenType
+ specification.
2002-11-18 David Turner <david@freetype.org>
- * Version 2.1.3 is released.
- ============================
+ * Version 2.1.3 released.
+ =========================
2002-11-07 David Turner <david@freetype.org>
@@ -375,9 +3967,18 @@
support fot the first GSUB lookups. Nothing that really compiles
for now though.
- * src/autohint/ahhint.c: Disabled serif stem width quantization. It
- produces slightly better shapes though this is not distinguishable
- with many fonts.
+ * src/autohint/ahhint.c (ah_align_serif_edge): Disabled serif stem
+ width quantization. It produces slightly better shapes though this
+ is not distinguishable with many fonts.
+ Remove other dead code.
+
+ * src/Jamfile, src/*/Jamfile: Simplified.
+ Use $(FT2_SRC_DIR).
+
+2002-11-06 David Turner <david@freetype.org>
+
+ * include/freetype/freetype.h (FT_LOAD_TARGET_LIGHT): New macro.
+ (FT_LOAD_TARGET, FT_LOAD_TARGET_MODE): Use `& 15' instead of `& 7'.
2002-11-05 David Turner <david@freetype.org>
@@ -391,9 +3992,9 @@
configuration (typically by adding -D flags at compile time).
* src/sfnt/ttcmap0.c (tt_face_build_cmaps): Removed compiler
- warnings in optimized mode relative to the "volatile" local
+ warnings in optimized mode relative to the `volatile' local
variables. This was not a compiler bug after all, but the fact that
- a pointer to a volatile variable is not the same than a volatile
+ a pointer to a volatile variable is not the same as a volatile
pointer to a variable :-)
The fix was to change
@@ -401,8 +4002,9 @@
into
`FT_Byte* volatile p'.
- * src/pfr/pfrload.c, src/pfr/pfrdrivr.c, src/gzip/inftrees.c:
- Removed compiler warnings in optimized modes.
+ * src/pfr/pfrload.c (pfr_phy_font_load), src/pfr/pfrdrivr.c
+ (pfr_get_metrics), src/gzip/inftrees.c: Removed compiler warnings in
+ optimized modes.
* src/gzip/*.[hc]: Modified our zlib copy in order to prevent
exporting any zlib function names outside of the component. This
@@ -414,24 +4016,75 @@
* src/psaux/psobjs.c (ps_table_add): Modified increment loop in
order to implement exponential behaviour.
+2002-11-01 David Turner <david@freetype.org>
+
+ Added PFR-specific public API. Fixed the kerning retrievel routine
+ (it returned invalid values when the outline and metrics resolution
+ differ).
+
+ * include/freetype/ftpfr.h, include/freetype/internal/pfr.h: New
+ files.
+
+ * include/freetype/internal/internal.h (FT_INTERNAL_PFR_H): New
+ macro for pfr.h.
+
+ * src/base/ftpfr.c: New file.
+ * src/base/Jamfile, src/base/descrip.mms: Updated.
+
+ * src/pfr/pfrdrivr.c: Include FT_INTERNAL_PFR_H.
+ (pfr_get_kerning, pfr_get_advance, pfr_get_metrics): New functions.
+ (pfr_service_rec): New format interface.
+ (pfr_driver_class): Use `pfr_service_rec'.
+ Replace `pfr_face_get_kerning' with `pfr_get_kerning'.
+ * src/pfr/pfrobjs.c: Remove dead code.
+
+ * src/base/ftobjs.c (ft_glyphslot_clear): Small internal fix to
+ better support bitmap-based font formats.
+
+ * src/base/ftsynth.c (FT_GlyphSlot_Embolden): Fix handling of
+ `scale'.
+ Fix arguments to `FT_Vector_From_Polar'.
+
2002-10-31 David Turner <david@freetype.org>
- * include/freetype/ftgzip.h, src/gzip/ftgzip.c: Adding support for
- gzip compressed streams.
+ Add support for automatic handling of gzip-compressed PCF files.
+
+ * src/gzip/*: New files, taken from the zlib package (except
+ ftgzip.c).
+
+ * include/freetype/ftgzip.h, src/gzip/ftgzip.c: New files.
+ * include/freetype/config/ftheader.h (FT_GZIP_H): New macro for
+ `ftgzip.h'.
+
+ * src/pcf/pcfdriver.c: Include FT_GZIP_H and FT_ERRORS_H.
+ (PCF_Face_Init): If normal open fails, try to open gzip stream.
+ (PCF_Face_Done): Close gzip stream.
- * src/pcf/pcfdriver.c: Adding automatic support for gzip-compressed
- PCF files.
+ * include/freetype/internal/pcftypes.h (PCF_Public_FaceRec),
+ src/pcf/pcf.h (PCF_FaceRec): Add `gzip_stream' and `gzip_source'.
+
+ * include/freetype/config/ftoption.h (FT_CONFIG_OPTION_USE_ZLIB):
+ New macro.
+ (T1_CONFIG_OPTION_DISABLE_HINTER, FT_CONFIG_OPTION_USE_CMAPS
+ FT_CONFIG_OPTION_NO_CONVENIENCE_FUNCS,
+ FT_CONFIG_OPTION_ALTERNATE_GLYPH_FORMATS): Removed.
+
+ (FT_EXPORT, FT_EXPORT_DEF, FT_DEBUG_LEVEL_ERROR,
+ FT_DEBUG_LEVEL_TRACE, FT_DEBUG_MEMORY): Comment out definitions so
+ that platform specific configuration file can override.
+
+ * include/freetype/internal/ftstream.h: Include FT_SYSTEM_H.
2002-10-30 David Turner <david@freetype.org>
- * FreeType 2.1.3rc3 released
+ * FreeType 2.1.3rc3 released.
2002-10-25 David Turner <david@freetype.org>
* include/freetype/ftcache.h (FT_POINTER_TO_ULONG): New macro.
(FTC_FACE_ID_HASH): Rewritten, using FT_POINTER_TO_ULONG.
-2002-10-22 Giuseppe Ghib <ghibo@mandrakesoft.com>
+2002-10-22 Giuseppe Ghib <ghibo@mandrakesoft.com>
* include/freetype/freetype.h (FT_Encoding): Fix entry for latin-2.
@@ -471,8 +4124,8 @@
src/tools/docmaker/tohtml.py: Fixing a few nasty bugs.
* src/sfnt/ttcmap0.c (tt_cmap4_validate): The validator for format 4
- sub-tables is now capable of dealing with invalid "length" fields at
- the start of the sub-table. This allows fonts like "mg______.ttf"
+ sub-tables is now capable of dealing with invalid `length' fields at
+ the start of the sub-table. This allows fonts like `mg______.ttf'
(i.e. Marriage) to return accurate charmaps.
* docs/CHANGES: Updated.
@@ -736,7 +4389,7 @@
Removed conditional code. This fixes a bug that prevented
compilation in debug mode of template instantiation.
- * include/freetype/ftimage.h: Removed incorrect "zft_" definitions
+ * include/freetype/ftimage.h: Removed incorrect `zft_' definitions
and updated constants documentation comments.
* src/cff/cffparse.c (cff_parser_run): Fixed the CFF table loader.
@@ -744,7 +4397,7 @@
certain fonts.
* include/freetype/freetype.h (FT_FaceRec): Updating documentation
- comment. The "descender" value is always *negative*, not positive.
+ comment. The `descender' value is always *negative*, not positive.
2002-09-09 Owen Taylor <owen@redhat.com>
@@ -1048,7 +4701,7 @@
The automatic and Postscript hinter now automatically detect
inflection points in glyph outlines and treats them specially. This
is very useful to prevent nasty effect like the disappearing
- diagonals of "S" and "s" in many, many fonts.
+ diagonals of `S' and `s' in many, many fonts.
* src/autohint/ahtypes.h (ah_flag_inflection): New macro.
* src/autohint/ahangles.c (ah_angle_diff): New function.
@@ -1062,8 +4715,8 @@
* src/tools/docmaker/docmaker.py, src/tools/docmaker/utils.py,
src/tools/docmaker/tohtml.py: Updating the DocMaker tool.
- * include/freetype/freetype.h: Changing the type of the "load_flags"
- parameter from "FT_Int" to "FT_Int32", this in order to support more
+ * include/freetype/freetype.h: Changing the type of the `load_flags'
+ parameter from `FT_Int' to `FT_Int32', this in order to support more
options. This should only break binary and/or source compatibility
on 16-bit platforms (Atari?).
(FT_LOAD_NO_AUTOHINT): New macro.
@@ -1202,7 +4855,7 @@
interface is hidden in an internal part of the face record, and all
the definitions are in ftincrem.h.
- * include/freetype/freeetype.h [FT_CONFIG_OPTION_INCREMENTAL]:
+ * include/freetype/freetype.h [FT_CONFIG_OPTION_INCREMENTAL]:
Removed.
* include/freetype/internal/ftobjs.h [FT_CONFIG_OPTION_INCREMENTAL]:
Include FT_INCREMENTAL_H.
@@ -1232,7 +4885,7 @@
2002-07-30 David Turner <david@freetype.org>
* include/freetype/ftincrem.h: Adding new experimental header file
- to demonstrate a "cleaner" API to support incremental font loading.
+ to demonstrate a `cleaner' API to support incremental font loading.
* include/freetype/config/ftheader.h (FT_INCREMENTAL_H): New macro.
@@ -1268,10 +4921,10 @@
2002-07-24 Graham Asher <graham.asher@btinternet.com>
* src/truetype/ttobjs.c: Fix for bug reported by Sven Neumann
- [sven@gimp.org] on the FreeType development forum: "If
+ [sven@gimp.org] on the FreeType development forum: `If
FT_CONFIG_OPTION_INCREMENTAL is undefined (this is the default), the
TrueType loader crashes in line 852 of src/truetype/ttgload.c when
- it tries to access face->glyph_locations."
+ it tries to access face->glyph_locations.'
2002-07-18 Graham Asher <graham.asher@btinternet.com>
@@ -1374,8 +5027,8 @@
2002-07-11 David Turner <david@freetype.org>
Changing the SFNT loader to check for SFNT-based font files
- differently. We now ignore the range "helper" fields and check the
- "head" table's magic number instead.
+ differently. We now ignore the range `helper' fields and check the
+ `head' table's magic number instead.
* include/freetype/internal/tttypes.h (SFNT_HeaderRec): Add `offset'
field.
@@ -1677,7 +5330,7 @@
(FT_Get_PS_Font_Info): Make it work with CID and Type 42 drivers
also.
-2002-06-19 Sebastien BARRE <sebastien@barre.nom.fr>
+2002-06-19 Sebastien BARRE <http://barre.nom.fr/contact.html#email>
* src/type42/t42parse.c (t42_parse_sfnts): Fix compiler warning.
@@ -1892,7 +5545,7 @@
2002-06-07 David Turner <david@freetype.org>
Fixed the bug that prevented the correct display of fonts with
- "ftview".
+ `ftview'.
* src/type42/t42drivr.c: Split into...
* src/type42/t42drivr.h, src/type42/t42parse.c,
@@ -1998,8 +5651,8 @@
* include/freetype/t1tables.h: Updated.
* src/base/Jamfile, src/base/rules.mk, src/base/descrip.mms:
- Updating build control files for the new files "ftxf86.c" and
- "fttype1.c" in src/base.
+ Updating build control files for the new files `ftxf86.c' and
+ `fttype1.c' in src/base.
* src/pshinter/pshglob.c (psh_blues_scale_zones): Fixed a bug that
prevented family blue zones substitution from hapenning correctly.
@@ -2021,7 +5674,7 @@
Fixing the SFNT name table loader to support various buggy fonts.
It now ignores empty name entries, entries with invalid pointer
Offsets and certain fonts containing tables with broken
- "storageOffset" fields.
+ `storageOffset' fields.
Name strings are now loaded on demand, which reduces the memory
requirements for a given FT_Face tremendously (for example, the name
@@ -2075,7 +5728,7 @@
2002-05-21 David Turner <david@freetype.org>
* src/bdf/bdflib.c: Removed compiler warning, and changed all tables
- to the "static const" storage specifier (instead of simply
+ to the `static const' storage specifier (instead of simply
`static').
* src/type42/t42drivr.c (hexval): Use more efficient code.
@@ -2086,7 +5739,7 @@
src/base/descrip.mms, src/base/Jamfile, src/base/rules.mk
(FT_Get_BDF_Charset_ID): New API to retrieve BDF-specific strings
from a face. This is much cleaner than accessing the internal types
- "BDF_Public_Face" defined in FT_INTERNAL_BDF_TYPES_H.
+ `BDF_Public_Face' defined in FT_INTERNAL_BDF_TYPES_H.
2002-05-21 Werner Lemberg <wl@gnu.org>
@@ -2240,11 +5893,11 @@
2002-05-01 David Turner <david@freetype.org>
* src/sfnt/sfobjs.c (tt_face_get_name): Fixing a bug that caused
- FreeType to crash when certain broken fonts (e.g. "hya6gb.ttf")
+ FreeType to crash when certain broken fonts (e.g. `hya6gb.ttf')
were opened.
* src/sfnt/ttload.c (TT_Load_Names): Applied a small work-around to
- manage fonts containing a broken name table (e.g. "hya6gb.ttf").
+ manage fonts containing a broken name table (e.g. `hya6gb.ttf').
* src/sfnt/ttcmap0.c (tt_cmap4_validate): Fixed over-restrictive
validation test. The charmap validator now accepts overlapping
@@ -2411,8 +6064,8 @@
* src/base/ftobjs.c, builds/win32/ftdebug.c,
builds/amiga/src/base/ftdebug.c: Version 2.1.0 couldn't be linked
against applications in Win32 and Amiga builds due to changes to
- "src/base/ftdebug.c" that were not properly propagated to
- "builds/win32" and "builds/amiga". This has been fixed.
+ `src/base/ftdebug.c' that were not properly propagated to
+ `builds/win32' and `builds/amiga'. This has been fixed.
* include/freetype/internal/ftobject.h,
include/freetype/internal/ftexcept.h, include/freetype/ftsysmem.h,
@@ -2499,7 +6152,7 @@
builds/amiga/src/base/ftdebug.c:
- Added the new configuration file "ftstdlib.h" used to define
+ Added the new configuration file `ftstdlib.h' used to define
aliases for all ISO C library functions used by the engine
(e.g. strlen, qsort, setjmp, etc.).
@@ -2740,7 +6393,7 @@
* src/psaux/t1cmap.h, src/psaux/t1cmap.c, src/type1/t1cmap.h,
src/type1/t1cmap.c: Updating and moving the Type 1 FT_CMap support
- from "src/type1" to "src/psaux" since it is going to be shared by
+ from `src/type1' to `src/psaux' since it is going to be shared by
the Type 1 and CID font drivers.
* src/psaux/Jamfile, src/psaux/psaux.c, src/psaux/psauxmod.c,
@@ -2950,11 +6603,11 @@
* src/cid/cidriver.c (cid_get_postscript_name): Fixed a bug that
caused the CID driver to return Postscript font names with a leading
- slash ("/") as in "/MOEKai-Regular".
+ slash (`/') as in `/MOEKai-Regular'.
* src/sfnt/ttload.c (TT_Load_Names), src/sfnt/sfobjs.c (Get_Name),
src/sfnt/sfdriver.c (get_sfnt_postscript_name): Fixed the loader so
- that it accepts broken fonts like "foxjump.ttf", which made FreeType
+ that it accepts broken fonts like `foxjump.ttf', which made FreeType
crash when trying to load them.
Also improved the name table parser to be able to load
@@ -3014,7 +6667,7 @@
* src/sfnt/ttload.c (TT_Load_Names): Simplifying and securing the
names table loader. Invalid individual name entries are now handled
correctly. This allows the loading of very buggy fonts like
- "foxjump.ttf" without allocating tons of memory and causing crashes.
+ `foxjump.ttf' without allocating tons of memory and causing crashes.
* src/otlayout/otlcommon.h, src/otlayout/otlcommon.c: Adding (still
experimental) code for OpenType Layout tables validation and
@@ -3061,14 +6714,14 @@
ft_io_stream => ft_ansi_stream_io (in base/ftsystem.c only)
* src/base/ftutil.c: New file. Contains all memory and list
- management code (previously in "ftobjs.c" and "ftlist.c",
+ management code (previously in `ftobjs.c' and `ftlist.c',
respectively).
* include/freetype/internal/ftobjs.h: Moving all code related to
glyph loaders to ...
- * include/freetype/"internal/ftgloadr.h: This new file.
- "FT_GlyphLoader" is now a pointer to the structure
- "FT_GlyphLoaderRec".
+ * include/freetype/internal/ftgloadr.h: This new file.
+ `FT_GlyphLoader' is now a pointer to the structure
+ `FT_GlyphLoaderRec'.
(ft_glyph_own_bitmap): Renamed to ...
(FT_GLYPH_OWN_BITMAP): This.
* src/base/ftobjs.c: Moving all code related to glyph loaders
@@ -3083,8 +6736,8 @@
2002-02-21 David Turner <david@freetype.org>
Modified the debug sub-system initialization. Trace levels can now
- be specified within the "FT2_DEBUG" environment variable. See the
- comments within "ftdebug.c" for more details.
+ be specified within the `FT2_DEBUG' environment variable. See the
+ comments within `ftdebug.c' for more details.
* src/base/ftdebug.c: (FT_SetTraceLevel): Removed.
(ft_debug_init): New function.
@@ -3109,8 +6762,8 @@
Removed. Both files are now completely obsolete.
* src/base/Jamfile, src/base/rules.mk: Updated.
- * include/freetype/fterrors.h: Adding "#undef FT_ERR_CAT" and
- `#undef FT_ERR_XCAT" to avoid warnings with certain compilers (like
+ * include/freetype/fterrors.h: Adding `#undef FT_ERR_CAT' and
+ `#undef FT_ERR_XCAT' to avoid warnings with certain compilers (like
LCC).
* src/pshinter/pshalgo2.c (print_zone): Renamed to ...
@@ -3122,7 +6775,7 @@
2002-02-20 David Turner <david@freetype.org>
- * README: Adding "devel@freetype.org" address for bug reports.
+ * README: Adding `devel@freetype.org' address for bug reports.
2002-02-20 Werner Lemberg <wl@gnu.org>
@@ -3250,7 +6903,7 @@
* src/pcf/pcfdriver.c (FT_Done_Face): Fixed small memory leak.
- * src/pcf/pcfread.c (pcf_load_font): Now handles the "AVERAGE_WIDTH"
+ * src/pcf/pcfread.c (pcf_load_font): Now handles the `AVERAGE_WIDTH'
property to return correct character pixel (width/height) pairs for
embedded bitmaps.
@@ -3316,7 +6969,7 @@
2002-01-30 David Turner <david@freetype.org>
* INSTALL: Moved to ...
- * docs/INSTALL: Here to avoid conflicts with the "install" script on
+ * docs/INSTALL: Here to avoid conflicts with the `install' script on
Windows, where the filesystem doesn't preserve case.
2002-01-29 David Turner <david@freetype.org>
@@ -3326,7 +6979,7 @@
./configure --disable-shared --disable-nls
- the "--disable-nls" was incorrectly sent to the "make" program.
+ the `--disable-nls' was incorrectly sent to the `make' program.
2002-01-29 Werner Lemberg <wl@gnu.org>
@@ -3373,7 +7026,7 @@
2002-01-21 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
- * docs/PATENTS: Typo fixed (thanks to Detlef "Hawkeye" Wrkner) in
+ * docs/PATENTS: Typo fixed (thanks to Detlef `Hawkeye' Wrkner) in
the URL for the online resource.
2002-01-18 Ian Brown <ian.brown@printsoft.de>
@@ -3433,7 +7086,7 @@
(html_format): Replaced with ...
(html_quote): New function.
(html_quote0): New function.
- (DocCode::dump_html: Small improvement.
+ (DocCode::dump_html): Small improvement.
(DocParagraph::dump, DocBlock::html): Use html_quote0 and html_quote.
* include/freetype/config/ftoption.h: Setting default options for
@@ -3448,7 +7101,7 @@
* src/autohint/ahhint.c (ah_align_linked_edge): Modified computation
of auto-hinted stem widths; this avoids color fringes in
- "ClearType-like" rendering.
+ `ClearType-like' rendering.
* src/truetype/ttgload.c (TT_Load_Glyph_Header,
TT_Load_Simple_Glyph, TT_Load_Composite_Glyph, load_truetype_glyph):
@@ -3475,22 +7128,22 @@
2002-01-03 Keith Packard <keithp@keithp.com>
* builds/unix/ftsystem.c (FT_New_Stream): Added a fix to ensure that
- all FreeType input streams are closed in child processes of a "fork"
+ all FreeType input streams are closed in child processes of a `fork'
on Unix systems. This is important to avoid (potential) access
control issues.
2002-01-03 David Turner <david@freetype.org>
* src/type1/t1objs.c (T1_Face_Init): Fixed a bug that crashed the
- library when dealing with certain weird fonts like "Stalingrad", in
- "sadn.pfb" (this font has no full font name entry).
+ library when dealing with certain weird fonts like `Stalingrad', in
+ `sadn.pfb' (this font has no full font name entry).
* src/base/ftoutln.c, include/freetype/ftoutln.h (FT_Outline_Check):
New function to check the consistency of outline data.
* src/base/ftobjs.c (FT_Load_Glyph): Use `FT_Outline_Check' to
ensure that loaded glyphs are valid. This allows certain fonts like
- "tt1095m_.ttf" to be loaded even though it appears they contain
+ `tt1095m_.ttf' to be loaded even though it appears they contain
really funky glyphs.
There still is a bug there, though.
@@ -3503,7 +7156,7 @@
computation of auto-hinted glyphs. This noticeably improves the
spacing of letters in KDE and Gnome.
-2001-12-25 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
+2001-12-25 Antoine Leca <Antoine-Freetype@Leca-Marti.org>
* builds/dos/detect.mk: Correcting the order for Borland compilers:
16-bit bcc was never selected, always overridden by 32-bit bcc32.
@@ -3541,8 +7194,8 @@
2001-12-21 David Turner <david@freetype.org>
* src/pshinter/pshrec.c (ps_hints_t2mask, ps_hints_t2counter):
- Ignore invalid "hintmask" and "cntrmask" operators (instead of
- returning an error). Glyph 2028 of the CFF font "MSung-Light-Acro"
+ Ignore invalid `hintmask' and `cntrmask' operators (instead of
+ returning an error). Glyph 2028 of the CFF font `MSung-Light-Acro'
couldn't be rendered otherwise (it seems its charstring is buggy,
though this requires more analysis).
(FT_COMPONENT): Define.
@@ -3638,12 +7291,12 @@
routines were never released when CID faces were destroyed.
* src/cff/cffload.h, src/cff/cffload.c, src/cff/cffgload.c: Updated
- to move the definition of encoding tables back within "cffload.c"
+ to move the definition of encoding tables back within `cffload.c'
instead of making them part of a shared header (causing problems in
- "multi" builds). This reverts change 2001-08-08.
+ `multi' builds). This reverts change 2001-08-08.
* docs/CHANGES: Updated for 2.0.6 release.
- * docs/TODO: Added "stem3 and counter hints support" to the TODO
+ * docs/TODO: Added `stem3 and counter hints support' to the TODO
list for the Postscript hinter.
* docs/BUGS: Closed the AUTOHINT-NO-SBITS bug.
@@ -3657,12 +7310,12 @@
that prevented composites from loading correctly, due to missing
parentheses around macro parameters.
- * src/sfnt/sfobjs.c (SFNT_Load_Face): Make the "post" and "name"
+ * src/sfnt/sfobjs.c (SFNT_Load_Face): Make the `post' and `name'
tables optional to load PCL fonts properly.
* src/truetype/ttgload.c (TT_Load_Glyph), src/base/ftobjs.c
(FT_Load_Glyph), include/freetype/freetype.h (FT_LOAD_SBITS_ONLY):
- "Fixed" the bug that prevented embedded bitmaps to be loaded when
+ `Fixed' the bug that prevented embedded bitmaps to be loaded when
the auto-hinter is used. This actually is a hack but will be enough
until the internal re-design scheduled for FreeType 2.1.
@@ -3706,7 +7359,7 @@
* src/truetype/ttgload.c (load_truetype_glyph): Fixing crash when
dealing with invalid fonts (i.e. glyph size < 10 bytes).
-2001-12-14 Sam Latinga <slouken@devolution.com>
+2001-12-14 Sam Latinga <slouken@devolution.com>
* builds/mac/freetype.make: A new Makefile to build with MPW on
MacOS classic.
@@ -3725,10 +7378,10 @@
2001-12-12 David Turner <david@freetype.org>
- * src/pshint/pshglob.c (psh_blues_scale_zones, psh_blues_snap_stem
+ * src/pshinter/pshglob.c (psh_blues_scale_zones, psh_blues_snap_stem
psh_globals_new): Adding correct BlueScale/BlueShift support, plus
family blues processing.
- * src/pshint/pshglob.h (PSH_BluesRec): Updated.
+ * src/pshinter/pshglob.h (PSH_BluesRec): Updated.
Started adding support for the Postscript hinter in the CFF module.
@@ -3751,9 +7404,9 @@
2001-12-11 David Turner <david@freetype.org>
* builds/unix/freetype-config.in: Modified the script to prevent
- passing "-L/usr/lib" to gcc.
+ passing `-L/usr/lib' to gcc.
- * docs/FTL.TXT: Simple fix (change "LICENSE.TXT" to "FTL.TXT").
+ * docs/FTL.TXT: Simple fix (change `LICENSE.TXT' to `FTL.TXT').
* builds/unix/freetype2.m4: New file for checking configure paths.
We need to install it in $(prefix)/share/aclocal/freetype2.m4 but I
@@ -3774,7 +7427,7 @@
2001-12-10 Francesco Zappa Nardelli <Francesco.Zappa.Nardelli@ens.fr>
* src/pcf/pcfdriver.c (PCF_Init_Face): Allow Xft to use PCF fonts
- by setting the "face->metrics.max_advance" correctly.
+ by setting the `face->metrics.max_advance' correctly.
2001-12-07 David Turner <david@freetype.org>
@@ -3873,8 +7526,8 @@
* include/freetype/ttnameid.h: Added some new Microsoft language
codes and LCIDs as found in MSDN (Passport SDK). Also added
comments about the meaning of bit 57 of the `OS/2' table
- (TT_UCR_SURROGATES) which (with OpenType v.1.3) now means "there is
- a character beyond 0xFFFF in this font". Thanks to Detlef Wrkner
+ (TT_UCR_SURROGATES) which (with OpenType v.1.3) now means `there is
+ a character beyond 0xFFFF in this font'. Thanks to Detlef Wrkner
<TetiSoft@apg.lahn.de> for noticing this.
2001-11-20 David Turner <david@freetype.org>
@@ -3921,7 +7574,7 @@
Fix typos.
* tests/gview.c: Updated the debugging glyph viewer to show the
- hints generated by the "autohint" module.
+ hints generated by the `autohint' module.
2001-10-27 David Turner <david@freetype.org>
@@ -3932,7 +7585,7 @@
* include/freetype/ftcache.h, include/freetype/cache/*.h,
src/cache/*.c: Major re-design of the cache sub-system to provide
- better performance as well as an "Acquire"/"Release" API. Seems to
+ better performance as well as an `Acquire'/`Release' API. Seems to
work well here, but probably needs a bit more testing.
2001-10-26 Leonard Rosenthol <leonardr@lazerware.com>
@@ -3969,7 +7622,7 @@
* include/freetype/internal/ftmemory.h, src/base/ftdbgmem.c:
Improvements to the memory debugger to report more information in
- case of errors. Also, some allocations that occured through REALLOC
+ case of errors. Also, some allocations that occurred through REALLOC
couldn't be previously catched correctly.
* src/autohint/ahglyph.c (ah_outline_compute_segments,
@@ -4000,7 +7653,7 @@
the source file.
* src/base/ftdbgmem.c: New debugging memory manager. You must
- define the FT_DEBUG_MEMORY macro in "ftoption.h" to enable it. It
+ define the FT_DEBUG_MEMORY macro in `ftoption.h' to enable it. It
will record every memory block allocated and report simple errors
like memory leaks and double deletes.
@@ -4043,7 +7696,7 @@
* src/type1/t1load.c (parse_font_name, parse_subrs): Added a test
for when loading synthetic fonts to make sure that the font name
and subrotuines are not loaded twice. This is to remove a memory
- leak that occured because the original memory blocks for these
+ leak that occurred because the original memory blocks for these
objects were not deallocated when the objects were parsed the
second time.
@@ -4054,7 +7707,7 @@
compiler warnings.
* src/pshinter/module.mk, src/pshinter/rules.mk: Adding control
- files to build the PostScript hinter with the "old" build system.
+ files to build the PostScript hinter with the `old' build system.
2001-10-19 Jacob Jansen <joukj@hrem.stm.tudelft.nl>
@@ -4064,7 +7717,7 @@
2001-10-18 David Turner <david@freetype.org>
* src/psnames/pstables.h, src/tools/glnames.py: Rewrote the
- "glnames.py" script used to generate the "pstables.h" header file.
+ `glnames.py' script used to generate the `pstables.h' header file.
The old one contained a serious bug that made FreeType return
incorrect glyph names for certain glyphs.
@@ -4106,7 +7759,7 @@
* tests/Jamfile, tests/gview.c: Adding a new glyph hinting
viewer/debugger to the source tree. Note that you will _not_ be
able to compile it since it depends on an unavailable graphics
- library named "Nirvana" to render vector images.
+ library named `Nirvana' to render vector images.
2001-10-17 David Turner <david@freetype.org>
@@ -4228,7 +7881,7 @@
in PDF documents that were automatically generated from TrueType
ones).
- * src/type1/t1load.c (is_alpha): Now supports "+" in font names;
+ * src/type1/t1load.c (is_alpha): Now supports `+' in font names;
this is used in embedded fonts.
* src/psaux/psobjs.c (PS_Table_Add): Fixed a reallocation bug that
@@ -4310,7 +7963,7 @@
(cff_get_glyph_index): Minor documentation change.
* src/type1/t1driver.c (t1_get_name_index): New function used in
- Get_Interface as the function returned when the "name_index"
+ Get_Interface as the function returned when the `name_index'
function is requested.
(get_t1_glyph_name): Renamed to t1_get_glyph_name for consistency.
@@ -4327,10 +7980,10 @@
* src/cff/cffdrivr.c (cff_get_name_index): New function, returned
when `cff_get_interface' is called with a request for the
- "name_index" function.
+ `name_index' function.
(cff_get_interface): Modified so that it returns the function
- `cff_get_name_index' when the "name_index" function is requested.
+ `cff_get_name_index' when the `name_index' function is requested.
* src/base/ftobjs.c (FT_Get_Name_Index): New function, used to
return a glyph index for a given glyph name only if the driver
@@ -4385,7 +8038,7 @@
* src/psaux/psobjs.c (T1_Decrypt): Ditto.
* src/type1/t1parse.c (T1_Get_Private_Dict): Ditto.
-2001-06-28 David Turner <david@freetype.org>
+2001-06-28 David Turner <david@freetype.org>
* include/internal/ftstream.h: Modified the definitions
of the FT_GET_XXXX and NEXT_XXXX macros for 16-bit correctness.
@@ -4406,7 +8059,7 @@
=========================
-2001-06-27 David Turner <david@freetype.org>
+2001-06-27 David Turner <david@freetype.org>
* builds/unix/ftconfig.in: Changed the definition of the
FT_CALLBACK_DEF macro.
@@ -4435,7 +8088,7 @@
* debian/*: Added Debian package build directory for 2.0.4.
-2001-06-22 David Turner <david@freetype.org>
+2001-06-22 David Turner <david@freetype.org>
* docs/PATENTS: Added patents disclaimer. This one was missing!
@@ -4476,7 +8129,7 @@
Removing _lots_ of compiler warnings when the most pedantic warning
levels of Visual C++ and Borland C++ are used. Too many files to be
listed here, but FT2 now compiles without warnings with VC++ and the
- "/W4" warning level (lint-style).
+ `/W4' warning level (lint-style).
* include/freetype/freetype.h (FT_New_Memory_Face): Updated
documentation.
@@ -4550,9 +8203,9 @@
2001-06-14 David Turner <david@freetype.org>
Modified the TrueType interpreter to let it use the new
- trigonometric functions provided in "fttrigon.h". This gets rid of
+ trigonometric functions provided in `fttrigon.h'. This gets rid of
some old 64-bit computation routines, as well as many warnings when
- compiling the library with the "long long" 64-bit integer type.
+ compiling the library with the `long long' 64-bit integer type.
* include/freetype/config/ftoption.h: Undefine
FT_CONFIG_OPTION_OLD_CALCS.
@@ -4674,7 +8327,7 @@
2001-05-25 David Turner <david@freetype.org>
- Moved several documents from the top-level to the "docs" directory.
+ Moved several documents from the top-level to the `docs' directory.
* src/base/ftcalc.c (FT_DivFix): Small fix to return value.
@@ -4728,9 +8381,9 @@
* builds/newline: New file.
* builds/top_level.mk, builds/detect.mk: Use it. This fixes
- problems with Make on Windows 2000, as well as problems when "make
- distclean" is invoked on a non-Unix platform when there is no
- "config.mk" in the current directory.
+ problems with Make on Windows 2000, as well as problems when `make
+ distclean' is invoked on a non-Unix platform when there is no
+ `config.mk' in the current directory.
* builds/freetype.mk: Fixed a problem with object deletions under
Dos/Windows/OS/2 systems.
@@ -4782,7 +8435,7 @@
* src/base/ftcalc.c (FT_MulDiv, FT_MulFix, FT_DivFix): Various tiny
fixes related to rounding in 64-bits routines and
- pseudo-"optimizations".
+ pseudo-`optimizations'.
2001-04-27 David Turner <david@freetype.org>
@@ -4809,7 +8462,7 @@
fixed-point square root computation. It is now used even with
64-bits integers, as it is _much_ faster than calling FT_Sqrt64 :-)
- * src/base/ftbbox.c: Removed invalid "#include FT_BEZIER_H" line.
+ * src/base/ftbbox.c: Removed invalid `#include FT_BEZIER_H' line.
2001-04-25 David Turner <david@freetype.org>
@@ -4827,7 +8480,7 @@
2001-04-20 David Turner <david@freetype.org>
- * ftconfig.h, ftoption.h: Updated "ftconfig.h" to detect 64-bit int
+ * ftconfig.h, ftoption.h: Updated `ftconfig.h' to detect 64-bit int
types on platforms where Autoconf is not available). Also removed
FTCALC_USE_LONG_LONG and replaced it with
FT_CONFIG_OPTION_FORCE_INT64.
@@ -4919,13 +8572,13 @@
2001-04-02 Tom Kacvinsky <tkacvins@freetype.org>
* src/sfnt/ttload.c (TT_Load_Metrics): Fix an improper pointer
- dereference. Submitted by Herbert Duerr <duerr@sun.com>
+ dereference. Submitted by Herbert Duerr <duerr@sun.com>.
2001-03-26 Tom Kacvinsky <tkacvins@freetype.org>
* include/freetype/config/ftconfig.h: Changed hexadecimal
constants to use suffix U to avoid problems with HP-UX's c89
- compiler. Submitted by G.W. Lucas <glucas@sonalysts.com>
+ compiler. Submitted by G.W. Lucas <glucas@sonalysts.com>.
2001-03-24 David Turner <david.turner@freetype.org>
@@ -4944,7 +8597,7 @@
2001-03-20 David Turner <david.turner@freetype.org>
* include/freetype/config/ftheader.h, include/freetype/ftsnames.h:
- Renamed "ftnames.h" to "ftsnames.h", and FT_NAMES_H to
+ Renamed `ftnames.h' to `ftsnames.h', and FT_NAMES_H to
FT_SFNT_NAMES_H.
* docs/docmaker.py: Added generation of INDEX link in table of
@@ -4954,8 +8607,8 @@
compilation process has changed slightly (no more `src' required in
the include path).
- * builds/*/*-def.mk: Changed the objects directory from "obj" to
- "objs".
+ * builds/*/*-def.mk: Changed the objects directory from `obj' to
+ `objs'.
* include/freetype/config/ftheader.h: Removed obsolete macros like
FT_SOURCE_FILE, etc. and added cache-specific macro definitions that
@@ -4964,7 +8617,7 @@
* src/*/*: Removed the use of FT_SOURCE_FILE, etc. Now, each
component needs to add its own directory to the include path at
- compile time. Modified all "rules.mk" and "descrip.mms"
+ compile time. Modified all `rules.mk' and `descrip.mms'
accordingly.
2001-03-20 Werner Lemberg <wl@gnu.org>
@@ -4990,7 +8643,7 @@
compiler warnings in pedantic modes.
* include/config/ft2build.h, include/config/ftheader.h: The file
- "ft2build.h" was renamed to "ftheader.h" to avoid conflicts with the
+ `ft2build.h' was renamed to `ftheader.h' to avoid conflicts with the
top-level <ft2build.h>.
* include/config/ftheader.h: Added new section describing the #include
@@ -5012,19 +8665,19 @@
via FT_Get_Glyph_Name().
(cff_get_interface): Added support for getting a glyph name via the
- "glyph_name" module interface. Uses the new function
+ `glyph_name' module interface. Uses the new function
get_cff_glyph_name().
- Submitted by Sander van der Wal <svdwal@xs4all.nl>
+ Submitted by Sander van der Wal <svdwal@xs4all.nl>.
* src/cff/cffobjs.c (CFF_Init_Face): Logical or the face flags with
FT_FACE_FLAG_GLYPH_NAMES only if FT_CONFIG_OPTION_NO_GLYPH_NAMES is
not defined. This is to add support for getting a glyph name from a
glyph index via FT_Get_Glyph_Name().
- Submitted by Sander van der Wal <svdwal@xs4all.nl>
+ Submitted by Sander van der Wal <svdwal@xs4all.nl>.
* src/cff/cffgload.c (CFF_Parse_CharStrings): Added support for
- deprecated operator "dotsection".
- Submitted by Sander van der Wal <svdwal@xs4all.nl>
+ deprecated operator `dotsection'.
+ Submitted by Sander van der Wal <svdwal@xs4all.nl>.
2001-03-12 Werner Lemberg <wl@gnu.org>
@@ -5180,7 +8833,7 @@
* src/cff/cffparse.c (cff_parse_font_matrix): Added logic to get
the units_per_EM from the FontMatrix.
- (cff_parse_fixed_thousand): New function. Gets a real number from
+ (cff_parse_fixed_thousand): New function. Gets a real number from
the CFF font, but multiplies by 1000 (this is to avoid rounding
errors when placing this real number into a 16.16 fixed number).
@@ -5209,7 +8862,7 @@
2001-02-01 David Turner <david.turner@freetype.org>
* docs/docmaker.py: Improved the index sorting routine to place
- capital letters before small ones. Added the "<order>" marker to
+ capital letters before small ones. Added the `<order>' marker to
section blocks in order to give the order of blocks.
2001-01-30 Antoine Leca <Antoine.Leca@renault.fr>
@@ -5294,7 +8947,7 @@
* src/cff/cffobjs.c, src/cff/cffobjs.h, src/cff/cffparse.c,
src/cff/cffdrivr.c, src/cff/cff.c, src/cff/cffload.c,
src/cff/cffgload.c, src/cff/cffgload.h: Changed to use
- cffgload.{c,h} instead of t2gload.{c,h}. All occurences of t2_
+ cffgload.{c,h} instead of t2gload.{c,h}. All occurrences of t2_
(T2_) were replaced with cff_ (CFF_, respectively).
* src/cff/t2gload.h: Renamed cffgload.h.
@@ -5416,7 +9069,7 @@
* src/smooth/ftgrays.c (grays_convert_glyph): Implement it.
* INSTALL: Updated installation instructions on Win32, listing the
- new "make setup list" target used to list supported
+ new `make setup list' target used to list supported
compilers/targets.
* src/raster/ftraster.c (ft_black_render): Test for unsupported
@@ -5434,7 +9087,7 @@
* builds/win32/detect.mk: Added support for the Intel C/C++
compiler, as well as _preliminary_ (read: doesn't work!) support for
- Watcom. Also added a new setup target. Type "make setup list" for
+ Watcom. Also added a new setup target. Type `make setup list' for
a list of supported command-line compilers on Win32.
* src/base/ftdebug.c: Added dummy symbol to avoid empty file if
@@ -5535,16 +9188,16 @@
pointer).
* src/base/ftsystem.c (FT_Done_Memory): Fixed an obvious bug:
- The ANSI "free()" function was called instead of "memory->free()".
+ The ANSI `free()' function was called instead of `memory->free()'.
* docs/docmaker.py: Added section filtering, multi-page generation
(index page generation is still missing though).
2000-12-04 David Turner <david.turner@freetype.org>
- * builds/unix/install.mk, builds/unix/ft2unix.h: The file "ft2unix.h"
+ * builds/unix/install.mk, builds/unix/ft2unix.h: The file `ft2unix.h'
is now installed as <ft2build.h> for Unix systems. Note that we
- still use the "freetype2/freetype" installation path for now.
+ still use the `freetype2/freetype' installation path for now.
* */*.[ch]: Now using <ft2build.h> as the default build and setup
configuration file in all public headers. Internal source files
@@ -5556,7 +9209,7 @@
* builds/win32/detect.mk, builds/win32/w32-bccd.mk,
builds/win32/w32-dev.mk: Changed the developer build targets to
- "devel-gcc" and "devel-bcc" in order to be able to develop with the
+ `devel-gcc' and `devel-bcc' in order to be able to develop with the
Borland C++ compiler.
2000-12-01 David Turner <david.turner@freetype.org>
@@ -5568,7 +9221,7 @@
* builds/unix/configure.in, builds/unix/configure,
builds/cygwin/configure.in, builds/cygwin/configure: Setting
- "version_info" to 6:1:0 for the 2.0.1 release.
+ `version_info' to 6:1:0 for the 2.0.1 release.
* CHANGES: Added a summary of changes between 2.0.1 and 2.0.
@@ -5595,13 +9248,13 @@
2000-11-30 David Turner <david.turner@freetype.ogr>
* INSTALL: Slightly updated the quick starter documentation to
- include IDE compilation, prevent against BSD Make, and specify "make
- setup" instead of a single "make" for build configuration.
+ include IDE compilation, prevent against BSD Make, and specify `make
+ setup' instead of a single `make' for build configuration.
* include/config/ftbuild.h, include/internal/internal.h: Added new
configuration files used to determine the location of all public,
configuration, and internal header files for FreeType 2. Modified
- all headers under "include/freetype" to reflect this change. Note
+ all headers under `include/freetype' to reflect this change. Note
that we still need to change the library source files themselves
though.
@@ -5609,7 +9262,7 @@
builds/win32/w32-bcc.mk, builds/win32/w32-bccd.mk,
builds/win32/detect.mk: Added new files to support compilation with
the free Borland C++ command-line compiler. Modified the detection
- rules to recognize the new "bcc32" target in "make setup bcc32".
+ rules to recognize the new `bcc32' target in `make setup bcc32'.
* src/sfnt/ttcmap.c, src/sfnt/ttpost.c, src/sfnt/ttsbit.c,
src/truetype/ttobjs.c, src/truetype/ttgload.c,
diff --git a/extras/freetype2/Jamfile b/extras/freetype2/Jamfile
index 3ba645f6b..c4e98a909 100644
--- a/extras/freetype2/Jamfile
+++ b/extras/freetype2/Jamfile
@@ -1,21 +1,22 @@
-# FreeType 2 top Jamfile (c) 2001-2002 David Turner
+# FreeType 2 top Jamfile (c) 2001, 2002, 2003, 2004 David Turner
#
# The HDRMACRO is already defined in FTJam and is used to add
# the content of certain macros to the list of included header
# files.
#
-# we can compile FreeType 2 with classic Jam however thanks to
+# We can compile FreeType 2 with classic Jam however thanks to
# the following code
#
if ! $(JAM_TOOLSET)
{
rule HDRMACRO
{
- # nothing !!
+ # nothing
}
}
+
# We need to invoke a SubDir rule if the FT2 source directory top is not the
# current directory. This allows us to build FreeType 2 as part of a larger
# project easily.
@@ -25,71 +26,85 @@ if $(FT2_TOP) != $(DOT)
SubDir FT2_TOP ;
}
-#
-# The following macros define the include directory, the source directory
-# and the final library name (without library extensions). They can be
+
+# The following macros define the include directory, the source directory,
+# and the final library name (without library extensions). They can be
# replaced by other definitions when the library is compiled as part of
# a larger project.
#
-# name of FreeType include directory during compilation.
-# relative to FT2_TOP
+# Name of FreeType include directory during compilation.
+# This is relative to FT2_TOP.
#
FT2_INCLUDE_DIR ?= include ;
-# name of FreeType source directory during compilation.
-# relative to FT2_TOP
+# Name of FreeType source directory during compilation.
+# This is relative to FT2_TOP.
#
FT2_SRC_DIR ?= src ;
-# name of final library, without extension
+# Name of final library, without extension.
#
FT2_LIB ?= $(LIBPREFIX)freetype ;
-# define FT2_BUILD_INCLUDE to point to your build-specific directory
-# this is prepended to FT2_INCLUDE_DIR. This can be used to specify
+# Define FT2_BUILD_INCLUDE to point to your build-specific directory.
+# This is prepended to FT2_INCLUDE_DIR. It can be used to specify
# the location of a custom <ft2build.h> which will point to custom
-# versions of "ftmodule.h" and "ftoption.h", for example
+# versions of "ftmodule.h" and "ftoption.h", for example.
#
FT2_BUILD_INCLUDE ?= ;
-# the list of modules to compile on any given build of the library
-# by default, this will contain _all_ modules defined in FT2_SRC_DIR
+# The list of modules to compile on any given build of the library.
+# By default, this will contain _all_ modules defined in FT2_SRC_DIR.
#
# IMPORTANT: You'll need to change the content of "ftmodule.h" as well
# if you modify this list or provide your own.
#
-FT2_COMPONENTS ?= gzip # support for gzip-compressed files.
+FT2_COMPONENTS ?= autofit # auto-fitter
autohint # auto-hinter
base # base component (public APIs)
bdf # BDF font driver
cache # cache sub-system
cff # CFF/CEF font driver
- cid # Postscript CID-keyed font driver
+ cid # PostScript CID-keyed font driver
+ gzip # support for gzip-compressed files
+ lzw # support for LZW-compressed files
pcf # PCF font driver
pfr # PFR/TrueDoc font driver
- psaux # Common Postscript routines module
- pshinter # Postscript hinter module
- psnames # Postscript names handling
- raster # Monochrome rasterizer
- smooth # Anti-aliased rasterizer
+ psaux # common PostScript routines module
+ pshinter # PostScript hinter module
+ psnames # PostScript names handling
+ raster # monochrome rasterizer
+ smooth # anti-aliased rasterizer
sfnt # SFNT-based format support routines
truetype # TrueType font driver
- type1 # Postscript Type 1 font driver
- type42 # Postscript Type 42 (embedded TrueType) driver
+ type1 # PostScript Type 1 font driver
+ type42 # PostScript Type 42 (embedded TrueType) driver
winfonts # Windows FON/FNT font driver
;
-# don't touch
+# Don't touch.
#
FT2_INCLUDE = $(FT2_BUILD_INCLUDE)
[ FT2_SubDir $(FT2_INCLUDE_DIR) ] ;
FT2_SRC = [ FT2_SubDir $(FT2_SRC_DIR) ] ;
-# only used by FreeType developers
+# Location of API Reference Documentation
+#
+if $(DOC_DIR)
+{
+ DOC_DIR = $(DOCDIR:T) ;
+}
+else
+{
+ DOC_DIR = docs/reference ;
+}
+
+
+# Only used by FreeType developers.
#
if $(DEBUG_HINTER)
{
@@ -104,11 +119,12 @@ HDRS += $(FT2_INCLUDE) ;
# Uncomment the following line if you want to build individual source files
-# for each FreeType 2 module. this is only useful during development, and
-# is better defined as an environment variable anyway !
+# for each FreeType 2 module. This is only useful during development, and
+# is better defined as an environment variable anyway!
#
# FT2_MULTI = true ;
+
# The file <freetype/config/ftheader.h> is used to define macros that are
# later used in #include statements. It needs to be parsed in order to
# record these definitions.
@@ -116,17 +132,26 @@ HDRS += $(FT2_INCLUDE) ;
HDRMACRO [ FT2_SubDir include freetype config ftheader.h ] ;
HDRMACRO [ FT2_SubDir include freetype internal internal.h ] ;
+
# Now include the Jamfile in "freetype2/src", used to drive the compilation
# of each FreeType 2 component and/or module.
#
SubInclude FT2_TOP $(FT2_SRC_DIR) ;
-# tests files (hinter debugging). only used by FreeType developers
+# Test files (hinter debugging). Only used by FreeType developers.
#
if $(DEBUG_HINTER)
{
SubInclude FT2_TOP tests ;
}
+actions RefDoc
+{
+ python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.1.8 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h $(FT2_INCLUDE)/freetype/cache/*.h
+}
+
+RefDoc refdoc ;
+
+
# end of top Jamfile
diff --git a/extras/freetype2/Jamrules b/extras/freetype2/Jamrules
index c05e50854..0b68597d0 100644
--- a/extras/freetype2/Jamrules
+++ b/extras/freetype2/Jamrules
@@ -1,4 +1,4 @@
-# FreeType 2 JamRules (c) 2001 David Turner
+# FreeType 2 JamRules (c) 2001, 2002, 2003 David Turner
#
# This file contains the Jam rules needed to build the FreeType 2 library.
# It is shared by all Jamfiles and is included only once in the build
@@ -6,7 +6,7 @@
#
-# call SubDirHdrs on a list of directories
+# Call SubDirHdrs on a list of directories.
#
rule AddSubDirHdrs
{
diff --git a/extras/freetype2/README b/extras/freetype2/README
index 13445c7a5..72baf3d6a 100644
--- a/extras/freetype2/README
+++ b/extras/freetype2/README
@@ -1,39 +1,36 @@
-
Special notes to Unix users
===========================
- Please read the file "docs/UPGRADE.UNX", it contains important
- information regarding the installation of FreeType on Unix systems,
+ Please read the file "docs/UPGRADE.UNX". It contains important
+ information regarding the installation of FreeType on Unix systems,
especially GNU based operating systems like GNU/Linux.
- FreeType 2's library is called `libfreetype', FreeType 1's library
+ FreeType 2's library is called `libfreetype', FreeType 1's library
is called `libttf'. They are *not* compatible!
- FreeType 2.1.4
+ FreeType 2.1.8
==============
- Please read the docs/CHANGES file, it contains IMPORTANT
- INFORMATION.
+ Please read the docs/CHANGES file, it contains IMPORTANT INFORMATION.
- Read the files "docs/INSTALL" for installation instructions.
+ Read the files "docs/INSTALL" for installation instructions.
- Note that the FreeType 2 documentation is now available as a
+ Note that the FreeType 2 documentation is now available as a
separate package from our sites. See:
- ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.4.tar.bz2
- ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.4.tar.gz
- ftp://ftp.freetype.org/pub/freetype2/ftdoc214.zip
-
+ ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.8.tar.bz2
+ ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.8.tar.gz
+ ftp://ftp.freetype.org/pub/freetype2/ftdoc218.zip
- Reports
- =======
- Please report bugs by e-mail to `devel@freetype.org'. Don't
- forget to send a detailed explanation of the problem -- there is
- nothing worse than receiving a terse message that only says "it
- doesn't work".
+ Bugs
+ ====
+ Please report bugs by e-mail to `devel@freetype.org'. Don't forget
+ to send a detailed explanation of the problem -- there is nothing
+ worse than receiving a terse message that only says "it doesn't
+ work".
Enjoy!
diff --git a/extras/freetype2/builds/ansi/ansi-def.mk b/extras/freetype2/builds/ansi/ansi-def.mk
index 032a7b802..bf2aa36f1 100644
--- a/extras/freetype2/builds/ansi/ansi-def.mk
+++ b/extras/freetype2/builds/ansi/ansi-def.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -17,11 +17,10 @@ ifndef TOP_DIR
TOP_DIR := .
endif
-DELETE := rm -f
-SEP := /
-HOSTSEP := $(SEP)
-BUILD := $(TOP_DIR)/builds/ansi
-PLATFORM := ansi
+DELETE := rm -f
+SEP := /
+BUILD_DIR := $(TOP_DIR)/builds/ansi
+PLATFORM := ansi
# The directory where all object files are placed.
@@ -34,7 +33,7 @@ PLATFORM := ansi
# make -f $TOP_DIR/Makefile
#
ifndef OBJ_DIR
- OBJ_DIR := $(TOP_DIR)$(SEP)objs
+ OBJ_DIR := $(TOP_DIR)/objs
endif
diff --git a/extras/freetype2/builds/ansi/ansi.mk b/extras/freetype2/builds/ansi/ansi.mk
index 739d48591..32b3bac3e 100644
--- a/extras/freetype2/builds/ansi/ansi.mk
+++ b/extras/freetype2/builds/ansi/ansi.mk
@@ -17,4 +17,5 @@ include $(TOP_DIR)/builds/ansi/ansi-def.mk
include $(TOP_DIR)/builds/compiler/ansi-cc.mk
include $(TOP_DIR)/builds/link_std.mk
+
# EOF
diff --git a/extras/freetype2/builds/atari/ATARI.H b/extras/freetype2/builds/atari/ATARI.H
new file mode 100644
index 000000000..28a5575da
--- /dev/null
+++ b/extras/freetype2/builds/atari/ATARI.H
@@ -0,0 +1,16 @@
+#ifndef ATARI_H
+#define ATARI_H
+
+#pragma warn -stu
+
+/* PureC doesn't like 32bit enumerations */
+
+#ifndef FT_IMAGE_TAG
+#define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value
+#endif /* FT_IMAGE_TAG */
+
+#ifndef FT_ENC_TAG
+#define FT_ENC_TAG( value, a, b, c, d ) value
+#endif /* FT_ENC_TAG */
+
+#endif /* ATARI_H */
diff --git a/extras/freetype2/builds/atari/FNames.SIC b/extras/freetype2/builds/atari/FNames.SIC
new file mode 100644
index 000000000..497f00218
--- /dev/null
+++ b/extras/freetype2/builds/atari/FNames.SIC
@@ -0,0 +1,37 @@
+/* the following changes file names for PureC projects */
+
+if (argc > 0)
+{
+ ordner = argv[0];
+ if (basename(ordner) == "") /* ist Ordner */
+ {
+ ChangeFilenames(ordner);
+ }
+}
+
+proc ChangeFilenames(folder)
+local i,entries,directory,file;
+{
+ entries = filelist(directory,folder);
+ for (i = 0; i < entries; ++i)
+ {
+ file = directory[i,0];
+ if ((directory[i,3]&16) > 0) /* subdirectory */
+ {
+ ChangeFilenames(folder+file+"\\");
+ }
+ else
+ {
+ if ((stricmp(suffix(file),".h")==0)|(stricmp(suffix(file),".c")==0))
+ ChangeFilename(folder,file);
+ }
+ }
+}
+
+proc ChangeFilename(path,datei)
+local newfile,err;
+{
+ newfile=datei;
+ newfile[0]=(newfile[0] | 32) ^ 32;
+ err=files.rename("-q",path+datei,newfile);
+}
diff --git a/extras/freetype2/builds/atari/FREETYPE.PRJ b/extras/freetype2/builds/atari/FREETYPE.PRJ
new file mode 100644
index 000000000..a4c0914da
--- /dev/null
+++ b/extras/freetype2/builds/atari/FREETYPE.PRJ
@@ -0,0 +1,33 @@
+;FreeType project file
+
+FREETYPE.LIB
+
+.C [-K -P -R -A]
+.L [-J -V]
+.S
+
+=
+
+..\..\src\base\ftsystem.c
+..\..\src\base\ftdebug.c
+
+..\..\src\base\ftinit.c
+..\..\src\base\ftglyph.c
+..\..\src\base\ftmm
+..\..\src\base\ftbbox
+
+..\..\src\base\ftbase.c
+..\..\src\autohint\autohint.c
+;..\..\src\cache\ftcache.c
+..\..\src\cff\cff.c
+..\..\src\cid\type1cid.c
+..\..\src\psaux\psaux.c
+..\..\src\pshinter\pshinter.c
+..\..\src\psnames\psnames.c
+..\..\src\raster\raster.c
+..\..\src\sfnt\sfnt.c
+..\..\src\smooth\smooth.c
+..\..\src\truetype\truetype.c
+..\..\src\type1\type1.c
+..\..\src\type42\type42.c
+
diff --git a/extras/freetype2/builds/atari/README.TXT b/extras/freetype2/builds/atari/README.TXT
new file mode 100644
index 000000000..a905c27bc
--- /dev/null
+++ b/extras/freetype2/builds/atari/README.TXT
@@ -0,0 +1,51 @@
+Compiling FreeType 2 with PureC compiler
+========================================
+
+[See below for a German version.]
+
+To compile FreeType 2 as a library the following changes must be applied:
+
+- All *.c files must start with an uppercase letter.
+ (In case GEMSCRIPT is available:
+ Simply drag the whole FreeType 2 directory to the file `FNames.SIC'.)
+
+- You have to change the INCLUDE directory in PureC's compiler options
+ to contain both the `INCLUDE' and `freetype2\include' directory.
+ Example:
+
+ INCLUDE;E:\freetype2\include
+
+- The file `freetype2/include/Ft2build.h' must be patched as follows to
+ include ATARI.H:
+
+ #ifndef __FT2_BUILD_GENERIC_H__
+ #define __FT2_BUILD_GENERIC_H__
+
+ #include "ATARI.H"
+
+
+
+Compilieren von FreeType 2 mit PureC
+====================================
+
+Um FreeType 2 als eine Bibliothek (library) zu compilieren, muss folgendes
+gendert werden:
+
+- Alle *.c-files mssen mit einem GROSSBUCHSTABEN beginnen.
+ (Falls GEMSCRIPT zur Verfgung steht:
+ Den kompletten Ordner freetype2 auf die Datei `FNames.SIC' draggen.)
+
+- In den Compiler-Optionen von PureC muss das INCLUDE directory auf INCLUDE
+ und freetype2\include verweisen. Z.B.:
+
+ INCLUDE;E:\freetype2\include
+
+- In der Datei freetype2/include/Ft2build.h muss zu Beginn
+ ein #include "ATARI.H" wie folgt eingefgt werden:
+
+ #ifndef __FT2_BUILD_GENERIC_H__
+ #define __FT2_BUILD_GENERIC_H__
+
+ #include "ATARI.H"
+
+--- end of README.TXT ---
diff --git a/extras/freetype2/builds/beos/beos-def.mk b/extras/freetype2/builds/beos/beos-def.mk
index eb55db94b..b569fe62c 100644
--- a/extras/freetype2/builds/beos/beos-def.mk
+++ b/extras/freetype2/builds/beos/beos-def.mk
@@ -5,7 +5,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -19,11 +19,10 @@ ifndef TOP_DIR
TOP_DIR := .
endif
-DELETE := rm -f
-SEP := /
-HOSTSEP := $(SEP)
-BUILD := $(TOP_DIR)/builds/neos
-PLATFORM := beos
+DELETE := rm -f
+SEP := /
+BUILD_DIR := $(TOP_DIR)/builds/beos
+PLATFORM := beos
# The directory where all object files are placed.
@@ -36,7 +35,7 @@ PLATFORM := beos
# make -f $TOP_DIR/Makefile
#
ifndef OBJ_DIR
- OBJ_DIR := $(TOP_DIR)$(SEP)objs
+ OBJ_DIR := $(TOP_DIR)/objs
endif
diff --git a/extras/freetype2/builds/beos/beos.mk b/extras/freetype2/builds/beos/beos.mk
index 1ccf8cea0..1bc8e3ae3 100644
--- a/extras/freetype2/builds/beos/beos.mk
+++ b/extras/freetype2/builds/beos/beos.mk
@@ -15,5 +15,5 @@ include $(TOP_DIR)/builds/compiler/ansi-cc.mk
include $(TOP_DIR)/builds/beos/beos-def.mk
include $(TOP_DIR)/builds/link_std.mk
-# EOF
+# EOF
diff --git a/extras/freetype2/builds/beos/detect.mk b/extras/freetype2/builds/beos/detect.mk
index 89b3f685e..8333aba4f 100644
--- a/extras/freetype2/builds/beos/detect.mk
+++ b/extras/freetype2/builds/beos/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -27,15 +27,14 @@ endif
ifeq ($(PLATFORM),beos)
- DELETE := rm -f
- SEP := /
- HOSTSEP := $(SEP)
- BUILD := $(TOP_DIR)/builds/beos
+ DELETE := rm -f
+ SEP := /
+ BUILD_DIR := $(TOP_DIR)/builds/beos
CONFIG_FILE := beos.mk
setup: std_setup
endif # test PLATFORM beos
-# EOF
+# EOF
diff --git a/extras/freetype2/builds/compiler/ansi-cc.mk b/extras/freetype2/builds/compiler/ansi-cc.mk
index 0309e39fc..c52c12fcc 100644
--- a/extras/freetype2/builds/compiler/ansi-cc.mk
+++ b/extras/freetype2/builds/compiler/ansi-cc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,9 @@
# Compiler command line name
#
-CC := cc
+CC := cc
+COMPILER_SEP := $(SEP)
+
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
@@ -74,8 +76,9 @@ ANSIFLAGS :=
# Library linking
#
ifndef CLEAN_LIBRARY
- CLEAN_LIBRARY = $(DELETE) $(subst $(SEP),$(HOSTSEP),$(PROJECT_LIBRARY))
+ CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
-LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
+LINK_LIBRARY = $(AR) -r $@ $(subst /,$(COMPILER_SEP),$(OBJECTS_LIST))
+
# EOF
diff --git a/extras/freetype2/builds/compiler/bcc-dev.mk b/extras/freetype2/builds/compiler/bcc-dev.mk
index aa5c369d8..446fd4e62 100644
--- a/extras/freetype2/builds/compiler/bcc-dev.mk
+++ b/extras/freetype2/builds/compiler/bcc-dev.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,9 @@
# Compiler command line name
#
-CC := bcc32
+CC := bcc32
+COMPILER_SEP := $(SEP)
+
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
@@ -72,9 +74,9 @@ ANSIFLAGS := -A
# Library linking
#
ifndef CLEAN_LIBRARY
- CLEAN_LIBRARY = $(DELETE) $(subst $(SEP),$(HOSTSEP),$(PROJECT_LIBRARY))
+ CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
-TARGET_OBJECTS = $(subst $(SEP),\\,$(OBJECTS_LIST))
-LINK_LIBRARY = tlib /u $(subst $(SEP),\\,$@) $(TARGET_OBJECTS:%=+%)
+LINK_LIBRARY = tlib /u $(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST:%=+%))
+
# EOF
diff --git a/extras/freetype2/builds/compiler/bcc.mk b/extras/freetype2/builds/compiler/bcc.mk
index 938eceeac..eedfa10fb 100644
--- a/extras/freetype2/builds/compiler/bcc.mk
+++ b/extras/freetype2/builds/compiler/bcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,9 @@
# Compiler command line name
#
-CC := bcc32
+CC := bcc32
+COMPILER_SEP := $(SEP)
+
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
@@ -72,9 +74,9 @@ ANSIFLAGS := -A
# Library linking
#
ifndef CLEAN_LIBRARY
- CLEAN_LIBRARY = $(DELETE) $(subst $(SEP),$(HOSTSEP),$(PROJECT_LIBRARY))
+ CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
-TARGET_OBJECTS = $(subst $(SEP),\\,$(OBJECTS_LIST))
-LINK_LIBRARY = tlib /u $(subst $(SEP),\\,$@) $(TARGET_OBJECTS:%=+%)
+LINK_LIBRARY = tlib /u $(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST:%=+%))
+
# EOF
diff --git a/extras/freetype2/builds/compiler/emx.mk b/extras/freetype2/builds/compiler/emx.mk
new file mode 100644
index 000000000..f2be13ca6
--- /dev/null
+++ b/extras/freetype2/builds/compiler/emx.mk
@@ -0,0 +1,81 @@
+#
+# FreeType 2 emx-specific definitions
+#
+
+
+# Copyright 2003 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+
+# Compiler command line name
+#
+CC := set GCCOPT="-ansi -pedantic"; gcc
+COMPILER_SEP := /
+
+
+# The object file extension (for standard and static libraries). This can be
+# .o, .tco, .obj, etc., depending on the platform.
+#
+O := o
+SO := o
+
+# The library file extension (for standard and static libraries). This can
+# be .a, .lib, etc., depending on the platform.
+#
+A := a
+SA := a
+
+
+# Path inclusion flag. Some compilers use a different flag than `-I' to
+# specify an additional include path. Examples are `/i=' or `-J'.
+#
+I := -I
+
+
+# C flag used to define a macro before the compilation of a given source
+# object. Usually it is `-D' like in `-DDEBUG'.
+#
+D := -D
+
+
+# The link flag used to specify a given library file on link. Note that
+# this is only used to compile the demo programs, not the library itself.
+#
+L := -l
+
+
+# Target flag.
+#
+T := -o$(space)
+
+# C flags
+#
+# These should concern: debug output, optimization & warnings.
+#
+# Use the ANSIFLAGS variable to define the compiler flags used to enfore
+# ANSI compliance.
+#
+ifndef CFLAGS
+ CFLAGS := -c -g -O6 -Wall
+endif
+
+# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
+#
+ANSIFLAGS :=
+
+
+# Library linking
+#
+ifndef CLEAN_LIBRARY
+ CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
+endif
+LINK_LIBRARY = $(foreach m,$(OBJECTS_LIST),$(AR) -r $@ $(m);) echo > nul
+
+
+# EOF
diff --git a/extras/freetype2/builds/compiler/gcc-dev.mk b/extras/freetype2/builds/compiler/gcc-dev.mk
index 76d0ba0b5..15879f85b 100644
--- a/extras/freetype2/builds/compiler/gcc-dev.mk
+++ b/extras/freetype2/builds/compiler/gcc-dev.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,9 @@
# Compiler command line name
#
-CC := gcc
+CC := gcc
+COMPILER_SEP := /
+
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
@@ -62,6 +64,7 @@ T := -o$(space)
#
ifndef CFLAGS
CFLAGS := -c -g -O0 \
+ -fno-strict-aliasing \
-Wall \
-W \
-Wundef \
@@ -82,8 +85,9 @@ ANSIFLAGS := -ansi -pedantic
# Library linking
#
ifndef CLEAN_LIBRARY
- CLEAN_LIBRARY = $(DELETE) $(subst $(SEP),$(HOSTSEP),$(PROJECT_LIBRARY))
+ CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
+
# EOF
diff --git a/extras/freetype2/builds/compiler/gcc.mk b/extras/freetype2/builds/compiler/gcc.mk
index f2c94de3b..d51f642d0 100644
--- a/extras/freetype2/builds/compiler/gcc.mk
+++ b/extras/freetype2/builds/compiler/gcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,9 @@
# Compiler command line name
#
-CC := gcc
+CC := gcc
+COMPILER_SEP := /
+
# The object file extension (for standard and static libraries). This can be
# .o, .tco, .obj, etc., depending on the platform.
@@ -60,7 +62,7 @@ T := -o$(space)
# ANSI compliance.
#
ifndef CFLAGS
- CFLAGS := -c -g -O6 -Wall
+ CFLAGS := -c -g -O6 -Wall -fno-strict-aliasing
endif
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
@@ -71,8 +73,9 @@ ANSIFLAGS := -ansi -pedantic
# Library linking
#
ifndef CLEAN_LIBRARY
- CLEAN_LIBRARY = $(DELETE) $(subst $(SEP),$(HOSTSEP),$(PROJECT_LIBRARY))
+ CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
+
# EOF
diff --git a/extras/freetype2/builds/compiler/intelc.mk b/extras/freetype2/builds/compiler/intelc.mk
index 0c3088a73..954dcf64c 100644
--- a/extras/freetype2/builds/compiler/intelc.mk
+++ b/extras/freetype2/builds/compiler/intelc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,8 @@
# compiler command line name
#
-CC := icl
+CC := icl
+COMPILER_SEP := $(SEP)
# The object file extension (for standard and static libraries). This can be
@@ -79,6 +80,7 @@ ANSIFLAGS := /Qansi /Za
# Library linking
#
#CLEAN_LIBRARY =
-LINK_LIBRARY = lib /nologo /out:$@ $(OBJECTS_LIST)
+LINK_LIBRARY = lib /nologo /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
+
# EOF
diff --git a/extras/freetype2/builds/compiler/unix-lcc.mk b/extras/freetype2/builds/compiler/unix-lcc.mk
index fd8c7fbd9..cf4ef5a00 100644
--- a/extras/freetype2/builds/compiler/unix-lcc.mk
+++ b/extras/freetype2/builds/compiler/unix-lcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,8 @@
# Command line name
#
-CC := lcc
+CC := lcc
+COMPILER_SEP := $(SEP)
# The object file extension (for standard and static libraries). This can be
@@ -78,8 +79,9 @@ ANSIFLAGS := -A
# library linking
#
ifndef CLEAN_LIBRARY
- CLEAN_LIBRARY = $(DELETE) $(subst $(SEP),$(HOSTSEP),$(PROJECT_LIBRARY))
+ CLEAN_LIBRARY = $(DELETE) $(PROJECT_LIBRARY)
endif
LINK_LIBRARY = $(AR) -r $@ $(OBJECTS_LIST)
+
# EOF
diff --git a/extras/freetype2/builds/compiler/visualage.mk b/extras/freetype2/builds/compiler/visualage.mk
index 3d07ac6ec..21ef12b27 100644
--- a/extras/freetype2/builds/compiler/visualage.mk
+++ b/extras/freetype2/builds/compiler/visualage.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,8 @@
# command line compiler name
#
-CC := icc
+CC := icc
+COMPILER_SEP := $(SEP)
# The object file extension (for standard and static libraries). This can be
@@ -71,6 +72,7 @@ ANSI_FLAGS := /Sa
# Library linking
#
#CLEAN_LIBRARY :=
-LINK_LIBRARY = lib /nologo /out:$@ $(OBJECTS_LIST)
+LINK_LIBRARY = lib /nologo /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
+
# EOF
diff --git a/extras/freetype2/builds/compiler/visualc.mk b/extras/freetype2/builds/compiler/visualc.mk
index 235a4df06..92d71a974 100644
--- a/extras/freetype2/builds/compiler/visualc.mk
+++ b/extras/freetype2/builds/compiler/visualc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,8 @@
# compiler command line name
#
-CC := cl
+CC := cl
+COMPILER_SEP := $(SEP)
# The object file extension (for standard and static libraries). This can be
@@ -74,6 +75,7 @@ ANSIFLAGS := /Za
# Library linking
#
#CLEAN_LIBRARY =
-LINK_LIBRARY = lib /nologo /out:$@ $(OBJECTS_LIST)
+LINK_LIBRARY = lib /nologo /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
+
# EOF
diff --git a/extras/freetype2/builds/compiler/watcom.mk b/extras/freetype2/builds/compiler/watcom.mk
index 7669ed620..12394be4b 100644
--- a/extras/freetype2/builds/compiler/watcom.mk
+++ b/extras/freetype2/builds/compiler/watcom.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,8 @@
# Compiler command line name
#
-CC := wcc386
+CC := wcc386
+COMPILER_SEP := $(SEP)
# The object file extension (for standard and static libraries). This can be
@@ -74,8 +75,11 @@ ANSIFLAGS := -za
# Library linking
#
ifndef CLEAN_LIBRARY
- CLEAN_LIBRARY = $(DELETE) $(subst $(SEP),$(HOSTSEP),$(PROJECT_LIBRARY))
+ CLEAN_LIBRARY = $(DELETE) $(subst /,$(SEP),$(PROJECT_LIBRARY))
endif
-LINK_LIBRARY = wlib -q -o = $@ $(OBJECTS_LIST)
+LINK_LIBRARY = $(subst /,$(COMPILER_SEP), \
+ wlib -q -n $@; \
+ $(foreach m, $(OBJECTS_LIST), wlib -q $@ +$(m);) \
+ echo > nul)
# EOF
diff --git a/extras/freetype2/builds/compiler/win-lcc.mk b/extras/freetype2/builds/compiler/win-lcc.mk
index 6e9512ae5..c500d82cf 100644
--- a/extras/freetype2/builds/compiler/win-lcc.mk
+++ b/extras/freetype2/builds/compiler/win-lcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,8 @@
# Command line name
#
-CC := lcc
+CC := lcc
+COMPILER_SEP := $(SEP)
# The object file extension (for standard and static libraries). This can be
@@ -76,6 +77,7 @@ ANSIFLAGS :=
# library linking
#
#CLEAN_LIBRARY :=
-LINK_LIBRARY = lcclib /out:$(subst $(SEP),\\,$@) $(subst $(SEP),\\,$(OBJECTS_LIST))
+LINK_LIBRARY = lcclib /out:$(subst /,$(COMPILER_SEP),$@ $(OBJECTS_LIST))
+
# EOF
diff --git a/extras/freetype2/builds/detect.mk b/extras/freetype2/builds/detect.mk
index ad825adbc..eeb1300bc 100644
--- a/extras/freetype2/builds/detect.mk
+++ b/extras/freetype2/builds/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2001, 2002, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -16,7 +16,7 @@
# This sub-Makefile is in charge of detecting the current platform. It sets
# the following variables:
#
-# BUILD The configuration and system-specific directory. Usually
+# BUILD_DIR The configuration and system-specific directory. Usually
# `freetype/builds/$(PLATFORM)' but can be different for
# custom builds of the library.
#
@@ -30,6 +30,7 @@
# DELETE The shell command used to remove a given file.
# COPY The shell command used to copy one file.
# SEP The platform-specific directory separator.
+# COMPILER_SEP The separator used in arguments of the compilation tools.
# CC The compiler to use.
#
# You need to set the following variable(s) before calling it:
@@ -44,17 +45,17 @@ ifndef TOP_DIR
endif
# Set auto-detection default to `ansi' resp. UNIX-like operating systems.
-# Note that we delay evaluation of $(BUILD_CONFIG_), $(BUILD), and
-# $(CONFIG_RULES).
#
-PLATFORM := ansi
-DELETE := $(RM)
-COPY := cp
-SEP := /
+PLATFORM := ansi
+DELETE := $(RM)
+COPY := cp
+SEP := /
-BUILD_CONFIG_ = $(TOP_DIR)$(SEP)builds$(SEP)
-BUILD = $(BUILD_CONFIG_)$(PLATFORM)
-CONFIG_RULES = $(BUILD)$(SEP)$(CONFIG_FILE)
+BUILD_CONFIG := $(TOP_DIR)/builds
+
+# These two assignments must be delayed.
+BUILD_DIR = $(BUILD_CONFIG)/$(PLATFORM)
+CONFIG_RULES = $(BUILD_DIR)/$(CONFIG_FILE)
# We define the BACKSLASH variable to hold a single back-slash character.
# This is needed because a line like
@@ -72,12 +73,12 @@ BACKSLASH := $(strip \ )
# Find all auto-detectable platforms.
#
-PLATFORMS_ := $(notdir $(subst /detect.mk,,$(wildcard $(BUILD_CONFIG_)*/detect.mk)))
-.PHONY: $(PLATFORMS_) ansi
+PLATFORMS := $(notdir $(subst /detect.mk,,$(wildcard $(BUILD_CONFIG)/*/detect.mk)))
+.PHONY: $(PLATFORMS) ansi
# Filter out platform specified as setup target.
#
-PLATFORM := $(firstword $(filter $(MAKECMDGOALS),$(PLATFORMS_)))
+PLATFORM := $(firstword $(filter $(MAKECMDGOALS),$(PLATFORMS)))
# If no setup target platform was specified, enable auto-detection/
# default platform.
@@ -94,7 +95,7 @@ ifeq ($(findstring ansi,$(MAKECMDGOALS)),)
# directories. Note that the calling order of the various `detect.mk'
# files isn't predictable.
#
- include $(wildcard $(BUILD_CONFIG_)*/detect.mk)
+ include $(wildcard $(BUILD_CONFIG)/*/detect.mk)
endif
# In case no detection rule file was successful, use the default.
@@ -121,13 +122,14 @@ std_setup:
@echo ""
@echo " platform $(PLATFORM)"
@echo " compiler $(CC)"
- @echo " configuration directory $(BUILD)"
+ @echo " configuration directory $(BUILD_DIR)"
@echo " configuration rules $(CONFIG_RULES)"
@echo ""
@echo "If this does not correspond to your system or settings please remove the file"
@echo "\`$(CONFIG_MK)' from this directory then read the INSTALL file for help."
@echo ""
- @echo "Otherwise, simply type \`$(MAKE)' again to build the library."
+ @echo "Otherwise, simply type \`$(MAKE)' again to build the library,"
+ @echo "or \`$(MAKE) refdoc' to build the API reference (the latter needs python)."
@echo ""
@$(COPY) $(CONFIG_RULES) $(CONFIG_MK)
@@ -142,14 +144,16 @@ dos_setup:
@type builds\newline
@echo platform$(PLATFORM)
@echo compiler$(CC)
- @echo configuration directory$(BUILD)
- @echo configuration rules$(CONFIG_RULES)
+ @echo configuration directory$(subst /,\,$(BUILD_DIR))
+ @echo configuration rules$(subst /,\,$(CONFIG_RULES))
@type builds\newline
@echo If this does not correspond to your system or settings please remove the file
@echo '$(CONFIG_MK)' from this directory then read the INSTALL file for help.
@type builds\newline
@echo Otherwise, simply type 'make' again to build the library.
+ @echo or 'make refdoc' to build the API reference (the latter needs python).
@type builds\newline
@$(COPY) $(subst /,\,$(CONFIG_RULES) $(CONFIG_MK)) > nul
+
# EOF
diff --git a/extras/freetype2/builds/dos/detect.mk b/extras/freetype2/builds/dos/detect.mk
index 046784887..b80686ce5 100644
--- a/extras/freetype2/builds/dos/detect.mk
+++ b/extras/freetype2/builds/dos/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -23,7 +23,8 @@ ifeq ($(PLATFORM),ansi)
# `make' utility is run).
#
# We test for the COMSPEC environment variable, then run the `ver'
- # command-line program to see if its output contains the word `Dos'.
+ # command-line program to see if its output contains the word `Dos' or
+ # `DOS'.
#
# If this is true, we are running a Dos-ish platform (or an emulation).
#
@@ -31,7 +32,7 @@ ifeq ($(PLATFORM),ansi)
PLATFORM := dos
else
ifdef COMSPEC
- is_dos := $(findstring Dos,$(shell ver))
+ is_dos := $(findstring DOS,$(subst Dos,DOS,$(shell ver)))
# We try to recognize a Dos session under OS/2. The `ver' command
# returns `Operating System/2 ...' there, so `is_dos' should be empty.
@@ -57,16 +58,21 @@ ifeq ($(PLATFORM),dos)
# Use DJGPP (i.e. gcc) by default.
#
CONFIG_FILE := dos-gcc.mk
- SEP := /
ifndef CC
CC := gcc
endif
# additionally, we provide hooks for various other compilers
#
+ ifneq ($(findstring emx,$(MAKECMDGOALS)),) # EMX gcc
+ CONFIG_FILE := dos-emx.mk
+ CC := gcc
+ emx: setup
+ .PHONY: emx
+ endif
+
ifneq ($(findstring turboc,$(MAKECMDGOALS)),) # Turbo C
CONFIG_FILE := dos-tcc.mk
- SEP := $(BACKSLASH)
CC := tcc
turboc: setup
.PHONY: turboc
@@ -74,7 +80,6 @@ ifeq ($(PLATFORM),dos)
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := dos-wat.mk
- SEP := $(BACKSLASH)
CC := wcc386
watcom: setup
.PHONY: watcom
@@ -82,7 +87,6 @@ ifeq ($(PLATFORM),dos)
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C/C++ 32-bit
CONFIG_FILE := dos-bcc.mk
- SEP := $(BACKSLASH)
CC := bcc32
borlandc: setup
.PHONY: borlandc
@@ -90,17 +94,18 @@ ifeq ($(PLATFORM),dos)
ifneq ($(findstring borlandc16,$(MAKECMDGOALS)),) # Borland C/C++ 16-bit
CONFIG_FILE := dos-bcc.mk
- SEP := $(BACKSLASH)
CC := bcc
borlandc16: setup
.PHONY: borlandc16
endif
ifneq ($(findstring bash,$(SHELL)),) # check for bash
+ SEP := /
DELETE := rm
COPY := cp
setup: std_setup
else
+ SEP := $(BACKSLASH)
DELETE := del
COPY := copy
setup: dos_setup
@@ -108,4 +113,5 @@ ifeq ($(PLATFORM),dos)
endif # test PLATFORM dos
+
# EOF
diff --git a/extras/freetype2/builds/dos/dos-def.mk b/extras/freetype2/builds/dos/dos-def.mk
index d2bcbd437..d6bc72e7b 100644
--- a/extras/freetype2/builds/dos/dos-def.mk
+++ b/extras/freetype2/builds/dos/dos-def.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -13,15 +13,10 @@
# fully.
-DELETE := del
-HOSTSEP := $(strip \ )
-BUILD := $(TOP_DIR)$(SEP)builds$(SEP)dos
-PLATFORM := dos
-
-# except for DJGPP/GCC on Dos
-ifndef SEP
-SEP := $(HOSTSEP)
-endif
+DELETE := del
+SEP := $(strip \ )
+BUILD_DIR := $(TOP_DIR)/builds/dos
+PLATFORM := dos
# The directory where all object files are placed.
@@ -34,7 +29,7 @@ endif
# make -f %TOP_DIR%/Makefile
#
ifndef OBJ_DIR
- OBJ_DIR := $(TOP_DIR)$(SEP)objs
+ OBJ_DIR := $(TOP_DIR)/objs
endif
diff --git a/extras/freetype2/builds/dos/dos-emx.mk b/extras/freetype2/builds/dos/dos-emx.mk
new file mode 100644
index 000000000..6ea8f6d87
--- /dev/null
+++ b/extras/freetype2/builds/dos/dos-emx.mk
@@ -0,0 +1,21 @@
+#
+# FreeType 2 configuration rules for the EMX gcc compiler
+#
+
+
+# Copyright 2003 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+
+include $(TOP_DIR)/builds/dos/dos-def.mk
+include $(TOP_DIR)/builds/compiler/emx.mk
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/extras/freetype2/builds/dos/dos-gcc.mk b/extras/freetype2/builds/dos/dos-gcc.mk
index 14a9d38dd..e14255c1f 100644
--- a/extras/freetype2/builds/dos/dos-gcc.mk
+++ b/extras/freetype2/builds/dos/dos-gcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -13,10 +13,9 @@
# fully.
-SEP := /
-
include $(TOP_DIR)/builds/dos/dos-def.mk
include $(TOP_DIR)/builds/compiler/gcc.mk
include $(TOP_DIR)/builds/link_dos.mk
+
# EOF
diff --git a/extras/freetype2/builds/dos/dos-wat.mk b/extras/freetype2/builds/dos/dos-wat.mk
new file mode 100644
index 000000000..0c39e4979
--- /dev/null
+++ b/extras/freetype2/builds/dos/dos-wat.mk
@@ -0,0 +1,17 @@
+#
+# FreeType 2 configuration rules for the Watcom C/C++ compiler
+#
+
+
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+include $(TOP_DIR)/builds/dos/dos-def.mk
+include $(TOP_DIR)/builds/compiler/watcom.mk
+include $(TOP_DIR)/builds/link_dos.mk
+
+
+# EOF
diff --git a/extras/freetype2/builds/freetype.mk b/extras/freetype2/builds/freetype.mk
index 9b5921cc9..29fa344d5 100644
--- a/extras/freetype2/builds/freetype.mk
+++ b/extras/freetype2/builds/freetype.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002 by
+# Copyright 1996-2000, 2001, 2002, 2003, 2004 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -20,13 +20,15 @@
# The following variables (set by other Makefile components, in the
# environment, or on the command line) are used:
#
-# BUILD The architecture dependent directory,
+# BUILD_DIR The architecture dependent directory,
# e.g. `$(TOP_DIR)/builds/unix'.
#
# OBJ_DIR The directory in which object files are created.
#
# LIB_DIR The directory in which the library is created.
#
+# DOC_DIR The directory in which the API reference is created.
+#
# INCLUDES A list of directories to be included additionally.
# Usually empty.
#
@@ -63,6 +65,7 @@
# `distclean' target.
#
# TOP_DIR, SEP,
+# COMPILER_SEP,
# LIBRARY, CC,
# A, I, O, T Check `config.mk' for details.
@@ -70,7 +73,7 @@
# The targets `objects' and `library' are defined at the end of this
# Makefile after all other rules have been included.
#
-.PHONY: single multi objects library
+.PHONY: single multi objects library refdoc
# default target -- build single objects and library
#
@@ -83,43 +86,30 @@ multi: objects library
# The FreeType source directory, usually `./src'.
#
-SRC := $(TOP_DIR)$(SEP)src
-
+SRC_DIR := $(TOP_DIR)/src
# The directory where the base layer components are placed, usually
# `./src/base'.
#
-BASE_DIR := $(SRC)$(SEP)base
+BASE_DIR := $(SRC_DIR)/base
-# The build header file used to define all public header file names
-# as macro.
+# Other derived directories.
#
-ifndef FT_BUILD_H
- FT_BUILD_H := $(TOP_DIR)$(SEP)include$(SEP)ft2build.h
- FTBUILD_CMD :=
-else
- FTBUILD_CMD = $(D)FT_BUILD_H=$(FT_BUILD_H)
-endif
+PUBLIC_DIR := $(TOP_DIR)/include/freetype
+INTERNAL_DIR := $(PUBLIC_DIR)/internal
+SERVICES_DIR := $(INTERNAL_DIR)/services
+CONFIG_DIR := $(PUBLIC_DIR)/config
+CACHE_DIR := $(PUBLIC_DIR)/cache
-# A few short-cuts in order to avoid typing $(SEP) all the time for the
-# directory separator.
-#
-# For example: $(SRC_) equals to `./src/' where `.' is $(TOP_DIR).
-#
+# The documentation directory.
#
-SRC_ := $(SRC)$(SEP)
-BASE_ := $(BASE_DIR)$(SEP)
-OBJ_ := $(OBJ_DIR)$(SEP)
-LIB_ := $(LIB_DIR)$(SEP)
-PUBLIC_ := $(TOP_DIR)$(SEP)include$(SEP)freetype$(SEP)
-INTERNAL_ := $(PUBLIC_)internal$(SEP)
-CONFIG_ := $(PUBLIC_)config$(SEP)
-CACHE_ := $(PUBLIC_)cache$(SEP)
-
+ifndef DOC_DIR
+ DOC_DIR := $(TOP_DIR)/docs/reference
+endif
# The final name of the library file.
#
-PROJECT_LIBRARY := $(LIB_)$(LIBRARY).$A
+PROJECT_LIBRARY := $(LIB_DIR)/$(LIBRARY).$A
# include paths
@@ -130,7 +120,8 @@ PROJECT_LIBRARY := $(LIB_)$(LIBRARY).$A
# in the `freetype/builds/<system>' directory, as these
# files will override the default sources.
#
-INCLUDES := $(OBJ_DIR) $(BUILD) $(TOP_DIR)$(SEP)include
+INCLUDES := $(subst /,$(COMPILER_SEP),$(OBJ_DIR) $(BUILD_DIR) \
+ $(TOP_DIR)/include)
INCLUDE_FLAGS = $(INCLUDES:%=$I%)
@@ -164,46 +155,48 @@ OBJECTS_LIST :=
# This is used to simplify the dependency rules -- if one of these files
# changes, the whole library is recompiled.
#
-PUBLIC_H := $(wildcard $(PUBLIC_)*.h)
-BASE_H := $(wildcard $(INTERNAL_)*.h)
-CONFIG_H := $(wildcard $(CONFIG_)*.h) \
- $(wildcard $(BUILD)$(SEP)freetype$(SEP)config$(SEP)*.h)
-CACHE_H := $(wildcard $(CACHE_)*.h)
+PUBLIC_H := $(wildcard $(PUBLIC_DIR)/*.h)
+BASE_H := $(wildcard $(INTERNAL_DIR)/*.h) \
+ $(wildcard $(SERVICES_DIR)/*.h)
+CONFIG_H := $(wildcard $(CONFIG_DIR)/*.h) \
+ $(wildcard $(BUILD_DIR)/freetype/config/*.h)
+CACHE_H := $(wildcard $(CACHE_DIR)/*.h)
+DEVEL_H := $(wildcard $(TOP_DIR)/devel/*.h)
-FREETYPE_H := $(PUBLIC_H) $(BASE_H) $(CONFIG_H) $(CACHE_H)
+FREETYPE_H := $(PUBLIC_H) $(BASE_H) $(CONFIG_H) $(CACHE_H) $(DEVEL_H)
# ftsystem component
#
ifndef FTSYS_SRC
- FTSYS_SRC = $(BASE_)ftsystem.c
+ FTSYS_SRC = $(BASE_DIR)/ftsystem.c
endif
-FTSYS_OBJ = $(OBJ_)ftsystem.$O
+FTSYS_OBJ = $(OBJ_DIR)/ftsystem.$O
OBJECTS_LIST += $(FTSYS_OBJ)
$(FTSYS_OBJ): $(FTSYS_SRC) $(FREETYPE_H)
- $(FT_COMPILE) $T$@ $<
+ $(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# ftdebug component
#
ifndef FTDEBUG_SRC
- FTDEBUG_SRC = $(BASE_)ftdebug.c
+ FTDEBUG_SRC = $(BASE_DIR)/ftdebug.c
endif
-FTDEBUG_OBJ = $(OBJ_)ftdebug.$O
+FTDEBUG_OBJ = $(OBJ_DIR)/ftdebug.$O
OBJECTS_LIST += $(FTDEBUG_OBJ)
$(FTDEBUG_OBJ): $(FTDEBUG_SRC) $(FREETYPE_H)
- $(FT_COMPILE) $T$@ $<
+ $(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# Include all rule files from FreeType components.
#
-include $(wildcard $(SRC)/*/rules.mk)
+include $(wildcard $(SRC_DIR)/*/rules.mk)
# ftinit component
@@ -217,13 +210,13 @@ include $(wildcard $(SRC)/*/rules.mk)
# which contain additional include paths and macros used to compile the
# single `ftinit.c' source.
#
-FTINIT_SRC := $(BASE_)ftinit.c
-FTINIT_OBJ := $(OBJ_)ftinit.$O
+FTINIT_SRC := $(BASE_DIR)/ftinit.c
+FTINIT_OBJ := $(OBJ_DIR)/ftinit.$O
OBJECTS_LIST += $(FTINIT_OBJ)
$(FTINIT_OBJ): $(FTINIT_SRC) $(FREETYPE_H) $(FT_MODULE_LIST)
- $(FT_COMPILE) $T$@ $<
+ $(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# All FreeType library objects
@@ -255,7 +248,17 @@ objects: $(OBJECTS_LIST)
library: $(PROJECT_LIBRARY)
.c.$O:
- $(FT_COMPILE) $T$@ $<
+ $(FT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+refdoc:
+ python $(SRC_DIR)/tools/docmaker/docmaker.py \
+ --prefix=ft2 \
+ --title=FreeType-2.1.8 \
+ --output=$(DOC_DIR) \
+ $(PUBLIC_DIR)/*.h \
+ $(PUBLIC_DIR)/config/*.h \
+ $(PUBLIC_DIR)/cache/*.h
.PHONY: clean_project_std distclean_project_std
@@ -280,10 +283,10 @@ distclean_project_std: clean_project_std
# working correctly on Win9x.
#
clean_project_dos:
- -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(OBJ_))*.$O $(CLEAN) $(NO_OUTPUT)
+ -$(DELETE) $(subst /,\,$(OBJ)/*.$O $(CLEAN) $(NO_OUTPUT))
distclean_project_dos: clean_project_dos
- -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(PROJECT_LIBRARY)) $(DISTCLEAN) $(NO_OUTPUT)
+ -$(DELETE) $(subst /,\,$(PROJECT_LIBRARY) $(DISTCLEAN) $(NO_OUTPUT))
.PHONY: remove_config_mk
@@ -291,7 +294,7 @@ distclean_project_dos: clean_project_dos
# Remove configuration file (used for distclean).
#
remove_config_mk:
- -$(DELETE) $(subst $(SEP),$(HOSTSEP),$(CONFIG_MK)) $(NO_OUTPUT)
+ -$(DELETE) $(subst /,$(SEP),$(CONFIG_MK) $(NO_OUTPUT))
.PHONY: clean distclean
@@ -303,5 +306,7 @@ remove_config_mk:
#
clean: clean_project
distclean: distclean_project remove_config_mk
+ -$(DELETE) $(subst /,$(SEP),$(DOC_DIR)/*.html $(NO_OUTPUT))
+
# EOF
diff --git a/extras/freetype2/builds/link_dos.mk b/extras/freetype2/builds/link_dos.mk
index bc36ed0ad..c37ac7e52 100644
--- a/extras/freetype2/builds/link_dos.mk
+++ b/extras/freetype2/builds/link_dos.mk
@@ -38,4 +38,5 @@ ifdef BUILD_PROJECT
endif
+
# EOF
diff --git a/extras/freetype2/builds/link_std.mk b/extras/freetype2/builds/link_std.mk
index d59f2c3a3..0bd2163bb 100644
--- a/extras/freetype2/builds/link_std.mk
+++ b/extras/freetype2/builds/link_std.mk
@@ -38,4 +38,5 @@ ifdef BUILD_PROJECT
endif
+
# EOF
diff --git a/extras/freetype2/builds/modules.mk b/extras/freetype2/builds/modules.mk
index 536ca5462..5102dc060 100644
--- a/extras/freetype2/builds/modules.mk
+++ b/extras/freetype2/builds/modules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -26,7 +26,7 @@
# resides. For now, it is in `include/freetype/config/ftmodule.h'.
#
ifndef MODULE_LIST
- MODULE_LIST := $(TOP_DIR)$(SEP)include$(SEP)$(PROJECT)$(SEP)config$(SEP)ftmodule.h
+ MODULE_LIST := $(TOP_DIR)/include/$(PROJECT)/config/ftmodule.h
endif
# To build the modules list, we invoke the `make_module_list' target.
@@ -39,8 +39,8 @@ endif
ifneq ($(findstring $(PLATFORM),dos win32 win16 os2),)
OPEN_MODULE := @echo$(space)
- CLOSE_MODULE := >> $(subst $(SEP),$(HOSTSEP),$(MODULE_LIST))
- REMOVE_MODULE := @-$(DELETE) $(subst $(SEP),$(HOSTSEP),$(MODULE_LIST))
+ CLOSE_MODULE := >> $(subst /,\,$(MODULE_LIST))
+ REMOVE_MODULE := @-$(DELETE) $(subst /,\,$(MODULE_LIST))
else
OPEN_MODULE := @echo "
CLOSE_MODULE := " >> $(MODULE_LIST)
@@ -53,7 +53,7 @@ endif
#
clean_module_list:
$(REMOVE_MODULE)
- @-echo Regenerating the modules list in $(MODULE_LIST)...
+ @-echo Regenerating modules list in $(MODULE_LIST)...
make_module_list: clean_module_list
@echo done.
@@ -73,4 +73,5 @@ ECHO_DRIVER_DONE := )"
#
include $(wildcard $(TOP_DIR)/src/*/module.mk)
+
# EOF
diff --git a/extras/freetype2/builds/os2/detect.mk b/extras/freetype2/builds/os2/detect.mk
index d332be7f4..97e4bc972 100644
--- a/extras/freetype2/builds/os2/detect.mk
+++ b/extras/freetype2/builds/os2/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -27,18 +27,17 @@ endif
ifeq ($(PLATFORM),os2)
- COPY := copy
- DELETE := del
+ COPY := copy
+ DELETE := del
+ SEP := $(BACKSLASH)
# gcc-emx by default
CONFIG_FILE := os2-gcc.mk
- SEP := /
# additionally, we provide hooks for various other compilers
#
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
CONFIG_FILE := os2-icc.mk
- SEP := $(BACKSLASH)
CC := icc
visualage: setup
.PHONY: visualage
@@ -46,7 +45,6 @@ ifeq ($(PLATFORM),os2)
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := os2-wat.mk
- SEP := $(BACKSLASH)
CC := wcc386
watcom: setup
.PHONY: watcom
@@ -54,7 +52,6 @@ ifeq ($(PLATFORM),os2)
ifneq ($(findstring borlandc,$(MAKECMDGOALS)),) # Borland C++ 32-bit
CONFIG_FILE := os2-bcc.mk
- SEP := $(BACKSLASH)
CC := bcc32
borlandc: setup
.PHONY: borlandc
@@ -63,7 +60,6 @@ ifeq ($(PLATFORM),os2)
ifneq ($(findstring devel,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := os2-dev.mk
CC := gcc
- SEP := /
devel: setup
.PHONY: devel
endif
@@ -72,4 +68,5 @@ ifeq ($(PLATFORM),os2)
endif # test PLATFORM os2
+
# EOF
diff --git a/extras/freetype2/builds/os2/os2-def.mk b/extras/freetype2/builds/os2/os2-def.mk
index ef4b8115d..26bf6a913 100644
--- a/extras/freetype2/builds/os2/os2-def.mk
+++ b/extras/freetype2/builds/os2/os2-def.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -13,15 +13,10 @@
# fully.
-DELETE := del
-HOSTSEP := $(strip \ )
-BUILD := $(TOP_DIR)$(SEP)builds$(SEP)os2
-PLATFORM := os2
-
-# except for GCC+emx on OS/2
-ifndef SEP
- SEP := $(HOSTSEP)
-endif
+DELETE := del
+SEP := $(strip \ )
+BUILD_DIR := $(TOP_DIR)/builds/os2
+PLATFORM := os2
# The directory where all object files are placed.
@@ -34,7 +29,7 @@ endif
# make -f %TOP_DIR%/Makefile
#
ifndef OBJ_DIR
- OBJ_DIR := $(TOP_DIR)$(SEP)objs
+ OBJ_DIR := $(TOP_DIR)/objs
endif
@@ -55,4 +50,5 @@ LIBRARY := $(PROJECT)
#
NO_OUTPUT = 2> nul
+
# EOF
diff --git a/extras/freetype2/builds/os2/os2-dev.mk b/extras/freetype2/builds/os2/os2-dev.mk
index 6527b79ee..96890fa0b 100644
--- a/extras/freetype2/builds/os2/os2-dev.mk
+++ b/extras/freetype2/builds/os2/os2-dev.mk
@@ -5,7 +5,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -19,10 +19,8 @@ ifndef TOP_DIR
TOP_DIR := .
endif
-SEP := /
-
include $(TOP_DIR)/builds/os2/os2-def.mk
-BUILD := $(TOP_DIR)/builds/devel
+BUILD_DIR := $(TOP_DIR)/devel
include $(TOP_DIR)/builds/compiler/gcc-dev.mk
diff --git a/extras/freetype2/builds/os2/os2-gcc.mk b/extras/freetype2/builds/os2/os2-gcc.mk
index 5853862f0..446073e4f 100644
--- a/extras/freetype2/builds/os2/os2-gcc.mk
+++ b/extras/freetype2/builds/os2/os2-gcc.mk
@@ -13,8 +13,6 @@
# fully.
-SEP := /
-
# include OS/2-specific definitions
include $(TOP_DIR)/builds/os2/os2-def.mk
@@ -24,4 +22,5 @@ include $(TOP_DIR)/builds/compiler/gcc.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
+
# EOF
diff --git a/extras/freetype2/builds/toplevel.mk b/extras/freetype2/builds/toplevel.mk
index 2e9fbd082..6ee3818df 100644
--- a/extras/freetype2/builds/toplevel.mk
+++ b/extras/freetype2/builds/toplevel.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2001, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -99,7 +99,9 @@ ifdef check_platform
#
# note: This test is duplicated in "builds/toplevel.mk".
#
- is_unix := $(strip $(wildcard /sbin/init) $(wildcard /usr/sbin/init) $(wildcard /hurd/auth))
+ is_unix := $(strip $(wildcard /sbin/init) \
+ $(wildcard /usr/sbin/init) \
+ $(wildcard /hurd/auth))
ifneq ($(is_unix),)
distclean:
@@ -108,6 +110,7 @@ ifdef check_platform
$(RM) builds/unix/config.status
$(RM) builds/unix/unix-def.mk
$(RM) builds/unix/unix-cc.mk
+ $(RM) builds/unix/freetype2.pc
$(RM) nul
endif # test is_unix
@@ -132,4 +135,5 @@ else
endif # test check_platform
+
# EOF
diff --git a/extras/freetype2/builds/unix/.cvsignore b/extras/freetype2/builds/unix/.cvsignore
index cc8ec6a8d..808b60059 100644
--- a/extras/freetype2/builds/unix/.cvsignore
+++ b/extras/freetype2/builds/unix/.cvsignore
@@ -6,3 +6,4 @@ config.log
libtool
ftconfig.h
freetype-config
+freetype2.pc
diff --git a/extras/freetype2/builds/unix/aclocal.m4 b/extras/freetype2/builds/unix/aclocal.m4
index bb44b8ddc..ceda545e2 100644
--- a/extras/freetype2/builds/unix/aclocal.m4
+++ b/extras/freetype2/builds/unix/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.7.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.8a -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
# Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -11,43 +11,63 @@
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-# serial 1 FT_MUNMAP_DECL
+# serial 47 AC_PROG_LIBTOOL
-AC_DEFUN(FT_MUNMAP_DECL,
-[AC_MSG_CHECKING([whether munmap must be declared])
-AC_CACHE_VAL(ft_cv_munmap_decl,
-[AC_TRY_COMPILE([
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <sys/mman.h>],
-[char *(*pfn) = (char *(*))munmap],
-ft_cv_munmap_decl=no,
-ft_cv_munmap_decl=yes)])
-AC_MSG_RESULT($ft_cv_munmap_decl)
-if test $ft_cv_munmap_decl = yes; then
- AC_DEFINE(NEED_MUNMAP_DECL,,
- [Define to 1 if munmap() is not defined in <sys/mman.h>])
-fi])
-
-AC_DEFUN(FT_MUNMAP_PARAM,
-[AC_MSG_CHECKING([for munmap's first parameter type])
-AC_TRY_COMPILE([
-#include <unistd.h>
-#include <sys/mman.h>
-int munmap(void *, size_t);],,
- AC_MSG_RESULT([void *]);AC_DEFINE(MUNMAP_USES_VOIDP,,
- [Define to 1 if the first argument of munmap is of type void *]),
- AC_MSG_RESULT([char *]))
-])
-# libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
+# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
+# -----------------------------------------------------------
+# If this macro is not defined by Autoconf, define it here.
+m4_ifdef([AC_PROVIDE_IFELSE],
+ [],
+ [m4_define([AC_PROVIDE_IFELSE],
+ [m4_ifdef([AC_PROVIDE_$1],
+ [$2], [$3])])])
-# serial 46 AC_PROG_LIBTOOL
+# AC_PROG_LIBTOOL
+# ---------------
AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
+dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
+dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
+ AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [AC_LIBTOOL_CXX],
+ [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
+ ])])
+dnl And a similar setup for Fortran 77 support
+ AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [AC_LIBTOOL_F77],
+ [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
+])])
+
+dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
+dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
+dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
+ AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [AC_LIBTOOL_GCJ],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [AC_LIBTOOL_GCJ],
+ [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
+ [AC_LIBTOOL_GCJ],
+ [ifdef([AC_PROG_GCJ],
+ [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+ ifdef([A][M_PROG_GCJ],
+ [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
+ ifdef([LT_AC_PROG_GCJ],
+ [define([LT_AC_PROG_GCJ],
+ defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
+])])# AC_PROG_LIBTOOL
+
+
+# _AC_PROG_LIBTOOL
+# ----------------
+AC_DEFUN([_AC_PROG_LIBTOOL],
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
+AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
# This can be used to rebuild libtool when needed
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
@@ -58,10 +78,13 @@ AC_SUBST(LIBTOOL)dnl
# Prevent multiple expansion
define([AC_PROG_LIBTOOL], [])
-])
+])# _AC_PROG_LIBTOOL
+
+# AC_LIBTOOL_SETUP
+# ----------------
AC_DEFUN([AC_LIBTOOL_SETUP],
-[AC_PREREQ(2.13)dnl
+[AC_PREREQ(2.50)dnl
AC_REQUIRE([AC_ENABLE_SHARED])dnl
AC_REQUIRE([AC_ENABLE_STATIC])dnl
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
@@ -71,345 +94,184 @@ AC_REQUIRE([AC_PROG_CC])dnl
AC_REQUIRE([AC_PROG_LD])dnl
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
AC_REQUIRE([AC_PROG_NM])dnl
-AC_REQUIRE([LT_AC_PROG_SED])dnl
AC_REQUIRE([AC_PROG_LN_S])dnl
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
AC_REQUIRE([AC_OBJEXT])dnl
AC_REQUIRE([AC_EXEEXT])dnl
dnl
-_LT_AC_PROG_ECHO_BACKSLASH
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- AC_PATH_MAGIC
- fi
- ;;
-esac
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-AC_CHECK_TOOL(STRIP, strip, :)
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-enable_win32_dll=yes, enable_win32_dll=no)
-
-AC_ARG_ENABLE(libtool-lock,
- [ --disable-libtool-lock avoid locking (might break parallel builds)])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+AC_LIBTOOL_SYS_MAX_CMD_LEN
+AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+AC_LIBTOOL_OBJDIR
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- 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
- rm -rf conftest*
- ;;
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_SAVE
- AC_LANG_C
- AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_RESTORE])
- 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"
+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
;;
-
-ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
-[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one
- AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
- [AC_TRY_LINK([],
- [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
- DllMain (0, 0, 0);],
- [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
-
- case $host/$CC in
- *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
- # old mingw systems require "-dll" to link a DLL, while more recent ones
- # require "-mdll"
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -mdll"
- AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
- [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
- CFLAGS="$SAVE_CFLAGS" ;;
- *-*-cygwin* | *-*-pw32*)
- # cygwin systems need to pass --dll to the linker, and not link
- # crt.o which will require a WinMain@16 definition.
- lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
- esac
- ;;
- ])
esac
-_LT_AC_LTCONFIG_HACK
-
-])
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
-# AC_LIBTOOL_HEADER_ASSERT
-# ------------------------
-AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
-[AC_CACHE_CHECK([whether $CC supports assert without backlinking],
- [lt_cv_func_assert_works],
- [case $host in
- *-*-solaris*)
- if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
- case `$CC --version 2>/dev/null` in
- [[12]].*) lt_cv_func_assert_works=no ;;
- *) lt_cv_func_assert_works=yes ;;
- esac
- fi
- ;;
- esac])
+# Same as above, but do not quote variable references.
+[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
-if test "x$lt_cv_func_assert_works" = xyes; then
- AC_CHECK_HEADERS(assert.h)
-fi
-])# AC_LIBTOOL_HEADER_ASSERT
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-# _LT_AC_CHECK_DLFCN
-# --------------------
-AC_DEFUN([_LT_AC_CHECK_DLFCN],
-[AC_CHECK_HEADERS(dlfcn.h)
-])# _LT_AC_CHECK_DLFCN
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
-# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# ---------------------------------
-AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
-[AC_REQUIRE([AC_CANONICAL_HOST])
-AC_REQUIRE([AC_PROG_NM])
-AC_REQUIRE([AC_OBJEXT])
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
+# Constants:
+rm="rm -f"
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+AC_CHECK_TOOL(AR, ar, false)
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+AC_CHECK_TOOL(STRIP, strip, :)
-# Transform the above into a raw symbol and a C symbol.
-symxfrm='\1 \2\3 \3'
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
-# Transform an extracted symbol line into a proper C declaration
-lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
+# Set sane defaults for various variables
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+test -z "$AS" && AS=as
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+test -z "$LD" && LD=ld
+test -z "$LN_S" && LN_S="ln -s"
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
+test -z "$OBJDUMP" && OBJDUMP=objdump
+test -z "$RANLIB" && RANLIB=:
+test -z "$STRIP" && STRIP=:
+test -z "$ac_objext" && ac_objext=o
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[[BCDT]]'
- ;;
-cygwin* | mingw* | pw32*)
- symcode='[[ABCDGISTW]]'
- ;;
-hpux*) # Its linker distinguishes data from code symbols
- lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
- lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
- ;;
-irix* | nonstopux*)
- symcode='[[BCDEGRST]]'
- ;;
-osf*)
- symcode='[[BCDEGQRST]]'
- ;;
-solaris* | sysv5*)
- symcode='[[BDT]]'
- ;;
-sysv4)
- symcode='[[DFNSTU]]'
- ;;
-esac
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+ ;;
+ *)
+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $host_os in
-mingw*)
- opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ AC_PATH_MAGIC
+ fi
;;
esac
-# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
- symcode='[[ABCDGISTW]]'
-fi
-
-# Try without a prefix undercore, then with it.
-for ac_symprfx in "" "_"; do
+AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+enable_win32_dll=yes, enable_win32_dll=no)
- # Write the raw and C identifiers.
-lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+AC_ARG_ENABLE([libtool-lock],
+ [AC_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
- # Check to see that the pipe works correctly.
- pipe_works=no
- rm -f conftest*
- cat > conftest.$ac_ext <<EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-EOF
+AC_ARG_WITH([pic],
+ [AC_HELP_STRING([--with-pic],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [pic_mode="$withval"],
+ [pic_mode=default])
+test -z "$pic_mode" && pic_mode=default
- if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && 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
+# Use C for the default configuration in the libtool script
+tagname=
+AC_LIBTOOL_LANG_C_CONFIG
+_LT_AC_TAGCONFIG
+])# AC_LIBTOOL_SETUP
- # Make sure that we snagged all the symbols we need.
- if egrep ' nm_test_var$' "$nlist" >/dev/null; then
- if egrep ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-EOF
- # Now generate the symbol file.
- eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
- cat <<EOF >> conftest.$ac_ext
-#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
-#else
-# define lt_ptr char *
-# define const
-#endif
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- lt_ptr address;
-}
-lt_preloaded_symbols[[]] =
-{
-EOF
- sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
- cat <<\EOF >> conftest.$ac_ext
- {0, (lt_ptr) 0}
-};
-
-#ifdef __cplusplus
-}
-#endif
-EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$no_builtin_flag"
- if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
- pipe_works=yes
- fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
- fi
- else
- echo "$progname: failed program was:" >&AC_FD_CC
- cat conftest.$ac_ext >&5
- fi
- rm -f conftest* conftst*
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
+
+
+# _LT_AC_SYS_LIBPATH_AIX
+# ----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
+[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+AC_DEFUN([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
- # 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
-])
-global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- global_symbol_to_cdecl=
- global_symbol_to_c_name_address=
-else
- global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
- global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
-fi
-if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
-then
- AC_MSG_RESULT(failed)
-else
- AC_MSG_RESULT(ok)
-fi
-]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-
-# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
-# ---------------------------------
-AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
-[# Find the correct PATH separator. Usually this is `:', but
-# DJGPP uses `;' like DOS.
-if test "X${PATH_SEPARATOR+set}" != Xset; then
- UNAME=${UNAME-`uname 2>/dev/null`}
- case X$UNAME in
- *-DOS) lt_cv_sys_path_separator=';' ;;
- *) lt_cv_sys_path_separator=':' ;;
- esac
- PATH_SEPARATOR=$lt_cv_sys_path_separator
-fi
-])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
# _LT_AC_PROG_ECHO_BACKSLASH
# --------------------------
# Add some code to the start of the generated configure script which
# will find an echo command which doesn't interpret backslashes.
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
-[ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
- [AC_DIVERT_PUSH(NOTICE)])
-_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
-
+[_LT_AC_SHELL_INIT([
# Check that we are running under the correct shell.
SHELL=${CONFIG_SHELL-/bin/sh}
@@ -427,7 +289,7 @@ if test "X[$]1" = X--no-reexec; then
elif test "X[$]1" = X--fallback-echo; then
# Avoid inline document here, it may be left over
:
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
# Yippee, $echo works!
:
else
@@ -439,7 +301,7 @@ if test "X[$]1" = X--fallback-echo; then
# used as fallback echo
shift
cat <<EOF
-$*
+[$]*
EOF
exit 0
fi
@@ -473,8 +335,9 @@ else
#
# So, first we look for a working echo in the user's PATH.
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
@@ -483,7 +346,7 @@ else
break
fi
done
- IFS="$save_ifs"
+ IFS="$lt_save_ifs"
if test "X$echo" = Xecho; then
# We didn't find a better echo, so look for alternatives.
@@ -556,17 +419,298 @@ if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
fi
AC_SUBST(ECHO)
-AC_DIVERT_POP
-])# _LT_AC_PROG_ECHO_BACKSLASH
+])])# _LT_AC_PROG_ECHO_BACKSLASH
+
+
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AC_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+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 AC_TRY_EVAL(ac_compile); 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 __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); 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-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ case $host in
+ 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-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*)
+ 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"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ 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
+ ;;
+AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
+[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+ ])
+esac
+
+need_locks="$enable_libtool_lock"
+
+])# _LT_AC_LOCK
+
+
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([LT_AC_PROG_SED])
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # 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}? :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ 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
+ if test ! -s conftest.err; then
+ $2=yes
+ fi
+ fi
+ $rm conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ ifelse([$5], , :, [$5])
+else
+ ifelse([$6], , :, [$6])
+fi
+])# AC_LIBTOOL_COMPILER_OPTION
+
+
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
+[AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The compiler 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>&AS_MESSAGE_LOG_FD
+ else
+ $2=yes
+ fi
+ fi
+ $rm conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ ifelse([$4], , :, [$4])
+else
+ ifelse([$5], , :, [$5])
+fi
+])# AC_LIBTOOL_LINKER_OPTION
+
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ 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*)
+ # 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;
+ ;;
+
+ 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;
+ ;;
+
+ *)
+ # 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"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
+ = "XX$teststring") >/dev/null 2>&1 &&
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ 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`
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _LT_AC_CHECK_DLFCN
+# --------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS(dlfcn.h)dnl
+])# _LT_AC_CHECK_DLFCN
+
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
# ------------------------------------------------------------------
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
-[if test "$cross_compiling" = yes; then :
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
[$4]
else
- AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
@@ -647,10 +791,12 @@ fi
rm -fr conftest*
])# _LT_AC_TRY_DLOPEN_SELF
+
# AC_LIBTOOL_DLOPEN_SELF
# -------------------
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
-[if test "x$enable_dlopen" != xyes; then
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
enable_dlopen=unknown
enable_dlopen_self=unknown
enable_dlopen_self_static=unknown
@@ -665,24 +811,39 @@ else
lt_cv_dlopen_self=yes
;;
- cygwin* | mingw* | pw32*)
+ mingw* | pw32*)
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
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
*)
AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen="shl_load"],
+ [lt_cv_dlopen="shl_load"],
[AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
[AC_CHECK_FUNC([dlopen],
[lt_cv_dlopen="dlopen"],
[AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
[AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
[AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
])
])
])
@@ -700,7 +861,6 @@ else
case $lt_cv_dlopen in
dlopen)
save_CPPFLAGS="$CPPFLAGS"
- AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
save_LDFLAGS="$LDFLAGS"
@@ -744,400 +904,64 @@ else
fi
])# AC_LIBTOOL_DLOPEN_SELF
-AC_DEFUN([_LT_AC_LTCONFIG_HACK],
-[AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-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'
-
-# Constants:
-rm="rm -f"
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-need_locks="$enable_libtool_lock"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-test -z "$AS" && AS=as
-test -z "$CC" && CC=cc
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-test -z "$LD" && LD=ld
-test -z "$LN_S" && LN_S="ln -s"
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-test -z "$NM" && NM=nm
-test -z "$OBJDUMP" && OBJDUMP=objdump
-test -z "$RANLIB" && RANLIB=:
-test -z "$STRIP" && STRIP=:
-test -z "$ac_objext" && ac_objext=o
-
-if test x"$host" != x"$build"; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
-case $host_os in
-linux-gnu*) ;;
-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
-esac
-
-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
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
- ;;
- *)
- old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="[$]2"
-
-AC_MSG_CHECKING([for objdir])
-rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-AC_MSG_RESULT($objdir)
-
-
-AC_ARG_WITH(pic,
-[ --with-pic try to use only PIC/non-PIC objects [default=use both]],
-pic_mode="$withval", pic_mode=default)
-test -z "$pic_mode" && pic_mode=default
-
-# We assume here that the value for lt_cv_prog_cc_pic will not be cached
-# in isolation, and that seeing it set (from the cache) indicates that
-# the associated values are set (in the cache) correctly too.
-AC_MSG_CHECKING([for $compiler option to produce PIC])
-AC_CACHE_VAL(lt_cv_prog_cc_pic,
-[ lt_cv_prog_cc_pic=
- lt_cv_prog_cc_shlib=
- lt_cv_prog_cc_wl=
- lt_cv_prog_cc_static=
- lt_cv_prog_cc_no_builtin=
- lt_cv_prog_cc_can_build_shared=$can_build_shared
-
- if test "$GCC" = yes; then
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-static'
-
- case $host_os in
- aix*)
- # Below there is a dirty hack to force normal static linking with -ldl
- # The problem is because libdl dynamically linked with both libc and
- # libC (AIX C++ library), which obviously doesn't included in libraries
- # list by gcc. This cause undefined symbols with -static flags.
- # This hack allows C programs to be linked with "-static -ldl", but
- # not sure about C++ programs.
- lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
- ;;
- amigaos*)
- # 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_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
- ;;
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_cv_prog_cc_pic='-fno-common'
- ;;
- cygwin* | mingw* | pw32* | os2*)
- # 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_cv_prog_cc_pic='-DDLL_EXPORT'
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_cv_prog_cc_pic=-Kconform_pic
- fi
- ;;
- *)
- lt_cv_prog_cc_pic='-fPIC'
- ;;
- esac
- else
- # PORTME Check for PIC flags for the system compiler.
- case $host_os in
- aix3* | aix4* | aix5*)
- lt_cv_prog_cc_wl='-Wl,'
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_cv_prog_cc_static='-Bstatic'
- else
- lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- hpux9* | hpux10* | hpux11*)
- # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
- lt_cv_prog_cc_pic='+Z'
- ;;
-
- irix5* | irix6* | nonstopux*)
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-non_shared'
- # PIC (with -KPIC) is the default.
- ;;
-
- cygwin* | mingw* | pw32* | os2*)
- # 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_cv_prog_cc_pic='-DDLL_EXPORT'
- ;;
-
- newsos6)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
- ;;
-
- osf3* | osf4* | osf5*)
- # All OSF/1 code is PIC.
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-non_shared'
- ;;
-
- sco3.2v5*)
- lt_cv_prog_cc_pic='-Kpic'
- lt_cv_prog_cc_static='-dn'
- lt_cv_prog_cc_shlib='-belf'
- ;;
-
- solaris*)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
- lt_cv_prog_cc_wl='-Wl,'
- ;;
-
- sunos4*)
- lt_cv_prog_cc_pic='-PIC'
- lt_cv_prog_cc_static='-Bstatic'
- lt_cv_prog_cc_wl='-Qoption ld '
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
- lt_cv_prog_cc_wl='-Wl,'
- ;;
-
- uts4*)
- lt_cv_prog_cc_pic='-pic'
- lt_cv_prog_cc_static='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- lt_cv_prog_cc_pic='-Kconform_pic'
- lt_cv_prog_cc_static='-Bstatic'
- fi
- ;;
-
- *)
- lt_cv_prog_cc_can_build_shared=no
- ;;
- esac
- fi
-])
-if test -z "$lt_cv_prog_cc_pic"; then
- AC_MSG_RESULT([none])
-else
- AC_MSG_RESULT([$lt_cv_prog_cc_pic])
-
- # Check to make sure the pic_flag actually works.
- AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
- AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
- AC_TRY_COMPILE([], [], [dnl
- case $host_os in
- hpux9* | hpux10* | hpux11*)
- # On HP-UX, both CC and GCC only warn that PIC is supported... then
- # they create non-PIC objects. So, if there were any warnings, we
- # assume that PIC is not supported.
- if test -s conftest.err; then
- lt_cv_prog_cc_pic_works=no
- else
- lt_cv_prog_cc_pic_works=yes
- fi
- ;;
- *)
- lt_cv_prog_cc_pic_works=yes
- ;;
- esac
- ], [dnl
- lt_cv_prog_cc_pic_works=no
- ])
- CFLAGS="$save_CFLAGS"
- ])
-
- if test "X$lt_cv_prog_cc_pic_works" = Xno; then
- lt_cv_prog_cc_pic=
- lt_cv_prog_cc_can_build_shared=no
- else
- lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
- fi
-
- AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
-fi
-
-# Check for any special shared library compilation flags.
-if test -n "$lt_cv_prog_cc_shlib"; then
- AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
- if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
- else
- AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
- lt_cv_prog_cc_can_build_shared=no
- fi
-fi
-
-AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
-AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
- lt_cv_prog_cc_static_works=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
- AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
- LDFLAGS="$save_LDFLAGS"
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $rm -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ printf "$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}? :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ 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
+ if test ! -s out/conftest.err; then
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w .
+ $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 ..
+ rmdir conftest
+ $rm conftest*
])
+])# AC_LIBTOOL_PROG_CC_C_O
-# Belt *and* braces to stop my trousers falling down:
-test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
-AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
-
-pic_flag="$lt_cv_prog_cc_pic"
-special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
-wl="$lt_cv_prog_cc_wl"
-link_static_flag="$lt_cv_prog_cc_static"
-no_builtin_flag="$lt_cv_prog_cc_no_builtin"
-can_build_shared="$lt_cv_prog_cc_can_build_shared"
-
-
-# Check to see if options -o and -c are simultaneously supported by compiler
-AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
-AC_CACHE_VAL([lt_cv_compiler_c_o], [
-$rm -r conftest 2>/dev/null
-mkdir conftest
-cd conftest
-echo "int some_variable = 0;" > conftest.$ac_ext
-mkdir out
-# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
-# that will create temporary files in the current directory regardless of
-# the output directory. Thus, making CWD read-only will cause this test
-# to fail, enabling locking or at least warning the user not to do parallel
-# builds.
-chmod -w .
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
-compiler_c_o=no
-if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && 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
- if test -s out/conftest.err; then
- lt_cv_compiler_c_o=no
- else
- lt_cv_compiler_c_o=yes
- fi
-else
- # Append any errors to the config.log.
- cat out/conftest.err 1>&AC_FD_CC
- lt_cv_compiler_c_o=no
-fi
-CFLAGS="$save_CFLAGS"
-chmod u+w .
-$rm conftest* out/*
-rmdir out
-cd ..
-rmdir conftest
-$rm -r conftest 2>/dev/null
-])
-compiler_c_o=$lt_cv_compiler_c_o
-AC_MSG_RESULT([$compiler_c_o])
-
-if test x"$compiler_c_o" = x"yes"; then
- # Check to see if we can write to a .lo
- AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
- AC_CACHE_VAL([lt_cv_compiler_o_lo], [
- lt_cv_compiler_o_lo=no
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -c -o conftest.lo"
- save_objext="$ac_objext"
- ac_objext=lo
- AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- lt_cv_compiler_o_lo=no
- else
- lt_cv_compiler_o_lo=yes
- fi
- ])
- ac_objext="$save_objext"
- CFLAGS="$save_CFLAGS"
- ])
- compiler_o_lo=$lt_cv_compiler_o_lo
- AC_MSG_RESULT([$compiler_o_lo])
-else
- compiler_o_lo=no
-fi
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([_LT_AC_LOCK])dnl
+
hard_links="nottested"
-if test "$compiler_c_o" = no && test "$need_locks" != no; then
+if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
# do not overwrite the value of need_locks provided by the user
AC_MSG_CHECKING([if we can lock with hard links])
hard_links=yes
@@ -1148,764 +972,77 @@ if test "$compiler_c_o" = no && test "$need_locks" != no; then
ln conftest.a conftest.b 2>/dev/null && hard_links=no
AC_MSG_RESULT([$hard_links])
if test "$hard_links" = no; then
- AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
need_locks=warn
fi
else
need_locks=no
fi
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
-if test "$GCC" = yes; then
- # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
- AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
- echo "int some_variable = 0;" > conftest.$ac_ext
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
- compiler_rtti_exceptions=no
- AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- compiler_rtti_exceptions=no
- else
- compiler_rtti_exceptions=yes
- fi
- ])
- CFLAGS="$save_CFLAGS"
- AC_MSG_RESULT([$compiler_rtti_exceptions])
-
- if test "$compiler_rtti_exceptions" = "yes"; then
- no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
- else
- no_builtin_flag=' -fno-builtin'
- fi
-fi
-
-# See if the linker supports building shared libraries.
-AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
-
-allow_undefined_flag=
-no_undefined_flag=
-need_lib_prefix=unknown
-need_version=unknown
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-archive_cmds=
-archive_expsym_cmds=
-old_archive_from_new_cmds=
-old_archive_from_expsyms_cmds=
-export_dynamic_flag_spec=
-whole_archive_flag_spec=
-thread_safe_flag_spec=
-hardcode_into_libs=no
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-hardcode_shlibpath_var=unsupported
-runpath_var=
-link_all_deplibs=unknown
-always_export_symbols=no
-export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-# 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 egrep regular expression 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_"
-# 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.
-extract_expsyms_cmds=
-
-case $host_os in
-cygwin* | mingw* | pw32*)
- # 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
- ;;
-openbsd*)
- with_gnu_ld=no
- ;;
-esac
-
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix3* | aix4* | aix5*)
- # On AIX, the GNU linker is very broken
- # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
- ld_shlibs=no
- cat <<EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-EOF
- ;;
-
- amigaos*)
- 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
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can use
- # them.
- ld_shlibs=no
- ;;
-
- beos*)
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag=unsupported
- # Joseph Beckenbach <jrb3@best.com> 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*)
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- allow_undefined_flag=unsupported
- always_export_symbols=yes
-
- extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
- sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
- test -f $output_objdir/impgen.exe || (cd $output_objdir && \
- if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
- else $CC -o impgen impgen.c ; fi)~
- $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
-
- old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
-
- # cygwin and mingw dlls have different entry points and sets of symbols
- # to exclude.
- # FIXME: what about values for MSVC?
- dll_entry=__cygwin_dll_entry@12
- dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
- case $host_os in
- mingw*)
- # mingw values
- dll_entry=_DllMainCRTStartup@12
- dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
- ;;
- esac
-
- # mingw and cygwin differ, and it's simplest to just exclude the union
- # of the two symbol sets.
- dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
-
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one (in ltdll.c)
- if test "x$lt_cv_need_dllmain" = "xyes"; then
- ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
- ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
- test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
- else
- ltdll_obj=
- ltdll_cmds=
- fi
-
- # Extract the symbol export list from an `--export-all' def file,
- # then regenerate the def file from the symbol export list, so that
- # the compiled dll only exports the symbol export list.
- # Be careful not to strip the DATA tag left be newer dlltools.
- export_symbols_cmds="$ltdll_cmds"'
- $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
- sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
-
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is.
- # If DATA tags from a recent dlltool are present, honour them!
- 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;
- _lt_hint=1;
- cat $export_symbols | while read symbol; do
- set dummy \$symbol;
- case \[$]# in
- 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
- 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
- *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
- esac;
- _lt_hint=`expr 1 + \$_lt_hint`;
- done;
- fi~
- '"$ltdll_cmds"'
- $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
- $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
- $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
- ;;
-
- 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 -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris* | sysv5*)
- if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- cat <<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.
-
-EOF
- elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- 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
- ;;
-
- 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 | egrep ': supported targets:.* elf' > /dev/null; then
- 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
- if test "$ld_shlibs" = yes; then
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
- case $host_os in
- cygwin* | mingw* | pw32*)
- # dlltool doesn't understand --whole-archive et. al.
- whole_archive_flag_spec=
- ;;
- *)
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- ;;
- esac
- fi
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
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 "$link_static_flag"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
-
- aix4* | aix5*)
- 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]].*|aix5*)
- 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.
-
- hardcode_direct=yes
- archive_cmds=''
- hardcode_libdir_separator=':'
- if test "$GCC" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" && \
- strings "$collect2name" | grep resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- hardcode_direct=yes
- 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'
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- shared_flag='${wl}-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- # It seems that -bexpall can do strange things, 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'
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
- archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${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 ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
- else
- hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag='${wl}-berok'
- # This is a bit strange, but is similar to how AIX traditionally builds
- # it's shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- 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
- # see comment about different semantics on the GNU ld section
- ld_shlibs=no
- ;;
-
- cygwin* | mingw* | pw32*)
- # 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.
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''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'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
- ;;
-
- darwin* | rhapsody*)
- case "$host_os" in
- rhapsody* | darwin1.[[012]])
- allow_undefined_flag='-undefined suppress'
- ;;
- *) # Darwin 1.3 on
- allow_undefined_flag='-flat_namespace -undefined suppress'
- ;;
- esac
- # FIXME: Relying on posixy $() will cause problems for
- # cross-compilation, but unfortunately the echo tests do not
- # yet detect zsh echo's removal of \ escapes. Also zsh mangles
- # `"' quotes if we put them in here... so don't!
- archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
- # We need to add '_' to the symbols in $export_symbols first
- #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- whole_archive_flag_spec='-all_load $convenience'
- ;;
-
- freebsd1*)
- ld_shlibs=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*)
- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- hpux9* | hpux10* | hpux11*)
- case $host_os in
- hpux9*) 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' ;;
- *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
- esac
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- hardcode_minus_L=yes # Not in the search PATH, but as the default
- # location of the library.
- export_dynamic_flag_spec='${wl}-E'
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- hardcode_libdir_separator=:
- 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
- ;;
-
- openbsd*)
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- 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'
- 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
- ;;
-
- 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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- 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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
-
- #Both c and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- hardcode_libdir_separator=:
- ;;
-
- sco3.2v5*)
- 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
- export_dynamic_flag_spec='${wl}-Bexport'
- ;;
-
- solaris*)
- # gcc --version < 3.0 without binutils cannot create self contained
- # shared libraries reliably, requiring libgcc.a to resolve some of
- # the object symbols generated in some cases. Libraries that use
- # assert need libgcc.a to resolve __eprintf, for example. Linking
- # a copy of libgcc.a into every shared library to guarantee resolving
- # such symbols causes other problems: According to Tim Van Holder
- # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
- # (to the application) exception stack for one thing.
- no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- case `$CC --version 2>/dev/null` in
- [[12]].*)
- cat <<EOF 1>&2
-
-*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
-*** create self contained shared libraries on Solaris systems, without
-*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
-*** -no-undefined support, which will at least allow you to build shared
-*** libraries. However, you may find that when you link such libraries
-*** into an application without using GCC, you have to manually add
-*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
-*** upgrade to a newer version of GCC. Another option is to rebuild your
-*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
-
-EOF
- no_undefined_flag=
- ;;
- esac
- fi
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- 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'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_shlibpath_var=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *) # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
- 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'
- ;;
-
- sysv5*)
- no_undefined_flag=' -z text'
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- 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'
- hardcode_libdir_flag_spec=
- hardcode_shlibpath_var=no
- runpath_var='LD_RUN_PATH'
- ;;
-
- uts4*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- dgux*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- 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.2uw2*)
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=no
- hardcode_shlibpath_var=no
- hardcode_runpath_var=yes
- runpath_var=LD_RUN_PATH
- ;;
-
- sysv5uw7* | unixware7*)
- no_undefined_flag='${wl}-z ${wl}text'
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- ;;
-
- *)
- ld_shlibs=no
- ;;
- esac
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
fi
-AC_MSG_RESULT([$ld_shlibs])
-test "$ld_shlibs" = no && can_build_shared=no
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+])# AC_LIBTOOL_OBJDIR
+
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
# Check hardcoding attributes.
-AC_MSG_CHECKING([how to hardcode library paths into programs])
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
- test -n "$runpath_var"; then
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_AC_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
+ test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
+ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
# We can hardcode non-existant directories.
- if test "$hardcode_direct" != no &&
+ if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != 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 "$hardcode_shlibpath_var" != no &&
- test "$hardcode_minus_L" != no; then
+ ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
# Linking always hardcodes the temporary library directory.
- hardcode_action=relink
+ _LT_AC_TAGVAR(hardcode_action, $1)=relink
else
# We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action=immediate
+ _LT_AC_TAGVAR(hardcode_action, $1)=immediate
fi
else
# We cannot hardcode anything, or else we can only hardcode existing
# directories.
- hardcode_action=unsupported
+ _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; 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
-AC_MSG_RESULT([$hardcode_action])
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
-striplib=
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[striplib=
old_striplib=
AC_MSG_CHECKING([whether stripping libraries is possible])
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
@@ -1913,17 +1050,33 @@ if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
AC_MSG_RESULT([yes])
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"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+fi
+ ;;
+ *)
AC_MSG_RESULT([no])
+ ;;
+ esac
fi
+])# AC_LIBTOOL_SYS_LIB_STRIP
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
# PORTME Fill in your ld.so characteristics
-AC_MSG_CHECKING([dynamic linker characteristics])
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_MSG_CHECKING([dynamic linker characteristics])
library_names_spec=
libname_spec='lib$name'
soname_spec=
+shrext_cmds=".so"
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
@@ -1933,16 +1086,35 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ # 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.
+ 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
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+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
- library_names_spec='${libname}${release}.so$versuffix $libname.a'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
shlibpath_var=LIBPATH
- # AIX has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}.so$major'
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
;;
aix4* | aix5*)
@@ -1952,7 +1124,7 @@ aix4* | aix5*)
hardcode_into_libs=yes
if test "$host_cpu" = ia64; then
# AIX 5 supports IA64
- library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
+ 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
@@ -1962,43 +1134,41 @@ aix4* | aix5*)
# 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
- ;;
+ 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.
+ # 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<name>.so
# instead of lib<name>.a to let people know that these are not
# typical AIX shared libraries.
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ 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}.so$major'
+ soname_spec='${libname}${release}${shared_ext}$major'
fi
shlibpath_var=LIBPATH
fi
- hardcode_into_libs=yes
;;
amigaos*)
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=`$echo "X$lib" | $Xsed -e '\''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'
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''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'
;;
beos*)
- library_names_spec='${libname}.so'
+ library_names_spec='${libname}${shared_ext}'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
@@ -2006,13 +1176,12 @@ beos*)
bsdi4*)
version_type=linux
need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
+ 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"
- export_dynamic_flag_spec=-rdynamic
# 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
@@ -2020,29 +1189,55 @@ bsdi4*)
cygwin* | mingw* | pw32*)
version_type=windows
+ shrext_cmds=".dll"
need_version=no
need_lib_prefix=no
+
case $GCC,$host_os in
- yes,cygwin*)
+ yes,cygwin* | yes,mingw* | yes,pw32*)
library_names_spec='$libname.dll.a'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
- postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
+ # 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 .libs/$dlname \$dldir/$dlname'
- postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ $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
+
+ 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="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ 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
+ ;;
+ 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
;;
- yes,mingw*)
- library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
- ;;
- yes,pw32*)
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
- ;;
+
*)
- library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
;;
esac
dynamic_linker='Win32 ld.exe'
@@ -2055,30 +1250,56 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- # FIXME: Relying on posixy $() will cause problems for
- # cross-compilation, but unfortunately the echo tests do not
- # yet detect zsh echo's removal of \ escapes.
- library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
- soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
+ library_names_spec='${libname}${release}${versuffix}$shared_ext ${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)'
+ # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+ if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+ else
+ sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+ fi
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ 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
;;
freebsd1*)
dynamic_linker=no
;;
+kfreebsd*-gnu)
+ version_type=linux
+ 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='GNU ld.so'
+ ;;
+
freebsd*)
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ 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}.so$versuffix $libname.so$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
esac
@@ -2087,7 +1308,11 @@ freebsd*)
freebsd2*)
shlibpath_overrides_runpath=yes
;;
- *)
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ *) # from 3.2 on
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
@@ -2098,8 +1323,8 @@ gnu*)
version_type=linux
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
- soname_spec='${libname}${release}.so$major'
+ 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
hardcode_into_libs=yes
;;
@@ -2107,14 +1332,45 @@ gnu*)
hpux9* | hpux10* | hpux11*)
# Give a soname corresponding to the major version so that dld.sl refuses to
# link against other versions.
- dynamic_linker="$host_os dld.sl"
version_type=sunos
need_lib_prefix=no
need_version=no
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
- soname_spec='${libname}${release}.sl$major'
+ 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'
;;
@@ -2122,21 +1378,29 @@ hpux9* | hpux10* | hpux11*)
irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
- *) version_type=irix ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
esac
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
+ 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 ") libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *-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
;;
@@ -2145,20 +1409,21 @@ irix5* | irix6* | nonstopux*)
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-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
# This must be Linux ELF.
-linux-gnu*)
+linux*)
version_type=linux
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
+ 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
@@ -2167,6 +1432,12 @@ linux-gnu*)
# 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=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | 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,
@@ -2176,17 +1447,29 @@ linux-gnu*)
dynamic_linker='GNU/Linux ld.so'
;;
+knetbsd*-gnu)
+ version_type=linux
+ 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='GNU 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}.so$versuffix ${libname}.so$versuffix'
+ 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}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
- soname_spec='${libname}${release}.so$major'
+ 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
@@ -2196,7 +1479,17 @@ netbsd*)
newsos6)
version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ 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=linux
+ 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
;;
@@ -2204,47 +1497,48 @@ newsos6)
openbsd*)
version_type=sunos
need_lib_prefix=no
- need_version=no
+ need_version=yes
+ 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
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
else
shlibpath_overrides_runpath=yes
fi
- library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
;;
os2*)
libname_spec='$name'
+ shrext_cmds=".dll"
need_lib_prefix=no
- library_names_spec='$libname.dll $libname.a'
+ 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}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ 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"
- hardcode_into_libs=yes
;;
sco3.2v5*)
version_type=osf
- soname_spec='${libname}${release}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ 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
;;
@@ -2252,8 +1546,8 @@ solaris*)
version_type=linux
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
+ 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
@@ -2263,7 +1557,7 @@ solaris*)
sunos4*)
version_type=sunos
- library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ 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
@@ -2275,8 +1569,8 @@ sunos4*)
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
+ 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)
@@ -2297,39 +1591,933 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
esac
;;
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
sysv4*MP*)
if test -d /usr/nec ;then
version_type=linux
- library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
- soname_spec='$libname.so.$major'
+ 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
;;
+uts4*)
+ version_type=linux
+ 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
AC_MSG_RESULT([$dynamic_linker])
test "$dynamic_linker" = no && can_build_shared=no
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+
+
+# _LT_AC_TAGCONFIG
+# ----------------
+AC_DEFUN([_LT_AC_TAGCONFIG],
+[AC_ARG_WITH([tags],
+ [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
+ [include additional configurations @<:@automatic@:>@])],
+ [tagnames="$withval"])
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+ if test ! -f "${ofile}"; then
+ AC_MSG_WARN([output file `$ofile' does not exist])
+ fi
+
+ if test -z "$LTCC"; then
+ eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+ if test -z "$LTCC"; then
+ AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
+ else
+ AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
+ fi
+ fi
+
+ # Extract list of available tagged configurations in $ofile.
+ # Note that this assumes the entire list is on one line.
+ available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for tagname in $tagnames; do
+ IFS="$lt_save_ifs"
+ # Check whether tagname contains only valid characters
+ case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
+ "") ;;
+ *) AC_MSG_ERROR([invalid tag name: $tagname])
+ ;;
+ esac
+
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+ then
+ AC_MSG_ERROR([tag name \"$tagname\" already exists])
+ fi
+
+ # Update the list of available tags.
+ if test -n "$tagname"; then
+ echo appending configuration tag \"$tagname\" to $ofile
+
+ case $tagname in
+ CXX)
+ if test -n "$CXX" && test "X$CXX" != "Xno"; then
+ AC_LIBTOOL_LANG_CXX_CONFIG
+ else
+ tagname=""
+ fi
+ ;;
+
+ F77)
+ if test -n "$F77" && test "X$F77" != "Xno"; then
+ AC_LIBTOOL_LANG_F77_CONFIG
+ else
+ tagname=""
+ fi
+ ;;
+
+ GCJ)
+ if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+ AC_LIBTOOL_LANG_GCJ_CONFIG
+ else
+ tagname=""
+ fi
+ ;;
+
+ RC)
+ AC_LIBTOOL_LANG_RC_CONFIG
+ ;;
+
+ *)
+ AC_MSG_ERROR([Unsupported tag name: $tagname])
+ ;;
+ esac
+
+ # Append the new tag name to the list of available tags.
+ if test -n "$tagname" ; then
+ available_tags="$available_tags $tagname"
+ fi
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ # Now substitute the updated list of available tags.
+ if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+ mv "${ofile}T" "$ofile"
+ chmod +x "$ofile"
+ else
+ rm -f "${ofile}T"
+ AC_MSG_ERROR([unable to update list of available tagged configurations.])
+ fi
+fi
+])# _LT_AC_TAGCONFIG
+
+
+# AC_LIBTOOL_DLOPEN
+# -----------------
+# enable checks for dlopen support
+AC_DEFUN([AC_LIBTOOL_DLOPEN],
+ [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_DLOPEN
+
+
+# AC_LIBTOOL_WIN32_DLL
+# --------------------
+# declare package support for building win32 dll's
+AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
+])# AC_LIBTOOL_WIN32_DLL
+
+
+# AC_ENABLE_SHARED([DEFAULT])
+# ---------------------------
+# implement the --enable-shared flag
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([shared],
+ [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
+ [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],
+ [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
+])# AC_ENABLE_SHARED
+
+
+# AC_DISABLE_SHARED
+# -----------------
+#- set the default shared flag to --disable-shared
+AC_DEFUN([AC_DISABLE_SHARED],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_SHARED(no)
+])# AC_DISABLE_SHARED
+
+
+# AC_ENABLE_STATIC([DEFAULT])
+# ---------------------------
+# implement the --enable-static flag
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([static],
+ [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
+ [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],
+ [enable_static=]AC_ENABLE_STATIC_DEFAULT)
+])# AC_ENABLE_STATIC
+
+
+# AC_DISABLE_STATIC
+# -----------------
+# set the default static flag to --disable-static
+AC_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_STATIC(no)
+])# AC_DISABLE_STATIC
+
+
+# AC_ENABLE_FAST_INSTALL([DEFAULT])
+# ---------------------------------
+# implement the --enable-fast-install flag
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+AC_DEFUN([AC_ENABLE_FAST_INSTALL],
+[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_ARG_ENABLE([fast-install],
+ [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [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],
+ [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
+])# AC_ENABLE_FAST_INSTALL
+
+
+# AC_DISABLE_FAST_INSTALL
+# -----------------------
+# set the default to --disable-fast-install
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_ENABLE_FAST_INSTALL(no)
+])# AC_DISABLE_FAST_INSTALL
+
+
+# AC_LIBTOOL_PICMODE([MODE])
+# --------------------------
+# implement the --with-pic flag
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+pic_mode=ifelse($#,1,$1,default)
+])# AC_LIBTOOL_PICMODE
+
+
+# AC_PROG_EGREP
+# -------------
+# This is predefined starting with Autoconf 2.54, so this conditional
+# definition can be removed once we require Autoconf 2.54 or later.
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
+[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
+ [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_prog_egrep='grep -E'
+ else ac_cv_prog_egrep='egrep'
+ fi])
+ EGREP=$ac_cv_prog_egrep
+ AC_SUBST([EGREP])
+])])
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[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
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="ifelse([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ 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 <<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
+
+EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognise a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+ [AC_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ 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
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[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 GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+])# AC_PROG_LD
+
+
+# AC_PROG_LD_GNU
+# --------------
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AC_PROG_LD_GNU
+
+
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+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'
+])# AC_PROG_LD_RELOAD_FLAG
+
+
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_CACHE_CHECK([how to recognise dependent libraries],
+lt_cv_deplibs_check_method,
+[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
+aix4* | aix5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi4*)
+ 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'.
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | kfreebsd*-gnu)
+ 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)/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
+ ;;
+
+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]) 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
+ ;;
+
+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 Linux ELF.
+linux*)
+ case $host_cpu in
+ alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
+ lt_cv_deplibs_check_method=pass_all ;;
+ *)
+ # glibc up to 2.1.1 does not perform some relocations on ARM
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ 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=unknown
+ ;;
+
+openbsd*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
+ else
+ lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sco3.2v5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ 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
+ ;;
+ esac
+ ;;
+
+sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+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
+])# AC_DEPLIBS_CHECK_METHOD
+
+
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/${ac_tool_prefix}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"
+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+])# AC_PROG_NM
+
+
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+])# AC_CHECK_LIBM
+
+
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
+# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
+# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
+# '${top_srcdir}/' (note the single quotes!). If your package is not
+# flat and you're not using automake, define top_builddir and
+# top_srcdir appropriately in the Makefiles.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+ case $enable_ltdl_convenience in
+ no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+ "") enable_ltdl_convenience=yes
+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+ esac
+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
+ LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+ # For backwards non-gettext consistent compatibility...
+ INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
+
+
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl installable library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
+# DIRECTORY is not provided and an installed libltdl is not found, it is
+# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
+# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
+# quotes!). If your package is not flat and you're not using automake,
+# define top_builddir and top_srcdir appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+ AC_CHECK_LIB(ltdl, lt_dlinit,
+ [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+ [if test x"$enable_ltdl_install" = xno; then
+ AC_MSG_WARN([libltdl not installed, but installation disabled])
+ else
+ enable_ltdl_install=yes
+ fi
+ ])
+ if test x"$enable_ltdl_install" = x"yes"; then
+ ac_configure_args="$ac_configure_args --enable-ltdl-install"
+ LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
+ LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
+ else
+ ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+ LIBLTDL="-lltdl"
+ LTDLINCL=
+ fi
+ # For backwards non-gettext consistent compatibility...
+ INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
+
+
+# AC_LIBTOOL_CXX
+# --------------
+# enable support for C++ libraries
+AC_DEFUN([AC_LIBTOOL_CXX],
+[AC_REQUIRE([_LT_AC_LANG_CXX])
+])# AC_LIBTOOL_CXX
+
-# Report the final consequences.
+# _LT_AC_LANG_CXX
+# ---------------
+AC_DEFUN([_LT_AC_LANG_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([AC_PROG_CXXCPP])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
+])# _LT_AC_LANG_CXX
+
+
+# AC_LIBTOOL_F77
+# --------------
+# enable support for Fortran 77 libraries
+AC_DEFUN([AC_LIBTOOL_F77],
+[AC_REQUIRE([_LT_AC_LANG_F77])
+])# AC_LIBTOOL_F77
+
+
+# _LT_AC_LANG_F77
+# ---------------
+AC_DEFUN([_LT_AC_LANG_F77],
+[AC_REQUIRE([AC_PROG_F77])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
+])# _LT_AC_LANG_F77
+
+
+# AC_LIBTOOL_GCJ
+# --------------
+# enable support for GCJ libraries
+AC_DEFUN([AC_LIBTOOL_GCJ],
+[AC_REQUIRE([_LT_AC_LANG_GCJ])
+])# AC_LIBTOOL_GCJ
+
+
+# _LT_AC_LANG_GCJ
+# ---------------
+AC_DEFUN([_LT_AC_LANG_GCJ],
+[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
+ [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
+ [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
+ [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
+ [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
+])# _LT_AC_LANG_GCJ
+
+
+# AC_LIBTOOL_RC
+# --------------
+# enable support for Windows resource files
+AC_DEFUN([AC_LIBTOOL_RC],
+[AC_REQUIRE([LT_AC_PROG_RC])
+_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
+])# AC_LIBTOOL_RC
+
+
+# AC_LIBTOOL_LANG_C_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
+AC_DEFUN([_LT_AC_LANG_C_CONFIG],
+[lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+_LT_AC_SYS_COMPILER
+
+#
+# Check for any special shared library compilation flags.
+#
+_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
+if test "$GCC" = no; then
+ case $host_os in
+ sco3.2v5*)
+ _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
+ ;;
+ esac
+fi
+if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
+ AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
+ if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
+ else
+ AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
+ _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
+ fi
+fi
+
+
+#
+# Check to make sure the static flag actually works.
+#
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
+ _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+ $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
+ [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+# Report which librarie types wil actually be built
AC_MSG_CHECKING([if libtool supports shared libraries])
AC_MSG_RESULT([$can_build_shared])
@@ -2347,11 +2535,48 @@ aix3*)
fi
;;
-aix4*)
+aix4* | aix5*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
;;
+ darwin* | rhapsody*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ output_verbose_link_cmd='echo'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
esac
AC_MSG_RESULT([$enable_shared])
@@ -2360,111 +2585,1307 @@ AC_MSG_CHECKING([whether to build static libraries])
test "$enable_shared" = yes || enable_static=yes
AC_MSG_RESULT([$enable_static])
-if test "$hardcode_action" = relink; 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
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_C_CONFIG
+
+
+# AC_LIBTOOL_LANG_CXX_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
+AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([AC_PROG_CXXCPP])
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+
+# Source file extension for C++ test sources.
+ac_ext=cc
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+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
+ 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
+ unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+# We don't want -fno-exception wen compiling C++ code, so set the
+# no_builtin_flag separately
+if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+else
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
fi
-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"
+if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ AC_PROG_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
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${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
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ 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.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$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 "\-L"'
+
+else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
fi
-AC_LIBTOOL_DLOPEN_SELF
-
-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.
- AC_MSG_CHECKING([whether -lc should be explicitly linked in])
- AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
- [$rm conftest*
- echo 'static int dummy;' > conftest.$ac_ext
-
- if AC_TRY_EVAL(ac_compile); then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_cv_prog_cc_wl
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- save_allow_undefined_flag=$allow_undefined_flag
- allow_undefined_flag=
- if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
- then
- lt_cv_archive_cmds_need_lc=no
+# PORTME: fill in a description of your system's C++ link characteristics
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+_LT_AC_TAGVAR(ld_shlibs, $1)=yes
+case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix4* | aix5*)
+ 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]].*|aix5*)
+ 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.
+
+ _LT_AC_TAGVAR(archive_cmds, $1)=''
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ 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
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ else
+ # We have old collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=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
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ 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
+
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_AC_TAGVAR(always_export_symbols, $1)=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.
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${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.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ darwin* | rhapsody*)
+ if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
else
- lt_cv_archive_cmds_need_lc=yes
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
+ ;;
+ esac
fi
- allow_undefined_flag=$save_allow_undefined_flag
+ ;;
+ esac
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+ lt_int_apple_cc_single_mod=yes
+ fi
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
else
- cat conftest.err 1>&5
- fi])
- AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
+ fi
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
;;
- esac
-fi
-need_lc=${lt_cv_archive_cmds_need_lc-yes}
-# The second clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
- :
+ dgux*)
+ case $cc_basename in
+ ec++)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ freebsd[12]*)
+ # C++ shared libraries reported to be fairly broken before switch to ELF
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ freebsd-elf*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+ freebsd* | kfreebsd*-gnu)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+ gnu*)
+ ;;
+ hpux9*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=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
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$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) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ ;;
+ *)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case "$host_cpu" in
+ hppa*64*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ *)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=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
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC)
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$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; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case "$host_cpu" in
+ ia64*|hppa*64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${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
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC)
+ # SGI C++
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${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.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+ fi
+ fi
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+ linux*)
+ 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.
+ _LT_AC_TAGVAR(archive_cmds, $1)='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'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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; echo $list'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc)
+ # Intel C++
+ with_gnu_ld=yes
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ cxx)
+ # Compaq C++
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # 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=`echo $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; echo $list'
+ ;;
+ esac
+ ;;
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=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::"'
+ ;;
+ osf3*)
+ 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.
+ _LT_AC_TAGVAR(archive_cmds, $1)='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'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # 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=`echo $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; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # 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 "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ 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.
+ _LT_AC_TAGVAR(archive_cmds, $1)='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'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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 $objdir/so_locations -o $lib~
+ $rm $lib.exp'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # 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=`echo $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; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # 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 "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ sco*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ case $cc_basename in
+ CC)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The C++ compiler is used as linker so we must use $wl
+ # flag to pass the commands to the underlying system
+ # linker.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ # 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 -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+ # 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.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx)
+ # Green Hills C++ Compiler
+ _LT_AC_TAGVAR(archive_cmds, $1)='$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.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | grep -v '^2\.7' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared -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 \"\-L\""
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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 \"\-L\""
+ fi
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ fi
+ ;;
+ esac
+ ;;
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+esac
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$GXX"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_POSTDEP_PREDEP($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+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
+])# AC_LIBTOOL_LANG_CXX_CONFIG
+
+# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+# ------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
+int a;
+void foo (void) { a = 0; }
+EOF
+],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+EOF
+],[$1],[F77],[cat > conftest.$ac_ext <<EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+EOF
+],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); 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
+
+ # The `*' in the case matches for architectures that use `case' in
+ # $output_verbose_cmd can trigger glob expansion during the loop
+ # eval without this substitution.
+ output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+
+ for p in `eval $output_verbose_link_cmd`; do
+ case $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
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p 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 "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${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 "$_LT_AC_TAGVAR(postdeps, $1)"; then
+ _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$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 "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+ _LT_AC_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+ _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
else
- # If there is no Makefile yet, we rely on a make rule to execute
- # `config.status --recheck' to rerun these tests and create the
- # libtool script then.
- test -f Makefile && make "$ltmain"
+ echo "libtool.m4: error: problem compiling $1 test program"
fi
-if test -f "$ltmain"; then
- trap "$rm \"${ofile}T\"; exit 1" 1 2 15
- $rm -f "${ofile}T"
+$rm -f confest.$objext
- echo creating $ofile
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+])# AC_LIBTOOL_POSTDEP_PREDEP
+# AC_LIBTOOL_LANG_F77_CONFIG
+# ------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
+AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
+[AC_REQUIRE([AC_PROG_F77])
+AC_LANG_PUSH(Fortran 77)
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code=" subroutine t\n return\n end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code=" program t\n end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+AC_MSG_CHECKING([if libtool supports shared libraries])
+AC_MSG_RESULT([$can_build_shared])
+
+AC_MSG_CHECKING([whether to build shared libraries])
+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
+ ;;
+aix4* | aix5*)
+ test "$enable_shared" = yes && enable_static=no
+ ;;
+esac
+AC_MSG_RESULT([$enable_shared])
+
+AC_MSG_CHECKING([whether to build static libraries])
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+AC_MSG_RESULT([$enable_static])
+
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_AC_TAGVAR(GCC, $1)="$G77"
+_LT_AC_TAGVAR(LD, $1)="$LD"
+
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_F77_CONFIG
+
+
+# AC_LIBTOOL_LANG_GCJ_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the C compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
+AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+AC_LIBTOOL_PROG_COMPILER_PIC($1)
+AC_LIBTOOL_PROG_CC_C_O($1)
+AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+AC_LIBTOOL_PROG_LD_SHLIBS($1)
+AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+AC_LIBTOOL_SYS_LIB_STRIP
+AC_LIBTOOL_DLOPEN_SELF($1)
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_GCJ_CONFIG
+
+
+# AC_LIBTOOL_LANG_RC_CONFIG
+# --------------------------
+# Ensure that the configuration vars for the Windows resource compiler are
+# suitably defined. Those variables are subsequently used by
+# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
+AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
+AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
+[AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+AC_LIBTOOL_CONFIG($1)
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# AC_LIBTOOL_LANG_RC_CONFIG
+
+
+# AC_LIBTOOL_CONFIG([TAGNAME])
+# ----------------------------
+# If TAGNAME is not passed, then create an initial libtool script
+# with a default configuration from the untagged config vars. Otherwise
+# add code to config.status for appending the configuration named by
+# TAGNAME from the matching tagged config vars.
+AC_DEFUN([AC_LIBTOOL_CONFIG],
+[# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+ # 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
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS SED \
- AR AR_FLAGS CC LD LN_S NM SHELL \
- reload_flag reload_cmds wl \
- pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
- thread_safe_flag_spec whole_archive_flag_spec libname_spec \
- library_names_spec soname_spec \
- RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
- old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
- postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
- old_striplib striplib file_magic_cmd export_symbols_cmds \
- deplibs_check_method allow_undefined_flag no_undefined_flag \
- finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
- global_symbol_to_c_name_address \
- hardcode_libdir_flag_spec hardcode_libdir_separator \
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ SED SHELL STRIP \
+ libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+ old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+ deplibs_check_method reload_flag reload_cmds need_locks \
+ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+ lt_cv_sys_global_symbol_to_c_name_address \
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
- compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
+ old_postinstall_cmds old_postuninstall_cmds \
+ _LT_AC_TAGVAR(compiler, $1) \
+ _LT_AC_TAGVAR(CC, $1) \
+ _LT_AC_TAGVAR(LD, $1) \
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
+ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
+ _LT_AC_TAGVAR(old_archive_cmds, $1) \
+ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
+ _LT_AC_TAGVAR(predep_objects, $1) \
+ _LT_AC_TAGVAR(postdep_objects, $1) \
+ _LT_AC_TAGVAR(predeps, $1) \
+ _LT_AC_TAGVAR(postdeps, $1) \
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
+ _LT_AC_TAGVAR(archive_cmds, $1) \
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
+ _LT_AC_TAGVAR(postinstall_cmds, $1) \
+ _LT_AC_TAGVAR(postuninstall_cmds, $1) \
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
+ _LT_AC_TAGVAR(allow_undefined_flag, $1) \
+ _LT_AC_TAGVAR(no_undefined_flag, $1) \
+ _LT_AC_TAGVAR(export_symbols_cmds, $1) \
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
+ _LT_AC_TAGVAR(hardcode_automatic, $1) \
+ _LT_AC_TAGVAR(module_cmds, $1) \
+ _LT_AC_TAGVAR(module_expsym_cmds, $1) \
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
+ _LT_AC_TAGVAR(exclude_expsyms, $1) \
+ _LT_AC_TAGVAR(include_expsyms, $1); do
case $var in
- reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | \
- export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
- extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
+ _LT_AC_TAGVAR(old_archive_cmds, $1) | \
+ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
+ _LT_AC_TAGVAR(archive_cmds, $1) | \
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
+ _LT_AC_TAGVAR(module_cmds, $1) | \
+ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
+ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
+ extract_expsyms_cmds | reload_cmds | finish_cmds | \
postinstall_cmds | postuninstall_cmds | \
- finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
# Double-quote double-evaled strings.
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
;;
@@ -2474,14 +3895,31 @@ if test -f "$ltmain"; then
esac
done
- cat <<__EOF__ > "${ofile}T"
-#! $SHELL
+ case $lt_echo in
+ *'\[$]0 --fallback-echo"')
+ lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
+ ;;
+ esac
+
+ifelse([$1], [],
+ [cfgfile="${ofile}T"
+ trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+ $rm -f "$cfgfile"
+ AC_MSG_NOTICE([creating $ofile])],
+ [cfgfile="$ofile"])
+
+ cat <<__EOF__ >> "$cfgfile"
+ifelse([$1], [],
+[#! $SHELL
-# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
#
-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# This program is free software; you can redistribute it and/or modify
@@ -2503,17 +3941,21 @@ if test -f "$ltmain"; then
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# A sed that does not truncate output.
+# 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 s/^X//"
+Xsed="$SED -e s/^X//"
# The HP-UX ksh and POSIX shell print the target directory to stdout
# if CDPATH is set.
if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-# ### BEGIN LIBTOOL CONFIG
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG],
+[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
@@ -2527,7 +3969,10 @@ build_libtool_libs=$enable_shared
build_old_libs=$enable_static
# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$need_lc
+build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install
@@ -2543,14 +3988,20 @@ echo=$lt_echo
AR=$lt_AR
AR_FLAGS=$lt_AR_FLAGS
-# The default C compiler.
-CC=$lt_CC
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
# Is the compiler the GNU C compiler?
-with_gcc=$GCC
+with_gcc=$_LT_AC_TAGVAR(GCC, $1)
+
+# An ERE matcher.
+EGREP=$lt_EGREP
# The linker used to build libraries.
-LD=$lt_LD
+LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
# Whether we need hard or soft links.
LN_S=$lt_LN_S
@@ -2559,7 +4010,7 @@ LN_S=$lt_LN_S
NM=$lt_NM
# A symbol stripping program
-STRIP=$STRIP
+STRIP=$lt_STRIP
# Used to examine libraries when file_magic_cmd begins "file"
MAGIC_CMD=$MAGIC_CMD
@@ -2581,7 +4032,7 @@ reload_flag=$lt_reload_flag
reload_cmds=$lt_reload_cmds
# How to pass a linker flag through the compiler.
-wl=$lt_wl
+wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
# Object file suffix (normally "o").
objext="$ac_objext"
@@ -2589,18 +4040,21 @@ objext="$ac_objext"
# Old archive suffix (normally "a").
libext="$libext"
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
# Executable file suffix (normally "").
exeext="$exeext"
# Additional compiler flags for building library objects.
-pic_flag=$lt_pic_flag
+pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
pic_mode=$pic_mode
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_compiler_c_o
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
-# Can we write directly to a .lo ?
-compiler_o_lo=$lt_compiler_o_lo
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
# Must we lock files when doing compilation ?
need_locks=$lt_need_locks
@@ -2621,19 +4075,19 @@ dlopen_self=$enable_dlopen_self
dlopen_self_static=$enable_dlopen_self_static
# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_link_static_flag
+link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_no_builtin_flag
+no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
+whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec
+thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
# Library versioning type.
version_type=$version_type
@@ -2650,26 +4104,50 @@ soname_spec=$lt_soname_spec
# Commands used to build and install an old-style archive.
RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds
+old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
old_postinstall_cmds=$lt_old_postinstall_cmds
old_postuninstall_cmds=$lt_old_postuninstall_cmds
# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
+archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
+archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
postinstall_cmds=$lt_postinstall_cmds
postuninstall_cmds=$lt_postuninstall_cmds
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
+module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
+
# Commands to strip libraries.
old_striplib=$lt_old_striplib
striplib=$lt_striplib
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
+
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -2677,10 +4155,10 @@ deplibs_check_method=$lt_deplibs_check_method
file_magic_cmd=$lt_file_magic_cmd
# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
+allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
+no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
# Commands used to finish a libtool library installation in a directory.
finish_cmds=$lt_finish_cmds
@@ -2689,13 +4167,13 @@ finish_cmds=$lt_finish_cmds
finish_eval=$lt_finish_eval
# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_global_symbol_pipe
+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_global_symbol_to_cdecl
+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_global_symbol_to_c_name_address
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# This is the shared library runtime path variable.
runpath_var=$runpath_var
@@ -2707,36 +4185,45 @@ shlibpath_var=$shlibpath_var
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
+hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
# Whether we should hardcode library paths into libraries.
hardcode_into_libs=$hardcode_into_libs
# 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
+hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
+hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
# resulting binary.
-hardcode_direct=$hardcode_direct
+hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
-hardcode_minus_L=$hardcode_minus_L
+hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
+hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
+
+# 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=$_LT_AC_TAGVAR(hardcode_automatic, $1)
# Variables whose values should be saved in libtool wrapper scripts and
# restored at relink time.
variables_saved_for_relink="$variables_saved_for_relink"
# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
+link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
# Compile-time system search path for libraries
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
@@ -2745,30 +4232,33 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path"
+fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols
+always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
+export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
# The commands to extract the exported symbol list from a shared archive.
extract_expsyms_cmds=$lt_extract_expsyms_cmds
# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
+exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
+include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
-# ### END LIBTOOL CONFIG
+ifelse([$1],[],
+[# ### END LIBTOOL CONFIG],
+[# ### END LIBTOOL TAG CONFIG: $tagname])
__EOF__
+ifelse([$1],[], [
case $host_os in
aix3*)
- cat <<\EOF >> "${ofile}T"
+ cat <<\EOF >> "$cfgfile"
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
@@ -2781,786 +4271,1570 @@ EOF
;;
esac
- case $host_os in
- cygwin* | mingw* | pw32* | os2*)
- cat <<'EOF' >> "${ofile}T"
- # This is a source program that is used to create dlls on Windows
- # Don't remove nor modify the starting and closing comments
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# # ifdef __CYGWIN32__
-# # define __CYGWIN__ __CYGWIN32__
-# # endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-# __hDllInstance_base = hInst;
-# return TRUE;
-# }
-# /* ltdll.c ends here */
- # This is a source program that is used to create import libraries
- # on Windows for dlls which lack them. Don't remove nor modify the
- # starting and closing comments
-# /* impgen.c starts here */
-# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
-#
-# This file is part of GNU libtool.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# */
-#
-# #include <stdio.h> /* for printf() */
-# #include <unistd.h> /* for open(), lseek(), read() */
-# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
-# #include <string.h> /* for strdup() */
-#
-# /* O_BINARY isn't required (or even defined sometimes) under Unix */
-# #ifndef O_BINARY
-# #define O_BINARY 0
-# #endif
-#
-# static unsigned int
-# pe_get16 (fd, offset)
-# int fd;
-# int offset;
-# {
-# unsigned char b[2];
-# lseek (fd, offset, SEEK_SET);
-# read (fd, b, 2);
-# return b[0] + (b[1]<<8);
-# }
-#
-# static unsigned int
-# pe_get32 (fd, offset)
-# int fd;
-# int offset;
-# {
-# unsigned char b[4];
-# lseek (fd, offset, SEEK_SET);
-# read (fd, b, 4);
-# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# static unsigned int
-# pe_as32 (ptr)
-# void *ptr;
-# {
-# unsigned char *b = ptr;
-# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# int
-# main (argc, argv)
-# int argc;
-# char *argv[];
-# {
-# int dll;
-# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
-# unsigned long export_rva, export_size, nsections, secptr, expptr;
-# unsigned long name_rvas, nexp;
-# unsigned char *expdata, *erva;
-# char *filename, *dll_name;
-#
-# filename = argv[1];
-#
-# dll = open(filename, O_RDONLY|O_BINARY);
-# if (dll < 1)
-# return 1;
-#
-# dll_name = filename;
-#
-# for (i=0; filename[i]; i++)
-# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
-# dll_name = filename + i +1;
-#
-# pe_header_offset = pe_get32 (dll, 0x3c);
-# opthdr_ofs = pe_header_offset + 4 + 20;
-# num_entries = pe_get32 (dll, opthdr_ofs + 92);
-#
-# if (num_entries < 1) /* no exports */
-# return 1;
-#
-# export_rva = pe_get32 (dll, opthdr_ofs + 96);
-# export_size = pe_get32 (dll, opthdr_ofs + 100);
-# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
-# secptr = (pe_header_offset + 4 + 20 +
-# pe_get16 (dll, pe_header_offset + 4 + 16));
-#
-# expptr = 0;
-# for (i = 0; i < nsections; i++)
-# {
-# char sname[8];
-# unsigned long secptr1 = secptr + 40 * i;
-# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
-# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-# lseek(dll, secptr1, SEEK_SET);
-# read(dll, sname, 8);
-# if (vaddr <= export_rva && vaddr+vsize > export_rva)
-# {
-# expptr = fptr + (export_rva - vaddr);
-# if (export_rva + export_size > vaddr + vsize)
-# export_size = vsize - (export_rva - vaddr);
-# break;
-# }
-# }
-#
-# expdata = (unsigned char*)malloc(export_size);
-# lseek (dll, expptr, SEEK_SET);
-# read (dll, expdata, export_size);
-# erva = expdata - export_rva;
-#
-# nexp = pe_as32 (expdata+24);
-# name_rvas = pe_as32 (expdata+32);
-#
-# printf ("EXPORTS\n");
-# for (i = 0; i<nexp; i++)
-# {
-# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
-# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
-# }
-#
-# return 0;
-# }
-# /* impgen.c ends here */
-
-EOF
- ;;
- esac
-
# 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" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
+ sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
- mv -f "${ofile}T" "$ofile" || \
- (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
+ mv -f "$cfgfile" "$ofile" || \
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
chmod +x "$ofile"
+])
+else
+ # If there is no Makefile yet, we rely on a make rule to execute
+ # `config.status --recheck' to rerun these tests and create the
+ # libtool script then.
+ ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+ if test -f "$ltmain_in"; then
+ test -f Makefile && make "$ltmain"
+ fi
fi
+])# AC_LIBTOOL_CONFIG
-])# _LT_AC_LTCONFIG_HACK
-# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
+# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
-# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
-AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
+_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-# AC_ENABLE_SHARED - implement the --enable-shared flag
-# Usage: AC_ENABLE_SHARED[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_SHARED],
-[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(shared,
-changequote(<<, >>)dnl
-<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
-changequote([, ])dnl
-[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.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
-])
+if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN([AC_DISABLE_SHARED],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_SHARED(no)])
+ AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
-# AC_ENABLE_STATIC - implement the --enable-static flag
-# Usage: AC_ENABLE_STATIC[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_STATIC],
-[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(static,
-changequote(<<, >>)dnl
-<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
-changequote([, ])dnl
-[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.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
-])
-# AC_DISABLE_STATIC - set the default static flag to --disable-static
-AC_DEFUN([AC_DISABLE_STATIC],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_STATIC(no)])
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AC_PROG_NM])
+AC_REQUIRE([AC_OBJEXT])
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# 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]]'
-# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
-# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
-# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
-# `yes'.
-AC_DEFUN([AC_ENABLE_FAST_INSTALL],
-[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
-AC_ARG_ENABLE(fast-install,
-changequote(<<, >>)dnl
-<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
-changequote([, ])dnl
-[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.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac],
-enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
-])
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN([AC_DISABLE_FAST_INSTALL],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-AC_ENABLE_FAST_INSTALL(no)])
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \2\3 \3'
-# AC_LIBTOOL_PICMODE - implement the --with-pic flag
-# Usage: AC_LIBTOOL_PICMODE[(MODE)]
-# Where MODE is either `yes' or `no'. If omitted, it defaults to
-# `both'.
-AC_DEFUN([AC_LIBTOOL_PICMODE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
-pic_mode=ifelse($#,1,$1,default)])
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \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\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
-# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
-AC_DEFUN([AC_PATH_TOOL_PREFIX],
-[AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+cygwin* | mingw* | pw32*)
+ symcode='[[ABCDGISTW]]'
;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="ifelse([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- 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 <<EOF 1>&2
+hpux*) # Its linker distinguishes data from code symbols
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+ lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris* | sysv5*)
+ symcode='[[BDRT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
-*** 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
+# 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
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Write the raw and C identifiers.
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+ rm -f conftest*
+ cat > conftest.$ac_ext <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
EOF
- fi ;;
- esac
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && 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
- break
+
+ # 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 <<EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
+
+ cat <<EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
+ cat <<\EOF >> conftest.$ac_ext
+ {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -f 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
+])
+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
+ AC_MSG_RESULT(failed)
else
- AC_MSG_RESULT(no)
+ AC_MSG_RESULT(ok)
fi
-])
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
-# AC_PATH_MAGIC - find a file program which can recognise a shared library
-AC_DEFUN([AC_PATH_MAGIC],
-[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
-AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+ ifelse([$1],[CXX],[
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+ amigaos*)
+ # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | os2* | pw32*)
+ # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # 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*)
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
else
- MAGIC_CMD=:
+ case $host_os in
+ aix4* | aix5*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68)
+ # Green Hills C++ Compiler
+ # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--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
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx)
+ # Green Hills C++ Compiler
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | kfreebsd*-gnu)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux*)
+ case $cc_basename in
+ KCC)
+ # KAI C++ Compiler
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ icpc)
+ # Intel C++
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ cxx)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx)
+ # Digital/Compaq C++
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ sco*)
+ case $cc_basename in
+ CC)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx)
+ # Green Hills C++ Compiler
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.x
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc)
+ # Lucid
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC)
+ # NonStop-UX NCC 3.20
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ unixware*)
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
fi
-fi
-])
+],
+[
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
-# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN([AC_PROG_LD],
-[AC_ARG_WITH(gnu-ld,
-[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
-test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- AC_MSG_CHECKING([for ld used by GCC])
- 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.
- [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the path 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"
+ amigaos*)
+ # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
;;
- "")
- # 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
- AC_MSG_CHECKING([for GNU ld])
-else
- AC_MSG_CHECKING([for non-GNU ld])
-fi
-AC_CACHE_VAL(lt_cv_path_LD,
-[if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- 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 GNU ld's only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
- test "$with_gnu_ld" != no && break
+
+ beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | pw32* | os2*)
+ # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ hpux*)
+ # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
else
- test "$with_gnu_ld" != yes && break
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
fi
- fi
- done
- IFS="$ac_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- AC_MSG_RESULT($LD)
-else
- AC_MSG_RESULT(no)
-fi
-test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
-AC_PROG_LD_GNU
-])
+ ;;
-# AC_PROG_LD_GNU -
-AC_DEFUN([AC_PROG_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- lt_cv_prog_gnu_ld=yes
-else
- lt_cv_prog_gnu_ld=no
-fi])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])
+ mingw* | pw32* | os2*)
+ # 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_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
-# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
-[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
-[lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
-])
+ hpux9* | hpux10* | hpux11*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-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_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
-# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
-[AC_CACHE_CHECK([how to recognise dependent libraries],
-lt_cv_deplibs_check_method,
-[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 egrep 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.
+ irix5* | irix6* | nonstopux*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
-case $host_os in
-aix4* | aix5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
+ newsos6)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
+ linux*)
+ case $CC in
+ icc* | ecc*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ ccc*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ esac
+ ;;
-bsdi4*)
- 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
- ;;
+ osf3* | osf4* | osf5*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
-cygwin* | mingw* | pw32*)
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
+ sco3.2v5*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
+ ;;
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.[[012]])
- lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
- ;;
+ solaris*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
-freebsd*)
- 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)/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.*`
+ sunos4*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ uts4*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
;;
esac
- else
- lt_cv_deplibs_check_method=pass_all
fi
- ;;
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+ _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
+ [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+case "$host_os" in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+])
-hpux10.20*|hpux11*)
- 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_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
-irix5* | irix6* | nonstopux*)
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ifelse([$1],[CXX],[
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
case $host_os in
- irix5* | nonstopux*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ aix4* | aix5*)
+ # 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
+ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ fi
;;
+ pw32*)
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw*)
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
- ;;
- esac
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
- lt_cv_deplibs_check_method=pass_all
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
;;
+ esac
+],[
+ runpath_var=
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_AC_TAGVAR(archive_cmds, $1)=
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+ _LT_AC_TAGVAR(module_cmds, $1)=
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_AC_TAGVAR(include_expsyms, $1)=
+ # 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'.
+ _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+ # 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.
+ extract_expsyms_cmds=
-# This must be Linux ELF.
-linux-gnu*)
- case $host_cpu in
- alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
- lt_cv_deplibs_check_method=pass_all ;;
- *)
- # glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # 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
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
esac
- lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
- ;;
-netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
- fi
- ;;
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
-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
- ;;
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ cat <<EOF 1>&2
-openbsd*)
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
- else
- lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
- fi
- ;;
+*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH
+*** so that a non-GNU linker is found, and then restart.
-osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
- lt_cv_deplibs_check_method=pass_all
- ;;
+EOF
+ fi
+ ;;
-sco3.2v5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
+ amigaos*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$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)'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can't use
+ # them.
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
-sysv5uw[[78]]* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
+ cygwin* | mingw* | pw32*)
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='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}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
-sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- 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
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ cat <<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.
+
+EOF
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sunos4*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ linux*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
+ supports_anon_versioning=no
+ case `$LD -v 2>/dev/null` in
+ *\ [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
+ if test $supports_anon_versioning = yes; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
+ fi
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
;;
- esac
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-])
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
-# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN([AC_PROG_NM],
-[AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
-AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
- test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}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
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- lt_cv_path_NM="$tmp_nm -B"
- break
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
+ if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
+ runpath_var=LD_RUN_PATH
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${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
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
else
- 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
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
fi
fi
- done
- IFS="$ac_save_ifs"
- test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
-fi])
-NM="$lt_cv_path_NM"
-AC_MSG_RESULT([$NM])
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$link_static_flag"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ 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
+ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$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]].*|aix5*)
+ 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.
+
+ _LT_AC_TAGVAR(archive_cmds, $1)=''
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ 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
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ else
+ # We have old collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=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
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ 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
+
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_AC_TAGVAR(always_export_symbols, $1)=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.
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${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.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$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)'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ # see comment about different semantics on the GNU ld section
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ bsdi4*)
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # 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.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=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.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ darwin* | rhapsody*)
+ if test "$GXX" = yes ; then
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+ lt_int_apple_cc_single_mod=yes
+ fi
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
+ fi
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ dgux*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ freebsd1*)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=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*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | kfreebsd*-gnu)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$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
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10* | hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ *)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ openbsd*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+
+ os2*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(archive_cmds, $1)='$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'
+ _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ sco3.2v5*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ;;
+
+ solaris*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+ esac
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=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.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4.2uw2*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ hardcode_runpath_var=yes
+ runpath_var=LD_RUN_PATH
+ ;;
+
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ runpath_var='LD_RUN_PATH'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv5*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$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'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+ ;;
+
+ uts4*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ fi
])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-# AC_CHECK_LIBM - check for math library
-AC_DEFUN([AC_CHECK_LIBM],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32*)
- # These system don't have libm
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, main, LIBM="-lm")
+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
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_AC_TAGVAR(archive_cmds, $1) 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.
+ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+ $rm conftest*
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
+ then
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $rm conftest*
+ AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+ ;;
+ esac
+ fi
;;
esac
-])
+])# AC_LIBTOOL_PROG_LD_SHLIBS
-# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl convenience library and LTDLINCL to the include flags for
-# the libltdl header and adds --enable-ltdl-convenience to the
-# configure arguments. Note that LIBLTDL and LTDLINCL are not
-# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
-# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
-# with '${top_builddir}/' and LTDLINCL will be prefixed with
-# '${top_srcdir}/' (note the single quotes!). If your package is not
-# flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case $enable_ltdl_convenience in
- no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
- "") enable_ltdl_convenience=yes
- ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
- esac
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- # For backwards non-gettext consistent compatibility...
- INCLTDL="$LTDLINCL"
-])
-# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
-# the libltdl installable library and LTDLINCL to the include flags for
-# the libltdl header and adds --enable-ltdl-install to the configure
-# arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
-# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
-# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
-# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
-# with '${top_srcdir}/' (note the single quotes!). If your package is
-# not flat and you're not using automake, define top_builddir and
-# top_srcdir appropriately in the Makefiles.
-# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
-AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
-[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- AC_CHECK_LIB(ltdl, main,
- [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
- [if test x"$enable_ltdl_install" = xno; then
- AC_MSG_WARN([libltdl not installed, but installation disabled])
- else
- enable_ltdl_install=yes
- fi
- ])
- if test x"$enable_ltdl_install" = x"yes"; then
- ac_configure_args="$ac_configure_args --enable-ltdl-install"
- LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
- LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
- else
- ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
- LTDLINCL=
- fi
- # For backwards non-gettext consistent compatibility...
- INCLTDL="$LTDLINCL"
-])
+# _LT_AC_FILE_LTDLL_C
+# -------------------
+# Be careful that the start marker always follows a newline.
+AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
+# /* ltdll.c starts here */
+# #define WIN32_LEAN_AND_MEAN
+# #include <windows.h>
+# #undef WIN32_LEAN_AND_MEAN
+# #include <stdio.h>
+#
+# #ifndef __CYGWIN__
+# # ifdef __CYGWIN32__
+# # define __CYGWIN__ __CYGWIN32__
+# # endif
+# #endif
+#
+# #ifdef __cplusplus
+# extern "C" {
+# #endif
+# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
+# #ifdef __cplusplus
+# }
+# #endif
+#
+# #ifdef __CYGWIN__
+# #include <cygwin/cygwin_dll.h>
+# DECLARE_CYGWIN_DLL( DllMain );
+# #endif
+# HINSTANCE __hDllInstance_base;
+#
+# BOOL APIENTRY
+# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
+# {
+# __hDllInstance_base = hInst;
+# return TRUE;
+# }
+# /* ltdll.c ends here */
+])# _LT_AC_FILE_LTDLL_C
+
+
+# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+# ---------------------------------
+AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
+
# old names
AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
@@ -3574,6 +5848,16 @@ AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
# This is just to silence aclocal about the macro not being used
ifelse([AC_DISABLE_FAST_INSTALL])
+AC_DEFUN([LT_AC_PROG_GCJ],
+[AC_CHECK_TOOL(GCJ, gcj, no)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)
+])
+
+AC_DEFUN([LT_AC_PROG_RC],
+[AC_CHECK_TOOL(RC, windres, no)
+])
+
# NOTE: This macro has been submitted for inclusion into #
# GNU Autoconf as AC_PROG_SED. When it is available in #
# a released version of Autoconf we should remove this #
@@ -3587,79 +5871,52 @@ AC_DEFUN([LT_AC_PROG_SED],
AC_CACHE_VAL(lt_cv_path_SED,
[# Loop through the user's path and test for sed and gsed.
# Then use that list of sed's as ones to test for truncation.
-as_executable_p="test -f"
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 lt_ac_prog in sed gsed; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
fi
done
done
done
-
- # Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
- tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=$TMPDIR/sed$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in $TMPDIR" >&2
- { (exit 1); exit 1; }
-}
- _max=0
- _count=0
- # Add /usr/xpg4/bin/sed as it is typically found on Solaris
- # along with /bin/sed that truncates output.
- for _sed in $_sed_list /usr/xpg4/bin/sed; do
- test ! -f ${_sed} && break
- cat /dev/null > "$tmp/sed.in"
- _count=0
- echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
- # Check for GNU sed and select it if it is found.
- if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
- lt_cv_path_SED=${_sed}
- break
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && break
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
fi
- while true; do
- cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
- mv "$tmp/sed.tmp" "$tmp/sed.in"
- cp "$tmp/sed.in" "$tmp/sed.nl"
- echo >>"$tmp/sed.nl"
- ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
- cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
- # 40000 chars as input seems more than enough
- test $_count -gt 10 && break
- _count=`expr $_count + 1`
- if test $_count -gt $_max; then
- _max=$_count
- lt_cv_path_SED=$_sed
- fi
- done
done
- rm -rf "$tmp"
+done
+SED=$lt_cv_path_SED
])
-if test "X$SED" != "X"; then
- lt_cv_path_SED=$SED
-else
- SED=$lt_cv_path_SED
-fi
AC_MSG_RESULT([$SED])
])
+m4_include([./ft-munmap.m4])
diff --git a/extras/freetype2/builds/unix/config.guess b/extras/freetype2/builds/unix/config.guess
index 78f6b92cd..51fab4770 100644
--- a/extras/freetype2/builds/unix/config.guess
+++ b/extras/freetype2/builds/unix/config.guess
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2003-01-10'
+timestamp='2004-03-12'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -106,6 +106,7 @@ trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
@@ -196,12 +197,18 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
+ amd64:OpenBSD:*:*)
+ echo x86_64-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
amiga:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
arc:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
+ cats:OpenBSD:*:*)
+ echo arm-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
hp300:OpenBSD:*:*)
echo m68k-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -220,6 +227,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
mvmeppc:OpenBSD:*:*)
echo powerpc-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
+ pegasos:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
pmax:OpenBSD:*:*)
echo mipsel-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
@@ -235,73 +245,70 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:OpenBSD:*:*)
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
exit 0 ;;
- *:MicroBSD:*:*)
- echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE}
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:MirBSD:*:*)
+ echo powerppc-unknown-mirbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
exit 0 ;;
alpha:OSF1:*:*)
- if test $UNAME_RELEASE = "V4.0"; then
+ case $UNAME_RELEASE in
+ *4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
- fi
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
- eval $set_cc_for_build
- cat <<EOF >$dummy.s
- .data
-\$Lformat:
- .byte 37,100,45,37,120,10,0 # "%d-%x\n"
-
- .text
- .globl main
- .align 4
- .ent main
-main:
- .frame \$30,16,\$26,0
- ldgp \$29,0(\$27)
- .prologue 1
- .long 0x47e03d80 # implver \$0
- lda \$2,-1
- .long 0x47e20c21 # amask \$2,\$1
- lda \$16,\$Lformat
- mov \$0,\$17
- not \$1,\$18
- jsr \$26,printf
- ldgp \$29,0(\$26)
- mov 0,\$16
- jsr \$26,exit
- .end main
-EOF
- $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
- if test "$?" = 0 ; then
- case `$dummy` in
- 0-0)
- UNAME_MACHINE="alpha"
- ;;
- 1-0)
- UNAME_MACHINE="alphaev5"
- ;;
- 1-1)
- UNAME_MACHINE="alphaev56"
- ;;
- 1-101)
- UNAME_MACHINE="alphapca56"
- ;;
- 2-303)
- UNAME_MACHINE="alphaev6"
- ;;
- 2-307)
- UNAME_MACHINE="alphaev67"
- ;;
- 2-1307)
- UNAME_MACHINE="alphaev68"
- ;;
- 3-1307)
- UNAME_MACHINE="alphaev7"
- ;;
- esac
- fi
- echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha*:OpenVMS:*:*)
+ echo alpha-hp-vms
exit 0 ;;
Alpha\ *:Windows_NT*:*)
# How do we know it's Interix rather than the generic POSIX subsystem?
@@ -324,6 +331,9 @@ EOF
*:OS/390:*:*)
echo i370-ibm-openedition
exit 0 ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit 0 ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit 0;;
@@ -341,6 +351,9 @@ EOF
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit 0 ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit 0 ;;
DRS?6000:UNIX_SV:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7 && exit 0 ;;
@@ -413,6 +426,9 @@ EOF
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
@@ -748,7 +764,7 @@ EOF
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
*:UNICOS/mp:*:*)
- echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
@@ -756,6 +772,11 @@ EOF
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
@@ -777,7 +798,10 @@ EOF
#endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
- echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+ # GNU/KFreeBSD systems have a "k" prefix to indicate we are using
+ # FreeBSD's kernel, but not the complete OS.
+ case ${LIBC} in gnu) kernel_only='k' ;; esac
+ echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
exit 0 ;;
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
@@ -788,8 +812,8 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
- x86:Interix*:3*)
- echo i586-pc-interix3
+ x86:Interix*:[34]*)
+ echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
exit 0 ;;
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
@@ -810,17 +834,28 @@ EOF
echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit 0 ;;
*:GNU:*:*)
+ # the GNU system
echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
exit 0 ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit 0 ;;
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
exit 0 ;;
arm*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit 0 ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
m68*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -896,6 +931,9 @@ EOF
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
exit 0 ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
sh*:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
@@ -953,6 +991,9 @@ EOF
LIBC=gnuaout
#endif
#endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
EOF
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
@@ -983,6 +1024,9 @@ EOF
i*86:atheos:*:*)
echo ${UNAME_MACHINE}-unknown-atheos
exit 0 ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit 0 ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
@@ -1054,7 +1098,7 @@ EOF
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1169,7 +1213,7 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
- NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+ NSR-?:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
@@ -1210,6 +1254,12 @@ EOF
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit 0 ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit 0 ;;
esac
#echo '(No uname command or uname output not recognized.)' 1>&2
diff --git a/extras/freetype2/builds/unix/config.sub b/extras/freetype2/builds/unix/config.sub
index 04baf3d80..ba331039b 100644
--- a/extras/freetype2/builds/unix/config.sub
+++ b/extras/freetype2/builds/unix/config.sub
@@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
-timestamp='2003-01-03'
+timestamp='2004-03-12'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -118,7 +118,8 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \
+ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -228,14 +229,15 @@ case $basic_machine in
| a29k \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
- | clipper \
+ | c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
| fr30 | frv \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| i370 | i860 | i960 | ia64 \
- | ip2k \
- | m32r | m68000 | m68k | m88k | mcore \
+ | ip2k | iq2000 \
+ | m32r | m32rle | m68000 | m68k | m88k | mcore \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -247,6 +249,7 @@ case $basic_machine in
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipstx39 | mipstx39el \
@@ -257,11 +260,11 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
- | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+ | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
- | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+ | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | sparcv9 | sparcv9b \
| strongarm \
- | tahoe | thumb | tic80 | tron \
+ | tahoe | thumb | tic4x | tic80 | tron \
| v850 | v850e \
| we32k \
| x86 | xscale | xstormy16 | xtensa \
@@ -296,7 +299,7 @@ case $basic_machine in
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* \
| bs2000-* \
- | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
| clipper-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| elxsi-* \
@@ -304,8 +307,8 @@ case $basic_machine in
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| i*86-* | i860-* | i960-* | ia64-* \
- | ip2k-* \
- | m32r-* \
+ | ip2k-* | iq2000-* \
+ | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | mcore-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
@@ -319,6 +322,7 @@ case $basic_machine in
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipstx39-* | mipstx39el-* \
@@ -329,11 +333,13 @@ case $basic_machine in
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
| romp-* | rs6000-* \
- | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
+ | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
- | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
- | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
@@ -357,6 +363,9 @@ case $basic_machine in
basic_machine=a29k-amd
os=-udi
;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
@@ -371,6 +380,12 @@ case $basic_machine in
basic_machine=a29k-none
os=-bsd
;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
amdahl)
basic_machine=580-amdahl
os=-sysv
@@ -430,12 +445,20 @@ case $basic_machine in
basic_machine=j90-cray
os=-unicos
;;
+ cr16c)
+ basic_machine=cr16c-unknown
+ os=-elf
+ ;;
crds | unos)
basic_machine=m68k-crds
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
da30 | da30-*)
basic_machine=m68k-da30
;;
@@ -735,6 +758,10 @@ case $basic_machine in
basic_machine=or32-unknown
os=-coff
;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
@@ -766,18 +793,24 @@ case $basic_machine in
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
- pentiumii | pentium2)
+ pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
- pentiumii-* | pentium2-*)
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
pn)
basic_machine=pn-gould
;;
@@ -836,6 +869,10 @@ case $basic_machine in
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
sequent)
basic_machine=i386-sequent
;;
@@ -843,6 +880,9 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
@@ -917,14 +957,18 @@ case $basic_machine in
basic_machine=t90-cray
os=-unicos
;;
- tic4x | c4x*)
- basic_machine=tic4x-unknown
- os=-coff
- ;;
tic54x | c54x*)
basic_machine=tic54x-unknown
os=-coff
;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
tx39)
basic_machine=mipstx39-unknown
;;
@@ -938,6 +982,10 @@ case $basic_machine in
tower | tower-32)
basic_machine=m68k-ncr
;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
udi29k)
basic_machine=a29k-amd
os=-udi
@@ -1027,13 +1075,13 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
+ sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
sh64)
basic_machine=sh64-unknown
;;
- sparc | sparcv9 | sparcv9b)
+ sparc | sparcv8 | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@@ -1106,19 +1154,20 @@ case $os in
| -aos* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
- | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
- | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
- | -powermax* | -dnix* | -microbsd*)
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1142,6 +1191,9 @@ case $os in
-mac*)
os=`echo $os | sed -e 's|mac|macos|'`
;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
@@ -1154,6 +1206,9 @@ case $os in
-opened*)
os=-openedition
;;
+ -os400*)
+ os=-os400
+ ;;
-wince*)
os=-wince
;;
@@ -1175,6 +1230,9 @@ case $os in
-atheos*)
os=-atheos
;;
+ -syllable*)
+ os=-syllable
+ ;;
-386bsd)
os=-bsd
;;
@@ -1197,6 +1255,9 @@ case $os in
-sinix*)
os=-sysv4
;;
+ -tpf*)
+ os=-tpf
+ ;;
-triton*)
os=-sysv3
;;
@@ -1227,6 +1288,12 @@ case $os in
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
-none)
;;
*)
@@ -1258,6 +1325,9 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
@@ -1436,9 +1506,15 @@ case $basic_machine in
-mvs* | -opened*)
vendor=ibm
;;
+ -os400*)
+ vendor=ibm
+ ;;
-ptx*)
vendor=sequent
;;
+ -tpf*)
+ vendor=ibm
+ ;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
diff --git a/extras/freetype2/builds/unix/configure b/extras/freetype2/builds/unix/configure
index 92c16963e..35bd6d20d 100755
--- a/extras/freetype2/builds/unix/configure
+++ b/extras/freetype2/builds/unix/configure
@@ -1,9 +1,9 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.54.
+# Generated by GNU Autoconf 2.59a.
#
-# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004 Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
## --------------------- ##
@@ -20,15 +20,62 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+
+# PATH needs CR
+# 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
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
# Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
fi
+# Find who we are. Look in the path if we contain no path at all
+# relative or not.
+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
+
+ ;;
+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
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+fi
+
# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
@@ -36,9 +83,12 @@ PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
do
- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
@@ -72,101 +122,277 @@ echo X/"$0" |
s/.*/./; q'`
-# PATH needs CR, and LINENO needs CR and PATH.
-# 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
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conftest.sh
- echo "exit 0" >>conftest.sh
- chmod +x conftest.sh
- if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conftest.sh
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
fi
+ if test $as_have_required = yes && (eval ":
+(func_return () {
+ (exit \$1)
+}
+func_success () {
+ func_return 0
+}
+func_failure () {
+ func_return 1
+}
+func_ret_success () {
+ return 0
+}
+func_ret_failure () {
+ return 1
+}
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- 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
+exitcode=0
+if func_success; then
+ :
+else
+ exitcode=1
+ echo func_failure succeeded.
+fi
- ;;
- 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
- { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
+if func_failure; then
+ exitcode=1
+ echo func_success failed.
+fi
+
+if func_ret_success; then
+ :
+else
+ exitcode=1
+ echo func_ret_success failed.
+fi
+
+if func_ret_failure; then
+ exitcode=1
+ echo func_ret_failure succeeded.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ as_lineno_3=\`(expr \$as_lineno_1 + 1) 2>/dev/null\`
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\$as_lineno_3\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells="$SHELL"
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
+ case $as_dir in
/*)
- if ("$as_dir/$as_base" -c '
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done
+ esac
+done
+
+
+ for as_shell in $as_candidate_shells; do
+ if { $as_shell 2> /dev/null <<\_ASEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { $as_shell 2> /dev/null <<\_ASEOF
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+:
+(func_return () {
+ (exit $1)
+}
+func_success () {
+ func_return 0
+}
+func_failure () {
+ func_return 1
+}
+func_ret_success () {
+ return 0
+}
+func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if func_success; then
+ :
+else
+ exitcode=1
+ echo func_failure succeeded.
+fi
+
+if func_failure; then
+ exitcode=1
+ echo func_success failed.
+fi
+
+if func_ret_success; then
+ :
+else
+ exitcode=1
+ echo func_ret_success failed.
+fi
+
+if func_ret_failure; then
+ exitcode=1
+ echo func_ret_failure succeeded.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
+ test "x$as_lineno_3" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+ $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "func_return () {
+ (exit \$1)
+}
+func_success () {
+ func_return 0
+}
+func_failure () {
+ func_return 1
+}
+func_ret_success () {
+ return 0
+}
+func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if func_success; then
+ :
+else
+ exitcode=1
+ echo func_failure succeeded.
+fi
+
+if func_failure; then
+ exitcode=1
+ echo func_success failed.
+fi
+
+if func_ret_success; then
+ :
+else
+ exitcode=1
+ echo func_ret_success failed.
+fi
+
+if func_ret_failure; then
+ exitcode=1
+ echo func_ret_failure succeeded.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell autoconf@gnu.org about your system,
+ echo including any error possibly output before this
+ echo message
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
sed '
+ s,[$]LINENO.*,&-,
+ t lineno
+ b
+ : lineno
N
- s,$,-,
: loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ s,[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\),\2\1\2,
t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
+ s,-\n.*,,
' >$as_me.lineno &&
chmod +x $as_me.lineno ||
{ echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
@@ -215,16 +441,17 @@ rm -f conf$$ conf$$.exe conf$$.file
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
+ test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
@@ -237,17 +464,6 @@ IFS=" $as_nl"
$as_unset CDPATH
-# Find the correct PATH separator. Usually this is `:', but
-# DJGPP uses `;' like DOS.
-if test "X${PATH_SEPARATOR+set}" != Xset; then
- UNAME=${UNAME-`uname 2>/dev/null`}
- case X$UNAME in
- *-DOS) lt_cv_sys_path_separator=';' ;;
- *) lt_cv_sys_path_separator=':' ;;
- esac
- PATH_SEPARATOR=$lt_cv_sys_path_separator
-fi
-
# Check that we are running under the correct shell.
SHELL=${CONFIG_SHELL-/bin/sh}
@@ -266,7 +482,7 @@ if test "X$1" = X--no-reexec; then
elif test "X$1" = X--fallback-echo; then
# Avoid inline document here, it may be left over
:
-elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
# Yippee, $echo works!
:
else
@@ -278,7 +494,7 @@ if test "X$1" = X--fallback-echo; then
# used as fallback echo
shift
cat <<EOF
-
+$*
EOF
exit 0
fi
@@ -312,8 +528,9 @@ else
#
# So, first we look for a working echo in the user's PATH.
- IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
@@ -322,7 +539,7 @@ else
break
fi
done
- IFS="$save_ifs"
+ IFS="$lt_save_ifs"
if test "X$echo" = Xecho; then
# We didn't find a better echo, so look for alternatives.
@@ -396,6 +613,11 @@ fi
+
+tagnames=${tagnames+${tagnames},}CXX
+
+tagnames=${tagnames+${tagnames},}F77
+
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
# so uname gets run too.
@@ -455,16 +677,15 @@ ac_includes_default="\
#endif
#if HAVE_INTTYPES_H
# include <inttypes.h>
-#else
-# if HAVE_STDINT_H
-# include <stdint.h>
-# endif
+#endif
+#if HAVE_STDINT_H
+# include <stdint.h>
#endif
#if HAVE_UNISTD_H
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS version_info ft_version build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP XX_CFLAGS XX_ANSIFLAGS RMF RMDIR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA EGREP FTSYS_SRC LIBZ SYSTEM_ZLIB LN_S ECHO RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP LIBTOOL LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS version_info ft_version build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP XX_CFLAGS XX_ANSIFLAGS RMF RMDIR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA GREP EGREP FTSYS_SRC LIBZ SYSTEM_ZLIB LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL enable_shared hardcode_libdir_flag_spec wl LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -823,7 +1044,7 @@ done
# Be sure to have absolute paths.
for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
- localstatedir libdir includedir oldincludedir infodir mandir
+ localstatedir libdir includedir oldincludedir infodir mandir
do
eval ac_val=$`echo $ac_var`
case $ac_val in
@@ -863,10 +1084,10 @@ if test -z "$srcdir"; then
# Try the directory containing this script, then its parent.
ac_confdir=`(dirname "$0") 2>/dev/null ||
$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$0" : 'X\(//\)[^/]' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$0" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -925,6 +1146,26 @@ ac_env_CPP_set=${CPP+set}
ac_env_CPP_value=$CPP
ac_cv_env_CPP_set=${CPP+set}
ac_cv_env_CPP_value=$CPP
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+ac_env_CXXCPP_set=${CXXCPP+set}
+ac_env_CXXCPP_value=$CXXCPP
+ac_cv_env_CXXCPP_set=${CXXCPP+set}
+ac_cv_env_CXXCPP_value=$CXXCPP
+ac_env_F77_set=${F77+set}
+ac_env_F77_value=$F77
+ac_cv_env_F77_set=${F77+set}
+ac_cv_env_F77_value=$F77
+ac_env_FFLAGS_set=${FFLAGS+set}
+ac_env_FFLAGS_value=$FFLAGS
+ac_cv_env_FFLAGS_set=${FFLAGS+set}
+ac_cv_env_FFLAGS_value=$FFLAGS
#
# Report the --help message.
@@ -958,9 +1199,9 @@ _ACEOF
cat <<_ACEOF
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
+ [$ac_default_prefix]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [PREFIX]
+ [PREFIX]
By default, \`make install' will install all the files in
\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -1000,17 +1241,24 @@ if test -n "$ac_init_help"; then
Optional Features:
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --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
+ --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)
- --without-zlib use internal zlib instead of system-wide
- --with-gnu-ld assume the C compiler uses GNU ld default=no
- --with-pic try to use only PIC/non-PIC objects default=use both
+ --without-zlib use internal zlib instead of system-wide
+ --with-old-mac-fonts allow Mac resource-based fonts to be used
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-tags[=TAGS]
+ include additional configurations [automatic]
Some influential environment variables:
CC C compiler command
@@ -1020,6 +1268,11 @@ Some influential environment variables:
CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
headers in a nonstandard directory <include dir>
CPP C preprocessor
+ CXX C++ compiler command
+ CXXFLAGS C++ compiler flags
+ CXXCPP C++ preprocessor
+ F77 Fortran 77 compiler command
+ FFLAGS Fortran 77 compiler flags
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -1057,12 +1310,45 @@ case $srcdir in
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
cd $ac_dir
# Check for guested configure; otherwise get Cygnus style configure.
@@ -1073,7 +1359,7 @@ ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
echo
$SHELL $ac_srcdir/configure --help=recursive
elif test -f $ac_srcdir/configure.ac ||
- test -f $ac_srcdir/configure.in; then
+ test -f $ac_srcdir/configure.in; then
echo
$ac_configure --help
else
@@ -1087,8 +1373,8 @@ test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
-Free Software Foundation, Inc.
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002,
+2003, 2004 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.
_ACEOF
@@ -1100,7 +1386,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.54. Invocation command line was
+generated by GNU Autoconf 2.59a. Invocation command line was
$ $0 $@
@@ -1152,24 +1438,54 @@ _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_sep=
-for ac_arg
+ac_must_keep_next=false
+for ac_pass in 1 2
do
- case $ac_arg in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c | -n ) continue ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
- continue ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
- ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
- esac
- ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
- # Get rid of the leading space.
- ac_sep=" "
+ 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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$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
+ ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ # Get rid of the leading space.
+ ac_sep=" "
+ ;;
+ esac
+ done
done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
# When interrupted or exit'd, cleanup temporary files, and complete
# config.log. We remove comments because anyway the quotes in there
@@ -1193,12 +1509,12 @@ _ASBOX
case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
*ac_space=\ *)
sed -n \
- "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
- s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
;;
*)
sed -n \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
}
@@ -1227,7 +1543,7 @@ _ASBOX
for ac_var in $ac_subst_files
do
eval ac_val=$`echo $ac_var`
- echo "$ac_var='"'"'$ac_val'"'"'"
+ echo "$ac_var='"'"'$ac_val'"'"'"
done | sort
echo
fi
@@ -1246,8 +1562,8 @@ _ASBOX
echo "$as_me: caught signal $ac_signal"
echo "$as_me: exit $exit_status"
} >&5
- rm -f core core.* *.core &&
- rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ rm -f core *.core &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
exit $exit_status
' 0
for ac_signal in 1 2 13 15; do
@@ -1256,9 +1572,11 @@ done
ac_signal=0
# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
+rm -f -r conftest* confdefs.h
# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo >confdefs.h
+# NextStep 3.3 (patch 3) loses unless the first echo outputs at least 14 bytes.
+ac_space=' '
+echo "$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space$ac_space" >confdefs.h
# Predefined preprocessor variables.
@@ -1326,7 +1644,7 @@ fi
# value.
ac_cache_corrupted=false
for ac_var in `(set) 2>&1 |
- sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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"
@@ -1343,13 +1661,13 @@ echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
,);;
*)
if test "x$ac_old_val" != "x$ac_new_val"; then
- { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
- { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
echo "$as_me: former value: $ac_old_val" >&2;}
- { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
echo "$as_me: current value: $ac_new_val" >&2;}
- ac_cache_corrupted=:
+ ac_cache_corrupted=:
fi;;
esac
# Pass precious variables to config.status.
@@ -1399,14 +1717,17 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
- ac_config_headers="$ac_config_headers ftconfig.h:ftconfig.in"
+# Don't forget to update docs/VERSION.DLL!
-version_info='9:3:3'
+version_info='9:6:3'
ft_version=`echo $version_info | tr : .`
+
+# checks for system type
+
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
if test -f $ac_dir/install-sh; then
@@ -1515,6 +1836,9 @@ test -n "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
+
+# checks for programs
+
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -1594,7 +1918,19 @@ else
echo "${ECHO_T}no" >&6
fi
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ if test "$build" != "$host"; then
+ { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ fi
+ CC=$ac_ct_CC
+ fi
else
CC="$ac_cv_prog_CC"
fi
@@ -1674,7 +2010,19 @@ else
echo "${ECHO_T}no" >&6
fi
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ if test "$build" != "$host"; then
+ { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ fi
+ CC=$ac_ct_CC
+ fi
else
CC="$ac_cv_prog_CC"
fi
@@ -1818,14 +2166,28 @@ fi
test -n "$ac_ct_CC" && break
done
- CC=$ac_ct_CC
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ if test "$build" != "$host"; then
+ { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ fi
+ CC=$ac_ct_CC
+ fi
fi
fi
-test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
-echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
# Provide some information about the compiler.
@@ -1849,8 +2211,11 @@ ac_compiler=`set X $ac_compile; echo $2`
(exit $ac_status); }
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -1861,12 +2226,12 @@ main ()
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.exe"
+ac_clean_files="$ac_clean_files a.out 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.
-echo "$as_me:$LINENO: checking for C compiler default output" >&5
-echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
(eval $ac_link_default) 2>&5
@@ -1880,27 +2245,39 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
# Be careful to initialize this variable, since it used to be cached.
# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
ac_cv_exeext=
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.*; do
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
test -f "$ac_file" || continue
case $ac_file in
- *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
- a.out ) # We found the default executable, but exeext='' is most
- # certainly right.
- break;;
- *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
- export ac_cv_exeext
- break;;
- * ) break;;
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
+ ;;
+ conftest.$ac_ext )
+ # This is the source file.
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool,
+ # but it would be cool to find out if it's true. Does anybody
+ # maintain Libtool? --akim.
+ export ac_cv_exeext
+ break;;
+ * )
+ break;;
esac
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
-check \`config.log' for details." >&5
+See \`config.log' for more details." >&5
echo "$as_me: error: C compiler cannot create executables
-check \`config.log' for details." >&2;}
+See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }
fi
@@ -1927,9 +2304,11 @@ if test "$cross_compiling" != yes; then
cross_compiling=yes
else
{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'." >&5
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
echo "$as_me: error: cannot run C compiled programs.
-If you meant to cross compile, use \`--host'." >&2;}
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
fi
@@ -1937,7 +2316,7 @@ fi
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}yes" >&6
-rm -f a.out a.exe conftest$ac_cv_exeext
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
# Check the compiler produces executables we can run. If not, either
# the compiler is broken, or we cross compile.
@@ -1962,14 +2341,16 @@ for ac_file in conftest.exe conftest conftest.*; do
case $ac_file in
*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
*.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
- export ac_cv_exeext
- break;;
+ export ac_cv_exeext
+ break;;
* ) break;;
esac
done
else
- { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
-echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -1986,8 +2367,11 @@ if test "${ac_cv_objext+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -2012,9 +2396,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
-echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2030,8 +2417,11 @@ if test "${ac_cv_c_compiler_gnu+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -2046,11 +2436,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2059,10 +2459,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_compiler_gnu=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_compiler_gnu=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_cv_c_compiler_gnu=$ac_compiler_gnu
fi
@@ -2078,8 +2479,11 @@ if test "${ac_cv_prog_cc_g+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -2091,11 +2495,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2104,10 +2518,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_prog_cc_g=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_prog_cc_g=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
@@ -2134,8 +2549,11 @@ else
ac_cv_prog_cc_stdc=no
ac_save_CC=$CC
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdarg.h>
#include <stdio.h>
#include <sys/types.h>
@@ -2158,6 +2576,16 @@ static char *f (char * (*g) (char **, int), char **p, ...)
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];
+
int test (int i, double x);
struct s1 {int (*f) (int a);};
struct s2 {int (*f) (double a);};
@@ -2175,20 +2603,30 @@ _ACEOF
# Don't try gcc -ansi; that turns off useful extensions and
# breaks some systems' header files.
# AIX -qlanglvl=ansi
-# Ultrix and OSF/1 -std1
+# Ultrix, OSF/1, Tru64 -std
# HP-UX 10.20 and later -Ae
# HP-UX older versions -Aa -D_HPUX_SOURCE
# SVR4 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+for ac_arg in "" -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
do
CC="$ac_save_CC $ac_arg"
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2198,9 +2636,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.$ac_objext
+rm -f conftest.err conftest.$ac_objext
done
rm -f conftest.$ac_ext conftest.$ac_objext
CC=$ac_save_CC
@@ -2228,19 +2667,28 @@ cat >conftest.$ac_ext <<_ACEOF
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
for ac_declaration in \
- ''\
- '#include <stdlib.h>' \
+ '' \
'extern "C" void std::exit (int) throw (); using std::exit;' \
'extern "C" void std::exit (int); using std::exit;' \
'extern "C" void exit (int) throw ();' \
@@ -2248,10 +2696,13 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
'void exit (int);'
do
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <stdlib.h>
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_declaration
+#include <stdlib.h>
int
main ()
{
@@ -2262,11 +2713,21 @@ exit (42);
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2275,13 +2736,17 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
:
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
continue
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_declaration
int
main ()
@@ -2293,11 +2758,21 @@ exit (42);
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2306,9 +2781,10 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
rm -f conftest*
if test -n "$ac_declaration"; then
@@ -2319,9 +2795,10 @@ fi
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -2351,13 +2828,22 @@ 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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> 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 >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <assert.h>
- Syntax error
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -2369,6 +2855,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2379,7 +2866,8 @@ if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Broken: fails on valid input.
continue
fi
@@ -2388,8 +2876,11 @@ rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -2402,6 +2893,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2413,7 +2905,8 @@ if test -z "$ac_cpp_err"; then
continue
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Passes both tests.
ac_preproc_ok=:
break
@@ -2442,13 +2935,22 @@ 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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> 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 >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <assert.h>
- Syntax error
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -2460,6 +2962,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2470,7 +2973,8 @@ if test -z "$ac_cpp_err"; then
:
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Broken: fails on valid input.
continue
fi
@@ -2479,8 +2983,11 @@ rm -f conftest.err conftest.$ac_ext
# OK, works on sane cases. Now check whether non-existent headers
# can be detected and how.
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ac_nonexistent.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -2493,6 +3000,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2504,7 +3012,8 @@ if test -z "$ac_cpp_err"; then
continue
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
# Passes both tests.
ac_preproc_ok=:
break
@@ -2517,8 +3026,10 @@ rm -f conftest.err conftest.$ac_ext
if $ac_preproc_ok; then
:
else
- { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check" >&5
-echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
+ { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
@@ -2529,25 +3040,31 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+# get compiler flags right
+
if test "x$CC" = xgcc; then
XX_CFLAGS="-Wall"
XX_ANSIFLAGS="-pedantic -ansi"
else
case "$host" in
- *-dec-osf*)
- CFLAGS=
- XX_CFLAGS="-std1 -g3"
- XX_ANSIFLAGS=
- ;;
- *)
- XX_CFLAGS=
- XX_ANSIFLAGS=
- ;;
+ *-dec-osf*)
+ CFLAGS=
+ XX_CFLAGS="-std1 -g3"
+ XX_ANSIFLAGS=
+ ;;
+ *)
+ XX_CFLAGS=
+ XX_ANSIFLAGS=
+ ;;
esac
fi
+
+# auxiliary programs
+
# Extract the first word of "rm", so it can be a program name with args.
set dummy rm; ac_word=$2
echo "$as_me:$LINENO: checking for $ac_word" >&5
@@ -2619,6 +3136,11 @@ echo "${ECHO_T}no" >&6
fi
+
+# Since this file will be finally moved to another directory we make
+# the path of the install script absolute. This small code snippet has
+# been taken from automake's `ylwrap' script.
+
# 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:
@@ -2630,6 +3152,7 @@ fi
# 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.
echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
@@ -2646,6 +3169,7 @@ do
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.
@@ -2653,20 +3177,20 @@ case $as_dir/ in
# by default.
for ac_prog in ginstall scoinst install; do
for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_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
- ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
- break 3
- fi
- fi
+ if $as_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
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
done
done
;;
@@ -2697,27 +3221,213 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
case "$INSTALL" in
- /*)
- ;;
- */*)
- INSTALL="`pwd`/$INSTALL" ;;
+/*)
+ ;;
+*/*)
+ INSTALL="`pwd`/$INSTALL" ;;
esac
+# checks for header files
+
+
+
+echo "$as_me:$LINENO: checking for grep that handles long lines" >&5
+echo $ECHO_N "checking for grep that handles long lines... $ECHO_C" >&6
+if test "${oc_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Extract the first word of "grep ggrep" to use in msg output
+if test -z "$GREP"; then
+set dummy grep ggrep; ac_prog_name=$2
+if test "${ac_cv_path_GREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/GREPXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=$TMPDIR/GREP$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ { (exit 1); exit 1; }
+}
+# 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 grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ test -f "$ac_path_GREP" || continue
+ if $as_executable_p "$ac_path_GREP"; then
+ # Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+if "$ac_path_GREP" --version 2>&1 < /dev/null | grep 'GNU' >/dev/null; then
+ ac_cv_path_GREP="$ac_path_GREP"
+ break 2
+
+fi
+
+
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"$tmp/conftest.in"
+ while :
+ do
+ cat "$tmp/conftest.in" "$tmp/conftest.in" >"$tmp/conftest.tmp"
+ mv "$tmp/conftest.tmp" "$tmp/conftest.in"
+ cp "$tmp/conftest.in" "$tmp/conftest.nl"
+ echo 'GREP' >> "$tmp/conftest.nl"
+ "$ac_path_GREP" 'GREP$' < "$tmp/conftest.nl" >"$tmp/conftest.out" || break
+ diff "$tmp/conftest.out" "$tmp/conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+fi
+
+ done
+done
+done
+
+rm -rf "$tmp"
+
+fi
+
+GREP="$ac_cv_path_GREP"
+if test -z "$GREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in \$PATH" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+
+
+fi
+echo "$as_me:$LINENO: result: $oc_cv_path_GREP" >&5
+echo "${ECHO_T}$oc_cv_path_GREP" >&6
+ GREP="$ac_cv_path_GREP"
+
echo "$as_me:$LINENO: checking for egrep" >&5
echo $ECHO_N "checking for egrep... $ECHO_C" >&6
-if test "${ac_cv_prog_egrep+set}" = set; then
+if test "${ac_cv_path_EGREP+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- if echo a | (grep -E '(a|b)') >/dev/null 2>&1
- then ac_cv_prog_egrep='grep -E'
- else ac_cv_prog_egrep='egrep'
+ if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ # Extract the first word of "egrep" to use in msg output
+if test -z "$EGREP"; then
+set dummy egrep; ac_prog_name=$2
+if test "${ac_cv_path_EGREP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/EGREPXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=$TMPDIR/EGREP$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ { (exit 1); exit 1; }
+}
+# 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 egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ test -f "$ac_path_EGREP" || continue
+ if $as_executable_p "$ac_path_EGREP"; then
+ # Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+if "$ac_path_EGREP" --version 2>&1 < /dev/null | grep 'GNU' >/dev/null; then
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ break 2
+
+fi
+
+
+ ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >"$tmp/conftest.in"
+ while :
+ do
+ cat "$tmp/conftest.in" "$tmp/conftest.in" >"$tmp/conftest.tmp"
+ mv "$tmp/conftest.tmp" "$tmp/conftest.in"
+ cp "$tmp/conftest.in" "$tmp/conftest.nl"
+ echo 'EGREP' >> "$tmp/conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "$tmp/conftest.nl" >"$tmp/conftest.out" || break
+ diff "$tmp/conftest.out" "$tmp/conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_max=$ac_count
fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
fi
-echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
-echo "${ECHO_T}$ac_cv_prog_egrep" >&6
- EGREP=$ac_cv_prog_egrep
+
+ done
+done
+done
+
+rm -rf "$tmp"
+
+fi
+
+EGREP="$ac_cv_path_EGREP"
+if test -z "$EGREP"; then
+ { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in \$PATH" >&5
+echo "$as_me: error: no acceptable $ac_prog_name could be found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+
+
+ fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+echo "${ECHO_T}$ac_cv_path_EGREP" >&6
+ EGREP="$ac_cv_path_EGREP"
echo "$as_me:$LINENO: checking for ANSI C header files" >&5
@@ -2726,44 +3436,63 @@ if test "${ac_cv_header_stdc+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
+int
+main ()
+{
+
+ ;
+ return 0;
+}
_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- else
- ac_cpp_err=
- fi
-else
- ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_err"; then
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_header_stdc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_header_stdc=no
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
fi
-rm -f conftest.err conftest.$ac_ext
+rm -f 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 >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <string.h>
_ACEOF
@@ -2780,8 +3509,11 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <stdlib.h>
_ACEOF
@@ -2801,16 +3533,20 @@ if test $ac_cv_header_stdc = yes; then
:
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <ctype.h>
#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 ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
#endif
@@ -2821,7 +3557,7 @@ main ()
int i;
for (i = 0; i < 256; i++)
if (XOR (islower (i), ISLOWER (i))
- || toupper (i) != TOUPPER (i))
+ || toupper (i) != TOUPPER (i))
exit(2);
exit (0);
}
@@ -2841,11 +3577,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
( exit $ac_status )
ac_cv_header_stdc=no
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
fi
@@ -2870,7 +3607,7 @@ fi
for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
- inttypes.h stdint.h unistd.h
+ inttypes.h stdint.h unistd.h
do
as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_header" >&5
@@ -2879,19 +3616,32 @@ if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2900,10 +3650,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
eval "$as_ac_Header=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_Header=no"
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
@@ -2935,18 +3686,31 @@ else
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -2955,10 +3719,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
@@ -2966,8 +3731,11 @@ echo "${ECHO_T}$ac_header_compiler" >&6
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -2980,6 +3748,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -2990,7 +3759,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -2998,26 +3768,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc in
- yes:no )
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
- no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- eval "$as_ac_Header=$ac_header_preproc"
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
@@ -3033,14 +3820,20 @@ fi
done
+
+# checks for typedefs, structures, and compiler characteristics
+
echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
if test "${ac_cv_c_const+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -3098,11 +3891,21 @@ main ()
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3111,10 +3914,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_c_const=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_c_const=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
echo "${ECHO_T}$ac_cv_c_const" >&6
@@ -3132,8 +3936,11 @@ if test "${ac_cv_type_int+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
int
main ()
@@ -3148,11 +3955,21 @@ if (sizeof (int))
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3161,10 +3978,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_type_int=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_type_int=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
echo "${ECHO_T}$ac_cv_type_int" >&6
@@ -3175,20 +3993,23 @@ if test "${ac_cv_sizeof_int+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$ac_cv_type_int" = yes; then
- # The cast to unsigned long works around a bug in the HP C Compiler
+ # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
if test "$cross_compiling" = yes; then
# Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
int
main ()
{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)];
test_array [0] = 0
;
@@ -3197,11 +4018,21 @@ test_array [0] = 0
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3210,13 +4041,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_lo=0 ac_mid=0
while :; do
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
int
main ()
{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
test_array [0] = 0
;
@@ -3225,11 +4059,21 @@ test_array [0] = 0
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3238,27 +4082,32 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_hi=$ac_mid; break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo=`expr $ac_mid + 1`
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
int
main ()
{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)];
test_array [0] = 0
;
@@ -3267,11 +4116,21 @@ test_array [0] = 0
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3280,13 +4139,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_hi=-1 ac_mid=-1
while :; do
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
int
main ()
{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
test_array [0] = 0
;
@@ -3295,11 +4157,21 @@ test_array [0] = 0
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3308,35 +4180,40 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_lo=$ac_mid; break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_hi=`expr '(' $ac_mid ')' - 1`
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo= ac_hi=
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
int
main ()
{
-static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
test_array [0] = 0
;
@@ -3345,11 +4222,21 @@ test_array [0] = 0
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3358,29 +4245,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_hi=$ac_mid
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo=`expr '(' $ac_mid ')' + 1`
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_int=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
-echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
- if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
- { (exit 1); exit 1; }; }
-else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-long longval () { return (long) (sizeof (int)); }
-unsigned long ulongval () { return (long) (sizeof (int)); }
+long longval () { return (long int) (sizeof (int)); }
+unsigned long ulongval () { return (long int) (sizeof (int)); }
#include <stdio.h>
#include <stdlib.h>
int
@@ -3390,17 +4278,17 @@ main ()
FILE *f = fopen ("conftest.val", "w");
if (! f)
exit (1);
- if (((long) (sizeof (int))) < 0)
+ if (((long int) (sizeof (int))) < 0)
{
long i = longval ();
- if (i != ((long) (sizeof (int))))
+ if (i != ((long int) (sizeof (int))))
exit (1);
fprintf (f, "%ld\n", i);
}
else
{
unsigned long i = ulongval ();
- if (i != ((long) (sizeof (int))))
+ if (i != ((long int) (sizeof (int))))
exit (1);
fprintf (f, "%lu\n", i);
}
@@ -3425,14 +4313,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77" >&5
-echo "$as_me: error: cannot compute sizeof (int), 77" >&2;}
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int), 77
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.val
else
@@ -3452,8 +4342,11 @@ if test "${ac_cv_type_long+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
int
main ()
@@ -3468,11 +4361,21 @@ if (sizeof (long))
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3481,10 +4384,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_cv_type_long=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_type_long=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
echo "${ECHO_T}$ac_cv_type_long" >&6
@@ -3495,20 +4399,23 @@ if test "${ac_cv_sizeof_long+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test "$ac_cv_type_long" = yes; then
- # The cast to unsigned long works around a bug in the HP C Compiler
+ # The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
if test "$cross_compiling" = yes; then
# Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
int
main ()
{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
test_array [0] = 0
;
@@ -3517,11 +4424,21 @@ test_array [0] = 0
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3530,13 +4447,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_lo=0 ac_mid=0
while :; do
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
int
main ()
{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
test_array [0] = 0
;
@@ -3545,11 +4465,21 @@ test_array [0] = 0
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3558,27 +4488,32 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_hi=$ac_mid; break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo=`expr $ac_mid + 1`
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
int
main ()
{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
test_array [0] = 0
;
@@ -3587,11 +4522,21 @@ test_array [0] = 0
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3600,13 +4545,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_hi=-1 ac_mid=-1
while :; do
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
int
main ()
{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
test_array [0] = 0
;
@@ -3615,11 +4563,21 @@ test_array [0] = 0
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3628,35 +4586,40 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_lo=$ac_mid; break
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_hi=`expr '(' $ac_mid ')' - 1`
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo= ac_hi=
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
# Binary search between lo and hi bounds.
while test "x$ac_lo" != "x$ac_hi"; do
ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
int
main ()
{
-static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
test_array [0] = 0
;
@@ -3665,11 +4628,21 @@ test_array [0] = 0
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3678,29 +4651,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_hi=$ac_mid
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_lo=`expr '(' $ac_mid ')' + 1`
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
?*) ac_cv_sizeof_long=$ac_lo;;
-'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
-echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; } ;;
esac
else
- if test "$cross_compiling" = yes; then
- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling" >&5
-echo "$as_me: error: cannot run test program while cross compiling" >&2;}
- { (exit 1); exit 1; }; }
-else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
-long longval () { return (long) (sizeof (long)); }
-unsigned long ulongval () { return (long) (sizeof (long)); }
+long longval () { return (long int) (sizeof (long)); }
+unsigned long ulongval () { return (long int) (sizeof (long)); }
#include <stdio.h>
#include <stdlib.h>
int
@@ -3710,17 +4684,17 @@ main ()
FILE *f = fopen ("conftest.val", "w");
if (! f)
exit (1);
- if (((long) (sizeof (long))) < 0)
+ if (((long int) (sizeof (long))) < 0)
{
long i = longval ();
- if (i != ((long) (sizeof (long))))
+ if (i != ((long int) (sizeof (long))))
exit (1);
fprintf (f, "%ld\n", i);
}
else
{
unsigned long i = ulongval ();
- if (i != ((long) (sizeof (long))))
+ if (i != ((long int) (sizeof (long))))
exit (1);
fprintf (f, "%lu\n", i);
}
@@ -3745,14 +4719,16 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
( exit $ac_status )
-{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77" >&5
-echo "$as_me: error: cannot compute sizeof (long), 77" >&2;}
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (long), 77
+See \`config.log' for more details." >&2;}
{ (exit 1); exit 1; }; }
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
rm -f conftest.val
else
@@ -3768,6 +4744,10 @@ _ACEOF
+# checks for library functions
+
+# Here we check whether we can use our mmap file component.
+
for ac_header in stdlib.h unistd.h
@@ -3786,18 +4766,31 @@ else
echo "$as_me:$LINENO: checking $ac_header usability" >&5
echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3806,10 +4799,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
@@ -3817,8 +4811,11 @@ echo "${ECHO_T}$ac_header_compiler" >&6
echo "$as_me:$LINENO: checking $ac_header presence" >&5
echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <$ac_header>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -3831,6 +4828,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -3841,7 +4839,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -3849,26 +4848,43 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc in
- yes:no )
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
{ echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
- no:yes )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
{ echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for $ac_header" >&5
echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
if eval "test \"\${$as_ac_Header+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- eval "$as_ac_Header=$ac_header_preproc"
+ eval "$as_ac_Header=\$ac_header_preproc"
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
@@ -3893,43 +4909,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-int
-main ()
-{
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -3938,10 +4984,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
@@ -3962,8 +5010,11 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
/* malloc might have been renamed as rpl_malloc. */
#undef malloc
@@ -4066,9 +5117,9 @@ main ()
data2 = (char *) malloc (2 * pagesize);
if (!data2)
exit (1);
- data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+ data2 += (pagesize - ((long) data2 & (pagesize - 1))) & (pagesize - 1);
if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
- MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
exit (1);
for (i = 0; i < pagesize; ++i)
if (*(data + i) != *(data2 + i))
@@ -4106,11 +5157,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
else
echo "$as_me: program exited with status $ac_status" >&5
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
( exit $ac_status )
ac_cv_func_mmap_fixed_mapped=no
fi
-rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
fi
echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
@@ -4125,103 +5177,146 @@ fi
rm -f conftest.mmap
if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
- FTSYS_SRC='$(BASE_)ftsystem.c'
+ FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
else
- FTSYS_SRC='$(BUILD)/ftsystem.c'
+ FTSYS_SRC='$(BUILD_DIR)/ftsystem.c'
- echo "$as_me:$LINENO: checking whether munmap must be declared" >&5
-echo $ECHO_N "checking whether munmap must be declared... $ECHO_C" >&6
-if test "${ft_cv_munmap_decl+set}" = set; then
+ echo "$as_me:$LINENO: checking whether munmap is declared" >&5
+echo $ECHO_N "checking whether munmap is declared... $ECHO_C" >&6
+if test "${ac_cv_have_decl_munmap+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <sys/mman.h>
+
+
+
int
main ()
{
-char *(*pfn) = (char *(*))munmap
+#ifndef munmap
+ char *p = (char *) munmap;
+#endif
+
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ft_cv_munmap_decl=no
+ ac_cv_have_decl_munmap=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ft_cv_munmap_decl=yes
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_have_decl_munmap=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_have_decl_munmap" >&5
+echo "${ECHO_T}$ac_cv_have_decl_munmap" >&6
+if test $ac_cv_have_decl_munmap = yes; then
-echo "$as_me:$LINENO: result: $ft_cv_munmap_decl" >&5
-echo "${ECHO_T}$ft_cv_munmap_decl" >&6
-if test $ft_cv_munmap_decl = yes; then
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MUNMAP 1
+_ACEOF
-cat >>confdefs.h <<\_ACEOF
-#define NEED_MUNMAP_DECL
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MUNMAP 0
_ACEOF
+
fi
+
+
+
echo "$as_me:$LINENO: checking for munmap's first parameter type" >&5
echo $ECHO_N "checking for munmap's first parameter type... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+ cat >conftest.$ac_ext <<_ACEOF
+
+ /* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
#include <unistd.h>
#include <sys/mman.h>
int munmap(void *, size_t);
-int
-main ()
-{
- ;
- return 0;
-}
+
+
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
echo "$as_me:$LINENO: result: void *" >&5
-echo "${ECHO_T}void *" >&6;
+echo "${ECHO_T}void *" >&6
+
cat >>confdefs.h <<\_ACEOF
#define MUNMAP_USES_VOIDP
_ACEOF
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
echo "$as_me:$LINENO: result: char *" >&5
echo "${ECHO_T}char *" >&6
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
fi
@@ -4237,43 +5332,73 @@ if eval "test \"\${$as_ac_var+set}\" = set"; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below. */
-#include <assert.h>
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $ac_func ();
-char (*f) ();
-
-int
-main ()
-{
/* 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_$ac_func) || defined (__stub___$ac_func)
choke me
#else
-f = $ac_func;
+char (*f) () = $ac_func;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != $ac_func;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4282,10 +5407,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
eval "$as_ac_var=yes"
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
eval "$as_ac_var=no"
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
@@ -4299,6 +5426,8 @@ done
+# Check for system zlib
+
# Check whether --with-zlib or --without-zlib was given.
if test "${with_zlib+set}" = set; then
@@ -4314,8 +5443,11 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lz $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -4334,11 +5466,21 @@ gzsetparams ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4347,10 +5489,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_z_gzsetparams=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_z_gzsetparams=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_z_gzsetparams" >&5
@@ -4369,18 +5513,31 @@ else
echo "$as_me:$LINENO: checking zlib.h usability" >&5
echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
$ac_includes_default
#include <zlib.h>
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+ (eval $ac_compile) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -4389,10 +5546,11 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
ac_header_compiler=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_compiler=no
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
echo "${ECHO_T}$ac_header_compiler" >&6
@@ -4400,8 +5558,11 @@ echo "${ECHO_T}$ac_header_compiler" >&6
echo "$as_me:$LINENO: checking zlib.h presence" >&5
echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
#include <zlib.h>
_ACEOF
if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
@@ -4414,6 +5575,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
(exit $ac_status); } >/dev/null; then
if test -s conftest.err; then
ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
else
ac_cpp_err=
fi
@@ -4424,7 +5586,8 @@ if test -z "$ac_cpp_err"; then
ac_header_preproc=yes
else
echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_header_preproc=no
fi
rm -f conftest.err conftest.$ac_ext
@@ -4432,19 +5595,36 @@ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
echo "${ECHO_T}$ac_header_preproc" >&6
# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc in
- yes:no )
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
{ echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;};;
- no:yes )
+ { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
{ echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
{ echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;};;
+echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
esac
echo "$as_me:$LINENO: checking for zlib.h" >&5
echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6
@@ -4472,6 +5652,23 @@ if test x$with_zlib != xno && test -n "$LIBZ"; then
fi
+# Whether to use Mac OS resource-based fonts or not
+
+
+# Check whether --with-old-mac-fonts or --without-old-mac-fonts was given.
+if test "${with_old_mac_fonts+set}" = set; then
+ withval="$with_old_mac_fonts"
+
+fi;
+if test x$with_old_mac_fonts = xyes; then
+ LDFLAGS="$LDFLAGS -Xlinker -framework -Xlinker CoreServices \
+ -Xlinker -framework -Xlinker ApplicationServices"
+else
+ CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
+fi
+
+
+
@@ -4481,79 +5678,131 @@ fi
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.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
+ 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 or --disable-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.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
+ 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 --enable-fast-install or --disable-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.
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
- for pkg in $enableval; do
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$ac_save_ifs"
- ;;
-esac
+ 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;
-# Find the correct PATH separator. Usually this is `:', but
-# DJGPP uses `;' like DOS.
-if test "X${PATH_SEPARATOR+set}" != Xset; then
- UNAME=${UNAME-`uname 2>/dev/null`}
- case X$UNAME in
- *-DOS) lt_cv_sys_path_separator=';' ;;
- *) lt_cv_sys_path_separator=':' ;;
- esac
- PATH_SEPARATOR=$lt_cv_sys_path_separator
+
+echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
+echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
+if test "${lt_cv_path_SED+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && break
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+SED=$lt_cv_path_SED
+
fi
+echo "$as_me:$LINENO: result: $SED" >&5
+echo "${ECHO_T}$SED" >&6
+
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
@@ -4565,8 +5814,8 @@ fi;
ac_prog=ld
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
- echo "$as_me:$LINENO: checking for ld used by GCC" >&5
-echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
+ echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -4576,12 +5825,12 @@ echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6
esac
case $ac_prog in
# Accept absolute paths.
- [\\/]* | [A-Za-z]:[\\/]*)
+ [\\/]* | ?:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the path of ld
- ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ # 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%/%"`
+ ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
done
test -z "$LD" && LD="$ac_prog"
;;
@@ -4605,22 +5854,26 @@ if test "${lt_cv_path_LD+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -z "$LD"; then
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ 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 GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
test "$with_gnu_ld" != no && break
- else
+ ;;
+ *)
test "$with_gnu_ld" != yes && break
- fi
+ ;;
+ esac
fi
done
- IFS="$ac_save_ifs"
+ IFS="$lt_save_ifs"
else
lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi
@@ -4643,11 +5896,14 @@ if test "${lt_cv_prog_gnu_ld+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
-if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
lt_cv_prog_gnu_ld=yes
-else
+ ;;
+*)
lt_cv_prog_gnu_ld=no
-fi
+ ;;
+esac
fi
echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6
@@ -4664,7 +5920,11 @@ fi
echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5
echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6
reload_flag=$lt_cv_ld_reload_flag
-test -n "$reload_flag" && reload_flag=" $reload_flag"
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5
echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6
@@ -4675,120 +5935,42 @@ else
# Let the user override the test.
lt_cv_path_NM="$NM"
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
test -z "$ac_dir" && ac_dir=.
- tmp_nm=$ac_dir/${ac_tool_prefix}nm
- if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
+ tmp_nm="$ac_dir/${ac_tool_prefix}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
- if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
+ 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
- elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- lt_cv_path_NM="$tmp_nm -p"
- break
- else
- 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
- fi
+ ;;
+ *)
+ 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="$ac_save_ifs"
+ IFS="$lt_save_ifs"
test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi
fi
-
+echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5
+echo "${ECHO_T}$lt_cv_path_NM" >&6
NM="$lt_cv_path_NM"
-echo "$as_me:$LINENO: result: $NM" >&5
-echo "${ECHO_T}$NM" >&6
-
-echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5
-echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6
-if test "${lt_cv_path_SED+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- # Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_executable_p="test -f"
-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
- if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
- _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-
- # Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
-{
- tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=$TMPDIR/sed$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in $TMPDIR" >&2
- { (exit 1); exit 1; }
-}
- _max=0
- _count=0
- # Add /usr/xpg4/bin/sed as it is typically found on Solaris
- # along with /bin/sed that truncates output.
- for _sed in $_sed_list /usr/xpg4/bin/sed; do
- test ! -f ${_sed} && break
- cat /dev/null > "$tmp/sed.in"
- _count=0
- echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
- # Check for GNU sed and select it if it is found.
- if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
- lt_cv_path_SED=${_sed}
- break
- fi
- while true; do
- cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
- mv "$tmp/sed.tmp" "$tmp/sed.in"
- cp "$tmp/sed.in" "$tmp/sed.nl"
- echo >>"$tmp/sed.nl"
- ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
- cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
- # 40000 chars as input seems more than enough
- test $_count -gt 10 && break
- _count=`expr $_count + 1`
- if test $_count -gt $_max; then
- _max=$_count
- lt_cv_path_SED=$_sed
- fi
- done
- done
- rm -rf "$tmp"
-
-fi
-
-if test "X$SED" != "X"; then
- lt_cv_path_SED=$SED
-else
- SED=$lt_cv_path_SED
-fi
-echo "$as_me:$LINENO: result: $SED" >&5
-echo "${ECHO_T}$SED" >&6
echo "$as_me:$LINENO: checking whether ln -s works" >&5
echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
@@ -4816,7 +5998,7 @@ lt_cv_deplibs_check_method='unknown'
# '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 egrep regex.
+# 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.
@@ -4835,25 +6017,24 @@ bsdi4*)
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin* | mingw* | pw32*)
+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'.
lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
lt_cv_file_magic_cmd='$OBJDUMP -f'
;;
darwin* | rhapsody*)
- lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- case "$host_os" in
- rhapsody* | darwin1.[012])
- lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
- ;;
- *) # Darwin 1.3 on
- lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
- ;;
- esac
+ lt_cv_deplibs_check_method=pass_all
;;
-freebsd*)
+freebsd* | kfreebsd*-gnu)
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
case $host_cpu in
i*86 )
@@ -4873,50 +6054,53 @@ gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-hpux10.20*|hpux11*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+hpux10.20* | hpux11*)
lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- irix5* | nonstopux*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+ 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]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
;;
*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+ 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
- lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+ ;;
+
+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 Linux ELF.
-linux-gnu*)
+linux*)
case $host_cpu in
- alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
+ alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
+ # this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
esac
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ 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]+$'
+ 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$'
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
fi
;;
@@ -4926,6 +6110,10 @@ newos6*)
lt_cv_file_magic_test_file=/usr/lib/libnls.so
;;
+nto-qnx*)
+ lt_cv_deplibs_check_method=unknown
+ ;;
+
openbsd*)
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
@@ -4937,9 +6125,6 @@ openbsd*)
;;
osf3* | osf4* | osf5*)
- # this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
- lt_cv_file_magic_test_file=/shlib/libc.so
lt_cv_deplibs_check_method=pass_all
;;
@@ -4949,11 +6134,6 @@ sco3.2v5*)
solaris*)
lt_cv_deplibs_check_method=pass_all
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
-
-sysv5uw[78]* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
@@ -4979,6 +6159,10 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
;;
esac
;;
+
+sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
esac
fi
@@ -4986,16 +6170,1288 @@ echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5
echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6
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 no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Check whether --enable-libtool-lock or --disable-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:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; 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 6215 "configure"' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; 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-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ case $host in
+ 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-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*)
+ 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"
+ echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
+echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
+if test "${lt_cv_cc_needs_belf+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ lt_cv_cc_needs_belf=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+lt_cv_cc_needs_belf=no
+fi
+rm -f 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
+echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
+echo "${ECHO_T}$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
+ ;;
+
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+
+for ac_header in dlfcn.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+ # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_header_compiler=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_c_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ ac_header_preproc=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ (
+ cat <<\_ASBOX
+## ------------------------------------------ ##
+## Report this to the AC_PACKAGE_NAME lists. ##
+## ------------------------------------------ ##
+_ASBOX
+ ) |
+ sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ac_ext=cc
+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 -n "$ac_tool_prefix"; then
+ for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl 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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+ echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$CXX" && break
+ done
+fi
+if test -z "$CXX"; then
+ ac_ct_CXX=$CXX
+ for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl 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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CXX="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CXX" && break
+done
+
+ if test "x$ac_ct_CXX" = x; then
+ CXX="g++"
+ else
+ if test "$build" != "$host"; then
+ { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ fi
+ CXX=$ac_ct_CXX
+ fi
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_cxx_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$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
+for ac_declaration in \
+ '' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+#include <stdlib.h>
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+
+ac_ext=cc
+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
+
+ac_ext=cc
+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
+echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
+if test -z "$CXXCPP"; then
+ if test "${ac_cv_prog_CXXCPP+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f 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
+echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$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 <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> 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 >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether non-existent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
+ (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null; then
+ if test -s conftest.err; then
+ ac_cpp_err=$ac_cxx_preproc_warn_flag
+ ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag
+ else
+ ac_cpp_err=
+ fi
+else
+ ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+ # Broken: success on invalid input.
+continue
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ac_ext=cc
+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
+
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+ 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
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_F77+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$F77"; then
+ ac_cv_prog_F77="$F77" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+ echo "$as_me:$LINENO: result: $F77" >&5
+echo "${ECHO_T}$F77" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$F77" && break
+ done
+fi
+if test -z "$F77"; then
+ ac_ct_F77=$F77
+ for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_F77"; then
+ ac_cv_prog_ac_ct_F77="$ac_ct_F77" # 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_F77="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+ echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+echo "${ECHO_T}$ac_ct_F77" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_F77" && break
+done
+
+ if test "x$ac_ct_F77" = x; then
+ F77=""
+ else
+ if test "$build" != "$host"; then
+ { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ fi
+ F77=$ac_ct_F77
+ fi
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:7228:" \
+ "checking for Fortran 77 compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+rm -f a.out
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file. (Note that this only needs to work for GNU compilers.)
+ac_save_ext=$ac_ext
+ac_ext=F
+echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
+if test "${ac_cv_f77_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+ program main
+#ifndef __GNUC__
+ choke me
+#endif
+
+ end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_f77_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
+ac_ext=$ac_save_ext
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_f77_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ FFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+ program main
+
+ end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_f77_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_prog_f77_g=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_f77_g=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
+if test "$ac_test_FFLAGS" = set; then
+ FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+ if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+ FFLAGS="-g -O2"
+ else
+ FFLAGS="-g"
+ fi
+else
+ if test "x$ac_cv_f77_compiler_gnu" = xyes; then
+ FFLAGS="-O2"
+ else
+ FFLAGS=
+ fi
+fi
+
+G77=`test $ac_compiler_gnu = yes && echo 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
+
+
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# find the maximum length of command line arguments
+echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5
+echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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*)
+ # 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;
+ ;;
+
+ 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;
+ ;;
+
+ *)
+ # 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"`$CONFIG_SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \
+ = "XX$teststring") >/dev/null 2>&1 &&
+ new_result=`expr "X$teststring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ 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`
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5
+echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6
+else
+ echo "$as_me:$LINENO: result: none" >&5
+echo "${ECHO_T}none" >&6
+fi
# Check for command to grab the raw symbol name followed by C symbol from nm.
-echo "$as_me:$LINENO: checking command to parse $NM output" >&5
-echo $ECHO_N "checking command to parse $NM output... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5
+echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6
if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
@@ -5013,10 +7469,10 @@ sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
symxfrm='\1 \2\3 \3'
# Transform an extracted symbol line into a proper C declaration
-lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
# Define system-specific variables.
case $host_os in
@@ -5027,8 +7483,11 @@ cygwin* | mingw* | pw32*)
symcode='[ABCDGISTW]'
;;
hpux*) # Its linker distinguishes data from code symbols
- lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
- lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+ lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
;;
irix* | nonstopux*)
symcode='[BCDEGRST]'
@@ -5037,7 +7496,7 @@ osf*)
symcode='[BCDEGQRST]'
;;
solaris* | sysv5*)
- symcode='[BDT]'
+ symcode='[BDRT]'
;;
sysv4)
symcode='[DFNSTU]'
@@ -5046,25 +7505,27 @@ esac
# Handle CRLF in mingw tool chain
opt_cr=
-case $host_os in
+case $build_os in
mingw*)
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
;;
esac
# If we're using GNU nm, then use its standard symbol codes.
-if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
- symcode='[ABCDGISTW]'
-fi
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
# Try without a prefix undercore, then with it.
for ac_symprfx in "" "_"; do
# Write the raw and C identifiers.
-lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
# Check to see that the pipe works correctly.
pipe_works=no
+
rm -f conftest*
cat > conftest.$ac_ext <<EOF
#ifdef __cplusplus
@@ -5098,8 +7559,8 @@ EOF
fi
# Make sure that we snagged all the symbols we need.
- if egrep ' nm_test_var$' "$nlist" >/dev/null; then
- if egrep ' nm_test_func$' "$nlist" >/dev/null; then
+ if grep ' nm_test_var$' "$nlist" >/dev/null; then
+ if grep ' nm_test_func$' "$nlist" >/dev/null; then
cat <<EOF > conftest.$ac_ext
#ifdef __cplusplus
extern "C" {
@@ -5107,27 +7568,27 @@ extern "C" {
EOF
# Now generate the symbol file.
- eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
cat <<EOF >> conftest.$ac_ext
#if defined (__STDC__) && __STDC__
-# define lt_ptr void *
+# define lt_ptr_t void *
#else
-# define lt_ptr char *
+# define lt_ptr_t char *
# define const
#endif
/* The mapping between symbol names and symbols. */
const struct {
const char *name;
- lt_ptr address;
+ lt_ptr_t address;
}
lt_preloaded_symbols[] =
{
EOF
- sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
cat <<\EOF >> conftest.$ac_ext
- {0, (lt_ptr) 0}
+ {0, (lt_ptr_t) 0}
};
#ifdef __cplusplus
@@ -5136,19 +7597,19 @@ EOF
EOF
# Now try linking the two files.
mv conftest.$ac_objext conftstm.$ac_objext
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$no_builtin_flag"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && test -s conftest$ac_exeext; then
+ (exit $ac_status); } && test -s conftest${ac_exeext}; then
pipe_works=yes
fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
else
echo "cannot find nm_test_func in $nlist" >&5
fi
@@ -5174,16 +7635,10 @@ done
fi
-global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
if test -z "$lt_cv_sys_global_symbol_pipe"; then
- global_symbol_to_cdecl=
- global_symbol_to_c_name_address=
-else
- global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
- global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
+ lt_cv_sys_global_symbol_to_cdecl=
fi
-if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
-then
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
echo "$as_me:$LINENO: result: failed" >&5
echo "${ECHO_T}failed" >&6
else
@@ -5191,264 +7646,161 @@ else
echo "${ECHO_T}ok" >&6
fi
-
-for ac_header in dlfcn.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+echo "$as_me:$LINENO: checking for objdir" >&5
+echo $ECHO_N "checking for objdir... $ECHO_C" >&6
+if test "${lt_cv_objdir+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
else
- # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-$ac_includes_default
-#include <$ac_header>
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_header_compiler=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-ac_header_compiler=no
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-echo "${ECHO_T}$ac_header_compiler" >&6
-
-# Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
-cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-#include <$ac_header>
-_ACEOF
-if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
- (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null; then
- if test -s conftest.err; then
- ac_cpp_err=$ac_c_preproc_warn_flag
- else
- ac_cpp_err=
- fi
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
else
- ac_cpp_err=yes
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
fi
-if test -z "$ac_cpp_err"; then
- ac_header_preproc=yes
-else
- echo "$as_me: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_header_preproc=no
+rmdir .libs 2>/dev/null
fi
-rm -f conftest.err conftest.$ac_ext
-echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-echo "${ECHO_T}$ac_header_preproc" >&6
+echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5
+echo "${ECHO_T}$lt_cv_objdir" >&6
+objdir=$lt_cv_objdir
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc in
- yes:no )
- { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
- no:yes )
- { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
- { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;};;
-esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- eval "$as_ac_Header=$ac_header_preproc"
-fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-fi
-done
+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
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+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 avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+# Constants:
+rm="rm -f"
-# Only perform the check for file, if the check method requires it
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
-echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+# Global variables:
+default_ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+ltmain="$ac_aux_dir/ltmain.sh"
+ofile="$default_ofile"
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- 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 <<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
+ 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- echo "$as_me:$LINENO: checking for file" >&5
-echo $ECHO_N "checking for file... $ECHO_C" >&6
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- case $MAGIC_CMD in
- /*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
- ?:/*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
- ;;
- *)
- ac_save_MAGIC_CMD="$MAGIC_CMD"
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="/usr/bin:$PATH"
- for ac_dir in $ac_dummy; do
- 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 <<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
+ 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_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_AR="ar"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
-EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$ac_save_ifs"
- MAGIC_CMD="$ac_save_MAGIC_CMD"
- ;;
-esac
fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
-echo "${ECHO_T}$MAGIC_CMD" >&6
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ echo "$as_me:$LINENO: result: $ac_ct_AR" >&5
+echo "${ECHO_T}$ac_ct_AR" >&6
else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
else
- MAGIC_CMD=:
+ if test "$build" != "$host"; then
+ { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ fi
+ AR=$ac_ct_AR
fi
+else
+ AR="$ac_cv_prog_AR"
fi
- fi
- ;;
-esac
-
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
@@ -5512,7 +7864,6 @@ do
done
done
- test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
fi
fi
ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
@@ -5524,7 +7875,19 @@ else
echo "${ECHO_T}no" >&6
fi
- RANLIB=$ac_ct_RANLIB
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ if test "$build" != "$host"; then
+ { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ fi
+ RANLIB=$ac_ct_RANLIB
+ fi
else
RANLIB="$ac_cv_prog_RANLIB"
fi
@@ -5592,7 +7955,6 @@ do
done
done
- test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
fi
fi
ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
@@ -5604,141 +7966,24 @@ else
echo "${ECHO_T}no" >&6
fi
- STRIP=$ac_ct_STRIP
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-
-enable_dlopen=no
-enable_win32_dll=no
-
-# Check whether --enable-libtool-lock or --disable-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
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 5628 "configure"' > conftest.$ac_ext
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- 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
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ if test "$build" != "$host"; then
+ { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet. If you think this
+configuration is useful to you, please write to autoconf@gnu.org." >&2;}
+ fi
+ STRIP=$ac_ct_STRIP
fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5
-echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6
-if test "${lt_cv_cc_needs_belf+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- lt_cv_cc_needs_belf=yes
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-lt_cv_cc_needs_belf=no
-fi
-rm -f 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
-
+ STRIP="$ac_cv_prog_STRIP"
fi
-echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5
-echo "${ECHO_T}$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
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-Xsed='sed -e s/^X//'
-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'
-
-# Constants:
-rm="rm -f"
-
-# Global variables:
-default_ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except M$VC,
-# which needs '.lib').
-libext=a
-ltmain="$ac_aux_dir/ltmain.sh"
-ofile="$default_ofile"
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-need_locks="$enable_libtool_lock"
-
old_CC="$CC"
old_CFLAGS="$CFLAGS"
@@ -5747,40 +7992,18 @@ test -z "$AR" && AR=ar
test -z "$AR_FLAGS" && AR_FLAGS=cru
test -z "$AS" && AS=as
test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
test -z "$DLLTOOL" && DLLTOOL=dlltool
test -z "$LD" && LD=ld
test -z "$LN_S" && LN_S="ln -s"
test -z "$MAGIC_CMD" && MAGIC_CMD=file
test -z "$NM" && NM=nm
+test -z "$SED" && SED=sed
test -z "$OBJDUMP" && OBJDUMP=objdump
test -z "$RANLIB" && RANLIB=:
test -z "$STRIP" && STRIP=:
test -z "$ac_objext" && ac_objext=o
-if test x"$host" != x"$build"; then
- ac_tool_prefix=${host_alias}-
-else
- ac_tool_prefix=
-fi
-
-# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
-case $host_os in
-linux-gnu*) ;;
-linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
-esac
-
-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
-
# Determine commands to create old-style static archives.
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
old_postinstall_cmds='chmod 644 $oldlib'
@@ -5798,24 +8021,150 @@ if test -n "$RANLIB"; then
old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
fi
-# Allow CC to be a program name with arguments.
-set dummy $CC
-compiler="$2"
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5
+echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF 1>&2
-echo "$as_me:$LINENO: checking for objdir" >&5
-echo $ECHO_N "checking for objdir... $ECHO_C" >&6
-rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- objdir=.libs
+*** 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
+
+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
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
else
- # MS-DOS does not allow filenames that begin with a dot.
- objdir=_libs
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
-rmdir .libs 2>/dev/null
-echo "$as_me:$LINENO: result: $objdir" >&5
-echo "${ECHO_T}$objdir" >&6
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ echo "$as_me:$LINENO: checking for file" >&5
+echo $ECHO_N "checking for file... $ECHO_C" >&6
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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 <<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
+
+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
+ echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5
+echo "${ECHO_T}$MAGIC_CMD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+enable_dlopen=no
+enable_win32_dll=no
+
+# Check whether --enable-libtool-lock or --disable-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
# Check whether --with-pic or --without-pic was given.
@@ -5827,169 +8176,788 @@ else
fi;
test -z "$pic_mode" && pic_mode=default
-# We assume here that the value for lt_cv_prog_cc_pic will not be cached
-# in isolation, and that seeing it set (from the cache) indicates that
-# the associated values are set (in the cache) correctly too.
-echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
-echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
-if test "${lt_cv_prog_cc_pic+set}" = set; then
+# Use C for the default configuration in the libtool script
+tagname=
+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;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+#
+# Check for any special shared library compilation flags.
+#
+lt_prog_cc_shlib=
+if test "$GCC" = no; then
+ case $host_os in
+ sco3.2v5*)
+ lt_prog_cc_shlib='-belf'
+ ;;
+ esac
+fi
+if test -n "$lt_prog_cc_shlib"; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5
+echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;}
+ if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then :
+ else
+ { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
+echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
+ lt_cv_prog_cc_can_build_shared=no
+ fi
+fi
+
+
+#
+# Check to make sure the static flag actually works.
+#
+echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5
+echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6
+if test "${lt_prog_compiler_static_works+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- lt_cv_prog_cc_pic=
- lt_cv_prog_cc_shlib=
- lt_cv_prog_cc_wl=
- lt_cv_prog_cc_static=
- lt_cv_prog_cc_no_builtin=
- lt_cv_prog_cc_can_build_shared=$can_build_shared
+ lt_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_prog_compiler_static"
+ printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The compiler 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
+ else
+ lt_prog_compiler_static_works=yes
+ fi
+ fi
+ $rm conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_static_works" >&6
+
+if test x"$lt_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ printf "$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}? :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:8295: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:8299: \$? = $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
+ if test ! -s conftest.err; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$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=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
if test "$GCC" = yes; then
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-static'
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
case $host_os in
- aix*)
- # Below there is a dirty hack to force normal static linking with -ldl
- # The problem is because libdl dynamically linked with both libc and
- # libC (AIX C++ library), which obviously doesn't included in libraries
- # list by gcc. This cause undefined symbols with -static flags.
- # This hack allows C programs to be linked with "-static -ldl", but
- # not sure about C++ programs.
- lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
+ 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*)
# 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_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
;;
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+
+ beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
+
+ mingw* | pw32* | os2*)
+ # 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'
+ ;;
+
darwin* | rhapsody*)
# PIC is the default on this platform
# Common symbols not allowed in MH_DYLIB files
- lt_cv_prog_cc_pic='-fno-common'
+ lt_prog_compiler_pic='-fno-common'
;;
- cygwin* | mingw* | pw32* | os2*)
- # 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_cv_prog_cc_pic='-DDLL_EXPORT'
+
+ 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
;;
+
sysv4*MP*)
if test -d /usr/nec; then
- lt_cv_prog_cc_pic=-Kconform_pic
+ lt_prog_compiler_pic=-Kconform_pic
fi
;;
+
+ hpux*)
+ # 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='-fPIC'
+ ;;
+ esac
+ ;;
+
*)
- lt_cv_prog_cc_pic='-fPIC'
+ lt_prog_compiler_pic='-fPIC'
;;
esac
else
- # PORTME Check for PIC flags for the system compiler.
+ # PORTME Check for flag to pass linker flags through the system compiler.
case $host_os in
- aix3* | aix4* | aix5*)
- lt_cv_prog_cc_wl='-Wl,'
- # All AIX code is PIC.
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
if test "$host_cpu" = ia64; then
# AIX 5 now supports IA64 processor
- lt_cv_prog_cc_static='-Bstatic'
+ lt_prog_compiler_static='-Bstatic'
else
- lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
fi
;;
+ mingw* | pw32* | os2*)
+ # 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*)
- # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
- lt_cv_prog_cc_pic='+Z'
+ 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_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-non_shared'
+ lt_prog_compiler_wl='-Wl,'
# PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
;;
- cygwin* | mingw* | pw32* | os2*)
- # 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_cv_prog_cc_pic='-DDLL_EXPORT'
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
;;
- newsos6)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
+ linux*)
+ case $CC in
+ icc* | ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ esac
;;
osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
# All OSF/1 code is PIC.
- lt_cv_prog_cc_wl='-Wl,'
- lt_cv_prog_cc_static='-non_shared'
+ lt_prog_compiler_static='-non_shared'
;;
sco3.2v5*)
- lt_cv_prog_cc_pic='-Kpic'
- lt_cv_prog_cc_static='-dn'
- lt_cv_prog_cc_shlib='-belf'
+ lt_prog_compiler_pic='-Kpic'
+ lt_prog_compiler_static='-dn'
;;
solaris*)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
- lt_cv_prog_cc_wl='-Wl,'
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
;;
sunos4*)
- lt_cv_prog_cc_pic='-PIC'
- lt_cv_prog_cc_static='-Bstatic'
- lt_cv_prog_cc_wl='-Qoption ld '
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- lt_cv_prog_cc_pic='-KPIC'
- lt_cv_prog_cc_static='-Bstatic'
- lt_cv_prog_cc_wl='-Wl,'
- ;;
-
- uts4*)
- lt_cv_prog_cc_pic='-pic'
- lt_cv_prog_cc_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
;;
sysv4*MP*)
if test -d /usr/nec ;then
- lt_cv_prog_cc_pic='-Kconform_pic'
- lt_cv_prog_cc_static='-Bstatic'
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
fi
;;
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
*)
- lt_cv_prog_cc_can_build_shared=no
+ lt_prog_compiler_can_build_shared=no
;;
esac
fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ printf "$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}? :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:8528: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:8532: \$? = $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
+ if test ! -s conftest.err; then
+ lt_prog_compiler_pic_works=yes
+ fi
+ fi
+ $rm conftest*
+
fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6
-if test -z "$lt_cv_prog_cc_pic"; then
- echo "$as_me:$LINENO: result: none" >&5
-echo "${ECHO_T}none" >&6
+if test x"$lt_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
else
- echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic" >&5
-echo "${ECHO_T}$lt_cv_prog_cc_pic" >&6
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
- # Check to make sure the pic_flag actually works.
- echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
-echo $ECHO_N "checking if $compiler PIC flag $lt_cv_prog_cc_pic works... $ECHO_C" >&6
- if test "${lt_cv_prog_cc_pic_works+set}" = set; then
+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
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+ lt_cv_prog_compiler_c_o=no
+ $rm -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ printf "$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}? :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:8588: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:8592: \$? = $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
+ if test ! -s out/conftest.err; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w .
+ $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 ..
+ rmdir conftest
+ $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5
+echo "${ECHO_T}$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
+ echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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
+ echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+ if test "$hard_links" = no; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+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
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+ runpath_var=
+ allow_undefined_flag=
+ enable_shared_with_static_runtimes=no
+ archive_cmds=
+ archive_expsym_cmds=
+ old_archive_From_new_cmds=
+ old_archive_from_expsyms_cmds=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ thread_safe_flag_spec=
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_direct=no
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ link_all_deplibs=unknown
+ hardcode_automatic=no
+ module_cmds=
+ module_expsym_cmds=
+ always_export_symbols=no
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ # 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_"
+ # 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.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # 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
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+ fi
+ ;;
+
+ amigaos*)
+ 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
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can't use
+ # them.
+ ld_shlibs=no
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> 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*)
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ 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 '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$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}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ 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 $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'
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<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.
+
+EOF
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ 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
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ linux*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds="$tmp_archive_cmds"
+ supports_anon_versioning=no
+ case `$LD -v 2>/dev/null` in
+ *\ 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
+ if test $supports_anon_versioning = yes; 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 -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ else
+ archive_expsym_cmds="$tmp_archive_cmds"
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ 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
+
+ if test "$ld_shlibs" = yes; then
+ 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
+ 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 "$link_static_flag"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ 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
+ 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")) && (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].*|aix5*)
+ 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_libdir_separator=':'
+ link_all_deplibs=yes
+
+ 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
+ hardcode_direct=yes
+ 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'
+ 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
+
+ # 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.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
int
main ()
@@ -5999,579 +8967,2870 @@ main ()
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- case $host_os in
- hpux9* | hpux10* | hpux11*)
- # On HP-UX, both CC and GCC only warn that PIC is supported... then
- # they create non-PIC objects. So, if there were any warnings, we
- # assume that PIC is not supported.
- if test -s conftest.err; then
- lt_cv_prog_cc_pic_works=no
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${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 $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
else
- lt_cv_prog_cc_pic_works=yes
+ # Determine the default libpath from the value encoded in an empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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'
+ # -bexpall does not export symbols beginning with underscore (_)
+ always_export_symbols=yes
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec=' '
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
+ fi
+ ;;
+
+ amigaos*)
+ 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
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+
+ bsdi4*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # 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.
+ 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 `echo "$deplibs" | $SED -e '\''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'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ darwin* | rhapsody*)
+ if test "$GXX" = yes ; then
+ archive_cmds_need_lc=no
+ case "$host_os" in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag='-undefined suppress'
;;
- *)
- lt_cv_prog_cc_pic_works=yes
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ allow_undefined_flag='-flat_namespace -undefined suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ allow_undefined_flag='-flat_namespace -undefined suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag='-undefined dynamic_lookup'
+ ;;
+ esac
+ fi
;;
esac
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+ lt_int_apple_cc_single_mod=yes
+ fi
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ else
+ archive_cmds='$CC -r ${wl}-bind_at_load -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'
+ fi
+ module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec='-all_load $convenience'
+ link_all_deplibs=yes
+ else
+ ld_shlibs=no
+ fi
+ ;;
-else
- echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
- lt_cv_prog_cc_pic_works=no
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs=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* | kfreebsd*-gnu)
+ archive_cmds='$CC -shared -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 -fPIC ${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* | hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ *)
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ ia64*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=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 $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec_ld='-rpath $libdir'
+ fi
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ 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
+ ;;
+
+ openbsd*)
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ 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'
+ 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
+ ;;
+
+ 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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ 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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -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; echo "-hidden">> $lib.exp~
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+
+ sco3.2v5*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z text'
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${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 ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+ else
+ 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'
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+ 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.2uw2*)
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=no
+ hardcode_runpath_var=yes
+ runpath_var=LD_RUN_PATH
+ ;;
+
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+ no_undefined_flag='${wl}-z ${wl}text'
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv5*)
+ no_undefined_flag=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ 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'
+ hardcode_libdir_flag_spec=
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+ ;;
+
+ 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
+ fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs" >&5
+echo "${ECHO_T}$ld_shlibs" >&6
+test "$ld_shlibs" = 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
-rm -f conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$save_CFLAGS"
+#
+# 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.
+ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+ $rm conftest*
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ 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:$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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $rm conftest*
+ echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5
+echo "${ECHO_T}$archive_cmds_need_lc" >&6
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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"
+if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ # 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.
+ 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
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
fi
+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
- if test "X$lt_cv_prog_cc_pic_works" = Xno; then
- lt_cv_prog_cc_pic=
- lt_cv_prog_cc_can_build_shared=no
+case $host_os in
+aix3*)
+ version_type=linux
+ 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'
+ ;;
+
+aix4* | aix5*)
+ version_type=linux
+ 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
- lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
+ # 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<name>.so
+ # instead of lib<name>.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
+ ;;
- echo "$as_me:$LINENO: result: $lt_cv_prog_cc_pic_works" >&5
-echo "${ECHO_T}$lt_cv_prog_cc_pic_works" >&6
-fi
+amigaos*)
+ 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=`$echo "X$lib" | $Xsed -e '\''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'
+ ;;
-# Check for any special shared library compilation flags.
-if test -n "$lt_cv_prog_cc_shlib"; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&5
-echo "$as_me: WARNING: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" >&2;}
- if echo "$old_CC $old_CFLAGS " | egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]" >/dev/null; then :
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi4*)
+ version_type=linux
+ 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*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ 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'
+ 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="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ 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
+ ;;
+ 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
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # 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}${versuffix}$shared_ext ${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)'
+ # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+ if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
else
- { echo "$as_me:$LINENO: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5
-echo "$as_me: WARNING: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;}
- lt_cv_prog_cc_can_build_shared=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+ fi
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ 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
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+kfreebsd*-gnu)
+ version_type=linux
+ 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='GNU ld.so'
+ ;;
+
+freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ 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
+ ;;
+ *) # from 3.2 on
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ 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
+ 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'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ 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 Linux ELF.
+linux*)
+ version_type=linux
+ 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
+ # 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=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | 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'
+ ;;
+
+knetbsd*-gnu)
+ version_type=linux
+ 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='GNU 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
+ 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=linux
+ 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
+ ;;
+
+openbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=yes
+ 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"
+ ;;
+
+sco3.2v5*)
+ version_type=osf
+ 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
+ ;;
+
+solaris*)
+ version_type=linux
+ 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.2uw2* | sysv4.3* | sysv5*)
+ version_type=linux
+ 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
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ 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
+ 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
+ ;;
+
+uts4*)
+ version_type=linux
+ 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
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" || \
+ test -n "$runpath_var " || \
+ test "X$hardcode_automatic"="Xyes" ; then
+
+ # We can hardcode non-existant 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_AC_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
+echo "$as_me:$LINENO: result: $hardcode_action" >&5
+echo "${ECHO_T}$hardcode_action" >&6
+
+if test "$hardcode_action" = relink; 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
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}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"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ ;;
+ *)
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ ;;
+ esac
fi
-echo "$as_me:$LINENO: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
-echo $ECHO_N "checking if $compiler static flag $lt_cv_prog_cc_static works... $ECHO_C" >&6
-if test "${lt_cv_prog_cc_static_works+set}" = set; then
+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*)
+ 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
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
- lt_cv_prog_cc_static_works=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
int
main ()
{
-
+dlopen ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- lt_cv_prog_cc_static_works=yes
+ ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_lib_dl_dlopen=no
fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
-# Belt *and* braces to stop my trousers falling down:
-test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
-echo "$as_me:$LINENO: result: $lt_cv_prog_cc_static_works" >&5
-echo "${ECHO_T}$lt_cv_prog_cc_static_works" >&6
-
-pic_flag="$lt_cv_prog_cc_pic"
-special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
-wl="$lt_cv_prog_cc_wl"
-link_static_flag="$lt_cv_prog_cc_static"
-no_builtin_flag="$lt_cv_prog_cc_no_builtin"
-can_build_shared="$lt_cv_prog_cc_can_build_shared"
+fi
+ ;;
-# Check to see if options -o and -c are simultaneously supported by compiler
-echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
-if test "${lt_cv_compiler_c_o+set}" = set; then
+ *)
+ echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define shl_load innocuous_shl_load
-$rm -r conftest 2>/dev/null
-mkdir conftest
-cd conftest
-echo "int some_variable = 0;" > conftest.$ac_ext
-mkdir out
-# According to Tom Tromey, Ian Lance Taylor reported there are C compilers
-# that will create temporary files in the current directory regardless of
-# the output directory. Thus, making CWD read-only will cause this test
-# to fail, enabling locking or at least warning the user not to do parallel
-# builds.
-chmod -w .
-save_CFLAGS="$CFLAGS"
-CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
-compiler_c_o=no
-if { (eval echo configure:6142: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && 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
- if test -s out/conftest.err; then
- lt_cv_compiler_c_o=no
- else
- lt_cv_compiler_c_o=yes
- fi
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shl_load (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+/* 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_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_shl_load=yes
else
- # Append any errors to the config.log.
- cat out/conftest.err 1>&5
- lt_cv_compiler_c_o=no
-fi
-CFLAGS="$save_CFLAGS"
-chmod u+w .
-$rm conftest* out/*
-rmdir out
-cd ..
-rmdir conftest
-$rm -r conftest 2>/dev/null
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_func_shl_load=no
fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+ lt_cv_dlopen="shl_load"
+else
+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-compiler_c_o=$lt_cv_compiler_c_o
-echo "$as_me:$LINENO: result: $compiler_c_o" >&5
-echo "${ECHO_T}$compiler_c_o" >&6
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-if test x"$compiler_c_o" = x"yes"; then
- # Check to see if we can write to a .lo
- echo "$as_me:$LINENO: checking if $compiler supports -c -o file.lo" >&5
-echo $ECHO_N "checking if $compiler supports -c -o file.lo... $ECHO_C" >&6
- if test "${lt_cv_compiler_o_lo+set}" = set; then
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+ echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- lt_cv_compiler_o_lo=no
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -c -o conftest.lo"
- save_objext="$ac_objext"
- ac_objext=lo
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+/* 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_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
int
main ()
{
-int some_variable = 0;
+return f != dlopen;
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- lt_cv_compiler_o_lo=no
- else
- lt_cv_compiler_o_lo=yes
- fi
-
+ ac_cv_func_dlopen=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- ac_objext="$save_objext"
- CFLAGS="$save_CFLAGS"
+sed 's/^/| /' conftest.$ac_ext >&5
+ac_cv_func_dlopen=no
fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+ lt_cv_dlopen="dlopen"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
- compiler_o_lo=$lt_cv_compiler_o_lo
- echo "$as_me:$LINENO: result: $compiler_o_lo" >&5
-echo "${ECHO_T}$compiler_o_lo" >&6
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
else
- compiler_o_lo=no
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
-# Check to see if we can do hard links to lock some files if needed
-hard_links="nottested"
-if test "$compiler_c_o" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
-echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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
- echo "$as_me:$LINENO: result: $hard_links" >&5
-echo "${ECHO_T}$hard_links" >&6
- if test "$hard_links" = no; then
- { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
- need_locks=warn
- fi
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_svld_dlopen=yes
else
- need_locks=no
-fi
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-if test "$GCC" = yes; then
- # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
- echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
- echo "int some_variable = 0;" > conftest.$ac_ext
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
- compiler_rtti_exceptions=no
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dld_link ();
int
main ()
{
-int some_variable = 0;
+dld_link ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- compiler_rtti_exceptions=no
- else
- compiler_rtti_exceptions=yes
- fi
-
+ ac_cv_lib_dld_dld_link=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
+
fi
-rm -f conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$save_CFLAGS"
- echo "$as_me:$LINENO: result: $compiler_rtti_exceptions" >&5
-echo "${ECHO_T}$compiler_rtti_exceptions" >&6
- if test "$compiler_rtti_exceptions" = "yes"; then
- no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
else
- no_builtin_flag=' -fno-builtin'
+ enable_dlopen=no
fi
-fi
-# See if the linker supports building shared libraries.
-echo "$as_me:$LINENO: checking whether the linker ($LD) supports shared libraries" >&5
-echo $ECHO_N "checking whether the linker ($LD) supports shared libraries... $ECHO_C" >&6
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-allow_undefined_flag=
-no_undefined_flag=
-need_lib_prefix=unknown
-need_version=unknown
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-archive_cmds=
-archive_expsym_cmds=
-old_archive_from_new_cmds=
-old_archive_from_expsyms_cmds=
-export_dynamic_flag_spec=
-whole_archive_flag_spec=
-thread_safe_flag_spec=
-hardcode_into_libs=no
-hardcode_libdir_flag_spec=
-hardcode_libdir_separator=
-hardcode_direct=no
-hardcode_minus_L=no
-hardcode_shlibpath_var=unsupported
-runpath_var=
-link_all_deplibs=unknown
-always_export_symbols=no
-export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
-# 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 egrep regular expression 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_"
-# 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.
-extract_expsyms_cmds=
+ save_LDFLAGS="$LDFLAGS"
+ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-case $host_os in
-cygwin* | mingw* | pw32*)
- # 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
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF
+#line 10772 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=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;
+ /* dlclose (self); */
+ }
+
+ exit (status);
+}
+EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
fi
- ;;
-openbsd*)
- with_gnu_ld=no
- ;;
-esac
+fi
+rm -fr conftest*
-ld_shlibs=yes
-if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix3* | aix4* | aix5*)
- # On AIX, the GNU linker is very broken
- # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
- ld_shlibs=no
- cat <<EOF 1>&2
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
-*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH
-*** so that a non-GNU linker is found, and then restart.
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ LDFLAGS="$LDFLAGS $link_static_flag"
+ echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF
+#line 10870 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=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;
+ /* dlclose (self); */
+ }
+ exit (status);
+}
EOF
- ;;
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
- amigaos*)
- 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
-
- # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
- # that the semantics of dynamic libraries on AmigaOS, at least up
- # to version 4, is to share data among multiple programs linked
- # with the same dynamic library. Since this doesn't match the
- # behavior of shared libraries on other platforms, we can use
- # them.
- ld_shlibs=no
- ;;
- beos*)
- if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag=unsupported
- # Joseph Beckenbach <jrb3@best.com> 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
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
;;
+ esac
- cygwin* | mingw* | pw32*)
- # hardcode_libdir_flag_spec is actually meaningless, as there is
- # no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- allow_undefined_flag=unsupported
- always_export_symbols=yes
-
- extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
- sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
- test -f $output_objdir/impgen.exe || (cd $output_objdir && \
- if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
- else $CC -o impgen impgen.c ; fi)~
- $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
-
- old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
-
- # cygwin and mingw dlls have different entry points and sets of symbols
- # to exclude.
- # FIXME: what about values for MSVC?
- dll_entry=__cygwin_dll_entry@12
- dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
- case $host_os in
- mingw*)
- # mingw values
- dll_entry=_DllMainCRTStartup@12
- dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
- ;;
- esac
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
- # mingw and cygwin differ, and it's simplest to just exclude the union
- # of the two symbol sets.
- dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
+ 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
- # recent cygwin and mingw systems supply a stub DllMain which the user
- # can override, but on older systems we have to supply one (in ltdll.c)
- if test "x$lt_cv_need_dllmain" = "xyes"; then
- ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
- ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
- test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
- else
- ltdll_obj=
- ltdll_cmds=
- fi
- # Extract the symbol export list from an `--export-all' def file,
- # then regenerate the def file from the symbol export list, so that
- # the compiled dll only exports the symbol export list.
- # Be careful not to strip the DATA tag left be newer dlltools.
- export_symbols_cmds="$ltdll_cmds"'
- $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
- sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
-
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is.
- # If DATA tags from a recent dlltool are present, honour them!
- archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname-def;
+# Report which librarie types wil actually be built
+echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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
+ ;;
+
+aix4* | aix5*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+ if test "$GCC" = yes; then
+ archive_cmds_need_lc=no
+ case "$host_os" in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag='-undefined suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ allow_undefined_flag='-flat_namespace -undefined suppress'
else
- echo EXPORTS > $output_objdir/$soname-def;
- _lt_hint=1;
- cat $export_symbols | while read symbol; do
- set dummy \$symbol;
- case \$# in
- 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
- 4) echo " \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
- *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
- esac;
- _lt_hint=`expr 1 + \$_lt_hint`;
- done;
- fi~
- '"$ltdll_cmds"'
- $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
- $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
- $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ allow_undefined_flag='-flat_namespace -undefined suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag='-undefined dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ output_verbose_link_cmd='echo'
+ archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
+ module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec='-all_load $convenience'
+ link_all_deplibs=yes
+ else
+ ld_shlibs=no
+ fi
;;
+esac
+echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
- 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 -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
+echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+ # 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
+ # Now quote all the things that may contain metacharacters while being
+ # careful not to overquote the AC_SUBSTed values. We take copies of the
+ # variables and quote the copies for generation of the libtool script.
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ SED SHELL STRIP \
+ libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+ old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+ deplibs_check_method reload_flag reload_cmds need_locks \
+ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+ lt_cv_sys_global_symbol_to_c_name_address \
+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+ old_postinstall_cmds old_postuninstall_cmds \
+ compiler \
+ CC \
+ LD \
+ lt_prog_compiler_wl \
+ lt_prog_compiler_pic \
+ lt_prog_compiler_static \
+ lt_prog_compiler_no_builtin_flag \
+ export_dynamic_flag_spec \
+ thread_safe_flag_spec \
+ whole_archive_flag_spec \
+ enable_shared_with_static_runtimes \
+ old_archive_cmds \
+ old_archive_from_new_cmds \
+ predep_objects \
+ postdep_objects \
+ predeps \
+ postdeps \
+ compiler_lib_search_path \
+ archive_cmds \
+ archive_expsym_cmds \
+ postinstall_cmds \
+ postuninstall_cmds \
+ old_archive_from_expsyms_cmds \
+ allow_undefined_flag \
+ no_undefined_flag \
+ export_symbols_cmds \
+ hardcode_libdir_flag_spec \
+ hardcode_libdir_flag_spec_ld \
+ hardcode_libdir_separator \
+ hardcode_automatic \
+ module_cmds \
+ module_expsym_cmds \
+ lt_cv_prog_compiler_c_o \
+ exclude_expsyms \
+ include_expsyms; do
+
+ case $var in
+ old_archive_cmds | \
+ old_archive_from_new_cmds | \
+ archive_cmds | \
+ archive_expsym_cmds | \
+ module_cmds | \
+ module_expsym_cmds | \
+ old_archive_from_expsyms_cmds | \
+ export_symbols_cmds | \
+ extract_expsyms_cmds | reload_cmds | finish_cmds | \
+ postinstall_cmds | postuninstall_cmds | \
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+ # Double-quote double-evaled strings.
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+ ;;
+ *)
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+ ;;
+ esac
+ done
+
+ case $lt_echo in
+ *'\$0 --fallback-echo"')
+ lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
;;
+ esac
- solaris* | sysv5*)
- if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- cat <<EOF 1>&2
+cfgfile="${ofile}T"
+ trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+ $rm -f "$cfgfile"
+ { echo "$as_me:$LINENO: creating $ofile" >&5
+echo "$as_me: creating $ofile" >&6;}
-*** 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.
+ cat <<__EOF__ >> "$cfgfile"
+#! $SHELL
+
+# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# 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 s/^X//"
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+# The names of the tagged configurations supported by this script.
+available_tags=
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# 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
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# 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
+
+# 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
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# 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
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec
+
+# Library versioning type.
+version_type=$version_type
+
+# 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
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# 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 and install a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+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
+
+# 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
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# 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
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# 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
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# 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 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
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# 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
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path"
+
+# 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
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_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
+
+# ### END LIBTOOL CONFIG
+
+__EOF__
+
+ case $host_os in
+ aix3*)
+ cat <<\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
EOF
- elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- 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
- ;;
+ # 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 $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
- 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'
+ mv -f "$cfgfile" "$ofile" || \
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+else
+ # If there is no Makefile yet, we rely on a make rule to execute
+ # `config.status --recheck' to rerun these tests and create the
+ # libtool script then.
+ ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+ if test -f "$ltmain_in"; then
+ test -f Makefile && make "$ltmain"
+ 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
+
+CC="$lt_save_CC"
+
+
+# Check whether --with-tags or --without-tags was given.
+if test "${with_tags+set}" = set; then
+ withval="$with_tags"
+ tagnames="$withval"
+fi;
+
+if test -f "$ltmain" && test -n "$tagnames"; then
+ if test ! -f "${ofile}"; then
+ { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;}
+ fi
+
+ if test -z "$LTCC"; then
+ eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
+ if test -z "$LTCC"; then
+ { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5
+echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;}
else
- ld_shlibs=no
+ { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5
+echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;}
+ fi
+ fi
+
+ # Extract list of available tagged configurations in $ofile.
+ # Note that this assumes the entire list is on one line.
+ available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
+
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for tagname in $tagnames; do
+ IFS="$lt_save_ifs"
+ # Check whether tagname contains only valid characters
+ case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in
+ "") ;;
+ *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5
+echo "$as_me: error: invalid tag name: $tagname" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
+ then
+ { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5
+echo "$as_me: error: tag name \"$tagname\" already exists" >&2;}
+ { (exit 1); exit 1; }; }
fi
+
+ # Update the list of available tags.
+ if test -n "$tagname"; then
+ echo appending configuration tag \"$tagname\" to $ofile
+
+ case $tagname in
+ CXX)
+ if test -n "$CXX" && test "X$CXX" != "Xno"; then
+ ac_ext=cc
+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=
+export_dynamic_flag_spec_CXX=
+hardcode_direct_CXX=no
+hardcode_libdir_flag_spec_CXX=
+hardcode_libdir_flag_spec_ld_CXX=
+hardcode_libdir_separator_CXX=
+hardcode_minus_L_CXX=no
+hardcode_automatic_CXX=no
+module_cmds_CXX=
+module_expsym_cmds_CXX=
+link_all_deplibs_CXX=unknown
+old_archive_cmds_CXX=$old_archive_cmds
+no_undefined_flag_CXX=
+whole_archive_flag_spec_CXX=
+enable_shared_with_static_runtimes_CXX=no
+
+# 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=
+
+# Source file extension for C++ test sources.
+ac_ext=cc
+
+# Object file extension for compiled C++ test sources.
+objext=o
+objext_CXX=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+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
+ 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
+ unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+compiler_CXX=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+# We don't want -fno-exception wen 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 or --without-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.
+ echo "$as_me:$LINENO: checking for ld used by $CC" >&5
+echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&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
+ echo "$as_me:$LINENO: checking for GNU ld" >&5
+echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6
+else
+ echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6
+fi
+if test "${lt_cv_path_LD+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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 GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
- if test "$ld_shlibs" = yes; then
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
- case $host_os in
- cygwin* | mingw* | pw32*)
- # dlltool doesn't understand --whole-archive et. al.
- whole_archive_flag_spec=
- ;;
- *)
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- ;;
- esac
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ echo "$as_me:$LINENO: result: $LD" >&5
+echo "${ECHO_T}$LD" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6
+if test "${lt_cv_prog_gnu_ld+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_gnu_ld" >&5
+echo "${ECHO_T}$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 -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_CXX='$CC -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 "\-L"'
+
else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+fi
+
+# PORTME: fill in a description of your system's C++ link characteristics
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+ld_shlibs_CXX=yes
+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 "$link_static_flag"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
;;
-
aix4* | aix5*)
if test "$host_cpu" = ia64; then
# On IA64, the linker does run time linking by default, so we don't
@@ -6591,7 +11850,7 @@ else
*-brtl*)
aix_use_runtimelinking=yes
break
- ;;
+ ;;
esac
done
esac
@@ -6606,34 +11865,39 @@ else
# CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
# enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
- hardcode_direct=yes
- archive_cmds=''
- hardcode_libdir_separator=':'
- if test "$GCC" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
+ archive_cmds_CXX=''
+ hardcode_direct_CXX=yes
+ hardcode_libdir_separator_CXX=':'
+ link_all_deplibs_CXX=yes
+
+ 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
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
then
# We have reworked collect2
- hardcode_direct=yes
+ hardcode_direct_CXX=yes
else
# We have old collect2
- hardcode_direct=unsupported
+ 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=yes
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_libdir_separator=
+ hardcode_minus_L_CXX=yes
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ hardcode_libdir_separator_CXX=
fi
esac
-
shared_flag='-shared'
else
# not using gcc
if test "$host_cpu" = ia64; then
- shared_flag='${wl}-G'
+ # 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'
@@ -6643,397 +11907,5080 @@ else
fi
fi
- # It seems that -bexpall can do strange things, so it is better to
- # generate a list of symbols to export.
- always_export_symbols=yes
+ # 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='-berok'
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
- archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
+ allow_undefined_flag_CXX='-berok'
+ # Determine the default libpath from the value encoded in an empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${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 ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ 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 $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
else
- hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
+ # Determine the default libpath from the value encoded in an empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; 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.
- allow_undefined_flag='${wl}-berok'
- # This is a bit strange, but is similar to how AIX traditionally builds
- # it's shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
+ no_undefined_flag_CXX=' ${wl}-bernotok'
+ allow_undefined_flag_CXX=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ always_export_symbols_CXX=yes
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec_CXX=' '
+ archive_cmds_need_lc_CXX=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
fi
fi
;;
-
- amigaos*)
- 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
- # see comment about different semantics on the GNU ld section
- ld_shlibs=no
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
;;
cygwin* | mingw* | pw32*)
- # 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.
- hardcode_libdir_flag_spec=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''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'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
- ;;
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ 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}--image-base=0x10000000 ${wl}--out-implib,$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}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ else
+ ld_shlibs_CXX=no
+ fi
+ ;;
darwin* | rhapsody*)
+ if test "$GXX" = yes; then
+ archive_cmds_need_lc_CXX=no
case "$host_os" in
rhapsody* | darwin1.[012])
- allow_undefined_flag='-undefined suppress'
+ allow_undefined_flag_CXX='-undefined suppress'
;;
*) # Darwin 1.3 on
- allow_undefined_flag='-flat_namespace -undefined suppress'
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ allow_undefined_flag_CXX='-flat_namespace -undefined suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ allow_undefined_flag_CXX='-flat_namespace -undefined suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag_CXX='-undefined dynamic_lookup'
+ ;;
+ esac
+ fi
;;
esac
- # FIXME: Relying on posixy $() will cause problems for
- # cross-compilation, but unfortunately the echo tests do not
- # yet detect zsh echo's removal of \ escapes. Also zsh mangles
- # `"' quotes if we put them in here... so don't!
- archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
- # We need to add '_' to the symbols in $export_symbols first
- #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- whole_archive_flag_spec='-all_load $convenience'
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+ lt_int_apple_cc_single_mod=yes
+ fi
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ else
+ archive_cmds_CXX='$CC -r ${wl}-bind_at_load -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'
+ fi
+ module_cmds_CXX='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ hardcode_direct_CXX=no
+ hardcode_automatic_CXX=yes
+ hardcode_shlibpath_var_CXX=unsupported
+ whole_archive_flag_spec_CXX='-all_load $convenience'
+ link_all_deplibs_CXX=yes
+ else
+ ld_shlibs_CXX=no
+ fi
;;
- freebsd1*)
- ld_shlibs=no
+ 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
+ ;;
+ freebsd12*)
+ # 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* | kfreebsd*-gnu)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ ld_shlibs_CXX=yes
+ ;;
+ gnu*)
+ ;;
+ 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) | grep "-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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
+ case "$host_cpu" in
+ hppa*64*)
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld_CXX='+b $libdir'
+ hardcode_libdir_separator_CXX=:
+ ;;
+ ia64*)
+ hardcode_libdir_flag_spec_CXX='-L$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
+ export_dynamic_flag_spec_CXX='${wl}-E'
+ ;;
+ esac
+ fi
+ case "$host_cpu" in
+ hppa*64*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ ;;
+ ia64*)
+ hardcode_direct_CXX=no
+ hardcode_shlibpath_var_CXX=no
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ *)
+ hardcode_direct_CXX=yes
+ hardcode_minus_L_CXX=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
- # 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
+ case $cc_basename in
+ CC)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ aCC)
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ ;;
+ *)
+ 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; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case "$host_cpu" in
+ ia64*|hppa*64*)
+ archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ ;;
+ *)
+ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${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
+ ;;
+ 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" && echo -set_version $verstring` -update_registry ${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 -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ else
+ archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${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=:
+ ;;
+ linux*)
+ 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; echo $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)
+ # Intel C++
+ with_gnu_ld=yes
+ archive_cmds_need_lc_CXX=no
+ 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'
+ 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'
+ ;;
+ 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=`echo $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; echo $list'
+ ;;
+ 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::"'
+ ;;
+ osf3*)
+ case $cc_basename in
+ KCC)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
- # 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
+ # 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
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs'
+
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ cxx)
+ 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" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+ 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.
+ #
+ # 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=`echo $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; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ 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 "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ fi
+ ;;
+ esac
;;
+ 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.
+ old_archive_cmds_CXX='$CC -o $oldlib $oldobjs'
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ cxx)
+ 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" && echo -set_version $verstring` -update_registry ${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 $objdir/so_locations -o $lib~
+ $rm $lib.exp'
+
+ 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" | grep -v "ld:"`; templist=`echo $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; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_CXX=:
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd*)
- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
+ # 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 "\-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
+ ;;
+ sco*)
+ archive_cmds_need_lc_CXX=no
+ case $cc_basename in
+ CC)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ ld_shlibs_CXX=no
+ ;;
+ esac
;;
+ 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)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ no_undefined_flag_CXX=' -zdefs'
+ archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -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} -nolib ${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 C++ compiler is used as linker so we must use $wl
+ # flag to pass the commands to the underlying system
+ # linker.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ link_all_deplibs_CXX=yes
+
+ # 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 -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+ # 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 -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 -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 \"\-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 \"\-L\""
+ fi
+
+ hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir'
+ fi
+ ;;
+ esac
+ ;;
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+ archive_cmds_need_lc_CXX=no
+ ;;
+ 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
+echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6
+test "$ld_shlibs_CXX" = no && can_build_shared=no
+
+GCC_CXX="$GXX"
+LD_CXX="$LD"
+
+
+cat > conftest.$ac_ext <<EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+EOF
+
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; 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
+
+ # The `*' in the case matches for architectures that use `case' in
+ # $output_verbose_cmd can trigger glob expansion during the loop
+ # eval without this substitution.
+ output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+
+ for p in `eval $output_verbose_link_cmd`; do
+ case $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
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p 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
+ ;;
+
+ *.$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
+
+case " $postdeps_CXX " in
+*" -lc "*) archive_cmds_need_lc_CXX=no ;;
+esac
+
+lt_prog_compiler_wl_CXX=
+lt_prog_compiler_pic_CXX=
+lt_prog_compiler_static_CXX=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+ # 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'
- hpux9* | hpux10* | hpux11*)
case $host_os in
- hpux9*) 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' ;;
- *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
+ 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*)
+ # 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'
+ ;;
+ beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | os2* | pw32*)
+ # 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'
+ ;;
+ 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=
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_CXX=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # 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*)
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix4* | aix5*)
+ # 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_AC_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
+ ;;
+ 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* | kfreebsd*-gnu)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC)
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_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="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic_CXX='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ 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*)
+ case $cc_basename in
+ KCC)
+ # KAI C++ Compiler
+ lt_prog_compiler_wl_CXX='--backend -Wl,'
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ icpc)
+ # Intel C++
+ lt_prog_compiler_wl_CXX='-Wl,'
+ lt_prog_compiler_pic_CXX='-KPIC'
+ lt_prog_compiler_static_CXX='-static'
+ ;;
+ 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'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx)
+ lt_prog_compiler_pic_CXX='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ 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*)
+ ;;
+ sco*)
+ case $cc_basename in
+ CC)
+ lt_prog_compiler_pic_CXX='-fPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC)
+ # 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
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC)
+ # NonStop-UX NCC 3.20
+ lt_prog_compiler_pic_CXX='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ unixware*)
+ ;;
+ vxworks*)
+ ;;
+ *)
+ lt_prog_compiler_can_build_shared_CXX=no
+ ;;
esac
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- hardcode_minus_L=yes # Not in the search PATH, but as the default
- # location of the library.
- export_dynamic_flag_spec='${wl}-E'
+ fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_CXX"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_pic_works_CXX=no
+ ac_outfile=conftest.$ac_objext
+ printf "$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}? :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:13049: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:13053: \$? = $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
+ if test ! -s conftest.err; then
+ lt_prog_compiler_pic_works_CXX=yes
+ fi
+ fi
+ $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6
+
+if test x"$lt_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
+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
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o_CXX=no
+ $rm -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ printf "$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}? :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:13109: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:13113: \$? = $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
+ if test ! -s out/conftest.err; then
+ lt_cv_prog_compiler_c_o_CXX=yes
+ fi
+ fi
+ chmod u+w .
+ $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 ..
+ rmdir conftest
+ $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5
+echo "${ECHO_T}$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
+ echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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
+ echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+ if test "$hard_links" = no; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+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
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+ aix4* | aix5*)
+ # 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
+ 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")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
else
- archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='-rpath $libdir'
+ 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
- hardcode_libdir_separator=:
- link_all_deplibs=yes
;;
+ pw32*)
+ export_symbols_cmds_CXX="$ltdll_cmds"
+ ;;
+ cygwin* | mingw*)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ *)
+ export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
- netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5
+echo "${ECHO_T}$ld_shlibs_CXX" >&6
+test "$ld_shlibs_CXX" = 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
+
+#
+# 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.
+ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+ $rm conftest*
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl_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:$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=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ then
+ archive_cmds_need_lc_CXX=no
+ else
+ 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*
+ echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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"
+if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ # 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.
+ 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
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+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
+ 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'
+ ;;
+
+aix4* | aix5*)
+ version_type=linux
+ 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<name>.so
+ # instead of lib<name>.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
- archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ # 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
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ 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=`$echo "X$lib" | $Xsed -e '\''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'
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi4*)
+ version_type=linux
+ 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*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ 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'
+ 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="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ 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
+ ;;
+ 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
;;
- 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
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
- openbsd*)
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- 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'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${versuffix}$shared_ext ${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)'
+ # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+ if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+ else
+ sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+ fi
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ 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
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+kfreebsd*-gnu)
+ version_type=linux
+ 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='GNU ld.so'
+ ;;
+
+freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ 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
+ ;;
+ *) # from 3.2 on
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ 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
+ 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
- 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'
- ;;
+ 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'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ 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 Linux ELF.
+linux*)
+ version_type=linux
+ 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
+ # 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=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | 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'
+ ;;
+
+knetbsd*-gnu)
+ version_type=linux
+ 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='GNU 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
+ 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=linux
+ 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
+ ;;
+
+openbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=yes
+ 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
+ ;;
*)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
+ shlibpath_overrides_runpath=yes
+ ;;
esac
- fi
+ 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"
+ ;;
+
+sco3.2v5*)
+ version_type=osf
+ 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
+ ;;
+
+solaris*)
+ version_type=linux
+ 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.2uw2* | sysv4.3* | sysv5*)
+ version_type=linux
+ 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
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ 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
+ 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
+ ;;
+
+uts4*)
+ version_type=linux
+ 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
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
+
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&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-existant 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_AC_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
+echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5
+echo "${ECHO_T}$hardcode_action_CXX" >&6
+
+if test "$hardcode_action_CXX" = relink; 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
+
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}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"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ ;;
+ *)
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
;;
+ esac
+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=
- 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'
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
;;
- 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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
+ mingw* | pw32*)
+ 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
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; 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
+
+ ;;
+
+ *)
+ echo "$as_me:$LINENO: checking for shl_load" >&5
+echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
+if test "${ac_cv_func_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define shl_load innocuous_shl_load
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shl_load (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+/* 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_shl_load) || defined (__stub___shl_load)
+choke me
+#else
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != shl_load;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
+echo "${ECHO_T}$ac_cv_func_shl_load" >&6
+if test $ac_cv_func_shl_load = yes; then
+ lt_cv_dlopen="shl_load"
+else
+ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
+echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char shl_load ();
+int
+main ()
+{
+shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_shl_load=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_shl_load=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
+if test $ac_cv_lib_dld_shl_load = yes; then
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
+else
+ echo "$as_me:$LINENO: checking for dlopen" >&5
+echo $ECHO_N "checking for dlopen... $ECHO_C" >&6
+if test "${ac_cv_func_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define dlopen innocuous_dlopen
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char dlopen (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+/* 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_dlopen) || defined (__stub___dlopen)
+choke me
+#else
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
+#endif
+
+int
+main ()
+{
+return f != dlopen;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_func_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
+echo "${ECHO_T}$ac_cv_func_dlopen" >&6
+if test $ac_cv_func_dlopen = yes; then
+ lt_cv_dlopen="dlopen"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5
+echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_svld_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_svld_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6
+if test $ac_cv_lib_svld_dlopen = yes; then
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5
+echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dld_link ();
+int
+main ()
+{
+dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_cxx_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dld_dld_link=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dld_dld_link=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
+echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6
+if test $ac_cv_lib_dld_dld_link = yes; then
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
;;
+ esac
- 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} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${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='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
- $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+ 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"
+ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5
+echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF
+#line 14470 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=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;
+ /* dlclose (self); */
+ }
+
+ exit (status);
+}
+EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self" >&6
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ LDFLAGS="$LDFLAGS $link_static_flag"
+ echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5
+echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6
+if test "${lt_cv_dlopen_self_static+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&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 <<EOF
+#line 14568 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#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
- #Both c and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=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;
+ /* dlclose (self); */
+ }
+
+ exit (status);
+}
+EOF
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) 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_unknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5
+echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
fi
- hardcode_libdir_separator=:
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
;;
+ esac
- sco3.2v5*)
- 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
- export_dynamic_flag_spec='${wl}-Bexport'
+ 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
+
+
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+ # 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
+ # Now quote all the things that may contain metacharacters while being
+ # careful not to overquote the AC_SUBSTed values. We take copies of the
+ # variables and quote the copies for generation of the libtool script.
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ SED SHELL STRIP \
+ libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+ old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+ deplibs_check_method reload_flag reload_cmds need_locks \
+ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+ lt_cv_sys_global_symbol_to_c_name_address \
+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+ old_postinstall_cmds old_postuninstall_cmds \
+ compiler_CXX \
+ CC_CXX \
+ LD_CXX \
+ lt_prog_compiler_wl_CXX \
+ lt_prog_compiler_pic_CXX \
+ lt_prog_compiler_static_CXX \
+ lt_prog_compiler_no_builtin_flag_CXX \
+ export_dynamic_flag_spec_CXX \
+ thread_safe_flag_spec_CXX \
+ whole_archive_flag_spec_CXX \
+ enable_shared_with_static_runtimes_CXX \
+ old_archive_cmds_CXX \
+ old_archive_from_new_cmds_CXX \
+ predep_objects_CXX \
+ postdep_objects_CXX \
+ predeps_CXX \
+ postdeps_CXX \
+ compiler_lib_search_path_CXX \
+ archive_cmds_CXX \
+ archive_expsym_cmds_CXX \
+ postinstall_cmds_CXX \
+ postuninstall_cmds_CXX \
+ old_archive_from_expsyms_cmds_CXX \
+ allow_undefined_flag_CXX \
+ no_undefined_flag_CXX \
+ export_symbols_cmds_CXX \
+ hardcode_libdir_flag_spec_CXX \
+ hardcode_libdir_flag_spec_ld_CXX \
+ hardcode_libdir_separator_CXX \
+ hardcode_automatic_CXX \
+ module_cmds_CXX \
+ module_expsym_cmds_CXX \
+ lt_cv_prog_compiler_c_o_CXX \
+ exclude_expsyms_CXX \
+ include_expsyms_CXX; do
+
+ case $var in
+ old_archive_cmds_CXX | \
+ old_archive_from_new_cmds_CXX | \
+ archive_cmds_CXX | \
+ archive_expsym_cmds_CXX | \
+ module_cmds_CXX | \
+ module_expsym_cmds_CXX | \
+ old_archive_from_expsyms_cmds_CXX | \
+ export_symbols_cmds_CXX | \
+ extract_expsyms_cmds | reload_cmds | finish_cmds | \
+ postinstall_cmds | postuninstall_cmds | \
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+ # Double-quote double-evaled strings.
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+ ;;
+ *)
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+ ;;
+ esac
+ done
+
+ case $lt_echo in
+ *'\$0 --fallback-echo"')
+ lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
;;
+ esac
- solaris*)
- # gcc --version < 3.0 without binutils cannot create self contained
- # shared libraries reliably, requiring libgcc.a to resolve some of
- # the object symbols generated in some cases. Libraries that use
- # assert need libgcc.a to resolve __eprintf, for example. Linking
- # a copy of libgcc.a into every shared library to guarantee resolving
- # such symbols causes other problems: According to Tim Van Holder
- # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
- # (to the application) exception stack for one thing.
- no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- case `$CC --version 2>/dev/null` in
- [12].*)
- cat <<EOF 1>&2
+cfgfile="$ofile"
-*** Warning: Releases of GCC earlier than version 3.0 cannot reliably
-*** create self contained shared libraries on Solaris systems, without
-*** introducing a dependency on libgcc.a. Therefore, libtool is disabling
-*** -no-undefined support, which will at least allow you to build shared
-*** libraries. However, you may find that when you link such libraries
-*** into an application without using GCC, you have to manually add
-*** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
-*** upgrade to a newer version of GCC. Another option is to rebuild your
-*** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
+ cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
-EOF
- no_undefined_flag=
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# 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
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_CXX
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_CXX
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_CXX
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_CXX
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_CXX
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# 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
+
+# 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
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_CXX
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_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
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX
+
+# Library versioning type.
+version_type=$version_type
+
+# 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
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_CXX
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# 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 and install a shared archive.
+archive_cmds=$lt_archive_cmds_CXX
+archive_expsym_cmds=$lt_archive_expsym_cmds_CXX
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_CXX
+module_expsym_cmds=$lt_module_expsym_cmds_CXX
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_CXX
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_CXX
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+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
+
+# 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
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_CXX
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_CXX
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# 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
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_CXX
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# 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
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_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 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
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_CXX
+
+# 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
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_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
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# 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
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+ # If there is no Makefile yet, we rely on a make rule to execute
+ # `config.status --recheck' to rerun these tests and create the
+ # libtool script then.
+ ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+ if test -f "$ltmain_in"; then
+ test -f Makefile && make "$ltmain"
+ 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
+
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+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
+
+ else
+ tagname=""
+ fi
;;
- esac
- fi
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- 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'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_shlibpath_var=no
+
+ F77)
+ if test -n "$F77" && test "X$F77" != "Xno"; then
+
+ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+
+
+archive_cmds_need_lc_F77=no
+allow_undefined_flag_F77=
+always_export_symbols_F77=no
+archive_expsym_cmds_F77=
+export_dynamic_flag_spec_F77=
+hardcode_direct_F77=no
+hardcode_libdir_flag_spec_F77=
+hardcode_libdir_flag_spec_ld_F77=
+hardcode_libdir_separator_F77=
+hardcode_minus_L_F77=no
+hardcode_automatic_F77=no
+module_cmds_F77=
+module_expsym_cmds_F77=
+link_all_deplibs_F77=unknown
+old_archive_cmds_F77=$old_archive_cmds
+no_undefined_flag_F77=
+whole_archive_flag_spec_F77=
+enable_shared_with_static_runtimes_F77=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+objext_F77=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code=" subroutine t\n return\n end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code=" program t\n end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+compiler_F77=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
+echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $can_build_shared" >&5
+echo "${ECHO_T}$can_build_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
+echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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
+ ;;
+aix4* | aix5*)
+ test "$enable_shared" = yes && enable_static=no
+ ;;
+esac
+echo "$as_me:$LINENO: result: $enable_shared" >&5
+echo "${ECHO_T}$enable_shared" >&6
+
+echo "$as_me:$LINENO: checking whether to build static libraries" >&5
+echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
+# Make sure either enable_shared or enable_static is yes.
+test "$enable_shared" = yes || enable_static=yes
+echo "$as_me:$LINENO: result: $enable_static" >&5
+echo "${ECHO_T}$enable_static" >&6
+
+test "$ld_shlibs_F77" = no && can_build_shared=no
+
+GCC_F77="$G77"
+LD_F77="$LD"
+
+lt_prog_compiler_wl_F77=
+lt_prog_compiler_pic_F77=
+lt_prog_compiler_static_F77=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_static_F77='-static'
+
case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *) # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_F77='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ # 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_F77='-m68020 -resident32 -malways-restore-a4'
+ ;;
+
+ beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | pw32* | os2*)
+ # 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_F77='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_F77='-fno-common'
+ ;;
+
+ 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_F77=no
+ enable_shared=no
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_F77=-Kconform_pic
+ fi
+ ;;
+
+ hpux*)
+ # 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_F77='-fPIC'
+ ;;
+ esac
+ ;;
+
+ *)
+ lt_prog_compiler_pic_F77='-fPIC'
+ ;;
esac
- link_all_deplibs=yes
- ;;
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_F77='-Bstatic'
+ else
+ lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
- 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
- ;;
+ mingw* | pw32* | os2*)
+ # 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_F77='-DDLL_EXPORT'
+ ;;
- 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
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl_F77='-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_F77='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static_F77='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static_F77='-non_shared'
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+
+ linux*)
+ case $CC in
+ icc* | ecc*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-static'
;;
- 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
+ ccc*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static_F77='-non_shared'
;;
+ esac
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static_F77='-non_shared'
+ ;;
+
+ sco3.2v5*)
+ lt_prog_compiler_pic_F77='-Kpic'
+ lt_prog_compiler_static_F77='-dn'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl_F77='-Qoption ld '
+ lt_prog_compiler_pic_F77='-PIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ lt_prog_compiler_wl_F77='-Wl,'
+ lt_prog_compiler_pic_F77='-KPIC'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic_F77='-Kconform_pic'
+ lt_prog_compiler_static_F77='-Bstatic'
+ fi
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic_F77='-pic'
+ lt_prog_compiler_static_F77='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared_F77=no
+ ;;
esac
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- ;;
+ fi
- sysv4.3*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- export_dynamic_flag_spec='-Bexport'
- ;;
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6
- sysv5*)
- no_undefined_flag=' -z text'
- # $CC -shared without GNU ld will not create a library from C++
- # object files and a static libstdc++, better avoid it by now
- 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'
- hardcode_libdir_flag_spec=
- hardcode_shlibpath_var=no
- runpath_var='LD_RUN_PATH'
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_F77"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_F77+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_pic_works_F77=no
+ ac_outfile=conftest.$ac_objext
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_F77"
+ # 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}? :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:15395: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:15399: \$? = $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
+ if test ! -s conftest.err; then
+ lt_prog_compiler_pic_works_F77=yes
+ fi
+ fi
+ $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6
+
+if test x"$lt_prog_compiler_pic_works_F77" = xyes; then
+ case $lt_prog_compiler_pic_F77 in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;;
+ esac
+else
+ lt_prog_compiler_pic_F77=
+ lt_prog_compiler_can_build_shared_F77=no
+fi
+
+fi
+case "$host_os" in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic_F77=
+ ;;
+ *)
+ lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77"
;;
+esac
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o_F77=no
+ $rm -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ printf "$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}? :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:15455: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:15459: \$? = $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
+ if test ! -s out/conftest.err; then
+ lt_cv_prog_compiler_c_o_F77=yes
+ fi
+ fi
+ chmod u+w .
+ $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 ..
+ rmdir conftest
+ $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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
+ echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+ if test "$hard_links" = no; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+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
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+ runpath_var=
+ allow_undefined_flag_F77=
+ enable_shared_with_static_runtimes_F77=no
+ archive_cmds_F77=
+ archive_expsym_cmds_F77=
+ old_archive_From_new_cmds_F77=
+ old_archive_from_expsyms_cmds_F77=
+ export_dynamic_flag_spec_F77=
+ whole_archive_flag_spec_F77=
+ thread_safe_flag_spec_F77=
+ hardcode_libdir_flag_spec_F77=
+ hardcode_libdir_flag_spec_ld_F77=
+ hardcode_libdir_separator_F77=
+ hardcode_direct_F77=no
+ hardcode_minus_L_F77=no
+ hardcode_shlibpath_var_F77=unsupported
+ link_all_deplibs_F77=unknown
+ hardcode_automatic_F77=no
+ module_cmds_F77=
+ module_expsym_cmds_F77=
+ always_export_symbols_F77=no
+ export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms_F77=
+ # 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_F77="_GLOBAL_OFFSET_TABLE_"
+ # 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.
+ extract_expsyms_cmds=
- uts4*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # 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
;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
- dgux*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
+ ld_shlibs_F77=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs_F77=no
+ cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+ fi
+ ;;
+
+ amigaos*)
+ archive_cmds_F77='$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_F77='-L$libdir'
+ hardcode_minus_L_F77=yes
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can't use
+ # them.
+ ld_shlibs_F77=no
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag_F77=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs_F77=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ allow_undefined_flag_F77=unsupported
+ always_export_symbols_F77=no
+ enable_shared_with_static_runtimes_F77=yes
+ export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds_F77='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}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs_F77=no
+ cat <<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.
+
+EOF
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs_F77=no
+ fi
+ ;;
+
+ sunos4*)
+ archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct_F77=yes
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ linux*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds_F77="$tmp_archive_cmds"
+ supports_anon_versioning=no
+ case `$LD -v 2>/dev/null` in
+ *\ 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
+ if test $supports_anon_versioning = yes; then
+ archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ else
+ archive_expsym_cmds_F77="$tmp_archive_cmds"
+ fi
+ else
+ ld_shlibs_F77=no
+ fi
;;
- sysv4*MP*)
- if test -d /usr/nec; then
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs_F77=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs_F77" = yes; then
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec_F77='${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_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec_F77=
+ fi
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag_F77=unsupported
+ always_export_symbols_F77=yes
+ archive_expsym_cmds_F77='$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_F77=yes
+ if test "$GCC" = yes && test -z "$link_static_flag"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct_F77=unsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ 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
+ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+ export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds_F77='$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].*|aix5*)
+ 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_F77=''
+ hardcode_direct_F77=yes
+ hardcode_libdir_separator_F77=':'
+ link_all_deplibs_F77=yes
+
+ 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
+ hardcode_direct_F77=yes
+ else
+ # We have old collect2
+ hardcode_direct_F77=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_F77=yes
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ hardcode_libdir_separator_F77=
+ fi
+ esac
+ shared_flag='-shared'
+ 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
+
+ # 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_F77=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_F77='-berok'
+ # Determine the default libpath from the value encoded in an empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+ program main
+
+ end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_f77_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag_F77="-z nodefs"
+ archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+ program main
+
+ end
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_f77_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec_F77='${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_F77=' ${wl}-bernotok'
+ allow_undefined_flag_F77=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ always_export_symbols_F77=yes
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec_F77=' '
+ archive_cmds_need_lc_F77=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ archive_cmds_F77='$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_F77='-L$libdir'
+ hardcode_minus_L_F77=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs_F77=no
+ ;;
+
+ bsdi4*)
+ export_dynamic_flag_spec_F77=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # 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.
+ hardcode_libdir_flag_spec_F77=' '
+ allow_undefined_flag_F77=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_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_From_new_cmds_F77='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes_F77=yes
+ ;;
+
+ darwin* | rhapsody*)
+ if test "$GXX" = yes ; then
+ archive_cmds_need_lc_F77=no
+ case "$host_os" in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag_F77='-undefined suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ allow_undefined_flag_F77='-flat_namespace -undefined suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ allow_undefined_flag_F77='-flat_namespace -undefined suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag_F77='-undefined dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+ lt_int_apple_cc_single_mod=yes
+ fi
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ else
+ archive_cmds_F77='$CC -r ${wl}-bind_at_load -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'
+ fi
+ module_cmds_F77='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ hardcode_direct_F77=no
+ hardcode_automatic_F77=yes
+ hardcode_shlibpath_var_F77=unsupported
+ whole_archive_flag_spec_F77='-all_load $convenience'
+ link_all_deplibs_F77=yes
+ else
+ ld_shlibs_F77=no
+ fi
+ ;;
+
+ dgux*)
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs_F77=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_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec_F77='-R$libdir'
+ hardcode_direct_F77=yes
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_F77=yes
+ hardcode_minus_L_F77=yes
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | kfreebsd*-gnu)
+ archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_F77='-R$libdir'
+ hardcode_direct_F77=yes
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${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_F77='$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_F77='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_F77=:
+ hardcode_direct_F77=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L_F77=yes
+ export_dynamic_flag_spec_F77='${wl}-E'
+ ;;
+
+ hpux10* | hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ *)
+ archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld_F77='+b $libdir'
+ hardcode_libdir_separator_F77=:
+ hardcode_direct_F77=no
+ hardcode_shlibpath_var_F77=no
+ ;;
+ ia64*)
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ hardcode_direct_F77=no
+ hardcode_shlibpath_var_F77=no
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L_F77=yes
+ ;;
+ *)
+ hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_F77=:
+ hardcode_direct_F77=yes
+ export_dynamic_flag_spec_F77='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L_F77=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec_ld_F77='-rpath $libdir'
+ fi
+ hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_F77=:
+ link_all_deplibs_F77=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec_F77='-R$libdir'
+ hardcode_direct_F77=yes
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ newsos6)
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_F77=yes
+ hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_F77=:
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ openbsd*)
+ hardcode_direct_F77=yes
+ hardcode_shlibpath_var_F77=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_F77='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_F77='-R$libdir'
+ ;;
+ *)
+ archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ hardcode_minus_L_F77=yes
+ allow_undefined_flag_F77=unsupported
+ archive_cmds_F77='$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_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag_F77=' -expect_unresolved \*'
+ archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_F77=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag_F77=' -expect_unresolved \*'
+ archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec_F77='-rpath $libdir'
+ fi
+ hardcode_libdir_separator_F77=:
+ ;;
+
+ sco3.2v5*)
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var_F77=no
+ export_dynamic_flag_spec_F77='${wl}-Bexport'
runpath_var=LD_RUN_PATH
hardcode_runpath_var=yes
- ld_shlibs=yes
+ ;;
+
+ solaris*)
+ no_undefined_flag_F77=' -z text'
+ if test "$GCC" = yes; then
+ archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+ else
+ archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds_F77='$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'
+ fi
+ hardcode_libdir_flag_spec_F77='-R$libdir'
+ hardcode_shlibpath_var_F77=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;;
+ esac
+ link_all_deplibs_F77=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_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ hardcode_direct_F77=yes
+ hardcode_minus_L_F77=yes
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_F77=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds_F77='$CC -r -o $output$reload_objs'
+ hardcode_direct_F77=no
+ ;;
+ motorola)
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var_F77=no
+ export_dynamic_flag_spec_F77='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var_F77=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs_F77=yes
+ fi
+ ;;
+
+ sysv4.2uw2*)
+ archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_F77=yes
+ hardcode_minus_L_F77=no
+ hardcode_shlibpath_var_F77=no
+ hardcode_runpath_var=yes
+ runpath_var=LD_RUN_PATH
+ ;;
+
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+ no_undefined_flag_F77='${wl}-z ${wl}text'
+ if test "$GCC" = yes; then
+ archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ sysv5*)
+ no_undefined_flag_F77=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds_F77='$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'
+ hardcode_libdir_flag_spec_F77=
+ hardcode_shlibpath_var_F77=no
+ runpath_var='LD_RUN_PATH'
+ ;;
+
+ uts4*)
+ archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_F77='-L$libdir'
+ hardcode_shlibpath_var_F77=no
+ ;;
+
+ *)
+ ld_shlibs_F77=no
+ ;;
+ esac
+ fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5
+echo "${ECHO_T}$ld_shlibs_F77" >&6
+test "$ld_shlibs_F77" = 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
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_F77" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc_F77=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds_F77 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.
+ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+ $rm conftest*
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl_F77
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag_F77
+ allow_undefined_flag_F77=
+ if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ then
+ archive_cmds_need_lc_F77=no
+ else
+ archive_cmds_need_lc_F77=yes
+ fi
+ allow_undefined_flag_F77=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $rm conftest*
+ echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
+echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&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"
+if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ # 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.
+ 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
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+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
+ 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'
+ ;;
+
+aix4* | aix5*)
+ version_type=linux
+ 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<name>.so
+ # instead of lib<name>.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*)
+ 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=`$echo "X$lib" | $Xsed -e '\''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'
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi4*)
+ version_type=linux
+ 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*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ 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'
+ 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="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ 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
+ ;;
+ 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
;;
- sysv4.2uw2*)
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=no
- hardcode_shlibpath_var=no
- hardcode_runpath_var=yes
- runpath_var=LD_RUN_PATH
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # 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}${versuffix}$shared_ext ${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)'
+ # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+ if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+ else
+ sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+ fi
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
- sysv5uw7* | unixware7*)
- no_undefined_flag='${wl}-z ${wl}text'
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+dgux*)
+ version_type=linux
+ 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
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+kfreebsd*-gnu)
+ version_type=linux
+ 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='GNU ld.so'
+ ;;
+
+freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ 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
+ ;;
+ *) # from 3.2 on
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ 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
+ 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
- archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
fi
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
+ 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'
+ ;;
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ 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=
+ ;;
*)
- ld_shlibs=no
+ 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
-fi
-echo "$as_me:$LINENO: result: $ld_shlibs" >&5
-echo "${ECHO_T}$ld_shlibs" >&6
-test "$ld_shlibs" = no && can_build_shared=no
+ 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 Linux ELF.
+linux*)
+ version_type=linux
+ 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
+ # 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=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | 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'
+ ;;
+
+knetbsd*-gnu)
+ version_type=linux
+ 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='GNU 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
+ 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=linux
+ 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
+ ;;
+
+openbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=yes
+ 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"
+ ;;
+
+sco3.2v5*)
+ version_type=osf
+ 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
+ ;;
+
+solaris*)
+ version_type=linux
+ 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.2uw2* | sysv4.3* | sysv5*)
+ version_type=linux
+ 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
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ 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
+ 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
+ ;;
+
+uts4*)
+ version_type=linux
+ 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
+echo "$as_me:$LINENO: result: $dynamic_linker" >&5
+echo "${ECHO_T}$dynamic_linker" >&6
+test "$dynamic_linker" = no && can_build_shared=no
-# Check hardcoding attributes.
echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" || \
- test -n "$runpath_var"; then
+hardcode_action_F77=
+if test -n "$hardcode_libdir_flag_spec_F77" || \
+ test -n "$runpath_var F77" || \
+ test "X$hardcode_automatic_F77"="Xyes" ; then
# We can hardcode non-existant directories.
- if test "$hardcode_direct" != no &&
+ if test "$hardcode_direct_F77" != 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 "$hardcode_shlibpath_var" != no &&
- test "$hardcode_minus_L" != no; then
+ ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no &&
+ test "$hardcode_minus_L_F77" != no; then
# Linking always hardcodes the temporary library directory.
- hardcode_action=relink
+ hardcode_action_F77=relink
else
# We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action=immediate
+ hardcode_action_F77=immediate
fi
else
# We cannot hardcode anything, or else we can only hardcode existing
# directories.
- hardcode_action=unsupported
+ hardcode_action_F77=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5
+echo "${ECHO_T}$hardcode_action_F77" >&6
+
+if test "$hardcode_action_F77" = relink; 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
-echo "$as_me:$LINENO: result: $hardcode_action" >&5
-echo "${ECHO_T}$hardcode_action" >&6
striplib=
old_striplib=
@@ -7045,19 +16992,1767 @@ if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
echo "$as_me:$LINENO: result: yes" >&5
echo "${ECHO_T}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"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
echo "$as_me:$LINENO: result: no" >&5
echo "${ECHO_T}no" >&6
fi
+ ;;
+ *)
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ ;;
+ esac
+fi
+
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-# PORTME Fill in your ld.so characteristics
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+ # 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
+ # Now quote all the things that may contain metacharacters while being
+ # careful not to overquote the AC_SUBSTed values. We take copies of the
+ # variables and quote the copies for generation of the libtool script.
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ SED SHELL STRIP \
+ libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+ old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+ deplibs_check_method reload_flag reload_cmds need_locks \
+ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+ lt_cv_sys_global_symbol_to_c_name_address \
+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+ old_postinstall_cmds old_postuninstall_cmds \
+ compiler_F77 \
+ CC_F77 \
+ LD_F77 \
+ lt_prog_compiler_wl_F77 \
+ lt_prog_compiler_pic_F77 \
+ lt_prog_compiler_static_F77 \
+ lt_prog_compiler_no_builtin_flag_F77 \
+ export_dynamic_flag_spec_F77 \
+ thread_safe_flag_spec_F77 \
+ whole_archive_flag_spec_F77 \
+ enable_shared_with_static_runtimes_F77 \
+ old_archive_cmds_F77 \
+ old_archive_from_new_cmds_F77 \
+ predep_objects_F77 \
+ postdep_objects_F77 \
+ predeps_F77 \
+ postdeps_F77 \
+ compiler_lib_search_path_F77 \
+ archive_cmds_F77 \
+ archive_expsym_cmds_F77 \
+ postinstall_cmds_F77 \
+ postuninstall_cmds_F77 \
+ old_archive_from_expsyms_cmds_F77 \
+ allow_undefined_flag_F77 \
+ no_undefined_flag_F77 \
+ export_symbols_cmds_F77 \
+ hardcode_libdir_flag_spec_F77 \
+ hardcode_libdir_flag_spec_ld_F77 \
+ hardcode_libdir_separator_F77 \
+ hardcode_automatic_F77 \
+ module_cmds_F77 \
+ module_expsym_cmds_F77 \
+ lt_cv_prog_compiler_c_o_F77 \
+ exclude_expsyms_F77 \
+ include_expsyms_F77; do
+
+ case $var in
+ old_archive_cmds_F77 | \
+ old_archive_from_new_cmds_F77 | \
+ archive_cmds_F77 | \
+ archive_expsym_cmds_F77 | \
+ module_cmds_F77 | \
+ module_expsym_cmds_F77 | \
+ old_archive_from_expsyms_cmds_F77 | \
+ export_symbols_cmds_F77 | \
+ extract_expsyms_cmds | reload_cmds | finish_cmds | \
+ postinstall_cmds | postuninstall_cmds | \
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+ # Double-quote double-evaled strings.
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+ ;;
+ *)
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+ ;;
+ esac
+ done
+
+ case $lt_echo in
+ *'\$0 --fallback-echo"')
+ lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+ ;;
+ esac
+
+cfgfile="$ofile"
+
+ cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_F77
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_F77
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_F77
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_F77
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_F77
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_F77
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# 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
+
+# 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
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_F77
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77
+
+# Library versioning type.
+version_type=$version_type
+
+# 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
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_F77
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_F77
+archive_expsym_cmds=$lt_archive_expsym_cmds_F77
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_F77
+module_expsym_cmds=$lt_module_expsym_cmds_F77
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_F77
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_F77
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_F77
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_F77
+
+# 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
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_F77
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_F77
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# 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
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_F77
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# 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_F77
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_F77
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_F77
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_F77
+
+# 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_F77
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_F77
+
+# 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
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_F77"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_F77
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_F77
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_F77
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_F77
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
+else
+ # If there is no Makefile yet, we rely on a make rule to execute
+ # `config.status --recheck' to rerun these tests and create the
+ # libtool script then.
+ ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+ if test -f "$ltmain_in"; then
+ test -f Makefile && make "$ltmain"
+ 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
+
+CC="$lt_save_CC"
+
+ else
+ tagname=""
+ fi
+ ;;
+
+ GCJ)
+ if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
+
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+objext_GCJ=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+compiler_GCJ=$CC
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+archive_cmds_need_lc_GCJ=no
+
+
+lt_prog_compiler_no_builtin_flag_GCJ=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin'
+
+
+echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ printf "$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}? :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:17488: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:17492: \$? = $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
+ if test ! -s conftest.err; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+lt_prog_compiler_wl_GCJ=
+lt_prog_compiler_pic_GCJ=
+lt_prog_compiler_static_GCJ=
+
+echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5
+echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ lt_prog_compiler_static_GCJ='-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_GCJ='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ # 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_GCJ='-m68020 -resident32 -malways-restore-a4'
+ ;;
+
+ beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | pw32* | os2*)
+ # 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_GCJ='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic_GCJ='-fno-common'
+ ;;
+
+ 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_GCJ=no
+ enable_shared=no
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic_GCJ=-Kconform_pic
+ fi
+ ;;
+
+ hpux*)
+ # 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_GCJ='-fPIC'
+ ;;
+ esac
+ ;;
+
+ *)
+ lt_prog_compiler_pic_GCJ='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ else
+ lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | pw32* | os2*)
+ # 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_GCJ='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl_GCJ='-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_GCJ='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static_GCJ='-non_shared'
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ ;;
+
+ linux*)
+ case $CC in
+ icc* | ecc*)
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_static_GCJ='-static'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static_GCJ='-non_shared'
+ ;;
+ esac
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static_GCJ='-non_shared'
+ ;;
+
+ sco3.2v5*)
+ lt_prog_compiler_pic_GCJ='-Kpic'
+ lt_prog_compiler_static_GCJ='-dn'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl_GCJ='-Qoption ld '
+ lt_prog_compiler_pic_GCJ='-PIC'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ lt_prog_compiler_wl_GCJ='-Wl,'
+ lt_prog_compiler_pic_GCJ='-KPIC'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic_GCJ='-Kconform_pic'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ fi
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic_GCJ='-pic'
+ lt_prog_compiler_static_GCJ='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared_GCJ=no
+ ;;
+ esac
+ fi
+
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic_GCJ"; then
+
+echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5
+echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6
+if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_prog_compiler_pic_works_GCJ=no
+ ac_outfile=conftest.$ac_objext
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic_GCJ"
+ # 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}? :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:17721: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:17725: \$? = $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
+ if test ! -s conftest.err; then
+ lt_prog_compiler_pic_works_GCJ=yes
+ fi
+ fi
+ $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5
+echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6
+
+if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then
+ case $lt_prog_compiler_pic_GCJ in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;;
+ esac
+else
+ lt_prog_compiler_pic_GCJ=
+ lt_prog_compiler_can_build_shared_GCJ=no
+fi
+
+fi
+case "$host_os" in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic_GCJ=
+ ;;
+ *)
+ lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ"
+ ;;
+esac
+
+echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5
+echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6
+if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ lt_cv_prog_compiler_c_o_GCJ=no
+ $rm -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ printf "$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}? :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:17781: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:17785: \$? = $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
+ if test ! -s out/conftest.err; then
+ lt_cv_prog_compiler_c_o_GCJ=yes
+ fi
+ fi
+ chmod u+w .
+ $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 ..
+ rmdir conftest
+ $rm conftest*
+
+fi
+echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5
+echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ echo "$as_me:$LINENO: checking if we can lock with hard links" >&5
+echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&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
+ echo "$as_me:$LINENO: result: $hard_links" >&5
+echo "${ECHO_T}$hard_links" >&6
+ if test "$hard_links" = no; then
+ { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+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
+
+echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6
+
+ runpath_var=
+ allow_undefined_flag_GCJ=
+ enable_shared_with_static_runtimes_GCJ=no
+ archive_cmds_GCJ=
+ archive_expsym_cmds_GCJ=
+ old_archive_From_new_cmds_GCJ=
+ old_archive_from_expsyms_cmds_GCJ=
+ export_dynamic_flag_spec_GCJ=
+ whole_archive_flag_spec_GCJ=
+ thread_safe_flag_spec_GCJ=
+ hardcode_libdir_flag_spec_GCJ=
+ hardcode_libdir_flag_spec_ld_GCJ=
+ hardcode_libdir_separator_GCJ=
+ hardcode_direct_GCJ=no
+ hardcode_minus_L_GCJ=no
+ hardcode_shlibpath_var_GCJ=unsupported
+ link_all_deplibs_GCJ=unknown
+ hardcode_automatic_GCJ=no
+ module_cmds_GCJ=
+ module_expsym_cmds_GCJ=
+ always_export_symbols_GCJ=no
+ export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms_GCJ=
+ # 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_GCJ="_GLOBAL_OFFSET_TABLE_"
+ # 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.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # 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
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ ld_shlibs_GCJ=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs_GCJ=no
+ cat <<EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, 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 modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+EOF
+ fi
+ ;;
+
+ amigaos*)
+ archive_cmds_GCJ='$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_GCJ='-L$libdir'
+ hardcode_minus_L_GCJ=yes
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can't use
+ # them.
+ ld_shlibs_GCJ=no
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag_GCJ=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs_GCJ=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec_GCJ='-L$libdir'
+ allow_undefined_flag_GCJ=unsupported
+ always_export_symbols_GCJ=no
+ enable_shared_with_static_runtimes_GCJ=yes
+ export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds_GCJ='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}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs_GCJ=no
+ cat <<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.
+
+EOF
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs_GCJ=no
+ fi
+ ;;
+
+ sunos4*)
+ archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct_GCJ=yes
+ hardcode_shlibpath_var_GCJ=no
+ ;;
+
+ linux*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_cmds_GCJ="$tmp_archive_cmds"
+ supports_anon_versioning=no
+ case `$LD -v 2>/dev/null` in
+ *\ 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
+ if test $supports_anon_versioning = yes; then
+ archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~
+cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+$echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ else
+ archive_expsym_cmds_GCJ="$tmp_archive_cmds"
+ fi
+ else
+ ld_shlibs_GCJ=no
+ fi
+ ;;
+
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs_GCJ=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs_GCJ" = yes; then
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir'
+ export_dynamic_flag_spec_GCJ='${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_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec_GCJ=
+ fi
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag_GCJ=unsupported
+ always_export_symbols_GCJ=yes
+ archive_expsym_cmds_GCJ='$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_GCJ=yes
+ if test "$GCC" = yes && test -z "$link_static_flag"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct_GCJ=unsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ 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
+ if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
+ export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds_GCJ='$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].*|aix5*)
+ 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_GCJ=''
+ hardcode_direct_GCJ=yes
+ hardcode_libdir_separator_GCJ=':'
+ link_all_deplibs_GCJ=yes
+
+ 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
+ hardcode_direct_GCJ=yes
+ else
+ # We have old collect2
+ hardcode_direct_GCJ=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_GCJ=yes
+ hardcode_libdir_flag_spec_GCJ='-L$libdir'
+ hardcode_libdir_separator_GCJ=
+ fi
+ esac
+ shared_flag='-shared'
+ 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
+
+ # 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_GCJ=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_GCJ='-berok'
+ # Determine the default libpath from the value encoded in an empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag_GCJ="-z nodefs"
+ archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an empty executable.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec_GCJ='${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_GCJ=' ${wl}-bernotok'
+ allow_undefined_flag_GCJ=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ always_export_symbols_GCJ=yes
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec_GCJ=' '
+ archive_cmds_need_lc_GCJ=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ archive_cmds_GCJ='$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_GCJ='-L$libdir'
+ hardcode_minus_L_GCJ=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs_GCJ=no
+ ;;
+
+ bsdi4*)
+ export_dynamic_flag_spec_GCJ=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # 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.
+ hardcode_libdir_flag_spec_GCJ=' '
+ allow_undefined_flag_GCJ=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_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_From_new_cmds_GCJ='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes_GCJ=yes
+ ;;
+
+ darwin* | rhapsody*)
+ if test "$GXX" = yes ; then
+ archive_cmds_need_lc_GCJ=no
+ case "$host_os" in
+ rhapsody* | darwin1.[012])
+ allow_undefined_flag_GCJ='-undefined suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ allow_undefined_flag_GCJ='-flat_namespace -undefined suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[012])
+ allow_undefined_flag_GCJ='-flat_namespace -undefined suppress'
+ ;;
+ 10.*)
+ allow_undefined_flag_GCJ='-undefined dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
+ lt_int_apple_cc_single_mod=yes
+ fi
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ else
+ archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -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'
+ fi
+ module_cmds_GCJ='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ hardcode_direct_GCJ=no
+ hardcode_automatic_GCJ=yes
+ hardcode_shlibpath_var_GCJ=unsupported
+ whole_archive_flag_spec_GCJ='-all_load $convenience'
+ link_all_deplibs_GCJ=yes
+ else
+ ld_shlibs_GCJ=no
+ fi
+ ;;
+
+ dgux*)
+ archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_GCJ='-L$libdir'
+ hardcode_shlibpath_var_GCJ=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs_GCJ=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_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec_GCJ='-R$libdir'
+ hardcode_direct_GCJ=yes
+ hardcode_shlibpath_var_GCJ=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_GCJ=yes
+ hardcode_minus_L_GCJ=yes
+ hardcode_shlibpath_var_GCJ=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | kfreebsd*-gnu)
+ archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_GCJ='-R$libdir'
+ hardcode_direct_GCJ=yes
+ hardcode_shlibpath_var_GCJ=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${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_GCJ='$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_GCJ='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_GCJ=:
+ hardcode_direct_GCJ=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L_GCJ=yes
+ export_dynamic_flag_spec_GCJ='${wl}-E'
+ ;;
+
+ hpux10* | hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ *)
+ archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld_GCJ='+b $libdir'
+ hardcode_libdir_separator_GCJ=:
+ hardcode_direct_GCJ=no
+ hardcode_shlibpath_var_GCJ=no
+ ;;
+ ia64*)
+ hardcode_libdir_flag_spec_GCJ='-L$libdir'
+ hardcode_direct_GCJ=no
+ hardcode_shlibpath_var_GCJ=no
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L_GCJ=yes
+ ;;
+ *)
+ hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator_GCJ=:
+ hardcode_direct_GCJ=yes
+ export_dynamic_flag_spec_GCJ='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L_GCJ=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir'
+ fi
+ hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_GCJ=:
+ link_all_deplibs_GCJ=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
+ archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec_GCJ='-R$libdir'
+ hardcode_direct_GCJ=yes
+ hardcode_shlibpath_var_GCJ=no
+ ;;
+
+ newsos6)
+ archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_GCJ=yes
+ hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_GCJ=:
+ hardcode_shlibpath_var_GCJ=no
+ ;;
+
+ openbsd*)
+ hardcode_direct_GCJ=yes
+ hardcode_shlibpath_var_GCJ=no
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec_GCJ='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_GCJ='-R$libdir'
+ ;;
+ *)
+ archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec_GCJ='-L$libdir'
+ hardcode_minus_L_GCJ=yes
+ allow_undefined_flag_GCJ=unsupported
+ archive_cmds_GCJ='$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_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag_GCJ=' -expect_unresolved \*'
+ archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator_GCJ=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag_GCJ=' -expect_unresolved \*'
+ archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec_GCJ='-rpath $libdir'
+ fi
+ hardcode_libdir_separator_GCJ=:
+ ;;
+
+ sco3.2v5*)
+ archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var_GCJ=no
+ export_dynamic_flag_spec_GCJ='${wl}-Bexport'
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ;;
+
+ solaris*)
+ no_undefined_flag_GCJ=' -z text'
+ if test "$GCC" = yes; then
+ archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+ else
+ archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds_GCJ='$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'
+ fi
+ hardcode_libdir_flag_spec_GCJ='-R$libdir'
+ hardcode_shlibpath_var_GCJ=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+ whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;;
+ esac
+ link_all_deplibs_GCJ=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_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec_GCJ='-L$libdir'
+ hardcode_direct_GCJ=yes
+ hardcode_minus_L_GCJ=yes
+ hardcode_shlibpath_var_GCJ=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_GCJ=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds_GCJ='$CC -r -o $output$reload_objs'
+ hardcode_direct_GCJ=no
+ ;;
+ motorola)
+ archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var_GCJ=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var_GCJ=no
+ export_dynamic_flag_spec_GCJ='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var_GCJ=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs_GCJ=yes
+ fi
+ ;;
+
+ sysv4.2uw2*)
+ archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct_GCJ=yes
+ hardcode_minus_L_GCJ=no
+ hardcode_shlibpath_var_GCJ=no
+ hardcode_runpath_var=yes
+ runpath_var=LD_RUN_PATH
+ ;;
+
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+ no_undefined_flag_GCJ='${wl}-z ${wl}text'
+ if test "$GCC" = yes; then
+ archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var_GCJ=no
+ ;;
+
+ sysv5*)
+ no_undefined_flag_GCJ=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds_GCJ='$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'
+ hardcode_libdir_flag_spec_GCJ=
+ hardcode_shlibpath_var_GCJ=no
+ runpath_var='LD_RUN_PATH'
+ ;;
+
+ uts4*)
+ archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec_GCJ='-L$libdir'
+ hardcode_shlibpath_var_GCJ=no
+ ;;
+
+ *)
+ ld_shlibs_GCJ=no
+ ;;
+ esac
+ fi
+
+echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5
+echo "${ECHO_T}$ld_shlibs_GCJ" >&6
+test "$ld_shlibs_GCJ" = 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
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc_GCJ" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc_GCJ=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds_GCJ 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.
+ echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
+echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
+ $rm conftest*
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl_GCJ
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ
+ allow_undefined_flag_GCJ=
+ if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5
+ (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+ then
+ archive_cmds_need_lc_GCJ=no
+ else
+ archive_cmds_need_lc_GCJ=yes
+ fi
+ allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $rm conftest*
+ echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5
+echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6
+ ;;
+ esac
+ fi
+ ;;
+esac
+
echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5
echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6
library_names_spec=
libname_spec='lib$name'
soname_spec=
+shrext_cmds=".so"
postinstall_cmds=
postuninstall_cmds=
finish_cmds=
@@ -7067,16 +18762,35 @@ shlibpath_overrides_runpath=unknown
version_type=none
dynamic_linker="$host_os ld.so"
sys_lib_dlsearch_path_spec="/lib /usr/lib"
-sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
+ # 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.
+ 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
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+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
- library_names_spec='${libname}${release}.so$versuffix $libname.a'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
shlibpath_var=LIBPATH
- # AIX has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}.so$major'
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
;;
aix4* | aix5*)
@@ -7086,7 +18800,7 @@ aix4* | aix5*)
hardcode_into_libs=yes
if test "$host_cpu" = ia64; then
# AIX 5 supports IA64
- library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
+ 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
@@ -7096,43 +18810,41 @@ aix4* | aix5*)
# 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
- ;;
+ 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.
+ # 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<name>.so
# instead of lib<name>.a to let people know that these are not
# typical AIX shared libraries.
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ 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}.so$major'
+ soname_spec='${libname}${release}${shared_ext}$major'
fi
shlibpath_var=LIBPATH
fi
- hardcode_into_libs=yes
;;
amigaos*)
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=`$echo "X$lib" | $Xsed -e '\''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'
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''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'
;;
beos*)
- library_names_spec='${libname}.so'
+ library_names_spec='${libname}${shared_ext}'
dynamic_linker="$host_os ld.so"
shlibpath_var=LIBRARY_PATH
;;
@@ -7140,13 +18852,12 @@ beos*)
bsdi4*)
version_type=linux
need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
+ 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"
- export_dynamic_flag_spec=-rdynamic
# 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
@@ -7154,29 +18865,55 @@ bsdi4*)
cygwin* | mingw* | pw32*)
version_type=windows
+ shrext_cmds=".dll"
need_version=no
need_lib_prefix=no
+
case $GCC,$host_os in
- yes,cygwin*)
+ yes,cygwin* | yes,mingw* | yes,pw32*)
library_names_spec='$libname.dll.a'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
- postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
+ # 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 .libs/$dlname \$dldir/$dlname'
- postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ $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
+
+ 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="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ 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
+ ;;
+ 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
;;
- yes,mingw*)
- library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
- sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
- ;;
- yes,pw32*)
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
- ;;
+
*)
- library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
;;
esac
dynamic_linker='Win32 ld.exe'
@@ -7189,30 +18926,56 @@ darwin* | rhapsody*)
version_type=darwin
need_lib_prefix=no
need_version=no
- # FIXME: Relying on posixy $() will cause problems for
- # cross-compilation, but unfortunately the echo tests do not
- # yet detect zsh echo's removal of \ escapes.
- library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
- soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
+ library_names_spec='${libname}${release}${versuffix}$shared_ext ${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)'
+ # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+ if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+ else
+ sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+ fi
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ 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
;;
freebsd1*)
dynamic_linker=no
;;
+kfreebsd*-gnu)
+ version_type=linux
+ 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='GNU ld.so'
+ ;;
+
freebsd*)
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
version_type=freebsd-$objformat
case $version_type in
freebsd-elf*)
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
+ 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}.so$versuffix $libname.so$versuffix'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
need_version=yes
;;
esac
@@ -7221,7 +18984,11 @@ freebsd*)
freebsd2*)
shlibpath_overrides_runpath=yes
;;
- *)
+ freebsd3.01* | freebsdelf3.01*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ *) # from 3.2 on
shlibpath_overrides_runpath=no
hardcode_into_libs=yes
;;
@@ -7232,8 +18999,8 @@ gnu*)
version_type=linux
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
- soname_spec='${libname}${release}.so$major'
+ 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
hardcode_into_libs=yes
;;
@@ -7241,14 +19008,45 @@ gnu*)
hpux9* | hpux10* | hpux11*)
# Give a soname corresponding to the major version so that dld.sl refuses to
# link against other versions.
- dynamic_linker="$host_os dld.sl"
version_type=sunos
need_lib_prefix=no
need_version=no
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
- soname_spec='${libname}${release}.sl$major'
+ 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'
;;
@@ -7256,21 +19054,29 @@ hpux9* | hpux10* | hpux11*)
irix5* | irix6* | nonstopux*)
case $host_os in
nonstopux*) version_type=nonstopux ;;
- *) version_type=irix ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
esac
need_lib_prefix=no
need_version=no
- soname_spec='${libname}${release}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
+ 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 ") libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *-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
;;
@@ -7279,20 +19085,21 @@ irix5* | irix6* | nonstopux*)
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-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+linux*oldld* | linux*aout* | linux*coff*)
dynamic_linker=no
;;
# This must be Linux ELF.
-linux-gnu*)
+linux*)
version_type=linux
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
+ 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
@@ -7301,6 +19108,12 @@ linux-gnu*)
# 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=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf | 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,
@@ -7310,17 +19123,29 @@ linux-gnu*)
dynamic_linker='GNU/Linux ld.so'
;;
+knetbsd*-gnu)
+ version_type=linux
+ 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='GNU 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}.so$versuffix ${libname}.so$versuffix'
+ 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}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
- soname_spec='${libname}${release}.so$major'
+ 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
@@ -7330,7 +19155,17 @@ netbsd*)
newsos6)
version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ 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=linux
+ 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
;;
@@ -7338,47 +19173,48 @@ newsos6)
openbsd*)
version_type=sunos
need_lib_prefix=no
- need_version=no
+ need_version=yes
+ 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
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
else
shlibpath_overrides_runpath=yes
fi
- library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
;;
os2*)
libname_spec='$name'
+ shrext_cmds=".dll"
need_lib_prefix=no
- library_names_spec='$libname.dll $libname.a'
+ 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}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ 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"
- hardcode_into_libs=yes
;;
sco3.2v5*)
version_type=osf
- soname_spec='${libname}${release}.so$major'
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ 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
;;
@@ -7386,8 +19222,8 @@ solaris*)
version_type=linux
need_lib_prefix=no
need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
+ 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
@@ -7397,7 +19233,7 @@ solaris*)
sunos4*)
version_type=sunos
- library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
+ 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
@@ -7409,8 +19245,8 @@ sunos4*)
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
+ 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)
@@ -7431,31 +19267,22 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
esac
;;
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
- soname_spec='${libname}${release}.so$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
sysv4*MP*)
if test -d /usr/nec ;then
version_type=linux
- library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
- soname_spec='$libname.so.$major'
+ 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
;;
+uts4*)
+ version_type=linux
+ 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
;;
@@ -7464,44 +19291,35 @@ echo "$as_me:$LINENO: result: $dynamic_linker" >&5
echo "${ECHO_T}$dynamic_linker" >&6
test "$dynamic_linker" = no && can_build_shared=no
-# Report the final consequences.
-echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5
-echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6
-echo "$as_me:$LINENO: result: $can_build_shared" >&5
-echo "${ECHO_T}$can_build_shared" >&6
-
-echo "$as_me:$LINENO: checking whether to build shared libraries" >&5
-echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&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
- ;;
+echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5
+echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6
+hardcode_action_GCJ=
+if test -n "$hardcode_libdir_flag_spec_GCJ" || \
+ test -n "$runpath_var GCJ" || \
+ test "X$hardcode_automatic_GCJ"="Xyes" ; then
-aix4*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
+ # We can hardcode non-existant directories.
+ if test "$hardcode_direct_GCJ" != 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_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no &&
+ test "$hardcode_minus_L_GCJ" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action_GCJ=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action_GCJ=immediate
fi
- ;;
-esac
-echo "$as_me:$LINENO: result: $enable_shared" >&5
-echo "${ECHO_T}$enable_shared" >&6
-
-echo "$as_me:$LINENO: checking whether to build static libraries" >&5
-echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6
-# Make sure either enable_shared or enable_static is yes.
-test "$enable_shared" = yes || enable_static=yes
-echo "$as_me:$LINENO: result: $enable_static" >&5
-echo "${ECHO_T}$enable_static" >&6
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action_GCJ=unsupported
+fi
+echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5
+echo "${ECHO_T}$hardcode_action_GCJ" >&6
-if test "$hardcode_action" = relink; then
+if test "$hardcode_action_GCJ" = relink; then
# Fast installation is not supported
enable_fast_install=no
elif test "$shlibpath_overrides_runpath" = yes ||
@@ -7510,9 +19328,33 @@ elif test "$shlibpath_overrides_runpath" = yes ||
enable_fast_install=needless
fi
-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"
+striplib=
+old_striplib=
+echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
+echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&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"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}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"
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+ else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ ;;
+ *)
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+ ;;
+ esac
fi
if test "x$enable_dlopen" != xyes; then
@@ -7530,11 +19372,94 @@ else
lt_cv_dlopen_self=yes
;;
- cygwin* | mingw* | pw32*)
+ mingw* | pw32*)
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
+ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen ();
+int
+main ()
+{
+dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_dl_dlopen=no
+fi
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
+if test $ac_cv_lib_dl_dlopen = yes; 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
+
+ ;;
+
*)
echo "$as_me:$LINENO: checking for shl_load" >&5
echo $ECHO_N "checking for shl_load... $ECHO_C" >&6
@@ -7542,43 +19467,73 @@ if test "${ac_cv_func_shl_load+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define shl_load to an innocuous variant, in case <limits.h> declares shl_load.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define shl_load innocuous_shl_load
+
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char shl_load (); below. */
-#include <assert.h>
+ which can conflict with char shl_load (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shl_load
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char shl_load ();
-char (*f) ();
-
-int
-main ()
-{
/* 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_shl_load) || defined (__stub___shl_load)
choke me
#else
-f = shl_load;
+char (*f) () = shl_load;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != shl_load;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7587,10 +19542,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_func_shl_load=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_func_shl_load=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5
echo "${ECHO_T}$ac_cv_func_shl_load" >&6
@@ -7605,8 +19562,11 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -7625,11 +19585,21 @@ shl_load ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7638,10 +19608,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_dld_shl_load=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_dld_shl_load=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
@@ -7655,43 +19627,73 @@ if test "${ac_cv_func_dlopen+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define dlopen to an innocuous variant, in case <limits.h> declares dlopen.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define dlopen innocuous_dlopen
+
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char dlopen (); below. */
-#include <assert.h>
+ which can conflict with char dlopen (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef dlopen
+
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
+{
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char dlopen ();
-char (*f) ();
-
-int
-main ()
-{
/* 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_dlopen) || defined (__stub___dlopen)
choke me
#else
-f = dlopen;
+char (*f) () = dlopen;
+#endif
+#ifdef __cplusplus
+}
#endif
+int
+main ()
+{
+return f != dlopen;
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7700,10 +19702,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_func_dlopen=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_func_dlopen=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5
echo "${ECHO_T}$ac_cv_func_dlopen" >&6
@@ -7718,8 +19722,11 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldl $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -7738,11 +19745,21 @@ dlopen ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7751,10 +19768,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_dl_dlopen=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_dl_dlopen=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
@@ -7770,8 +19789,11 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lsvld $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -7790,11 +19812,21 @@ dlopen ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7803,10 +19835,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_svld_dlopen=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_svld_dlopen=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5
@@ -7822,8 +19856,11 @@ else
ac_check_lib_save_LIBS=$LIBS
LIBS="-ldld $LIBS"
cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
@@ -7842,11 +19879,21 @@ dld_link ();
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>&5
+ (eval $ac_link) 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
- { ac_try='test -s conftest$ac_exeext'
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
@@ -7855,10 +19902,12 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
ac_cv_lib_dld_dld_link=yes
else
echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
ac_cv_lib_dld_dld_link=no
fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5
@@ -7894,7 +19943,7 @@ fi
case $lt_cv_dlopen in
dlopen)
save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
save_LDFLAGS="$LDFLAGS"
eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
@@ -7910,10 +19959,10 @@ 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_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 7916 "configure"
+#line 19965 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -8008,10 +20057,10 @@ 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_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 8014 "configure"
+#line 20063 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -8115,109 +20164,521 @@ echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6
fi
-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.
- echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5
-echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6
- if test "${lt_cv_archive_cmds_need_lc+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- $rm conftest*
- echo 'static int dummy;' > conftest.$ac_ext
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+ # 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
+ # Now quote all the things that may contain metacharacters while being
+ # careful not to overquote the AC_SUBSTed values. We take copies of the
+ # variables and quote the copies for generation of the libtool script.
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ SED SHELL STRIP \
+ libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+ old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+ deplibs_check_method reload_flag reload_cmds need_locks \
+ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+ lt_cv_sys_global_symbol_to_c_name_address \
+ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
+ old_postinstall_cmds old_postuninstall_cmds \
+ compiler_GCJ \
+ CC_GCJ \
+ LD_GCJ \
+ lt_prog_compiler_wl_GCJ \
+ lt_prog_compiler_pic_GCJ \
+ lt_prog_compiler_static_GCJ \
+ lt_prog_compiler_no_builtin_flag_GCJ \
+ export_dynamic_flag_spec_GCJ \
+ thread_safe_flag_spec_GCJ \
+ whole_archive_flag_spec_GCJ \
+ enable_shared_with_static_runtimes_GCJ \
+ old_archive_cmds_GCJ \
+ old_archive_from_new_cmds_GCJ \
+ predep_objects_GCJ \
+ postdep_objects_GCJ \
+ predeps_GCJ \
+ postdeps_GCJ \
+ compiler_lib_search_path_GCJ \
+ archive_cmds_GCJ \
+ archive_expsym_cmds_GCJ \
+ postinstall_cmds_GCJ \
+ postuninstall_cmds_GCJ \
+ old_archive_from_expsyms_cmds_GCJ \
+ allow_undefined_flag_GCJ \
+ no_undefined_flag_GCJ \
+ export_symbols_cmds_GCJ \
+ hardcode_libdir_flag_spec_GCJ \
+ hardcode_libdir_flag_spec_ld_GCJ \
+ hardcode_libdir_separator_GCJ \
+ hardcode_automatic_GCJ \
+ module_cmds_GCJ \
+ module_expsym_cmds_GCJ \
+ lt_cv_prog_compiler_c_o_GCJ \
+ exclude_expsyms_GCJ \
+ include_expsyms_GCJ; do
- if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_cv_prog_cc_wl
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- save_allow_undefined_flag=$allow_undefined_flag
- allow_undefined_flag=
- if { (eval echo "$as_me:$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=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }
- then
- lt_cv_archive_cmds_need_lc=no
- else
- lt_cv_archive_cmds_need_lc=yes
- fi
- allow_undefined_flag=$save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
-fi
+ case $var in
+ old_archive_cmds_GCJ | \
+ old_archive_from_new_cmds_GCJ | \
+ archive_cmds_GCJ | \
+ archive_expsym_cmds_GCJ | \
+ module_cmds_GCJ | \
+ module_expsym_cmds_GCJ | \
+ old_archive_from_expsyms_cmds_GCJ | \
+ export_symbols_cmds_GCJ | \
+ extract_expsyms_cmds | reload_cmds | finish_cmds | \
+ postinstall_cmds | postuninstall_cmds | \
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+ # Double-quote double-evaled strings.
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
+ ;;
+ *)
+ eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
+ ;;
+ esac
+ done
- echo "$as_me:$LINENO: result: $lt_cv_archive_cmds_need_lc" >&5
-echo "${ECHO_T}$lt_cv_archive_cmds_need_lc" >&6
+ case $lt_echo in
+ *'\$0 --fallback-echo"')
+ lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
;;
esac
-fi
-need_lc=${lt_cv_archive_cmds_need_lc-yes}
-# The second clause should only fire when bootstrapping the
-# libtool distribution, otherwise you forgot to ship ltmain.sh
-# with your package, and you will get complaints that there are
-# no rules to generate ltmain.sh.
-if test -f "$ltmain"; then
- :
+cfgfile="$ofile"
+
+ cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
+
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc_GCJ
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+
+# An echo program that does not interpret backslashes.
+echo=$lt_echo
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_GCJ
+
+# Is the compiler the GNU C compiler?
+with_gcc=$GCC_GCJ
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# The linker used to build libraries.
+LD=$lt_LD_GCJ
+
+# Whether we need hard or soft links.
+LN_S=$lt_LN_S
+
+# A BSD-compatible nm program.
+NM=$lt_NM
+
+# A symbol stripping program
+STRIP=$lt_STRIP
+
+# Used to examine libraries when file_magic_cmd begins "file"
+MAGIC_CMD=$MAGIC_CMD
+
+# Used on cygwin: DLL creation program.
+DLLTOOL="$DLLTOOL"
+
+# Used on cygwin: object dumper.
+OBJDUMP="$OBJDUMP"
+
+# Used on cygwin: assembler.
+AS="$AS"
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl_GCJ
+
+# Object file suffix (normally "o").
+objext="$ac_objext"
+
+# Old archive suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
+# Executable file suffix (normally "").
+exeext="$exeext"
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic_GCJ
+pic_mode=$pic_mode
+
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ
+
+# Must we lock files when doing compilation ?
+need_locks=$lt_need_locks
+
+# 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
+
+# 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
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static_GCJ
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ
+
+# Compiler flag to generate thread-safe objects.
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ
+
+# Library versioning type.
+version_type=$version_type
+
+# 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
+
+# Commands used to build and install an old-style archive.
+RANLIB=$lt_RANLIB
+old_archive_cmds=$lt_old_archive_cmds_GCJ
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ
+
+# Commands used to build and install a shared archive.
+archive_cmds=$lt_archive_cmds_GCJ
+archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ
+postinstall_cmds=$lt_postinstall_cmds
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_GCJ
+module_expsym_cmds=$lt_module_expsym_cmds_GCJ
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_GCJ
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_GCJ
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_GCJ
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ
+
+# 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
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag_GCJ
+
+# Flag that forces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag_GCJ
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# Same as above, but a single script fragment to be evaled but not shown.
+finish_eval=$lt_finish_eval
+
+# 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
+
+# This is the shared library runtime path variable.
+runpath_var=$runpath_var
+
+# This is the shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action_GCJ
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# 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_GCJ
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ
+
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct=$hardcode_direct_GCJ
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L=$hardcode_minus_L_GCJ
+
+# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
+# the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ
+
+# 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_GCJ
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at relink time.
+variables_saved_for_relink="$variables_saved_for_relink"
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs_GCJ
+
+# 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
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path="$fix_srcfile_path_GCJ"
+
+# Set to yes if exported symbols are required.
+always_export_symbols=$always_export_symbols_GCJ
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds_GCJ
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms_GCJ
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms_GCJ
+
+# ### END LIBTOOL TAG CONFIG: $tagname
+
+__EOF__
+
+
else
# If there is no Makefile yet, we rely on a make rule to execute
# `config.status --recheck' to rerun these tests and create the
# libtool script then.
- test -f Makefile && make "$ltmain"
+ ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+ if test -f "$ltmain_in"; then
+ test -f Makefile && make "$ltmain"
+ fi
fi
-if test -f "$ltmain"; then
- trap "$rm \"${ofile}T\"; exit 1" 1 2 15
- $rm -f "${ofile}T"
- echo creating $ofile
+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"
+
+ else
+ tagname=""
+ fi
+ ;;
+
+ RC)
+
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+objext_RC=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+compiler_RC=$CC
+lt_cv_prog_compiler_c_o_RC=yes
+# The else clause should only fire when bootstrapping the
+# libtool distribution, otherwise you forgot to ship ltmain.sh
+# with your package, and you will get complaints that there are
+# no rules to generate ltmain.sh.
+if test -f "$ltmain"; then
+ # 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
# Now quote all the things that may contain metacharacters while being
# careful not to overquote the AC_SUBSTed values. We take copies of the
# variables and quote the copies for generation of the libtool script.
- for var in echo old_CC old_CFLAGS SED \
- AR AR_FLAGS CC LD LN_S NM SHELL \
- reload_flag reload_cmds wl \
- pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
- thread_safe_flag_spec whole_archive_flag_spec libname_spec \
- library_names_spec soname_spec \
- RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
- old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
- postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
- old_striplib striplib file_magic_cmd export_symbols_cmds \
- deplibs_check_method allow_undefined_flag no_undefined_flag \
- finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
- global_symbol_to_c_name_address \
- hardcode_libdir_flag_spec hardcode_libdir_separator \
+ for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
+ SED SHELL STRIP \
+ libname_spec library_names_spec soname_spec extract_expsyms_cmds \
+ old_striplib striplib file_magic_cmd finish_cmds finish_eval \
+ deplibs_check_method reload_flag reload_cmds need_locks \
+ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
+ lt_cv_sys_global_symbol_to_c_name_address \
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
- compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
+ old_postinstall_cmds old_postuninstall_cmds \
+ compiler_RC \
+ CC_RC \
+ LD_RC \
+ lt_prog_compiler_wl_RC \
+ lt_prog_compiler_pic_RC \
+ lt_prog_compiler_static_RC \
+ lt_prog_compiler_no_builtin_flag_RC \
+ export_dynamic_flag_spec_RC \
+ thread_safe_flag_spec_RC \
+ whole_archive_flag_spec_RC \
+ enable_shared_with_static_runtimes_RC \
+ old_archive_cmds_RC \
+ old_archive_from_new_cmds_RC \
+ predep_objects_RC \
+ postdep_objects_RC \
+ predeps_RC \
+ postdeps_RC \
+ compiler_lib_search_path_RC \
+ archive_cmds_RC \
+ archive_expsym_cmds_RC \
+ postinstall_cmds_RC \
+ postuninstall_cmds_RC \
+ old_archive_from_expsyms_cmds_RC \
+ allow_undefined_flag_RC \
+ no_undefined_flag_RC \
+ export_symbols_cmds_RC \
+ hardcode_libdir_flag_spec_RC \
+ hardcode_libdir_flag_spec_ld_RC \
+ hardcode_libdir_separator_RC \
+ hardcode_automatic_RC \
+ module_cmds_RC \
+ module_expsym_cmds_RC \
+ lt_cv_prog_compiler_c_o_RC \
+ exclude_expsyms_RC \
+ include_expsyms_RC; do
case $var in
- reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
- old_postinstall_cmds | old_postuninstall_cmds | \
- export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
- extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
+ old_archive_cmds_RC | \
+ old_archive_from_new_cmds_RC | \
+ archive_cmds_RC | \
+ archive_expsym_cmds_RC | \
+ module_cmds_RC | \
+ module_expsym_cmds_RC | \
+ old_archive_from_expsyms_cmds_RC | \
+ export_symbols_cmds_RC | \
+ extract_expsyms_cmds | reload_cmds | finish_cmds | \
postinstall_cmds | postuninstall_cmds | \
- finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
+ old_postinstall_cmds | old_postuninstall_cmds | \
+ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
# Double-quote double-evaled strings.
eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
;;
@@ -8227,46 +20688,16 @@ if test -f "$ltmain"; then
esac
done
- cat <<__EOF__ > "${ofile}T"
-#! $SHELL
-
-# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
-# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# A sed that does not truncate output.
-SED=$lt_SED
+ case $lt_echo in
+ *'\$0 --fallback-echo"')
+ lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
+ ;;
+ esac
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="${SED} -e s/^X//"
+cfgfile="$ofile"
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
-
-# ### BEGIN LIBTOOL CONFIG
+ cat <<__EOF__ >> "$cfgfile"
+# ### BEGIN LIBTOOL TAG CONFIG: $tagname
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
@@ -8280,7 +20711,10 @@ build_libtool_libs=$enable_shared
build_old_libs=$enable_static
# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$need_lc
+build_libtool_need_lc=$archive_cmds_need_lc_RC
+
+# Whether or not to disallow shared libs when runtime libs are static
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC
# Whether or not to optimize for fast installation.
fast_install=$enable_fast_install
@@ -8296,14 +20730,20 @@ echo=$lt_echo
AR=$lt_AR
AR_FLAGS=$lt_AR_FLAGS
-# The default C compiler.
-CC=$lt_CC
+# A C compiler.
+LTCC=$lt_LTCC
+
+# A language-specific compiler.
+CC=$lt_compiler_RC
# Is the compiler the GNU C compiler?
-with_gcc=$GCC
+with_gcc=$GCC_RC
+
+# An ERE matcher.
+EGREP=$lt_EGREP
# The linker used to build libraries.
-LD=$lt_LD
+LD=$lt_LD_RC
# Whether we need hard or soft links.
LN_S=$lt_LN_S
@@ -8312,7 +20752,7 @@ LN_S=$lt_LN_S
NM=$lt_NM
# A symbol stripping program
-STRIP=$STRIP
+STRIP=$lt_STRIP
# Used to examine libraries when file_magic_cmd begins "file"
MAGIC_CMD=$MAGIC_CMD
@@ -8334,7 +20774,7 @@ reload_flag=$lt_reload_flag
reload_cmds=$lt_reload_cmds
# How to pass a linker flag through the compiler.
-wl=$lt_wl
+wl=$lt_lt_prog_compiler_wl_RC
# Object file suffix (normally "o").
objext="$ac_objext"
@@ -8342,18 +20782,21 @@ objext="$ac_objext"
# Old archive suffix (normally "a").
libext="$libext"
+# Shared library suffix (normally ".so").
+shrext_cmds='$shrext_cmds'
+
# Executable file suffix (normally "").
exeext="$exeext"
# Additional compiler flags for building library objects.
-pic_flag=$lt_pic_flag
+pic_flag=$lt_lt_prog_compiler_pic_RC
pic_mode=$pic_mode
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_compiler_c_o
+# What is the maximum length of a command?
+max_cmd_len=$lt_cv_sys_max_cmd_len
-# Can we write directly to a .lo ?
-compiler_o_lo=$lt_compiler_o_lo
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC
# Must we lock files when doing compilation ?
need_locks=$lt_need_locks
@@ -8374,19 +20817,19 @@ dlopen_self=$enable_dlopen_self
dlopen_self_static=$enable_dlopen_self_static
# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_link_static_flag
+link_static_flag=$lt_lt_prog_compiler_static_RC
# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_no_builtin_flag
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC
# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC
# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
+whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC
# Compiler flag to generate thread-safe objects.
-thread_safe_flag_spec=$lt_thread_safe_flag_spec
+thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC
# Library versioning type.
version_type=$version_type
@@ -8403,26 +20846,50 @@ soname_spec=$lt_soname_spec
# Commands used to build and install an old-style archive.
RANLIB=$lt_RANLIB
-old_archive_cmds=$lt_old_archive_cmds
+old_archive_cmds=$lt_old_archive_cmds_RC
old_postinstall_cmds=$lt_old_postinstall_cmds
old_postuninstall_cmds=$lt_old_postuninstall_cmds
# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC
# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC
# Commands used to build and install a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
+archive_cmds=$lt_archive_cmds_RC
+archive_expsym_cmds=$lt_archive_expsym_cmds_RC
postinstall_cmds=$lt_postinstall_cmds
postuninstall_cmds=$lt_postuninstall_cmds
+# Commands used to build a loadable module (assumed same as above if empty)
+module_cmds=$lt_module_cmds_RC
+module_expsym_cmds=$lt_module_expsym_cmds_RC
+
# Commands to strip libraries.
old_striplib=$lt_old_striplib
striplib=$lt_striplib
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predep_objects=$lt_predep_objects_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdep_objects=$lt_postdep_objects_RC
+
+# Dependencies to place before the objects being linked to create a
+# shared library.
+predeps=$lt_predeps_RC
+
+# Dependencies to place after the objects being linked to create a
+# shared library.
+postdeps=$lt_postdeps_RC
+
+# The library search path used internally by the compiler when linking
+# a shared library.
+compiler_lib_search_path=$lt_compiler_lib_search_path_RC
+
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$lt_deplibs_check_method
@@ -8430,10 +20897,10 @@ deplibs_check_method=$lt_deplibs_check_method
file_magic_cmd=$lt_file_magic_cmd
# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
+allow_undefined_flag=$lt_allow_undefined_flag_RC
# Flag that forces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
+no_undefined_flag=$lt_no_undefined_flag_RC
# Commands used to finish a libtool library installation in a directory.
finish_cmds=$lt_finish_cmds
@@ -8442,13 +20909,13 @@ finish_cmds=$lt_finish_cmds
finish_eval=$lt_finish_eval
# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_global_symbol_pipe
+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_global_symbol_to_cdecl
+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_global_symbol_to_c_name_address
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
# This is the shared library runtime path variable.
runpath_var=$runpath_var
@@ -8460,36 +20927,45 @@ shlibpath_var=$shlibpath_var
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
+hardcode_action=$hardcode_action_RC
# Whether we should hardcode library paths into libraries.
hardcode_into_libs=$hardcode_into_libs
# 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
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC
+
+# If ld is used when linking, flag to hardcode \$libdir into
+# a binary during linking. This must work even if \$libdir does
+# not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC
# Whether we need a single -rpath flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
+hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC
-# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
# resulting binary.
-hardcode_direct=$hardcode_direct
+hardcode_direct=$hardcode_direct_RC
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
# resulting binary.
-hardcode_minus_L=$hardcode_minus_L
+hardcode_minus_L=$hardcode_minus_L_RC
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
# the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
+hardcode_shlibpath_var=$hardcode_shlibpath_var_RC
+
+# 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_RC
# Variables whose values should be saved in libtool wrapper scripts and
# restored at relink time.
variables_saved_for_relink="$variables_saved_for_relink"
# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
+link_all_deplibs=$link_all_deplibs_RC
# Compile-time system search path for libraries
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
@@ -8498,234 +20974,75 @@ sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path="$fix_srcfile_path"
+fix_srcfile_path="$fix_srcfile_path_RC"
# Set to yes if exported symbols are required.
-always_export_symbols=$always_export_symbols
+always_export_symbols=$always_export_symbols_RC
# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
+export_symbols_cmds=$lt_export_symbols_cmds_RC
# The commands to extract the exported symbol list from a shared archive.
extract_expsyms_cmds=$lt_extract_expsyms_cmds
# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
+exclude_expsyms=$lt_exclude_expsyms_RC
# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
+include_expsyms=$lt_include_expsyms_RC
-# ### END LIBTOOL CONFIG
+# ### END LIBTOOL TAG CONFIG: $tagname
__EOF__
- case $host_os in
- aix3*)
- cat <<\EOF >> "${ofile}T"
-# 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
+else
+ # If there is no Makefile yet, we rely on a make rule to execute
+ # `config.status --recheck' to rerun these tests and create the
+ # libtool script then.
+ ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
+ if test -f "$ltmain_in"; then
+ test -f Makefile && make "$ltmain"
+ fi
fi
-EOF
- ;;
- esac
- case $host_os in
- cygwin* | mingw* | pw32* | os2*)
- cat <<'EOF' >> "${ofile}T"
- # This is a source program that is used to create dlls on Windows
- # Don't remove nor modify the starting and closing comments
-# /* ltdll.c starts here */
-# #define WIN32_LEAN_AND_MEAN
-# #include <windows.h>
-# #undef WIN32_LEAN_AND_MEAN
-# #include <stdio.h>
-#
-# #ifndef __CYGWIN__
-# # ifdef __CYGWIN32__
-# # define __CYGWIN__ __CYGWIN32__
-# # endif
-# #endif
-#
-# #ifdef __cplusplus
-# extern "C" {
-# #endif
-# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
-# #ifdef __cplusplus
-# }
-# #endif
-#
-# #ifdef __CYGWIN__
-# #include <cygwin/cygwin_dll.h>
-# DECLARE_CYGWIN_DLL( DllMain );
-# #endif
-# HINSTANCE __hDllInstance_base;
-#
-# BOOL APIENTRY
-# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
-# {
-# __hDllInstance_base = hInst;
-# return TRUE;
-# }
-# /* ltdll.c ends here */
- # This is a source program that is used to create import libraries
- # on Windows for dlls which lack them. Don't remove nor modify the
- # starting and closing comments
-# /* impgen.c starts here */
-# /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
-#
-# This file is part of GNU libtool.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# */
-#
-# #include <stdio.h> /* for printf() */
-# #include <unistd.h> /* for open(), lseek(), read() */
-# #include <fcntl.h> /* for O_RDONLY, O_BINARY */
-# #include <string.h> /* for strdup() */
-#
-# /* O_BINARY isn't required (or even defined sometimes) under Unix */
-# #ifndef O_BINARY
-# #define O_BINARY 0
-# #endif
-#
-# static unsigned int
-# pe_get16 (fd, offset)
-# int fd;
-# int offset;
-# {
-# unsigned char b[2];
-# lseek (fd, offset, SEEK_SET);
-# read (fd, b, 2);
-# return b[0] + (b[1]<<8);
-# }
-#
-# static unsigned int
-# pe_get32 (fd, offset)
-# int fd;
-# int offset;
-# {
-# unsigned char b[4];
-# lseek (fd, offset, SEEK_SET);
-# read (fd, b, 4);
-# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# static unsigned int
-# pe_as32 (ptr)
-# void *ptr;
-# {
-# unsigned char *b = ptr;
-# return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
-# }
-#
-# int
-# main (argc, argv)
-# int argc;
-# char *argv[];
-# {
-# int dll;
-# unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
-# unsigned long export_rva, export_size, nsections, secptr, expptr;
-# unsigned long name_rvas, nexp;
-# unsigned char *expdata, *erva;
-# char *filename, *dll_name;
-#
-# filename = argv[1];
-#
-# dll = open(filename, O_RDONLY|O_BINARY);
-# if (dll < 1)
-# return 1;
-#
-# dll_name = filename;
-#
-# for (i=0; filename[i]; i++)
-# if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
-# dll_name = filename + i +1;
-#
-# pe_header_offset = pe_get32 (dll, 0x3c);
-# opthdr_ofs = pe_header_offset + 4 + 20;
-# num_entries = pe_get32 (dll, opthdr_ofs + 92);
-#
-# if (num_entries < 1) /* no exports */
-# return 1;
-#
-# export_rva = pe_get32 (dll, opthdr_ofs + 96);
-# export_size = pe_get32 (dll, opthdr_ofs + 100);
-# nsections = pe_get16 (dll, pe_header_offset + 4 +2);
-# secptr = (pe_header_offset + 4 + 20 +
-# pe_get16 (dll, pe_header_offset + 4 + 16));
-#
-# expptr = 0;
-# for (i = 0; i < nsections; i++)
-# {
-# char sname[8];
-# unsigned long secptr1 = secptr + 40 * i;
-# unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
-# unsigned long vsize = pe_get32 (dll, secptr1 + 16);
-# unsigned long fptr = pe_get32 (dll, secptr1 + 20);
-# lseek(dll, secptr1, SEEK_SET);
-# read(dll, sname, 8);
-# if (vaddr <= export_rva && vaddr+vsize > export_rva)
-# {
-# expptr = fptr + (export_rva - vaddr);
-# if (export_rva + export_size > vaddr + vsize)
-# export_size = vsize - (export_rva - vaddr);
-# break;
-# }
-# }
-#
-# expdata = (unsigned char*)malloc(export_size);
-# lseek (dll, expptr, SEEK_SET);
-# read (dll, expdata, export_size);
-# erva = expdata - export_rva;
-#
-# nexp = pe_as32 (expdata+24);
-# name_rvas = pe_as32 (expdata+32);
-#
-# printf ("EXPORTS\n");
-# for (i = 0; i<nexp; i++)
-# {
-# unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
-# printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
-# }
-#
-# return 0;
-# }
-# /* impgen.c ends here */
-EOF
- ;;
- 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
- # 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" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
+CC="$lt_save_CC"
- mv -f "${ofile}T" "$ofile" || \
- (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
- chmod +x "$ofile"
-fi
+ ;;
+ *)
+ { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5
+echo "$as_me: error: Unsupported tag name: $tagname" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+
+ # Append the new tag name to the list of available tags.
+ if test -n "$tagname" ; then
+ available_tags="$available_tags $tagname"
+ fi
+ fi
+ done
+ IFS="$lt_save_ifs"
+ # Now substitute the updated list of available tags.
+ if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
+ mv "${ofile}T" "$ofile"
+ chmod +x "$ofile"
+ else
+ rm -f "${ofile}T"
+ { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5
+echo "$as_me: error: unable to update list of available tagged configurations." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
@@ -8739,10 +21056,47 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
- ac_config_files="$ac_config_files unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# urgh -- these are internal libtool variables...
+
+
+
+
+
+# configuration file -- stay in 8.3 limit
+#
+# since #undef doesn't survive in configuration header files we replace
+# `/undef' with `#undef' after creating the output file
+
+ ac_config_headers="$ac_config_headers ftconfig.h:ftconfig.in"
+
+
+# create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
+# and 'builds/unix/unix-cc.mk' that will be used by the build system
+#
+ ac_config_files="$ac_config_files unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config freetype2.pc:freetype2.in"
+
+
+# re-generate the Jamfile to use libtool now
+#
+# AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
+
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
@@ -8771,13 +21125,13 @@ _ACEOF
# `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"
+ "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 \
- "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
;;
esac;
} |
@@ -8788,7 +21142,7 @@ _ACEOF
t end
/^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
: end' >>confcache
-if cmp -s $cache_file confcache; then :; else
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
if test -w $cache_file; then
test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
cat confcache >$cache_file
@@ -8807,13 +21161,13 @@ test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
# 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[ ]*=/{
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
s/:*\$(srcdir):*/:/;
s/:*\${srcdir}:*/:/;
s/:*@srcdir@:*/:/;
-s/^\([^=]*=[ ]*\):*/\1/;
+s/^\([^=]*=[ ]*\):*/\1/;
s/:*$//;
-s/^[^=]*=[ ]*$//;
+s/^[^=]*=[ ]*$//;
}'
fi
@@ -8823,8 +21177,8 @@ ac_libobjs=
ac_ltlibobjs=
for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
# 1. Remove the extension, and $U if already installed.
- ac_i=`echo "$ac_i" |
- sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`echo "$ac_i" | sed "$ac_script"`
# 2. Add them.
ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
@@ -8848,6 +21202,8 @@ cat >$CONFIG_STATUS <<_ACEOF
# configure, is in config.log if it exists.
debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
SHELL=\${CONFIG_SHELL-$SHELL}
_ACEOF
@@ -8866,15 +21222,63 @@ if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
set -o posix
fi
+DUALCASE=1; export DUALCASE # for MKS sh
+
+
+# PATH needs CR
+# 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
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
# Support unset when possible.
-if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
as_unset=unset
else
as_unset=false
fi
+# Find who we are. Look in the path if we contain no path at all
+# relative or not.
+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
+
+ ;;
+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
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
# Work around bugs in pre-3.0 UWIN ksh.
$as_unset ENV MAIL MAILPATH
PS1='$ '
@@ -8882,9 +21286,12 @@ PS2='> '
PS4='+ '
# NLS nuisances.
-for as_var in LANG LANGUAGE LC_ALL LC_COLLATE LC_CTYPE LC_NUMERIC LC_MESSAGES LC_TIME
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
do
- if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
eval $as_var=C; export $as_var
else
$as_unset $as_var
@@ -8918,102 +21325,38 @@ echo X/"$0" |
s/.*/./; q'`
-# PATH needs CR, and LINENO needs CR and PATH.
-# 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
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conftest.sh
- echo "exit 0" >>conftest.sh
- chmod +x conftest.sh
- if (PATH="/nonexistent;."; conftest.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conftest.sh
-fi
as_lineno_1=$LINENO
as_lineno_2=$LINENO
as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- 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
-
- ;;
- 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
- { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=$LINENO
- as_lineno_2=$LINENO
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
# Create $as_me.lineno as a copy of $as_myself, but with $LINENO
# uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that $LINENO is not a special case at line end.
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
# (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
sed '
+ s,[$]LINENO.*,&-,
+ t lineno
+ b
+ : lineno
N
- s,$,-,
: loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ s,[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\),\2\1\2,
t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
+ s,-\n.*,,
' >$as_me.lineno &&
chmod +x $as_me.lineno ||
{ { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
@@ -9063,16 +21406,17 @@ rm -f conf$$ conf$$.exe conf$$.file
if mkdir -p . 2>/dev/null; then
as_mkdir_p=:
else
+ test -d ./-p && rmdir ./-p
as_mkdir_p=false
fi
as_executable_p="test -f"
# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
# IFS
@@ -9099,7 +21443,7 @@ _ASBOX
cat >&5 <<_CSEOF
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.54. Invocation command line was
+generated by GNU Autoconf 2.59a. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -9139,12 +21483,13 @@ Usage: $0 [OPTIONS] [FILE]...
-h, --help print this help, then exit
-V, --version print version number, then exit
+ -q, --quiet 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
+ instantiate the configuration file FILE
--header=FILE[:TEMPLATE]
- instantiate the configuration header FILE
+ instantiate the configuration header FILE
Configuration files:
$config_files
@@ -9158,11 +21503,10 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.54,
+configured by $0, generated by GNU Autoconf 2.59a,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
-Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
-Free Software Foundation, Inc.
+Copyright (C) 2004 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it."
srcdir=$srcdir
@@ -9195,12 +21539,9 @@ do
case $ac_option in
# Handling of the options.
_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
- exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
-_ACEOF
cat >>$CONFIG_STATUS <<\_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
--version | --vers* | -V )
echo "$ac_cs_version"; exit 0 ;;
--he | --h)
@@ -9222,6 +21563,9 @@ Try \`$0 --help' for more information." >&2;}
$ac_shift
CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
ac_need_defaults=false;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
# This is an error.
-*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
@@ -9236,6 +21580,20 @@ Try \`$0 --help' for more information." >&2;}
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
+if \$ac_cs_recheck; then
+ echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+ exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
+
_ACEOF
@@ -9250,6 +21608,7 @@ do
"unix-cc.mk" ) CONFIG_FILES="$CONFIG_FILES unix-cc.mk:unix-cc.in" ;;
"unix-def.mk" ) CONFIG_FILES="$CONFIG_FILES unix-def.mk:unix-def.in" ;;
"freetype-config" ) CONFIG_FILES="$CONFIG_FILES freetype-config" ;;
+ "freetype2.pc" ) CONFIG_FILES="$CONFIG_FILES freetype2.pc:freetype2.in" ;;
"ftconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS ftconfig.h:ftconfig.in" ;;
*) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
@@ -9266,25 +21625,28 @@ if $ac_need_defaults; then
test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
fi
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
# Create a temporary directory, and hook for its removal unless debugging.
$debug ||
{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap 'exit_status=$?; rm -f -r $tmp && exit $exit_status' 0
trap '{ (exit 1); exit 1; }' 1 2 13 15
}
# Create a (secure) tmp directory for tmp files.
-: ${TMPDIR=/tmp}
+
{
- tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+ tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
test -n "$tmp" && test -d "$tmp"
} ||
{
- tmp=$TMPDIR/cs$$-$RANDOM
+ tmp=./confstat$$-$RANDOM
(umask 077 && mkdir $tmp)
} ||
{
- echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ echo "$me: cannot create a temporary directory in ." >&2
{ (exit 1); exit 1; }
}
@@ -9361,17 +21723,30 @@ s,@RMDIR@,$RMDIR,;t t
s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
s,@INSTALL_DATA@,$INSTALL_DATA,;t t
+s,@GREP@,$GREP,;t t
s,@EGREP@,$EGREP,;t t
s,@FTSYS_SRC@,$FTSYS_SRC,;t t
s,@LIBZ@,$LIBZ,;t t
s,@SYSTEM_ZLIB@,$SYSTEM_ZLIB,;t t
s,@LN_S@,$LN_S,;t t
s,@ECHO@,$ECHO,;t t
+s,@AR@,$AR,;t t
+s,@ac_ct_AR@,$ac_ct_AR,;t t
s,@RANLIB@,$RANLIB,;t t
s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
s,@STRIP@,$STRIP,;t t
s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s,@CXX@,$CXX,;t t
+s,@CXXFLAGS@,$CXXFLAGS,;t t
+s,@ac_ct_CXX@,$ac_ct_CXX,;t t
+s,@CXXCPP@,$CXXCPP,;t t
+s,@F77@,$F77,;t t
+s,@FFLAGS@,$FFLAGS,;t t
+s,@ac_ct_F77@,$ac_ct_F77,;t t
s,@LIBTOOL@,$LIBTOOL,;t t
+s,@enable_shared@,$enable_shared,;t t
+s,@hardcode_libdir_flag_spec@,$hardcode_libdir_flag_spec,;t t
+s,@wl@,$wl,;t t
s,@LIBOBJS@,$LIBOBJS,;t t
s,@LTLIBOBJS@,$LTLIBOBJS,;t t
CEOF
@@ -9403,9 +21778,9 @@ _ACEOF
(echo ':t
/@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
fi
ac_sed_frag=`expr $ac_sed_frag + 1`
ac_beg=$ac_end
@@ -9423,21 +21798,21 @@ for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
# Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -9445,7 +21820,7 @@ echo X"$ac_file" |
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
{ if $as_mkdir_p; then
- mkdir -p "$ac_dir"
+ test -d "$ac_dir" || mkdir -p "$ac_dir"
else
as_dir="$ac_dir"
as_dirs=
@@ -9453,10 +21828,10 @@ echo X"$ac_file" |
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -9494,12 +21869,45 @@ case $srcdir in
ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
ac_top_srcdir=$ac_top_builddir$srcdir ;;
esac
-# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
-# absolute.
-ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
-ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
-ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
-ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+# Do not use `cd foo && pwd` to compute absolute paths, because
+# the directories may not exist.
+case `pwd` in
+.) ac_abs_builddir="$ac_dir";;
+*)
+ case "$ac_dir" in
+ .) ac_abs_builddir=`pwd`;;
+ [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
+ *) ac_abs_builddir=`pwd`/"$ac_dir";;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_builddir=${ac_top_builddir}.;;
+*)
+ case ${ac_top_builddir}. in
+ .) ac_abs_top_builddir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
+ *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_srcdir=$ac_srcdir;;
+*)
+ case $ac_srcdir in
+ .) ac_abs_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
+ *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
+ esac;;
+esac
+case $ac_abs_builddir in
+.) ac_abs_top_srcdir=$ac_top_srcdir;;
+*)
+ case $ac_top_srcdir in
+ .) ac_abs_top_srcdir=$ac_abs_builddir;;
+ [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
+ *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
+ esac;;
+esac
case $INSTALL in
@@ -9521,7 +21929,7 @@ echo "$as_me: creating $ac_file" >&6;}
configure_input="$ac_file. "
fi
configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
+ sed 's,.*/,,'` by configure."
# First look for the input files in the build tree, otherwise in the
# src tree.
@@ -9530,24 +21938,24 @@ echo "$as_me: creating $ac_file" >&6;}
case $f in
-) echo $tmp/stdin ;;
[\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
- echo $f;;
+ echo "$f";;
*) # Relative
- if test -f "$f"; then
- # Build tree
- echo $f
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo $srcdir/$f
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
- fi;;
+ fi;;
esac
done` || { (exit 1); exit 1; }
_ACEOF
@@ -9589,12 +21997,12 @@ cat >>$CONFIG_STATUS <<\_ACEOF
# NAME is the cpp macro being defined and VALUE is the value it is being given.
#
# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
-ac_dB='[ ].*$,\1#\2'
+ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
+ac_dB='[ ].*$,\1#\2'
ac_dC=' '
ac_dD=',;t'
# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
+ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
ac_uB='$,\1#\2define\3'
ac_uC=' '
ac_uD=',;t'
@@ -9603,11 +22011,11 @@ for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
# Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
case $ac_file in
- | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
*:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
* ) ac_file_in=$ac_file.in ;;
esac
@@ -9621,28 +22029,29 @@ echo "$as_me: creating $ac_file" >&6;}
case $f in
-) echo $tmp/stdin ;;
[\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
- echo $f;;
+ # Do quote $f, to prevent DOS paths from being IFS'd.
+ echo "$f";;
*) # Relative
- if test -f "$f"; then
- # Build tree
- echo $f
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo $srcdir/$f
- else
- # /dev/null tree
- { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+ if test -f "$f"; then
+ # Build tree
+ echo "$f"
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo "$srcdir/$f"
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
echo "$as_me: error: cannot find input file: $f" >&2;}
{ (exit 1); exit 1; }; }
- fi;;
+ fi;;
esac
done` || { (exit 1); exit 1; }
# Remove the trailing spaces.
- sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
+ sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
_ACEOF
@@ -9665,9 +22074,9 @@ s/[\\&,]/\\&/g
s,[\\$`],\\&,g
t clear
: clear
-s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
t end
-s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
: end
_ACEOF
# If some macros were called several times there might be several times
@@ -9681,13 +22090,13 @@ rm -f confdef2sed.sed
# example, in the case of _POSIX_SOURCE, which is predefined and required
# on some systems where configure will not decide to define it.
cat >>conftest.undefs <<\_ACEOF
-s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
_ACEOF
# Break up conftest.defines because some shells have a limit on the size
# of here documents, and old seds have small limits too (100 cmds).
echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
-echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
echo ' :' >>$CONFIG_STATUS
rm -f conftest.tail
@@ -9696,7 +22105,7 @@ do
# Write a limited-size here document to $tmp/defines.sed.
echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
# Speed up: don't consider the non `#define' lines.
- echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
+ echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
# Work around the forget-to-reset-the-flag bug.
echo 't clr' >>$CONFIG_STATUS
echo ': clr' >>$CONFIG_STATUS
@@ -9723,7 +22132,7 @@ do
# Write a limited-size here document to $tmp/undefs.sed.
echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
# Speed up: don't consider the non `#undef'
- echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
+ echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
# Work around the forget-to-reset-the-flag bug.
echo 't clr' >>$CONFIG_STATUS
echo ': clr' >>$CONFIG_STATUS
@@ -9751,16 +22160,16 @@ cat >>$CONFIG_STATUS <<\_ACEOF
cat $tmp/in >>$tmp/config.h
rm -f $tmp/in
if test x"$ac_file" != x-; then
- if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
+ if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
{ echo "$as_me:$LINENO: $ac_file is unchanged" >&5
echo "$as_me: $ac_file is unchanged" >&6;}
else
ac_dir=`(dirname "$ac_file") 2>/dev/null ||
$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$ac_file" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -9768,7 +22177,7 @@ echo X"$ac_file" |
/^X\(\/\).*/{ s//\1/; q; }
s/.*/./; q'`
{ if $as_mkdir_p; then
- mkdir -p "$ac_dir"
+ test -d "$ac_dir" || mkdir -p "$ac_dir"
else
as_dir="$ac_dir"
as_dirs=
@@ -9776,10 +22185,10 @@ echo X"$ac_file" |
as_dirs="$as_dir $as_dirs"
as_dir=`(dirname "$as_dir") 2>/dev/null ||
$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
echo X"$as_dir" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
/^X\(\/\/\)[^/].*/{ s//\1/; q; }
@@ -9799,6 +22208,12 @@ echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
cat $tmp/config.h
rm -f $tmp/config.h
fi
+ # Run the commands associated with the file.
+ case $ac_file in
+ ftconfig.h ) mv ftconfig.h ftconfig.tmp
+ sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h
+ rm ftconfig.tmp ;;
+ esac
done
_ACEOF
@@ -9820,8 +22235,11 @@ ac_clean_files=$ac_clean_files_save
# 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_cs_success=false
+ $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.
@@ -9829,3 +22247,4 @@ if test "$no_create" != yes; then
fi
+# end of configure.ac
diff --git a/extras/freetype2/builds/unix/configure.ac b/extras/freetype2/builds/unix/configure.ac
index a90200a7f..1cddcaccd 100644
--- a/extras/freetype2/builds/unix/configure.ac
+++ b/extras/freetype2/builds/unix/configure.ac
@@ -1,116 +1,178 @@
-dnl This file is part of the FreeType project.
-dnl
-dnl Process this file with autoconf to produce a configure script.
-dnl
+# This file is part of the FreeType project.
+#
+# Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([ftconfig.in])
-dnl configuration file -- stay in 8.3 limit
-AC_CONFIG_HEADER(ftconfig.h:ftconfig.in)
-dnl Don't forget to update VERSION.DLL!
-version_info='9:3:3'
-AC_SUBST(version_info)
+# Don't forget to update docs/VERSION.DLL!
+
+version_info='9:6:3'
+AC_SUBST([version_info])
ft_version=`echo $version_info | tr : .`
-AC_SUBST(ft_version)
+AC_SUBST([ft_version])
+
+
+# checks for system type
+
+AC_CANONICAL_TARGET
-dnl checks for system type
-AC_CANONICAL_TARGET([])
-dnl checks for programs
+# checks for programs
+
AC_PROG_CC
AC_PROG_CPP
-dnl get Compiler flags right.
+
+# get compiler flags right
+
if test "x$CC" = xgcc; then
XX_CFLAGS="-Wall"
XX_ANSIFLAGS="-pedantic -ansi"
else
case "$host" in
- *-dec-osf*)
- CFLAGS=
- XX_CFLAGS="-std1 -g3"
- XX_ANSIFLAGS=
- ;;
- *)
- XX_CFLAGS=
- XX_ANSIFLAGS=
- ;;
+ *-dec-osf*)
+ CFLAGS=
+ XX_CFLAGS="-std1 -g3"
+ XX_ANSIFLAGS=
+ ;;
+ *)
+ XX_CFLAGS=
+ XX_ANSIFLAGS=
+ ;;
esac
fi
-AC_SUBST(XX_CFLAGS)
-AC_SUBST(XX_ANSIFLAGS)
+AC_SUBST([XX_CFLAGS])
+AC_SUBST([XX_ANSIFLAGS])
+
+
+# auxiliary programs
+
+AC_CHECK_PROG([RMF], [rm], [rm -f])
+AC_CHECK_PROG([RMDIR], [rmdir], [rmdir])
-AC_CHECK_PROG(RMF, rm, rm -f)
-AC_CHECK_PROG(RMDIR, rmdir, rmdir)
-dnl Since this file will be finally moved to another directory we make
-dnl the path of the install script absolute. This small code snippet has
-dnl been taken from automake's `ylwrap' script.
+# Since this file will be finally moved to another directory we make
+# the path of the install script absolute. This small code snippet has
+# been taken from automake's `ylwrap' script.
+
AC_PROG_INSTALL
case "$INSTALL" in
- /*)
- ;;
- */*)
- INSTALL="`pwd`/$INSTALL" ;;
+/*)
+ ;;
+*/*)
+ INSTALL="`pwd`/$INSTALL" ;;
esac
-dnl checks for header files
+
+# checks for header files
+
AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h unistd.h)
+AC_CHECK_HEADERS([fcntl.h unistd.h])
+
+
+# checks for typedefs, structures, and compiler characteristics
-dnl checks for typedefs, structures, and compiler characteristics
AC_C_CONST
-AC_CHECK_SIZEOF(int)
-AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF([int])
+AC_CHECK_SIZEOF([long])
+
-dnl checks for library functions
+# checks for library functions
+
+# Here we check whether we can use our mmap file component.
-dnl Here we check whether we can use our mmap file component.
AC_FUNC_MMAP
if test "$ac_cv_func_mmap_fixed_mapped" != yes; then
- FTSYS_SRC='$(BASE_)ftsystem.c'
+ FTSYS_SRC='$(BASE_DIR)/ftsystem.c'
else
- FTSYS_SRC='$(BUILD)/ftsystem.c'
+ FTSYS_SRC='$(BUILD_DIR)/ftsystem.c'
+
+ AC_CHECK_DECLS([munmap],
+ [],
+ [],
+ [
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/mman.h>
+
+ ])
- FT_MUNMAP_DECL
FT_MUNMAP_PARAM
fi
-AC_SUBST(FTSYS_SRC)
+AC_SUBST([FTSYS_SRC])
-AC_CHECK_FUNCS(memcpy memmove)
+AC_CHECK_FUNCS([memcpy memmove])
-dnl Check for system zlib
-AC_ARG_WITH(zlib,
- [ --without-zlib use internal zlib instead of system-wide])
+# Check for system zlib
+
+AC_ARG_WITH([zlib],
+ dnl don't quote AS_HELP_STRING!
+ AS_HELP_STRING([--without-zlib],
+ [use internal zlib instead of system-wide]))
if test x$with_zlib != xno && test -z "$LIBZ"; then
- AC_CHECK_LIB(z, gzsetparams, [AC_CHECK_HEADER(zlib.h, LIBZ='-lz')])
+ AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])])
fi
if test x$with_zlib != xno && test -n "$LIBZ"; then
CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
LDFLAGS="$LDFLAGS $LIBZ"
SYSTEM_ZLIB=yes
fi
-AC_SUBST(LIBZ)
-AC_SUBST(CFLAGS)
-AC_SUBST(LDFLAGS)
-AC_SUBST(SYSTEM_ZLIB)
+# Whether to use Mac OS resource-based fonts or not
-AC_PROG_LIBTOOL
+AC_ARG_WITH([old-mac-fonts],
+ dnl don't quote AS_HELP_STRING!
+ AS_HELP_STRING([--with-old-mac-fonts],
+ [allow Mac resource-based fonts to be used]))
+if test x$with_old_mac_fonts = xyes; then
+ LDFLAGS="$LDFLAGS -Xlinker -framework -Xlinker CoreServices \
+ -Xlinker -framework -Xlinker ApplicationServices"
+else
+ CFLAGS="$CFLAGS -DDARWIN_NO_CARBON"
+fi
-dnl create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
-dnl and 'builds/unix/unix-cc.mk' that will be used by the build system
-dnl
-AC_CONFIG_FILES([unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config])
-dnl re-generate the Jamfile to use libtool now
-dnl
-dnl AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
+AC_SUBST([LIBZ])
+AC_SUBST([CFLAGS])
+AC_SUBST([LDFLAGS])
+AC_SUBST([SYSTEM_ZLIB])
+
+
+AC_PROG_LIBTOOL
+# urgh -- these are internal libtool variables...
+AC_SUBST([enable_shared])
+AC_SUBST([hardcode_libdir_flag_spec])
+AC_SUBST([wl])
+
+
+# configuration file -- stay in 8.3 limit
+#
+# since #undef doesn't survive in configuration header files we replace
+# `/undef' with `#undef' after creating the output file
+
+AC_CONFIG_HEADERS([ftconfig.h:ftconfig.in],
+ [mv ftconfig.h ftconfig.tmp
+ sed 's|/undef|#undef|' < ftconfig.tmp > ftconfig.h
+ rm ftconfig.tmp])
+
+# create the Unix-specific sub-Makefiles `builds/unix/unix-def.mk'
+# and 'builds/unix/unix-cc.mk' that will be used by the build system
+#
+AC_CONFIG_FILES([unix-cc.mk:unix-cc.in
+ unix-def.mk:unix-def.in
+ freetype-config
+ freetype2.pc:freetype2.in])
+
+# re-generate the Jamfile to use libtool now
+#
+# AC_CONFIG_FILES([../../Jamfile:../../Jamfile.in])
AC_OUTPUT
-dnl end of configure.ac
+# end of configure.ac
diff --git a/extras/freetype2/builds/unix/detect.mk b/extras/freetype2/builds/unix/detect.mk
index 516f8ffd8..a0419dce7 100644
--- a/extras/freetype2/builds/unix/detect.mk
+++ b/extras/freetype2/builds/unix/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002 by
+# Copyright 1996-2000, 2002, 2003, 2004 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -18,7 +18,9 @@ ifeq ($(PLATFORM),ansi)
# Note: this test is duplicated in "builds/toplevel.mk".
#
- is_unix := $(strip $(wildcard /sbin/init) $(wildcard /usr/sbin/init) $(wildcard /hurd/auth))
+ is_unix := $(strip $(wildcard /sbin/init) \
+ $(wildcard /usr/sbin/init) \
+ $(wildcard /hurd/auth))
ifneq ($(is_unix),)
PLATFORM := unix
@@ -27,8 +29,8 @@ ifeq ($(PLATFORM),ansi)
endif # test PLATFORM ansi
ifeq ($(PLATFORM),unix)
- COPY := cp
- DELETE := rm -f
+ COPY := cp
+ DELETE := rm -f
# If `devel' is the requested target, we use a special configuration
# file named `unix-dev.mk'. It disables optimization and libtool.
@@ -64,7 +66,7 @@ ifeq ($(PLATFORM),unix)
# platform).
#
CONFIG_FILE := unix.mk
- setup: unix-def.mk
+ setup: $(BUILD_DIR)/unix-def.mk
unix: setup
.PHONY: unix
endif
@@ -75,13 +77,14 @@ ifeq ($(PLATFORM),unix)
have_mk := $(strip $(wildcard $(OBJ_DIR)/Makefile))
ifneq ($(have_mk),)
# we are building FT2 not in the src tree
- unix-def.mk: $(TOP_DIR)/builds/unix/unix-def.in
+ $(BUILD_DIR)/unix-def.mk: $(TOP_DIR)/builds/unix/unix-def.in
$(TOP_DIR)/builds/unix/configure $(CFG)
else
- unix-def.mk: $(TOP_DIR)/builds/unix/unix-def.in
+ $(BUILD_DIR)/unix-def.mk: $(TOP_DIR)/builds/unix/unix-def.in
cd builds/unix; ./configure $(CFG)
endif
endif # test PLATFORM unix
+
# EOF
diff --git a/extras/freetype2/builds/unix/freetype-config.in b/extras/freetype2/builds/unix/freetype-config.in
index c5a3e5abc..9a6ae100d 100644
--- a/extras/freetype2/builds/unix/freetype-config.in
+++ b/extras/freetype2/builds/unix/freetype-config.in
@@ -2,18 +2,31 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
+exec_prefix_set=no
+includedir=@includedir@
+libdir=@libdir@
+enable_shared=@enable_shared@
+wl=@wl@
+hardcode_libdir_flag_spec='@hardcode_libdir_flag_spec@'
usage()
{
cat <<EOF
-Usage: freetype-config [OPTIONS] [LIBRARIES]
+Usage: freetype-config [OPTION]...
+Get FreeType compilation and linking information.
+
Options:
- [--prefix[=DIR]]
- [--exec-prefix[=DIR]]
- [--version]
- [--libs]
- [--libtool]
- [--cflags]
+ --prefix display \`--prefix' value used for building the
+ FreeType library
+ --prefix=PREFIX override \`--prefix' value with PREFIX
+ --exec-prefix display \`--exec-prefix' value used for building
+ the FreeType library
+ --exec-prefix=EPREFIX override \`--exec-prefix' value with EPREFIX
+ --version display libtool version of the FreeType library
+ --libs display flags for linking with the FreeType library
+ --libtool display library name for linking with libtool
+ --cflags display flags for compiling with the FreeType
+ library
EOF
exit $1
}
@@ -24,8 +37,12 @@ fi
while test $# -gt 0 ; do
case "$1" in
- -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) optarg= ;;
+ -*=*)
+ optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'`
+ ;;
+ *)
+ optarg=
+ ;;
esac
case $1 in
@@ -65,40 +82,53 @@ while test $# -gt 0 ; do
done
if test "$local_prefix" = "yes" ; then
- if test "$exec_prefix_set" != "yes" ; then
- exec_prefix=$prefix
- fi
+ if test "$exec_prefix_set" != "yes" ; then
+ exec_prefix=$prefix
+ fi
fi
if test "$echo_prefix" = "yes" ; then
- echo $prefix
+ echo $prefix
fi
if test "$echo_exec_prefix" = "yes" ; then
- echo $exec_prefix
+ echo $exec_prefix
+fi
+
+if test "$exec_prefix_set" = "yes" ; then
+ libdir=$exec_prefix/lib
+else
+ if test "$local_prefix" = "yes" ; then
+ includedir=$prefix/include
+ libdir=$prefix/lib
+ fi
fi
if test "$echo_cflags" = "yes" ; then
- cflags="-I@includedir@/freetype2"
- if test "@includedir@" != "/usr/include" ; then
- echo -I@includedir@ $cflags
- else
- echo $cflags
- fi
+ cflags="-I$includedir/freetype2"
+ if test "$includedir" != "/usr/include" ; then
+ echo $cflags -I$includedir
+ else
+ echo $cflags
+ fi
fi
if test "$echo_libs" = "yes" ; then
- libs="-lfreetype @LIBZ@"
- if test "@libdir@" != "/usr/lib" ; then
- echo -L@libdir@ $libs
- else
- echo $libs
- fi
+ rpath=
+ if test "$enable_shared" = "yes" ; then
+ eval "rpath=\"$hardcode_libdir_flag_spec\""
+ fi
+ libs="-lfreetype @LIBZ@"
+ if test "$libdir" != "/usr/lib" ; then
+ echo -L$libdir $rpath $libs
+ else
+ echo $libs
+ fi
fi
if test "$echo_libtool" = "yes" ; then
- convlib="libfreetype.la"
- echo @libdir@/$convlib
+ convlib="libfreetype.la"
+ echo $libdir/$convlib
fi
# EOF
diff --git a/extras/freetype2/builds/unix/freetype2.in b/extras/freetype2/builds/unix/freetype2.in
new file mode 100644
index 000000000..0bc22d1ba
--- /dev/null
+++ b/extras/freetype2/builds/unix/freetype2.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: FreeType 2
+Description: A free, high-quality, and portable font engine.
+Version: @ft_version@
+Requires:
+Libs: -L${libdir} -lfreetype @LIBZ@
+Cflags: -I${includedir}/freetype2
diff --git a/extras/freetype2/builds/unix/freetype2.m4 b/extras/freetype2/builds/unix/freetype2.m4
index 21c6445e2..7424a32ab 100644
--- a/extras/freetype2/builds/unix/freetype2.m4
+++ b/extras/freetype2/builds/unix/freetype2.m4
@@ -1,88 +1,104 @@
# Configure paths for FreeType2
# Marcelo Magallon 2001-10-26, based on gtk.m4 by Owen Taylor
+#
+# serial 2
+
+# AC_CHECK_FT2([MINIMUM-VERSION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
+# Test for FreeType 2, and define FT2_CFLAGS and FT2_LIBS.
+# MINIMUM-VERSION is what libtool reports; the default is `7.0.1' (this is
+# FreeType 2.0.4).
+#
+AC_DEFUN([AC_CHECK_FT2],
+ [# Get the cflags and libraries from the freetype-config script
+ #
+ AC_ARG_WITH([ft-prefix],
+ dnl don't quote AS_HELP_STRING!
+ AS_HELP_STRING([--with-ft-prefix=PREFIX],
+ [Prefix where FreeType is installed (optional)]),
+ [ft_config_prefix="$withval"],
+ [ft_config_prefix=""])
+
+ AC_ARG_WITH([ft-exec-prefix],
+ dnl don't quote AS_HELP_STRING!
+ AS_HELP_STRING([--with-ft-exec-prefix=PREFIX],
+ [Exec prefix where FreeType is installed (optional)]),
+ [ft_config_exec_prefix="$withval"],
+ [ft_config_exec_prefix=""])
+
+ AC_ARG_ENABLE([freetypetest],
+ dnl don't quote AS_HELP_STRING!
+ AS_HELP_STRING([--disable-freetypetest],
+ [Do not try to compile and run a test FreeType program]),
+ [],
+ [enable_fttest=yes])
+
+ if test x$ft_config_exec_prefix != x ; then
+ ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix"
+ if test x${FT2_CONFIG+set} != xset ; then
+ FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config
+ fi
+ fi
+
+ if test x$ft_config_prefix != x ; then
+ ft_config_args="$ft_config_args --prefix=$ft_config_prefix"
+ if test x${FT2_CONFIG+set} != xset ; then
+ FT2_CONFIG=$ft_config_prefix/bin/freetype-config
+ fi
+ fi
+
+ AC_PATH_PROG([FT2_CONFIG], [freetype-config], [no])
+
+ min_ft_version=m4_if([$1], [], [7.0.1], [$1])
+ AC_MSG_CHECKING([for FreeType -- version >= $min_ft_version])
+ no_ft=""
+ if test "$FT2_CONFIG" = "no" ; then
+ no_ft=yes
+ else
+ FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags`
+ FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
+ ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ ft_min_major_version=`echo $min_ft_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ ft_min_minor_version=`echo $min_ft_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ ft_min_micro_version=`echo $min_ft_version | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test x$enable_fttest = xyes ; then
+ ft_config_is_lt=""
+ if test $ft_config_major_version -lt $ft_min_major_version ; then
+ ft_config_is_lt=yes
+ else
+ if test $ft_config_major_version -eq $ft_min_major_version ; then
+ if test $ft_config_minor_version -lt $ft_min_minor_version ; then
+ ft_config_is_lt=yes
+ else
+ if test $ft_config_minor_version -eq $ft_min_minor_version ; then
+ if test $ft_config_micro_version -lt $ft_min_micro_version ; then
+ ft_config_is_lt=yes
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test x$ft_config_is_lt = xyes ; then
+ no_ft=yes
+ else
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $FT2_CFLAGS"
+ LIBS="$FT2_LIBS $LIBS"
+
+ #
+ # Sanity checks for the results of freetype-config to some extent.
+ #
+ AC_RUN_IFELSE([
+ AC_LANG_SOURCE([[
-dnl AC_CHECK_FT2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
-dnl Test for FreeType2, and define FT2_CFLAGS and FT2_LIBS
-dnl
-AC_DEFUN(AC_CHECK_FT2,
-[dnl
-dnl Get the cflags and libraries from the freetype-config script
-dnl
-AC_ARG_WITH(ft-prefix,
-[ --with-ft-prefix=PREFIX
- Prefix where FreeType is installed (optional)],
- ft_config_prefix="$withval", ft_config_prefix="")
-AC_ARG_WITH(ft-exec-prefix,
-[ --with-ft-exec-prefix=PREFIX
- Exec prefix where FreeType is installed (optional)],
- ft_config_exec_prefix="$withval", ft_config_exec_prefix="")
-AC_ARG_ENABLE(freetypetest,
-[ --disable-freetypetest Do not try to compile and run
- a test FreeType program],
- [], enable_fttest=yes)
-
-if test x$ft_config_exec_prefix != x ; then
- ft_config_args="$ft_config_args --exec-prefix=$ft_config_exec_prefix"
- if test x${FT2_CONFIG+set} != xset ; then
- FT2_CONFIG=$ft_config_exec_prefix/bin/freetype-config
- fi
-fi
-if test x$ft_config_prefix != x ; then
- ft_config_args="$ft_config_args --prefix=$ft_config_prefix"
- if test x${FT2_CONFIG+set} != xset ; then
- FT2_CONFIG=$ft_config_prefix/bin/freetype-config
- fi
-fi
-AC_PATH_PROG(FT2_CONFIG, freetype-config, no)
-
-min_ft_version=ifelse([$1], ,6.1.0,$1)
-AC_MSG_CHECKING(for FreeType - version >= $min_ft_version)
-no_ft=""
-if test "$FT2_CONFIG" = "no" ; then
- no_ft=yes
-else
- FT2_CFLAGS=`$FT2_CONFIG $ft_config_args --cflags`
- FT2_LIBS=`$FT2_CONFIG $ft_config_args --libs`
- ft_config_major_version=`$FT2_CONFIG $ft_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- ft_config_minor_version=`$FT2_CONFIG $ft_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- ft_config_micro_version=`$FT2_CONFIG $ft_config_args --version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- ft_min_major_version=`echo $min_ft_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- ft_min_minor_version=`echo $min_ft_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- ft_min_micro_version=`echo $min_ft_version | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test x$enable_fttest = xyes ; then
- ft_config_is_lt=""
- if test $ft_config_major_version -lt $ft_min_major_version ; then
- ft_config_is_lt=yes
- else
- if test $ft_config_major_version -eq $ft_min_major_version ; then
- if test $ft_config_minor_version -lt $ft_min_minor_version ; then
- ft_config_is_lt=yes
- else
- if test $ft_config_minor_version -eq $ft_min_minor_version ; then
- if test $ft_config_micro_version -lt $ft_min_micro_version ; then
- ft_config_is_lt=yes
- fi
- fi
- fi
- fi
- fi
- if test x$ft_config_is_lt = xyes ; then
- no_ft=yes
- else
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $FT2_CFLAGS"
- LIBS="$FT2_LIBS $LIBS"
-dnl
-dnl Sanity checks for the results of freetype-config to some extent
-dnl
- AC_TRY_RUN([
#include <ft2build.h>
#include FT_FREETYPE_H
#include <stdio.h>
@@ -92,7 +108,7 @@ int
main()
{
FT_Library library;
- FT_Error error;
+ FT_Error error;
error = FT_Init_FreeType(&library);
@@ -104,40 +120,59 @@ main()
return 0;
}
}
-],, no_ft=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi # test $ft_config_version -lt $ft_min_version
- fi # test x$enable_fttest = xyes
-fi # test "$FT2_CONFIG" = "no"
-if test x$no_ft = x ; then
- AC_MSG_RESULT(yes)
- ifelse([$2], , :, [$2])
-else
- AC_MSG_RESULT(no)
- if test "$FT2_CONFIG" = "no" ; then
- echo "*** The freetype-config script installed by FreeType 2 could not be found."
- echo "*** If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in"
- echo "*** your path, or set the FT2_CONFIG environment variable to the"
- echo "*** full path to freetype-config."
+
+ ]])
+ ],
+ [],
+ [no_ft=yes],
+ [echo $ECHO_N "cross compiling; assuming OK... $ECHO_C"])
+
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi # test $ft_config_version -lt $ft_min_version
+ fi # test x$enable_fttest = xyes
+ fi # test "$FT2_CONFIG" = "no"
+
+ if test x$no_ft = x ; then
+ AC_MSG_RESULT([yes])
+ m4_if([$2], [], [:], [$2])
else
- if test x$ft_config_is_lt = xyes ; then
- echo "*** Your installed version of the FreeType 2 library is too old."
- echo "*** If you have different versions of FreeType 2, make sure that"
- echo "*** correct values for --with-ft-prefix or --with-ft-exec-prefix"
- echo "*** are used, or set the FT2_CONFIG environment variable to the"
- echo "*** full path to freetype-config."
+ AC_MSG_RESULT([no])
+ if test "$FT2_CONFIG" = "no" ; then
+ AC_MSG_WARN([
+
+ The freetype-config script installed by FreeType 2 could not be found.
+ If FreeType 2 was installed in PREFIX, make sure PREFIX/bin is in
+ your path, or set the FT2_CONFIG environment variable to the
+ full path to freetype-config.
+ ])
else
- echo "*** The FreeType test program failed to run. If your system uses"
- echo "*** shared libraries and they are installed outside the normal"
- echo "*** system library path, make sure the variable LD_LIBRARY_PATH"
- echo "*** (or whatever is appropiate for your system) is correctly set."
+ if test x$ft_config_is_lt = xyes ; then
+ AC_MSG_WARN([
+
+ Your installed version of the FreeType 2 library is too old.
+ If you have different versions of FreeType 2, make sure that
+ correct values for --with-ft-prefix or --with-ft-exec-prefix
+ are used, or set the FT2_CONFIG environment variable to the
+ full path to freetype-config.
+ ])
+ else
+ AC_MSG_WARN([
+
+ The FreeType test program failed to run. If your system uses
+ shared libraries and they are installed outside the normal
+ system library path, make sure the variable LD_LIBRARY_PATH
+ (or whatever is appropiate for your system) is correctly set.
+ ])
+ fi
fi
+
+ FT2_CFLAGS=""
+ FT2_LIBS=""
+ m4_if([$3], [], [:], [$3])
fi
- FT2_CFLAGS=""
- FT2_LIBS=""
- ifelse([$3], , :, [$3])
-fi
-AC_SUBST(FT2_CFLAGS)
-AC_SUBST(FT2_LIBS)
-])
+
+ AC_SUBST([FT2_CFLAGS])
+ AC_SUBST([FT2_LIBS])])
+
+# end of freetype2.m4
diff --git a/extras/freetype2/builds/unix/ft-munmap.m4 b/extras/freetype2/builds/unix/ft-munmap.m4
index 37ebbd92d..0036ffb61 100644
--- a/extras/freetype2/builds/unix/ft-munmap.m4
+++ b/extras/freetype2/builds/unix/ft-munmap.m4
@@ -1,31 +1,23 @@
## FreeType specific autoconf tests
-# serial 1 FT_MUNMAP_DECL
+# serial 2
-AC_DEFUN(FT_MUNMAP_DECL,
-[AC_MSG_CHECKING([whether munmap must be declared])
-AC_CACHE_VAL(ft_cv_munmap_decl,
-[AC_TRY_COMPILE([
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <sys/mman.h>],
-[char *(*pfn) = (char *(*))munmap],
-ft_cv_munmap_decl=no,
-ft_cv_munmap_decl=yes)])
-AC_MSG_RESULT($ft_cv_munmap_decl)
-if test $ft_cv_munmap_decl = yes; then
- AC_DEFINE(NEED_MUNMAP_DECL,,
- [Define to 1 if munmap() is not defined in <sys/mman.h>])
-fi])
+AC_DEFUN([FT_MUNMAP_PARAM],
+ [AC_MSG_CHECKING([for munmap's first parameter type])
+ AC_COMPILE_IFELSE([
+ AC_LANG_SOURCE([[
-AC_DEFUN(FT_MUNMAP_PARAM,
-[AC_MSG_CHECKING([for munmap's first parameter type])
-AC_TRY_COMPILE([
#include <unistd.h>
#include <sys/mman.h>
-int munmap(void *, size_t);],,
- AC_MSG_RESULT([void *]);AC_DEFINE(MUNMAP_USES_VOIDP,,
- [Define to 1 if the first argument of munmap is of type void *]),
- AC_MSG_RESULT([char *]))
-])
+int munmap(void *, size_t);
+
+ ]])
+ ],
+ [AC_MSG_RESULT([void *])
+ AC_DEFINE([MUNMAP_USES_VOIDP],
+ [],
+ [Define to 1 if the first argument of munmap is of type void *])],
+ [AC_MSG_RESULT([char *])])
+ ])
+
+# end of ft-munmap.m4
diff --git a/extras/freetype2/builds/unix/ft2unix.h b/extras/freetype2/builds/unix/ft2unix.h
index c4299c3ab..7390dc494 100644
--- a/extras/freetype2/builds/unix/ft2unix.h
+++ b/extras/freetype2/builds/unix/ft2unix.h
@@ -4,7 +4,7 @@
/* */
/* Build macros of the FreeType 2 library. */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,14 +21,15 @@
/* This is a Unix-specific version of <ft2build.h> that should be used */
/* exclusively *after* installation of the library. */
/* */
- /* It assumes that "/usr/local/include/freetype2" (or wathever is */
- /* returned by the "freetype-config --cflags" command) is in your */
- /* compilation include path. */
+ /* It assumes that "/usr/local/include/freetype2" (or whatever is */
+ /* returned by the "freetype-config --cflags" or "pkg-config --cflags" */
+ /* command) is in your compilation include path. */
/* */
/* We don't need to do anything special in this release. However, for */
- /* FreeType 2.1, the following installation changes will be performed: */
+ /* a future FreeType 2 release, the following installation changes will */
+ /* be performed: */
/* */
- /* - The contents of "freetype-2.1/include/freetype" will be installed */
+ /* - The contents of "freetype-2.x/include/freetype" will be installed */
/* to "/usr/local/include/freetype2" instead of */
/* "/usr/local/include/freetype2/freetype". */
/* */
@@ -39,11 +40,11 @@
/* replace all "<freetype/xxx>" with "<freetype2/xxx>". */
/* */
/* - Adding "/usr/local/include/freetype2" to your compilation include */
- /* path will not be necessary anymore. The command */
- /* "freetype-config --cflags" will return an empty string. */
+ /* path will not be necessary anymore. */
/* */
- /* - Client applications which adhere to the new inclusion scheme */
- /* WILL NOT NEED TO BE MODIFIED to compile with FT 2.1! */
+ /* These changes will be transparent to client applications which use */
+ /* freetype-config (or pkg-config). No modifications will be necessary */
+ /* to compile with the new scheme. */
/* */
/*************************************************************************/
@@ -51,7 +52,7 @@
#ifndef __FT2_BUILD_UNIX_H__
#define __FT2_BUILD_UNIX_H__
- /* "/usr/local/include/freetype2" must be in your current inclusion path */
+ /* "<prefix>/include/freetype2" must be in your current inclusion path */
#include <freetype/config/ftheader.h>
#endif /* __FT2_BUILD_UNIX_H__ */
diff --git a/extras/freetype2/builds/unix/ftconfig.in b/extras/freetype2/builds/unix/ftconfig.in
index c7511039f..6d8f1e856 100644
--- a/extras/freetype2/builds/unix/ftconfig.in
+++ b/extras/freetype2/builds/unix/ftconfig.in
@@ -4,7 +4,7 @@
/* */
/* UNIX-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2000, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -57,15 +57,17 @@ FT_BEGIN_HEADER
/*************************************************************************/
-#define HAVE_UNISTD_H 0
-#define HAVE_FCNTL_H 0
+#undef HAVE_UNISTD_H
+#undef HAVE_FCNTL_H
+
+#undef SIZEOF_INT
+#undef SIZEOF_LONG
-#define SIZEOF_INT 2
-#define SIZEOF_LONG 2
#define FT_SIZEOF_INT SIZEOF_INT
#define FT_SIZEOF_LONG SIZEOF_LONG
+#define FT_CHAR_BIT CHAR_BIT
/* Preferred alignment of data */
#define FT_ALIGNMENT 8
@@ -91,6 +93,19 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* Mac support */
+ /* */
+ /* This is the only necessary change, so it is defined here instead */
+ /* providing a new configuration file. */
+ /* */
+#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
+ ( defined( __MWERKS__ ) && defined( macintosh ) )
+#define FT_MACINTOSH 1
+#endif
+
+
+ /*************************************************************************/
+ /* */
/* IntN types */
/* */
/* Used to guarantee the size of some specific integers. */
@@ -112,31 +127,88 @@ FT_BEGIN_HEADER
#error "no 32bit type found -- please check your configuration files"
#endif
+
+ /* look up an integer type that is at least 32 bits */
+#if FT_SIZEOF_INT >= 4
+
+ typedef int FT_Fast;
+ typedef unsigned int FT_UFast;
+
+#elif FT_SIZEOF_LONG >= 4
+
+ typedef long FT_Fast;
+ typedef unsigned long FT_UFast;
+
+#endif
+
+
+ /* determine whether we have a 64-bit int type for platforms without */
+ /* Autoconf */
#if FT_SIZEOF_LONG == 8
/* FT_LONG64 must be defined if a 64-bit type is available */
#define FT_LONG64
-#define FT_INT64 long
+#define FT_INT64 long
+
+#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
+
+ /* this compiler provides the __int64 type */
+#define FT_LONG64
+#define FT_INT64 __int64
+
+#elif defined( __BORLANDC__ ) /* Borland C++ */
+
+ /* XXXX: We should probably check the value of __BORLANDC__ in order */
+ /* to test the compiler version. */
+
+ /* this compiler provides the __int64 type */
+#define FT_LONG64
+#define FT_INT64 __int64
+
+#elif defined( __WATCOMC__ ) /* Watcom C++ */
+
+ /* Watcom doesn't provide 64-bit data types */
+
+#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
+
+#define FT_LONG64
+#define FT_INT64 long long int
+
+#elif defined( __GNUC__ )
+
+ /* GCC provides the "long long" type */
+#define FT_LONG64
+#define FT_INT64 long long int
+
+#endif /* FT_SIZEOF_LONG == 8 */
+
+
+#define FT_BEGIN_STMNT do {
+#define FT_END_STMNT } while ( 0 )
+#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
-#else
/*************************************************************************/
/* */
- /* Many compilers provide the non-ANSI `long long' 64-bit type. You can */
- /* activate it by defining the FTCALC_USE_LONG_LONG macro in */
- /* `ftoption.h'. */
- /* */
- /* Note that this will produce many -ansi warnings during library */
- /* compilation, and that in many cases, the generated code will be */
- /* neither smaller nor faster! */
+ /* A 64-bit data type will create compilation problems if you compile */
+ /* in strict ANSI mode. To avoid them, we disable their use if */
+ /* __STDC__ is defined. You can however ignore this rule by */
+ /* defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
/* */
-#ifdef FTCALC_USE_LONG_LONG
+#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
-#define FT_LONG64
-#define FT_INT64 long long
+#ifdef __STDC__
-#endif /* FTCALC_USE_LONG_LONG */
-#endif /* FT_SIZEOF_LONG == 8 */
+ /* Undefine the 64-bit macros in strict ANSI compilation mode. */
+ /* Since `#undef' doesn't survive in configuration header files */
+ /* we use the postprocessing facility of AC_CONFIG_HEADERS to */
+ /* replace the leading `/' with `#'. */
+/undef FT_LONG64
+/undef FT_INT64
+
+#endif /* __STDC__ */
+
+#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
@@ -151,7 +223,7 @@ FT_BEGIN_HEADER
#define FT_LOCAL_DEF( x ) extern "C" x
#else
#define FT_LOCAL( x ) extern x
-#define FT_LOCAL_DEF( x ) extern x
+#define FT_LOCAL_DEF( x ) x
#endif
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
@@ -255,6 +327,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
+
#endif /* __FTCONFIG_H__ */
diff --git a/extras/freetype2/builds/unix/ftsystem.c b/extras/freetype2/builds/unix/ftsystem.c
index 4ae260cd3..c7a34ad58 100644
--- a/extras/freetype2/builds/unix/ftsystem.c
+++ b/extras/freetype2/builds/unix/ftsystem.c
@@ -4,7 +4,7 @@
/* */
/* Unix-specific FreeType low-level system interface (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -67,6 +67,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <errno.h>
/*************************************************************************/
@@ -182,16 +183,16 @@
/*************************************************************************/
/* */
/* <Function> */
- /* ft_close_stream */
+ /* ft_close_stream_by_munmap */
/* */
/* <Description> */
- /* The function to close a stream. */
+ /* The function to close a stream which is opened by mmap. */
/* */
/* <Input> */
/* stream :: A pointer to the stream object. */
/* */
FT_CALLBACK_DEF( void )
- ft_close_stream( FT_Stream stream )
+ ft_close_stream_by_munmap( FT_Stream stream )
{
munmap( (MUNMAP_ARG_CAST)stream->descriptor.pointer, stream->size );
@@ -201,6 +202,28 @@
}
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* ft_close_stream_by_free */
+ /* */
+ /* <Description> */
+ /* The function to close a stream which is created by ft_alloc. */
+ /* */
+ /* <Input> */
+ /* stream :: A pointer to the stream object. */
+ /* */
+ FT_CALLBACK_DEF( void )
+ ft_close_stream_by_free( FT_Stream stream )
+ {
+ ft_free( NULL, stream->descriptor.pointer );
+
+ stream->descriptor.pointer = NULL;
+ stream->size = 0;
+ stream->base = 0;
+ }
+
+
/* documentation is in ftobjs.h */
FT_EXPORT_DEF( FT_Error )
@@ -252,11 +275,49 @@
file,
0 );
- if ( (long)stream->base == -1 )
+ if ( (long)stream->base != -1 )
+ stream->close = ft_close_stream_by_munmap;
+ else
{
+ ssize_t total_read_count;
+
+
FT_ERROR(( "FT_Stream_Open:" ));
FT_ERROR(( " could not `mmap' file `%s'\n", filepathname ));
- goto Fail_Map;
+
+ stream->base = ft_alloc( NULL, stream->size );
+
+ if ( !stream->base )
+ {
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " could not `alloc' memory\n" ));
+ goto Fail_Map;
+ }
+
+ total_read_count = 0;
+ do {
+ ssize_t read_count;
+
+
+ read_count = read( file,
+ stream->base + total_read_count,
+ stream->size - total_read_count );
+
+ if ( ( read_count == -1 ) )
+ {
+ if ( errno == EINTR )
+ continue;
+
+ FT_ERROR(( "FT_Stream_Open:" ));
+ FT_ERROR(( " error while `read'ing file `%s'\n", filepathname ));
+ goto Fail_Read;
+ }
+
+ total_read_count += read_count;
+
+ } while ( total_read_count != stream->size );
+
+ stream->close = ft_close_stream_by_free;
}
close( file );
@@ -264,8 +325,7 @@
stream->descriptor.pointer = stream->base;
stream->pathname.pointer = (char*)filepathname;
- stream->close = ft_close_stream;
- stream->read = 0;
+ stream->read = 0;
FT_TRACE1(( "FT_Stream_Open:" ));
FT_TRACE1(( " opened `%s' (%d bytes) successfully\n",
@@ -273,6 +333,9 @@
return FT_Err_Ok;
+ Fail_Read:
+ ft_free( NULL, stream->base );
+
Fail_Map:
close( file );
diff --git a/extras/freetype2/builds/unix/install-sh b/extras/freetype2/builds/unix/install-sh
index 57a2fbd18..77bc38144 100644
--- a/extras/freetype2/builds/unix/install-sh
+++ b/extras/freetype2/builds/unix/install-sh
@@ -1,21 +1,38 @@
#!/bin/sh
# install - install a program, script, or datafile
-# This originally came from X11R5 (mit/util/scripts/install.sh).
-scriptversion=2003-01-17.15
+scriptversion=2004-02-15.20
-# Copyright 1991 by the Massachusetts Institute of Technology
-# (FSF changes in the public domain.)
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
#
-# Permission to use, copy, modify, distribute, and sell this software and its
-# documentation for any purpose is hereby granted without fee, provided that
-# the above copyright notice appear in all copies and that both that
-# copyright notice and this permission notice appear in supporting
-# documentation, and that the name of M.I.T. not be used in advertising or
-# publicity pertaining to distribution of the software without specific,
-# written prior permission. M.I.T. makes no representations about the
-# suitability of this software for any purpose. It is provided "as is"
-# without express or implied warranty.
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
@@ -55,7 +72,8 @@ dst=
dir_arg=
usage="Usage: $0 [OPTION]... SRCFILE DSTFILE
- or: $0 -d DIR1 DIR2...
+ or: $0 [OPTION]... SRCFILES... DIRECTORY
+ or: $0 -d DIRECTORIES...
In the first form, install SRCFILE to DSTFILE, removing SRCFILE by default.
In the second, create the directory path DIR.
@@ -117,144 +135,173 @@ while test -n "$1"; do
--version) echo "$0 $scriptversion"; exit 0;;
- *) if test -z "$src"; then
- src=$1
- else
- # this colon is to work around a 386BSD /bin/sh bug
- :
- dst=$1
- fi
- shift
- continue;;
+ *) # When -d is used, all remaining arguments are directories to create.
+ test -n "$dir_arg" && break
+ # Otherwise, the last argument is the destination. Remove it from $@.
+ for arg
+ do
+ if test -n "$dstarg"; then
+ # $@ is not empty: it contains at least $arg.
+ set fnord "$@" "$dstarg"
+ shift # fnord
+ fi
+ shift # arg
+ dstarg=$arg
+ done
+ break;;
esac
done
-if test -z "$src"; then
- echo "$0: no input file specified." >&2
- exit 1
-fi
-
-if test -n "$dir_arg"; then
- dst=$src
- src=
-
- if test -d "$dst"; then
- instcmd=:
- chmodcmd=
- else
- instcmd=$mkdirprog
- fi
-else
- # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
- # might cause directories to be created, which would be especially bad
- # if $src (and thus $dsttmp) contains '*'.
- if test ! -f "$src" && test ! -d "$src"; then
- echo "$0: $src does not exist." >&2
+if test -z "$1"; then
+ if test -z "$dir_arg"; then
+ echo "$0: no input file specified." >&2
exit 1
fi
-
- if test -z "$dst"; then
- echo "$0: no destination specified." >&2
- exit 1
- fi
-
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
- if test -d "$dst"; then
- dst=$dst/`basename "$src"`
- fi
+ # It's OK to call `install-sh -d' without argument.
+ # This can happen when creating conditional directories.
+ exit 0
fi
-## this sed command emulates the dirname command
-dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+for src
+do
+ # Protect names starting with `-'.
+ case $src in
+ -*) src=./$src ;;
+ esac
-# Make sure that the destination directory exists.
-# (this part is taken from Noah Friedman's mkinstalldirs script.)
+ if test -n "$dir_arg"; then
+ dst=$src
+ src=
-# Skip lots of stat calls in the usual case.
-if test ! -d "$dstdir"; then
- defaultIFS='
- '
- IFS="${IFS-$defaultIFS}"
+ if test -d "$dst"; then
+ instcmd=:
+ chmodcmd=
+ else
+ instcmd=$mkdirprog
+ fi
+ else
+ # Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+ # might cause directories to be created, which would be especially bad
+ # if $src (and thus $dsttmp) contains '*'.
+ if test ! -f "$src" && test ! -d "$src"; then
+ echo "$0: $src does not exist." >&2
+ exit 1
+ fi
- oIFS=$IFS
- # Some sh's can't handle IFS=/ for some reason.
- IFS='%'
- set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
- IFS=$oIFS
+ if test -z "$dstarg"; then
+ echo "$0: no destination specified." >&2
+ exit 1
+ fi
- pathcomp=
+ dst=$dstarg
+ # Protect names starting with `-'.
+ case $dst in
+ -*) dst=./$dst ;;
+ esac
- while test $# -ne 0 ; do
- pathcomp=$pathcomp$1
- shift
- test -d "$pathcomp" || $mkdirprog "$pathcomp"
- pathcomp=$pathcomp/
- done
-fi
+ # If destination is a directory, append the input filename; won't work
+ # if double slashes aren't ignored.
+ if test -d "$dst"; then
+ dst=$dst/`basename "$src"`
+ fi
+ fi
-if test -n "$dir_arg"; then
- $doit $instcmd "$dst" \
- && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
-
-else
- # If we're going to rename the final executable, determine the name now.
- if test -z "$transformarg"; then
- dstfile=`basename "$dst"`
- else
- dstfile=`basename "$dst" $transformbasename \
- | sed $transformarg`$transformbasename
+ # This sed command emulates the dirname command.
+ dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+ # Make sure that the destination directory exists.
+
+ # Skip lots of stat calls in the usual case.
+ if test ! -d "$dstdir"; then
+ defaultIFS='
+ '
+ IFS="${IFS-$defaultIFS}"
+
+ oIFS=$IFS
+ # Some sh's can't handle IFS=/ for some reason.
+ IFS='%'
+ set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+ IFS=$oIFS
+
+ pathcomp=
+
+ while test $# -ne 0 ; do
+ pathcomp=$pathcomp$1
+ shift
+ if test ! -d "$pathcomp"; then
+ $mkdirprog "$pathcomp" || lasterr=$?
+ # mkdir can fail with a `File exist' error in case several
+ # install-sh are creating the directory concurrently. This
+ # is OK.
+ test ! -d "$pathcomp" && { (exit ${lasterr-1}); exit; }
+ fi
+ pathcomp=$pathcomp/
+ done
fi
- # don't allow the sed command to completely eliminate the filename.
- test -z "$dstfile" && dstfile=`basename "$dst"`
-
- # Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/#inst.$$#
- rmtmp=$dstdir/#rm.$$#
-
- # Trap to clean up those temp files at exit.
- trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
- trap '(exit $?); exit' 1 2 13 15
-
- # Move or copy the file name to the temp name
- $doit $instcmd "$src" "$dsttmp" &&
-
- # and set any options; do chmod last to preserve setuid bits.
- #
- # If any of these fail, we abort the whole thing. If we want to
- # ignore errors from any of these, just make sure not to ignore
- # errors from the above "$doit $instcmd $src $dsttmp" command.
- #
- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
- && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
- && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
- && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
-
- # Now remove or move aside any old file at destination location. We
- # try this two ways since rm can't unlink itself on some systems and
- # the destination file might be busy for other reasons. In this case,
- # the final cleanup might fail but the new file should still install
- # successfully.
- {
- if test -f "$dstdir/$dstfile"; then
- $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
- || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
- || {
- echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
- (exit 1); exit
- }
+ if test -n "$dir_arg"; then
+ $doit $instcmd "$dst" \
+ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; }
+
+ else
+ # If we're going to rename the final executable, determine the name now.
+ if test -z "$transformarg"; then
+ dstfile=`basename "$dst"`
else
- :
+ dstfile=`basename "$dst" $transformbasename \
+ | sed $transformarg`$transformbasename
fi
- } &&
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
-fi &&
+ # don't allow the sed command to completely eliminate the filename.
+ test -z "$dstfile" && dstfile=`basename "$dst"`
+
+ # Make a couple of temp file names in the proper directory.
+ dsttmp=$dstdir/_inst.$$_
+ rmtmp=$dstdir/_rm.$$_
+
+ # Trap to clean up those temp files at exit.
+ trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+ trap '(exit $?); exit' 1 2 13 15
+
+ # Move or copy the file name to the temp name
+ $doit $instcmd "$src" "$dsttmp" &&
+
+ # and set any options; do chmod last to preserve setuid bits.
+ #
+ # If any of these fail, we abort the whole thing. If we want to
+ # ignore errors from any of these, just make sure not to ignore
+ # errors from the above "$doit $instcmd $src $dsttmp" command.
+ #
+ { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \
+ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \
+ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \
+ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } &&
+
+ # Now remove or move aside any old file at destination location. We
+ # try this two ways since rm can't unlink itself on some systems and
+ # the destination file might be busy for other reasons. In this case,
+ # the final cleanup might fail but the new file should still install
+ # successfully.
+ {
+ if test -f "$dstdir/$dstfile"; then
+ $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \
+ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \
+ || {
+ echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+ (exit 1); exit
+ }
+ else
+ :
+ fi
+ } &&
+
+ # Now rename the file to the real destination.
+ $doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+ fi || { (exit 1); exit; }
+done
# The final little trick to "correctly" pass the exit status to the exit trap.
{
diff --git a/extras/freetype2/builds/unix/install.mk b/extras/freetype2/builds/unix/install.mk
index cfd24f89e..1930d3716 100644
--- a/extras/freetype2/builds/unix/install.mk
+++ b/extras/freetype2/builds/unix/install.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002 by
+# Copyright 1996-2000, 2002, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -25,6 +25,7 @@
# Unix installation and deinstallation targets.
install: $(PROJECT_LIBRARY)
$(MKINSTALLDIRS) $(DESTDIR)$(libdir) \
+ $(DESTDIR)$(libdir)/pkgconfig \
$(DESTDIR)$(includedir)/freetype2/freetype/config \
$(DESTDIR)$(includedir)/freetype2/freetype/internal \
$(DESTDIR)$(includedir)/freetype2/freetype/cache \
@@ -48,11 +49,16 @@ install: $(PROJECT_LIBRARY)
$(INSTALL_DATA) \
$$P $(DESTDIR)$(includedir)/freetype2/freetype/cache ; \
done
- $(INSTALL_DATA) $(BUILD)/ft2unix.h $(DESTDIR)$(includedir)/ft2build.h
+ $(INSTALL_DATA) $(BUILD_DIR)/ft2unix.h \
+ $(DESTDIR)$(includedir)/ft2build.h
+ $(INSTALL_DATA) $(BUILD_DIR)/ftconfig.h \
+ $(DESTDIR)$(includedir)/freetype2/freetype/config/ftconfig.h
$(INSTALL_SCRIPT) -m 755 $(OBJ_BUILD)/freetype-config \
$(DESTDIR)$(bindir)/freetype-config
- $(INSTALL_SCRIPT) -m 644 $(BUILD)/freetype2.m4 \
+ $(INSTALL_SCRIPT) -m 644 $(BUILD_DIR)/freetype2.m4 \
$(DESTDIR)$(datadir)/aclocal/freetype2.m4
+ $(INSTALL_SCRIPT) -m 644 $(OBJ_BUILD)/freetype2.pc \
+ $(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
uninstall:
@@ -69,6 +75,7 @@ uninstall:
-$(DELETE) $(DESTDIR)$(includedir)/ft2build.h
-$(DELETE) $(DESTDIR)$(bindir)/freetype-config
-$(DELETE) $(DESTDIR)$(datadir)/aclocal/freetype2.m4
+ -$(DELETE) $(DESTDIR)$(libdir)/pkgconfig/freetype2.pc
check:
diff --git a/extras/freetype2/builds/unix/ltmain.sh b/extras/freetype2/builds/unix/ltmain.sh
index 7e0c9f487..70f0b2d03 100644
--- a/extras/freetype2/builds/unix/ltmain.sh
+++ b/extras/freetype2/builds/unix/ltmain.sh
@@ -1,7 +1,7 @@
# ltmain.sh - Provide generalized library-building support services.
# NOTE: Changing this file will not affect anything until you rerun configure.
#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
# Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
@@ -24,6 +24,29 @@
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
+basename="s,^.*/,,g"
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+progname=`echo "$progpath" | $SED $basename`
+modename="$progname"
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.5.6
+TIMESTAMP=" (1.1220.2.94 2004/04/10 16:27:27)"
+
+
# Check that we have a working $echo.
if test "X$1" = X--no-reexec; then
# Discard the --no-reexec flag, and continue.
@@ -36,7 +59,7 @@ elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
:
else
# Restart under the correct shell, and then maybe $echo will work.
- exec $SHELL "$0" --no-reexec ${1+"$@"}
+ exec $SHELL "$progpath" --no-reexec ${1+"$@"}
fi
if test "X$1" = X--fallback-echo; then
@@ -45,19 +68,9 @@ if test "X$1" = X--fallback-echo; then
cat <<EOF
$*
EOF
- exit 0
+ exit $EXIT_SUCCESS
fi
-# The name of this program.
-progname=`$echo "$0" | ${SED} 's%^.*/%%'`
-modename="$progname"
-
-# Constants.
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=1.4.3
-TIMESTAMP=" (1.922.2.110 2002/10/23 01:39:54)"
-
default_mode=
help="Try \`$progname --help' for more information."
magic="%%%MAGIC variable%%%"
@@ -69,17 +82,17 @@ rm="rm -f"
# metacharacters that are still active within double-quoted strings.
Xsed="${SED}"' -e 1s/^X//'
sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
-# test EBCDIC or ASCII
-case `echo A|od -x` in
- *[Cc]1*) # EBCDIC based system
- SP2NL="tr '\100' '\n'"
- NL2SP="tr '\r\n' '\100\100'"
- ;;
- *) # Assume ASCII based system
- SP2NL="tr '\040' '\012'"
- NL2SP="tr '\015\012' '\040\040'"
- ;;
-esac
+# test EBCDIC or ASCII
+case `echo A|tr A '\301'` in
+ A) # EBCDIC based system
+ SP2NL="tr '\100' '\n'"
+ NL2SP="tr '\r\n' '\100\100'"
+ ;;
+ *) # Assume ASCII based system
+ SP2NL="tr '\040' '\012'"
+ NL2SP="tr '\015\012' '\040\040'"
+ ;;
+esac
# NLS nuisances.
# Only set LANG and LC_ALL to C if already set.
@@ -94,12 +107,13 @@ if test "${LANG+set}" = set; then
fi
# Make sure IFS has a sensible default
-: ${IFS=" "}
+: ${IFS="
+"}
if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
- echo "$modename: not configured to build any kind of library" 1>&2
- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit 1
+ $echo "$modename: not configured to build any kind of library" 1>&2
+ $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit $EXIT_FAILURE
fi
# Global variables.
@@ -114,8 +128,121 @@ execute_dlfiles=
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
+#####################################
+# Shell function definitions:
+# This seems to be the best place for them
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid () {
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \
+ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+ win32_nmres=`eval $NM -f posix -A $1 | \
+ sed -n -e '1,100{/ I /{x;/import/!{s/^/import/;h;p;};x;};}'`
+ if test "X$win32_nmres" = "Ximport" ; then
+ win32_libid_type="x86 archive import"
+ else
+ win32_libid_type="x86 archive static"
+ fi
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $echo $win32_libid_type
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag () {
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ CC_quoted="$CC_quoted $arg"
+ done
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ CC_quoted="$CC_quoted $arg"
+ done
+ case "$@ " in
+ " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ $echo "$modename: unable to infer tagged configuration"
+ $echo "$modename: specify a tag with \`--tag'" 1>&2
+ exit $EXIT_FAILURE
+# else
+# $echo "$modename: using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+# End of Shell function definitions
+#####################################
+
+# Darwin sucks
+eval std_shrext=\"$shrext_cmds\"
+
# Parse our command line options once, thoroughly.
-while test $# -gt 0
+while test "$#" -gt 0
do
arg="$1"
shift
@@ -131,6 +258,34 @@ do
execute_dlfiles)
execute_dlfiles="$execute_dlfiles $arg"
;;
+ tag)
+ tagname="$arg"
+ preserve_args="${preserve_args}=$arg"
+
+ # Check whether tagname contains only valid characters
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ $echo "$progname: invalid tag name: $tagname" 1>&2
+ exit $EXIT_FAILURE
+ ;;
+ esac
+
+ case $tagname in
+ CC)
+ # Don't test for the "default" C tag, as we know, it's there, but
+ # not specially marked.
+ ;;
+ *)
+ if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then
+ taglist="$taglist $tagname"
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`"
+ else
+ $echo "$progname: ignoring unknown tag $tagname" 1>&2
+ fi
+ ;;
+ esac
+ ;;
*)
eval "$prev=\$arg"
;;
@@ -148,18 +303,27 @@ do
;;
--version)
- echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
- exit 0
+ $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+ $echo
+ $echo "Copyright (C) 2003 Free Software Foundation, Inc."
+ $echo "This is free software; see the source for copying conditions. There is NO"
+ $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+ exit $EXIT_SUCCESS
;;
--config)
- ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
- exit 0
+ ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath"
+ done
+ exit $EXIT_SUCCESS
;;
--debug)
- echo "$progname: enabling shell trace mode"
+ $echo "$progname: enabling shell trace mode"
set -x
+ preserve_args="$preserve_args $arg"
;;
--dry-run | -n)
@@ -167,18 +331,18 @@ do
;;
--features)
- echo "host: $host"
+ $echo "host: $host"
if test "$build_libtool_libs" = yes; then
- echo "enable shared libraries"
+ $echo "enable shared libraries"
else
- echo "disable shared libraries"
+ $echo "disable shared libraries"
fi
if test "$build_old_libs" = yes; then
- echo "enable static libraries"
+ $echo "enable static libraries"
else
- echo "disable static libraries"
+ $echo "disable static libraries"
fi
- exit 0
+ exit $EXIT_SUCCESS
;;
--finish) mode="finish" ;;
@@ -190,6 +354,15 @@ do
--quiet | --silent)
show=:
+ preserve_args="$preserve_args $arg"
+ ;;
+
+ --tag) prevopt="--tag" prev=tag ;;
+ --tag=*)
+ set tag "$optarg" ${1+"$@"}
+ shift
+ prev=tag
+ preserve_args="$preserve_args --tag"
;;
-dlopen)
@@ -200,7 +373,7 @@ do
-*)
$echo "$modename: unrecognized option \`$arg'" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
*)
@@ -213,7 +386,7 @@ done
if test -n "$prevopt"; then
$echo "$modename: option \`$prevopt' requires an argument" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# If this variable is set in any of the actions, the command in it
@@ -225,8 +398,10 @@ if test -z "$show_help"; then
# Infer the operation mode.
if test -z "$mode"; then
+ $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2
+ $echo "*** Future versions of Libtool will require -mode=MODE be specified." 1>&2
case $nonopt in
- *cc | *++ | gcc* | *-gcc* | xlc*)
+ *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*)
mode=link
for arg
do
@@ -267,7 +442,7 @@ if test -z "$show_help"; then
if test -n "$execute_dlfiles" && test "$mode" != execute; then
$echo "$modename: unrecognized option \`-dlopen'" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# Change the help message to a mode-specific one.
@@ -281,158 +456,124 @@ if test -z "$show_help"; then
modename="$modename: compile"
# Get the compilation command and the source file.
base_compile=
- prev=
- lastarg=
- srcfile="$nonopt"
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
- user_target=no
for arg
do
- case $prev in
- "") ;;
- xcompiler)
- # Aesthetically quote the previous argument.
- prev=
- lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
-
- case $arg in
- # Double-quote args containing other shell metacharacters.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
+ case "$arg_mode" in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
- # Add the previous argument to base_compile.
- if test -z "$base_compile"; then
- base_compile="$lastarg"
- else
- base_compile="$base_compile $lastarg"
- fi
+ target )
+ libobj="$arg"
+ arg_mode=normal
continue
;;
- esac
- # Accept any command-line options.
- case $arg in
- -o)
- if test "$user_target" != "no"; then
- $echo "$modename: you cannot specify \`-o' more than once" 1>&2
- exit 1
- fi
- user_target=next
- ;;
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ if test -n "$libobj" ; then
+ $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+ exit $EXIT_FAILURE
+ fi
+ arg_mode=target
+ continue
+ ;;
- -static)
- build_old_libs=yes
- continue
- ;;
+ -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
+ continue
+ ;;
- -prefer-pic)
- pic_mode=yes
- continue
- ;;
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
- -prefer-non-pic)
- pic_mode=no
- continue
- ;;
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
- -Xcompiler)
- prev=xcompiler
- continue
- ;;
+ -Wc,*)
+ args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
- -Wc,*)
- args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
- lastarg=
- save_ifs="$IFS"; IFS=','
- for arg in $args; do
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ lastarg="$lastarg $arg"
+ done
IFS="$save_ifs"
+ lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
- # Double-quote args containing other shell metacharacters.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- case $arg in
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- arg="\"$arg\""
- ;;
- esac
- lastarg="$lastarg $arg"
- done
- IFS="$save_ifs"
- lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
-
- # Add the arguments to base_compile.
- if test -z "$base_compile"; then
- base_compile="$lastarg"
- else
+ # Add the arguments to base_compile.
base_compile="$base_compile $lastarg"
- fi
- continue
- ;;
- esac
+ continue
+ ;;
- case $user_target in
- next)
- # The next one is the -o target name
- user_target=yes
- continue
- ;;
- yes)
- # We got the output file
- user_target=set
- libobj="$arg"
- continue
+ * )
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
;;
- esac
-
- # Accept the current argument as the source file.
- lastarg="$srcfile"
- srcfile="$arg"
+ esac # case $arg_mode
# Aesthetically quote the previous argument.
-
- # Backslashify any backslashes, double quotes, and dollar signs.
- # These are the only characters that are still specially
- # interpreted inside of double-quoted scrings.
lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+ case $lastarg in
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
- case $lastarg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
lastarg="\"$lastarg\""
;;
esac
- # Add the previous argument to base_compile.
- if test -z "$base_compile"; then
- base_compile="$lastarg"
- else
- base_compile="$base_compile $lastarg"
- fi
- done
+ base_compile="$base_compile $lastarg"
+ done # for arg
- case $user_target in
- set)
+ case $arg_mode in
+ arg)
+ $echo "$modename: you must specify an argument for -Xcompile"
+ exit $EXIT_FAILURE
;;
- no)
- # Get the name of the library object.
- libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ target)
+ $echo "$modename: you must specify a target with \`-o'" 1>&2
+ exit $EXIT_FAILURE
;;
*)
- $echo "$modename: you must specify a target with \`-o'" 1>&2
- exit 1
+ # Get the name of the library object.
+ [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
;;
esac
# Recognize several different file suffixes.
# If the user specifies -o file.o, it is replaced with file.lo
- xform='[cCFSfmso]'
+ xform='[cCFSifmso]'
case $libobj in
*.ada) xform=ada ;;
*.adb) xform=adb ;;
@@ -440,10 +581,13 @@ if test -z "$show_help"; then
*.asm) xform=asm ;;
*.c++) xform=c++ ;;
*.cc) xform=cc ;;
+ *.ii) xform=ii ;;
+ *.class) xform=class ;;
*.cpp) xform=cpp ;;
*.cxx) xform=cxx ;;
*.f90) xform=f90 ;;
*.for) xform=for ;;
+ *.java) xform=java ;;
esac
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
@@ -452,25 +596,55 @@ if test -z "$show_help"; then
*.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
*)
$echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -static)
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+ xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$obj"; then
+ xdir=
+ else
+ xdir=$xdir/
+ fi
+ lobj=${xdir}$objdir/$objname
+
if test -z "$base_compile"; then
$echo "$modename: you must specify a compilation command" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# Delete any leftover library objects.
if test "$build_old_libs" = yes; then
- removelist="$obj $libobj"
+ removelist="$obj $lobj $libobj ${libobj}T"
else
- removelist="$libobj"
+ removelist="$lobj $libobj ${libobj}T"
fi
$run $rm $removelist
- trap "$run $rm $removelist; exit 1" 1 2 15
+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
# On Cygwin there's no "real" PIC flag so we must build both object types
case $host_os in
@@ -489,8 +663,9 @@ if test -z "$show_help"; then
output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
lockfile="$output_obj.lock"
removelist="$removelist $output_obj $lockfile"
- trap "$run $rm $removelist; exit 1" 1 2 15
+ trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15
else
+ output_obj=
need_locks=no
lockfile=
fi
@@ -498,13 +673,13 @@ if test -z "$show_help"; then
# Lock this critical section if it is needed
# We use this script file to make the link, it avoids creating a new file
if test "$need_locks" = yes; then
- until $run ln "$0" "$lockfile" 2>/dev/null; do
+ until $run ln "$progpath" "$lockfile" 2>/dev/null; do
$show "Waiting for $lockfile to be removed"
sleep 2
done
elif test "$need_locks" = warn; then
if test -f "$lockfile"; then
- echo "\
+ $echo "\
*** ERROR, $lockfile exists and contains:
`cat $lockfile 2>/dev/null`
@@ -516,68 +691,67 @@ avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
- exit 1
+ exit $EXIT_FAILURE
fi
- echo $srcfile > "$lockfile"
+ $echo $srcfile > "$lockfile"
fi
if test -n "$fix_srcfile_path"; then
eval srcfile=\"$fix_srcfile_path\"
fi
+ $run $rm "$libobj" "${libobj}T"
+
+ # Create a libtool object file (analogous to a ".la" file),
+ # but don't create it if we're doing a dry run.
+ test -z "$run" && cat > ${libobj}T <<EOF
+# $libobj - a libtool object file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+EOF
+
# Only build a PIC object if we are building libtool libraries.
if test "$build_libtool_libs" = yes; then
# Without this assignment, base_compile gets emptied.
fbsd_hideous_sh_bug=$base_compile
if test "$pic_mode" != no; then
- # All platforms use -DPIC, to notify preprocessed assembler code.
- command="$base_compile $srcfile $pic_flag -DPIC"
+ command="$base_compile $srcfile $pic_flag"
else
# Don't build PIC code
command="$base_compile $srcfile"
fi
- if test "$build_old_libs" = yes; then
- lo_libobj="$libobj"
- dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$dir" = "X$libobj"; then
- dir="$objdir"
- else
- dir="$dir/$objdir"
- fi
- libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
- if test -d "$dir"; then
- $show "$rm $libobj"
- $run $rm $libobj
- else
- $show "$mkdir $dir"
- $run $mkdir $dir
- status=$?
- if test $status -ne 0 && test ! -d $dir; then
- exit $status
- fi
+ if test ! -d "${xdir}$objdir"; then
+ $show "$mkdir ${xdir}$objdir"
+ $run $mkdir ${xdir}$objdir
+ status=$?
+ if test "$status" -ne 0 && test ! -d "${xdir}$objdir"; then
+ exit $status
fi
fi
- if test "$compiler_o_lo" = yes; then
- output_obj="$libobj"
- command="$command -o $output_obj"
- elif test "$compiler_c_o" = yes; then
- output_obj="$obj"
- command="$command -o $output_obj"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ command="$command -o $lobj"
fi
- $run $rm "$output_obj"
+ $run $rm "$lobj" "$output_obj"
+
$show "$command"
if $run eval "$command"; then :
else
test -n "$output_obj" && $run $rm $removelist
- exit 1
+ exit $EXIT_FAILURE
fi
if test "$need_locks" = warn &&
- test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
- echo "\
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $echo "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`
@@ -592,13 +766,13 @@ avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
- exit 1
+ exit $EXIT_FAILURE
fi
# Just move the object if needed, then go on to compile the next one
- if test x"$output_obj" != x"$libobj"; then
- $show "$mv $output_obj $libobj"
- if $run $mv $output_obj $libobj; then :
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ $show "$mv $output_obj $lobj"
+ if $run $mv $output_obj $lobj; then :
else
error=$?
$run $rm $removelist
@@ -606,48 +780,23 @@ compiler."
fi
fi
- # If we have no pic_flag, then copy the object into place and finish.
- if (test -z "$pic_flag" || test "$pic_mode" != default) &&
- test "$build_old_libs" = yes; then
- # Rename the .lo from within objdir to obj
- if test -f $obj; then
- $show $rm $obj
- $run $rm $obj
- fi
+ # Append the name of the PIC object to the libtool object file.
+ test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object='$objdir/$objname'
- $show "$mv $libobj $obj"
- if $run $mv $libobj $obj; then :
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
+EOF
- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$obj"; then
- xdir="."
- else
- xdir="$xdir"
- fi
- baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
- libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
- # Now arrange that obj and lo_libobj become the same file
- $show "(cd $xdir && $LN_S $baseobj $libobj)"
- if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
- # Unlock the critical section if it was locked
- if test "$need_locks" != no; then
- $run $rm "$lockfile"
- fi
- exit 0
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
fi
+ else
+ # No PIC object so indicate it doesn't exist in the libtool
+ # object file.
+ test -z "$run" && cat >> ${libobj}T <<EOF
+pic_object=none
- # Allow error messages only from the first compilation.
- suppress_output=' >/dev/null 2>&1'
+EOF
fi
# Only build a position-dependent object if we build old libraries.
@@ -656,27 +805,25 @@ compiler."
# Don't build PIC code
command="$base_compile $srcfile"
else
- # All platforms use -DPIC, to notify preprocessed assembler code.
- command="$base_compile $srcfile $pic_flag -DPIC"
+ command="$base_compile $srcfile $pic_flag"
fi
if test "$compiler_c_o" = yes; then
command="$command -o $obj"
- output_obj="$obj"
fi
# Suppress compiler output if we already did a PIC compilation.
command="$command$suppress_output"
- $run $rm "$output_obj"
+ $run $rm "$obj" "$output_obj"
$show "$command"
if $run eval "$command"; then :
else
$run $rm $removelist
- exit 1
+ exit $EXIT_FAILURE
fi
if test "$need_locks" = warn &&
- test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
- echo "\
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $echo "\
*** ERROR, $lockfile contains:
`cat $lockfile 2>/dev/null`
@@ -691,11 +838,11 @@ avoid parallel builds (make -j) in this platform, or get a better
compiler."
$run $rm $removelist
- exit 1
+ exit $EXIT_FAILURE
fi
# Just move the object if needed
- if test x"$output_obj" != x"$obj"; then
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
$show "$mv $output_obj $obj"
if $run $mv $output_obj $obj; then :
else
@@ -705,29 +852,31 @@ compiler."
fi
fi
- # Create an invalid libtool object if no PIC, so that we do not
- # accidentally link it into a program.
- if test "$build_libtool_libs" != yes; then
- $show "echo timestamp > $libobj"
- $run eval "echo timestamp > \$libobj" || exit $?
- else
- # Move the .lo from within objdir
- $show "$mv $libobj $lo_libobj"
- if $run $mv $libobj $lo_libobj; then :
- else
- error=$?
- $run $rm $removelist
- exit $error
- fi
- fi
+ # Append the name of the non-PIC object the libtool object file.
+ # Only append if the libtool object file exists.
+ test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object='$objname'
+
+EOF
+ else
+ # Append the name of the non-PIC object the libtool object file.
+ # Only append if the libtool object file exists.
+ test -z "$run" && cat >> ${libobj}T <<EOF
+# Name of the non-PIC object.
+non_pic_object=none
+
+EOF
fi
+ $run $mv "${libobj}T" "${libobj}"
+
# Unlock the critical section if it was locked
if test "$need_locks" != no; then
$run $rm "$lockfile"
fi
- exit 0
+ exit $EXIT_SUCCESS
;;
# libtool link mode
@@ -738,7 +887,7 @@ compiler."
# It is impossible to link a dll without this setting, and
# we shouldn't force the makefile maintainer to figure out
# which system we are compiling for in order to pass an extra
- # flag for every libtool invokation.
+ # flag for every libtool invocation.
# allow_undefined=no
# FIXME: Unfortunately, there are problems with the above when trying
@@ -753,6 +902,7 @@ compiler."
;;
esac
libtool_args="$nonopt"
+ base_compile="$nonopt $@"
compile_command="$nonopt"
finalize_command="$nonopt"
@@ -768,6 +918,7 @@ compiler."
linker_flags=
dllsearchpath=
lib_search_path=`pwd`
+ inst_prefix_dir=
avoid_version=no
dlfiles=
@@ -782,6 +933,8 @@ compiler."
module=no
no_install=no
objs=
+ non_pic_objects=
+ precious_files_regex=
prefer_static_libs=no
preload=no
prev=
@@ -793,6 +946,9 @@ compiler."
temp_rpath=
thread_safe=no
vinfo=
+ vinfo_number=no
+
+ func_infer_tag $base_compile
# We need to know -static, to get the right output filenames.
for arg
@@ -823,7 +979,7 @@ compiler."
test -n "$old_archive_from_new_cmds" && build_old_libs=yes
# Go through the arguments, transforming them on the way.
- while test $# -gt 0; do
+ while test "$#" -gt 0; do
arg="$1"
shift
case $arg in
@@ -888,7 +1044,7 @@ compiler."
export_symbols="$arg"
if test ! -f "$arg"; then
$echo "$modename: symbol file \`$arg' does not exist"
- exit 1
+ exit $EXIT_FAILURE
fi
prev=
continue
@@ -898,18 +1054,135 @@ compiler."
prev=
continue
;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
release)
release="-$arg"
prev=
continue
;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat $save_arg`
+ do
+# moreargs="$moreargs $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ # If there is no directory component, then add one.
+ case $arg in
+ */* | *\\*) . $arg ;;
+ *) . ./$arg ;;
+ esac
+
+ if test -z "$pic_object" || \
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none && \
+ test "$non_pic_object" = none; then
+ $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Extract subdirectory from the argument.
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$arg"; then
+ xdir=
+ else
+ xdir="$xdir/"
+ fi
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ libobjs="$libobjs $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ non_pic_objects="$non_pic_objects $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if test -z "$run"; then
+ $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+ exit $EXIT_FAILURE
+ else
+ # Dry-run case.
+
+ # Extract subdirectory from the argument.
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$arg"; then
+ xdir=
+ else
+ xdir="$xdir/"
+ fi
+
+ pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+ non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+ libobjs="$libobjs $pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
+ fi
+ fi
+ done
+ else
+ $echo "$modename: link input file \`$save_arg' does not exist"
+ exit $EXIT_FAILURE
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
rpath | xrpath)
# We need an absolute path.
case $arg in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
$echo "$modename: only absolute run-paths are allowed" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
if test "$prev" = rpath; then
@@ -941,13 +1214,26 @@ compiler."
finalize_command="$finalize_command $wl$qarg"
continue
;;
+ xcclinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ compile_command="$compile_command $qarg"
+ finalize_command="$finalize_command $qarg"
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
*)
eval "$prev=\"\$arg\""
prev=
continue
;;
esac
- fi # test -n $prev
+ fi # test -n "$prev"
prevarg="$arg"
@@ -989,7 +1275,7 @@ compiler."
-export-symbols | -export-symbols-regex)
if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
$echo "$modename: more than one -exported-symbols argument is not allowed"
- exit 1
+ exit $EXIT_FAILURE
fi
if test "X$arg" = "X-export-symbols"; then
prev=expsyms
@@ -999,11 +1285,16 @@ compiler."
continue
;;
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
# The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
# so, if we see these flags be careful not to treat them like -L
-L[A-Z][A-Z]*:*)
case $with_gcc/$host in
- no/*-*-irix* | no/*-*-nonstopux*)
+ no/*-*-irix* | /*-*-irix*)
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
;;
@@ -1020,7 +1311,7 @@ compiler."
absdir=`cd "$dir" && pwd`
if test -z "$absdir"; then
$echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
dir="$absdir"
;;
@@ -1058,24 +1349,61 @@ compiler."
# Do not include libc due to us having libc/libc_r.
test "X$arg" = "X-lc" && continue
;;
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
- *-*-openbsd* | *-*-freebsd*)
- # Do not include libc_r directly, use -pthread flag.
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ deplibs="$deplibs -framework System"
continue
- ;;
esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
fi
deplibs="$deplibs $arg"
continue
;;
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
-module)
module=yes
continue
;;
+ # gcc -m* arguments should be passed to the linker via $compiler_flags
+ # in order to pass architecture information to the linker
+ # (e.g. 32 vs 64-bit). This may also be accomplished via -Wl,-mfoo
+ # but this is not reliable with gcc because gcc may use -mfoo to
+ # select a different linker, different libraries, etc, while
+ # -Wl,-mfoo simply passes -mfoo to the linker.
+ -m*)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ if test "$with_gcc" = "yes" ; then
+ compiler_flags="$compiler_flags $arg"
+ fi
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
-no-fast-install)
fast_install=no
continue
@@ -1100,8 +1428,18 @@ compiler."
continue
;;
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
-o) prev=output ;;
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
-release)
prev=release
continue
@@ -1124,7 +1462,7 @@ compiler."
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
$echo "$modename: only absolute run-paths are allowed" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
case "$xrpath " in
@@ -1152,6 +1490,11 @@ compiler."
prev=vinfo
continue
;;
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
-Wc,*)
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
@@ -1200,6 +1543,11 @@ compiler."
continue
;;
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
# Some other compiler flag.
-* | +*)
# Unknown arguments in both finalize_command and compile_command need
@@ -1212,29 +1560,101 @@ compiler."
esac
;;
- *.lo | *.$objext)
- # A library or standard object.
- if test "$prev" = dlfiles; then
- # This file was specified with -dlopen.
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $arg"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
+ *.$objext)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
- prev=
- else
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ # If there is no directory component, then add one.
case $arg in
- *.lo) libobjs="$libobjs $arg" ;;
- *) objs="$objs $arg" ;;
+ */* | *\\*) . $arg ;;
+ *) . ./$arg ;;
esac
+
+ if test -z "$pic_object" || \
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none && \
+ test "$non_pic_object" = none; then
+ $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Extract subdirectory from the argument.
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$arg"; then
+ xdir=
+ else
+ xdir="$xdir/"
+ fi
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ libobjs="$libobjs $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ non_pic_objects="$non_pic_objects $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if test -z "$run"; then
+ $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+ exit $EXIT_FAILURE
+ else
+ # Dry-run case.
+
+ # Extract subdirectory from the argument.
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$arg"; then
+ xdir=
+ else
+ xdir="$xdir/"
+ fi
+
+ pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+ non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+ libobjs="$libobjs $pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
+ fi
fi
;;
@@ -1285,7 +1705,7 @@ compiler."
if test -n "$prev"; then
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
@@ -1294,6 +1714,7 @@ compiler."
finalize_command="$finalize_command $arg"
fi
+ oldlibs=
# calculate the name of the file, without its directory
outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
libobjs_save="$libobjs"
@@ -1314,11 +1735,11 @@ compiler."
output_objdir="$output_objdir/$objdir"
fi
# Create the object directory.
- if test ! -d $output_objdir; then
+ if test ! -d "$output_objdir"; then
$show "$mkdir $output_objdir"
$run $mkdir $output_objdir
status=$?
- if test $status -ne 0 && test ! -d $output_objdir; then
+ if test "$status" -ne 0 && test ! -d "$output_objdir"; then
exit $status
fi
fi
@@ -1328,7 +1749,7 @@ compiler."
"")
$echo "$modename: you must specify an output file" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
*.$libext) linkmode=oldlib ;;
*.lo | *.$objext) linkmode=obj ;;
@@ -1336,7 +1757,17 @@ compiler."
*) linkmode=prog ;; # Anything else should be a program.
esac
+ case $host in
+ *cygwin* | *mingw* | *pw32*)
+ # don't eliminate duplications in $postdeps and $predeps
+ duplicate_compiler_generated_deps=yes
+ ;;
+ *)
+ duplicate_compiler_generated_deps=$duplicate_deps
+ ;;
+ esac
specialdeplibs=
+
libs=
# Find all interdependent deplibs by searching for libraries
# that are linked more than once (e.g. -la -lb -la)
@@ -1348,6 +1779,25 @@ compiler."
fi
libs="$libs $deplib"
done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+ esac
+ pre_post_deps="$pre_post_deps $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
deplibs=
newdependency_libs=
newlib_search_path=
@@ -1362,7 +1812,7 @@ compiler."
*.la) ;;
*)
$echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
done
@@ -1379,39 +1829,59 @@ compiler."
;;
esac
for pass in $passes; do
- if test $linkmode = prog; then
- # Determine which files to process
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
case $pass in
- dlopen)
- libs="$dlfiles"
- save_deplibs="$deplibs" # Collect dlpreopened libraries
- deplibs=
- ;;
+ dlopen) libs="$dlfiles" ;;
dlpreopen) libs="$dlprefiles" ;;
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
esac
fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
for deplib in $libs; do
lib=
found=no
case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ fi
+ continue
+ ;;
-l*)
- if test $linkmode = oldlib && test $linkmode = obj; then
- $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
continue
fi
- if test $pass = conv; then
+ if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
- # Search the libtool library
- lib="$searchdir/lib${name}.la"
- if test -f "$lib"; then
- found=yes
- break
- fi
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
done
if test "$found" != yes; then
# deplib doesn't seem to be a libtool library
@@ -1420,40 +1890,76 @@ compiler."
finalize_deplibs="$deplib $finalize_deplibs"
else
deplibs="$deplib $deplibs"
- test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
fi
continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if (${SED} -e '2q' $lib |
+ grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ library_names=
+ old_library=
+ case $lib in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$ladir" = "X$lib" && ladir="."
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
fi
;; # -l
-L*)
case $linkmode in
lib)
deplibs="$deplib $deplibs"
- test $pass = conv && continue
+ test "$pass" = conv && continue
newdependency_libs="$deplib $newdependency_libs"
newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
;;
prog)
- if test $pass = conv; then
+ if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
- if test $pass = scan; then
+ if test "$pass" = scan; then
deplibs="$deplib $deplibs"
- newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
else
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
fi
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
;;
*)
- $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
+ $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
;;
esac # linkmode
continue
;; # -L
-R*)
- if test $pass = link; then
+ if test "$pass" = link; then
dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
# Make sure the xrpath contains only unique directories.
case "$xrpath " in
@@ -1466,30 +1972,30 @@ compiler."
;;
*.la) lib="$deplib" ;;
*.$libext)
- if test $pass = conv; then
+ if test "$pass" = conv; then
deplibs="$deplib $deplibs"
continue
fi
case $linkmode in
lib)
if test "$deplibs_check_method" != pass_all; then
- echo
- echo "*** Warning: Trying to link with static lib archive $deplib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have"
- echo "*** because the file extensions .$libext of this argument makes me believe"
- echo "*** that it is just a static archive that I should not used here."
+ $echo
+ $echo "*** Warning: Trying to link with static lib archive $deplib."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have"
+ $echo "*** because the file extensions .$libext of this argument makes me believe"
+ $echo "*** that it is just a static archive that I should not used here."
else
- echo
- echo "*** Warning: Linking the shared library $output against the"
- echo "*** static library $deplib is not portable!"
+ $echo
+ $echo "*** Warning: Linking the shared library $output against the"
+ $echo "*** static library $deplib is not portable!"
deplibs="$deplib $deplibs"
fi
continue
;;
prog)
- if test $pass != link; then
+ if test "$pass" != link; then
deplibs="$deplib $deplibs"
else
compile_deplibs="$deplib $compile_deplibs"
@@ -1500,14 +2006,18 @@ compiler."
esac # linkmode
;; # *.$libext
*.lo | *.$objext)
- if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
- # If there is no dlopen support or we're linking statically,
- # we need to preload.
- newdlprefiles="$newdlprefiles $deplib"
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- newdlfiles="$newdlfiles $deplib"
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$newdlfiles $deplib"
+ fi
fi
continue
;;
@@ -1516,17 +2026,17 @@ compiler."
continue
;;
esac # case $deplib
- if test $found = yes || test -f "$lib"; then :
+ if test "$found" = yes || test -f "$lib"; then :
else
$echo "$modename: cannot find the library \`$lib'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
@@ -1539,8 +2049,9 @@ compiler."
library_names=
old_library=
# If the library was installed with an old release of libtool,
- # it will not redefine variable installed.
+ # it will not redefine variables installed, or shouldnotlink
installed=yes
+ shouldnotlink=no
# Read the .la file
case $lib in
@@ -1550,19 +2061,18 @@ compiler."
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan" ||
- { test $linkmode = oldlib && test $linkmode = obj; }; then
- # Add dl[pre]opened files of deplib
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
fi
- if test $pass = conv; then
+ if test "$pass" = conv; then
# Only check for convenience libraries
deplibs="$lib $deplibs"
if test -z "$libdir"; then
if test -z "$old_library"; then
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# It is a libtool convenience library, so add in its objects.
convenience="$convenience $ladir/$objdir/$old_library"
@@ -1577,13 +2087,14 @@ compiler."
fi
tmp_libs="$tmp_libs $deplib"
done
- elif test $linkmode != prog && test $linkmode != lib; then
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
$echo "$modename: \`$lib' is not a convenience library" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
continue
fi # $pass = conv
+
# Get the name of the library we link against.
linklib=
for l in $old_library $library_names; do
@@ -1591,19 +2102,23 @@ compiler."
done
if test -z "$linklib"; then
$echo "$modename: cannot find name of link library for \`$lib'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# This library was specified with -dlopen.
- if test $pass = dlopen; then
+ if test "$pass" = dlopen; then
if test -z "$libdir"; then
$echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
- if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
# If there is no dlname, no dlopen support or we're linking
- # statically, we need to preload.
- dlprefiles="$dlprefiles $lib"
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ dlprefiles="$dlprefiles $lib $dependency_libs"
else
newdlfiles="$newdlfiles $lib"
fi
@@ -1644,10 +2159,10 @@ compiler."
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
# This library was specified with -dlpreopen.
- if test $pass = dlpreopen; then
+ if test "$pass" = dlpreopen; then
if test -z "$libdir"; then
$echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# Prefer using a static library (so that no silly _DYNAMIC symbols
# are required to link).
@@ -1663,18 +2178,19 @@ compiler."
if test -z "$libdir"; then
# Link the convenience library
- if test $linkmode = lib; then
+ if test "$linkmode" = lib; then
deplibs="$dir/$old_library $deplibs"
elif test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$dir/$old_library $compile_deplibs"
finalize_deplibs="$dir/$old_library $finalize_deplibs"
else
- deplibs="$lib $deplibs"
+ deplibs="$lib $deplibs" # used for prog,scan pass
fi
continue
fi
- if test $linkmode = prog && test $pass != link; then
+
+ if test "$linkmode" = prog && test "$pass" != link; then
newlib_search_path="$newlib_search_path $ladir"
deplibs="$lib $deplibs"
@@ -1690,7 +2206,7 @@ compiler."
-L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
esac
# Need to link against all dependency_libs?
- if test $linkalldeplibs = yes; then
+ if test "$linkalldeplibs" = yes; then
deplibs="$deplib $deplibs"
else
# Need to hardcode shared library paths
@@ -1707,13 +2223,19 @@ compiler."
continue
fi # $linkmode = prog...
- link_static=no # Whether the deplib will be linked statically
- if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
- # Link against this shared library
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath " in
+ *" $dir "*) ;;
+ *" $absdir "*) ;;
+ *) temp_rpath="$temp_rpath $dir" ;;
+ esac
+ fi
- if test "$linkmode,$pass" = "prog,link" ||
- { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
@@ -1735,17 +2257,6 @@ compiler."
esac
;;
esac
- if test $linkmode = prog; then
- # We need to hardcode the library path
- if test -n "$shlibpath_var"; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath " in
- *" $dir "*) ;;
- *" $absdir "*) ;;
- *) temp_rpath="$temp_rpath $dir" ;;
- esac
- fi
- fi
fi # $linkmode,$pass = prog,link...
if test "$alldeplibs" = yes &&
@@ -1755,11 +2266,52 @@ compiler."
# We only need to search for static libraries
continue
fi
+ fi
+ link_static=no # Whether the deplib will be linked statically
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
if test "$installed" = no; then
notinst_deplibs="$notinst_deplibs $lib"
need_relink=yes
fi
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on
+ # some systems (darwin)
+ if test "$shouldnotlink" = yes && test "$pass" = link ; then
+ $echo
+ if test "$linkmode" = prog; then
+ $echo "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $echo "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $echo "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi
if test -n "$old_archive_from_expsyms_cmds"; then
# figure out the soname
@@ -1773,7 +2325,7 @@ compiler."
elif test -n "$soname_spec"; then
# bleh windows
case $host in
- *cygwin*)
+ *cygwin* | mingw*)
major=`expr $current - $age`
versuffix="-$major"
;;
@@ -1785,17 +2337,18 @@ compiler."
# Make a new name for the extract_expsyms_cmds to use
soroot="$soname"
- soname=`echo $soroot | ${SED} -e 's/^.*\///'`
- newlib="libimp-`echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
+ soname=`$echo $soroot | ${SED} -e 's/^.*\///'`
+ newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a"
# If the library has no export list, then create one now
if test -f "$output_objdir/$soname-def"; then :
else
$show "extracting exported symbol list from \`$soname'"
save_ifs="$IFS"; IFS='~'
- eval cmds=\"$extract_expsyms_cmds\"
+ cmds=$extract_expsyms_cmds
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
@@ -1806,9 +2359,10 @@ compiler."
if test -f "$output_objdir/$newlib"; then :; else
$show "generating import library for \`$soname'"
save_ifs="$IFS"; IFS='~'
- eval cmds=\"$old_archive_from_expsyms_cmds\"
+ cmds=$old_archive_from_expsyms_cmds
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
@@ -1817,9 +2371,9 @@ compiler."
# make sure the library variables are pointing to the new library
dir=$output_objdir
linklib=$newlib
- fi # test -n $old_archive_from_expsyms_cmds
+ fi # test -n "$old_archive_from_expsyms_cmds"
- if test $linkmode = prog || test "$mode" != relink; then
+ if test "$linkmode" = prog || test "$mode" != relink; then
add_shlibpath=
add_dir=
add=
@@ -1828,6 +2382,22 @@ compiler."
immediate | unsupported)
if test "$hardcode_direct" = no; then
add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5* ) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a module then we can not link against
+ # it, someone is ignoring the new warnings I added
+ if /usr/bin/file -L $add 2> /dev/null | $EGREP "bundle" >/dev/null ; then
+ $echo "** Warning, lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ $echo
+ $echo "** And there doesn't seem to be a static archive available"
+ $echo "** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
elif test "$hardcode_minus_L" = no; then
case $host in
*-*-sunos*) add_shlibpath="$dir" ;;
@@ -1846,6 +2416,14 @@ compiler."
add="$dir/$linklib"
elif test "$hardcode_minus_L" = yes; then
add_dir="-L$dir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case "$libdir" in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
add="-l$name"
elif test "$hardcode_shlibpath_var" = yes; then
add_shlibpath="$dir"
@@ -1859,7 +2437,7 @@ compiler."
if test "$lib_linked" != yes; then
$echo "$modename: configuration error: unsupported hardcode properties"
- exit 1
+ exit $EXIT_FAILURE
fi
if test -n "$add_shlibpath"; then
@@ -1868,7 +2446,7 @@ compiler."
*) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
esac
fi
- if test $linkmode = prog; then
+ if test "$linkmode" = prog; then
test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
test -n "$add" && compile_deplibs="$add $compile_deplibs"
else
@@ -1885,7 +2463,7 @@ compiler."
fi
fi
- if test $linkmode = prog || test "$mode" = relink; then
+ if test "$linkmode" = prog || test "$mode" = relink; then
add_shlibpath=
add_dir=
add=
@@ -1901,13 +2479,28 @@ compiler."
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
esac
add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
else
# We cannot seem to hardcode it, guess we'll fake it.
add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case "$libdir" in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
add="-l$name"
fi
- if test $linkmode = prog; then
+ if test "$linkmode" = prog; then
test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
else
@@ -1915,16 +2508,7 @@ compiler."
test -n "$add" && deplibs="$add $deplibs"
fi
fi
- elif test $linkmode = prog; then
- if test "$alldeplibs" = yes &&
- { test "$deplibs_check_method" = pass_all ||
- { test "$build_libtool_libs" = yes &&
- test -n "$library_names"; }; }; then
- # We only need to search for static libraries
- continue
- fi
-
- # Try to link the static library
+ elif test "$linkmode" = prog; then
# Here we assume that one of hardcode_direct or hardcode_minus_L
# is not unsupported. This is valid on all known static and
# shared platforms.
@@ -1944,21 +2528,21 @@ compiler."
# Just print a warning and add the library to dependency_libs so
# that the program can be linked against the static library.
- echo
- echo "*** Warning: This system can not link to static lib archive $lib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have."
+ $echo
+ $echo "*** Warning: This system can not link to static lib archive $lib."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have."
if test "$module" = yes; then
- echo "*** But as you try to build a module library, libtool will still create "
- echo "*** a static module, that should work as long as the dlopening application"
- echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ $echo "*** But as you try to build a module library, libtool will still create "
+ $echo "*** a static module, that should work as long as the dlopening application"
+ $echo "*** is linked with the -dlopen flag to resolve symbols at runtime."
if test -z "$global_symbol_pipe"; then
- echo
- echo "*** However, this would only work if libtool was able to extract symbol"
- echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
- echo "*** not find such a program. So, this module is probably useless."
- echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ $echo
+ $echo "*** However, this would only work if libtool was able to extract symbol"
+ $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $echo "*** not find such a program. So, this module is probably useless."
+ $echo "*** \`nm' from GNU binutils and a full rebuild may help."
fi
if test "$build_old_libs" = no; then
build_libtool_libs=module
@@ -1975,10 +2559,11 @@ compiler."
fi
fi # link shared/static library?
- if test $linkmode = lib; then
+ if test "$linkmode" = lib; then
if test -n "$dependency_libs" &&
- { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
- test $link_static = yes; }; then
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
# Extract -R from dependency_libs
temp_deplibs=
for libdir in $dependency_libs; do
@@ -2009,7 +2594,7 @@ compiler."
tmp_libs="$tmp_libs $deplib"
done
- if test $link_all_deplibs != no; then
+ if test "$link_all_deplibs" != no; then
# Add the search paths of all dependency libraries
for deplib in $dependency_libs; do
case $deplib in
@@ -2029,22 +2614,67 @@ compiler."
;;
esac
if grep "^installed=no" $deplib > /dev/null; then
- path="-L$absdir/$objdir"
+ path="$absdir/$objdir"
else
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
if test "$absdir" != "$libdir"; then
$echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
fi
- path="-L$absdir"
+ path="$absdir"
fi
+ depdepl=
+ case $host in
+ *-*-darwin*)
+ # we do not want to link against static libs,
+ # but need to link against shared
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$path/$depdepl" ; then
+ depdepl="$path/$depdepl"
+ fi
+ # do not add paths which are already there
+ case " $newlib_search_path " in
+ *" $path "*) ;;
+ *) newlib_search_path="$newlib_search_path $path";;
+ esac
+ fi
+ path=""
+ ;;
+ *)
+ path="-L$path"
+ ;;
+ esac
+ ;;
+ -l*)
+ case $host in
+ *-*-darwin*)
+ # Again, we only want to link against shared libraries
+ eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"`
+ for tmp in $newlib_search_path ; do
+ if test -f "$tmp/lib$tmp_libs.dylib" ; then
+ eval depdepl="$tmp/lib$tmp_libs.dylib"
+ break
+ fi
+ done
+ path=""
+ ;;
+ *) continue ;;
+ esac
;;
*) continue ;;
esac
case " $deplibs " in
+ *" $depdepl "*) ;;
+ *) deplibs="$depdepl $deplibs" ;;
+ esac
+ case " $deplibs " in
*" $path "*) ;;
*) deplibs="$deplibs $path" ;;
esac
@@ -2052,15 +2682,15 @@ compiler."
fi # link_all_deplibs != no
fi # linkmode = lib
done # for deplib in $libs
- if test $pass = dlpreopen; then
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
# Link the dlpreopened libraries before other libraries
for deplib in $save_deplibs; do
deplibs="$deplib $deplibs"
done
fi
- if test $pass != dlopen; then
- test $pass != scan && dependency_libs="$newdependency_libs"
- if test $pass != conv; then
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
# Make sure lib_search_path contains only unique directories.
lib_search_path=
for dir in $newlib_search_path; do
@@ -2082,9 +2712,30 @@ compiler."
eval tmp_libs=\"\$$var\"
new_libs=
for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
case $deplib in
-L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
*)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
case " $specialdeplibs " in
*" $deplib "*) new_libs="$deplib $new_libs" ;;
*)
@@ -2112,19 +2763,32 @@ compiler."
eval $var=\"$tmp_libs\"
done # for var
fi
- if test "$pass" = "conv" &&
- { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
- libs="$deplibs" # reset libs
- deplibs=
- fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ tmp_libs="$tmp_libs $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
done # for pass
- if test $linkmode = prog; then
+ if test "$linkmode" = prog; then
dlfiles="$newdlfiles"
dlprefiles="$newdlprefiles"
fi
case $linkmode in
oldlib)
+ if test -n "$deplibs"; then
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2
+ fi
+
if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
$echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
fi
@@ -2138,7 +2802,7 @@ compiler."
fi
if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+ $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
fi
if test -n "$release"; then
@@ -2160,17 +2824,19 @@ compiler."
case $outputname in
lib*)
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ eval shared_ext=\"$shrext_cmds\"
eval libname=\"$libname_spec\"
;;
*)
if test "$module" = no; then
$echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
if test "$need_lib_prefix" != no; then
# Add the "lib" prefix for modules if required
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ eval shared_ext=\"$shrext_cmds\"
eval libname=\"$libname_spec\"
else
libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
@@ -2181,11 +2847,11 @@ compiler."
if test -n "$objs"; then
if test "$deplibs_check_method" != pass_all; then
$echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
- exit 1
+ exit $EXIT_FAILURE
else
- echo
- echo "*** Warning: Linking the shared library $output against the non-libtool"
- echo "*** objects $objs is not portable!"
+ $echo
+ $echo "*** Warning: Linking the shared library $output against the non-libtool"
+ $echo "*** objects $objs is not portable!"
libobjs="$libobjs $objs"
fi
fi
@@ -2195,7 +2861,7 @@ compiler."
fi
set dummy $rpath
- if test $# -gt 2; then
+ if test "$#" -gt 2; then
$echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
fi
install_libdir="$2"
@@ -2204,14 +2870,16 @@ compiler."
if test -z "$rpath"; then
if test "$build_libtool_libs" = yes; then
# Building a libtool convenience library.
- libext=al
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
oldlibs="$output_objdir/$libname.$libext $oldlibs"
build_libtool_libs=convenience
build_old_libs=yes
fi
if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
+ $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
fi
if test -n "$release"; then
@@ -2227,12 +2895,49 @@ compiler."
if test -n "$8"; then
$echo "$modename: too many parameters to \`-version-info'" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
- current="$2"
- revision="$3"
- age="$4"
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$2"
+ number_minor="$3"
+ number_revision="$4"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows)
+ current=`expr $number_major + $number_minor`
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ current=`expr $number_major + $number_minor - 1`
+ age="$number_minor"
+ revision="$number_minor"
+ ;;
+ esac
+ ;;
+ no)
+ current="$2"
+ revision="$3"
+ age="$4"
+ ;;
+ esac
# Check that each of the things are valid numbers.
case $current in
@@ -2240,7 +2945,7 @@ compiler."
*)
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
@@ -2249,7 +2954,7 @@ compiler."
*)
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
@@ -2258,14 +2963,14 @@ compiler."
*)
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
- if test $age -gt $current; then
+ if test "$age" -gt "$current"; then
$echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# Calculate the version variables.
@@ -2306,7 +3011,7 @@ compiler."
# Add in all the interfaces that we are compatible with.
loop=$revision
- while test $loop != 0; do
+ while test "$loop" -ne 0; do
iface=`expr $revision - $loop`
loop=`expr $loop - 1`
verstring="$verstring_prefix$major.$iface:$verstring"
@@ -2329,7 +3034,7 @@ compiler."
# Add in all the interfaces that we are compatible with.
loop=$age
- while test $loop != 0; do
+ while test "$loop" -ne 0; do
iface=`expr $current - $loop`
loop=`expr $loop - 1`
verstring="$verstring:${iface}.0"
@@ -2353,20 +3058,19 @@ compiler."
*)
$echo "$modename: unknown library version type \`$version_type'" 1>&2
- echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
- exit 1
+ $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit $EXIT_FAILURE
;;
esac
# Clear the version info if we defaulted, and they specified a release.
if test -z "$vinfo" && test -n "$release"; then
major=
- verstring="0.0"
case $version_type in
darwin)
# we can't check for "0.0" in archive_cmds due to quoting
# problems, so we reset it completely
- verstring=""
+ verstring=
;;
*)
verstring="0.0"
@@ -2400,9 +3104,30 @@ compiler."
fi
if test "$mode" != relink; then
- # Remove our outputs.
- $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
- $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$echo "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ removelist="$removelist $p"
+ ;;
+ *) ;;
+ esac
+ done
+ if test -n "$removelist"; then
+ $show "${rm}r $removelist"
+ $run ${rm}r $removelist
+ fi
fi
# Now set the variables for building old libraries.
@@ -2415,9 +3140,9 @@ compiler."
# Eliminate all temporary directories.
for path in $notinst_path; do
- lib_search_path=`echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
- deplibs=`echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
- dependency_libs=`echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
+ lib_search_path=`$echo "$lib_search_path " | ${SED} -e 's% $path % %g'`
+ deplibs=`$echo "$deplibs " | ${SED} -e 's% -L$path % %g'`
+ dependency_libs=`$echo "$dependency_libs " | ${SED} -e 's% -L$path % %g'`
done
if test -n "$xrpath"; then
@@ -2430,7 +3155,7 @@ compiler."
*) finalize_rpath="$finalize_rpath $libdir" ;;
esac
done
- if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
dependency_libs="$temp_xrpath $dependency_libs"
fi
fi
@@ -2470,10 +3195,11 @@ compiler."
;;
*-*-openbsd* | *-*-freebsd*)
# Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
;;
- *)
+ *)
# Add libc to deplibs on all other systems if necessary.
- if test $build_libtool_need_lc = "yes"; then
+ if test "$build_libtool_need_lc" = "yes"; then
deplibs="$deplibs -lc"
fi
;;
@@ -2500,7 +3226,7 @@ compiler."
# This might be a little naive. We might want to check
# whether the library exists or not. But this is on
# osf3 & osf4 and I'm not really sure... Just
- # implementing what was already the behaviour.
+ # implementing what was already the behavior.
newdeplibs=$deplibs
;;
test_compile)
@@ -2513,68 +3239,88 @@ compiler."
int main() { return 0; }
EOF
$rm conftest
- $CC -o conftest conftest.c $deplibs
- if test $? -eq 0 ; then
+ $LTCC -o conftest conftest.c $deplibs
+ if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
for i in $deplibs; do
name="`expr $i : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; then
- libname=`eval \\$echo \"$libname_spec\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- echo
- echo "*** Warning: dynamic linker does not accept needed library $i."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which I believe you do not have"
- echo "*** because a test_compile did reveal that the linker did not use it for"
- echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ if test "$name" != "" && test "$name" -ne "0"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $echo
+ $echo "*** Warning: dynamic linker does not accept needed library $i."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which I believe you do not have"
+ $echo "*** because a test_compile did reveal that the linker did not use it for"
+ $echo "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
fi
else
newdeplibs="$newdeplibs $i"
fi
done
else
- # Error occured in the first compile. Let's try to salvage
+ # Error occurred in the first compile. Let's try to salvage
# the situation: Compile a separate program for each library.
for i in $deplibs; do
name="`expr $i : '-l\(.*\)'`"
- # If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; then
+ # If $name is empty we are operating on a -L argument.
+ if test "$name" != "" && test "$name" != "0"; then
$rm conftest
- $CC -o conftest conftest.c $i
+ $LTCC -o conftest conftest.c $i
# Did it work?
- if test $? -eq 0 ; then
+ if test "$?" -eq 0 ; then
ldd_output=`ldd conftest`
- libname=`eval \\$echo \"$libname_spec\"`
- deplib_matches=`eval \\$echo \"$library_names_spec\"`
- set dummy $deplib_matches
- deplib_match=$2
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- echo
- echo "*** Warning: dynamic linker does not accept needed library $i."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have"
- echo "*** because a test_compile did reveal that the linker did not use this one"
- echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $echo
+ $echo "*** Warning: dynamic linker does not accept needed library $i."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have"
+ $echo "*** because a test_compile did reveal that the linker did not use this one"
+ $echo "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
fi
else
droppeddeps=yes
- echo
- echo "*** Warning! Library $i is needed by this library but I was not able to"
- echo "*** make it link in! You will probably need to install it or some"
- echo "*** library that it depends on before this library will be fully"
- echo "*** functional. Installing it before continuing would be even better."
+ $echo
+ $echo "*** Warning! Library $i is needed by this library but I was not able to"
+ $echo "*** make it link in! You will probably need to install it or some"
+ $echo "*** library that it depends on before this library will be fully"
+ $echo "*** functional. Installing it before continuing would be even better."
fi
else
newdeplibs="$newdeplibs $i"
@@ -2588,11 +3334,20 @@ EOF
for a_deplib in $deplibs; do
name="`expr $a_deplib : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument.
- if test -n "$name" && test "$name" != "0"; then
- libname=`eval \\$echo \"$libname_spec\"`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
+ if test "$name" != "" && test "$name" != "0"; then
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
# Follow soft links.
if ls -lLd "$potent_lib" 2>/dev/null \
| grep " -> " >/dev/null; then
@@ -2613,26 +3368,27 @@ EOF
done
if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
| ${SED} 10q \
- | egrep "$file_magic_regex" > /dev/null; then
+ | $EGREP "$file_magic_regex" > /dev/null; then
newdeplibs="$newdeplibs $a_deplib"
a_deplib=""
break 2
fi
- done
- done
+ done
+ done
+ fi
if test -n "$a_deplib" ; then
droppeddeps=yes
- echo
- echo "*** Warning: linker path does not have real file for library $a_deplib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have"
- echo "*** because I did check the linker path looking for a file starting"
+ $echo
+ $echo "*** Warning: linker path does not have real file for library $a_deplib."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have"
+ $echo "*** because I did check the linker path looking for a file starting"
if test -z "$potlib" ; then
- echo "*** with $libname but no candidates were found. (...for file magic test)"
+ $echo "*** with $libname but no candidates were found. (...for file magic test)"
else
- echo "*** with $libname and none of the candidates passed a file format test"
- echo "*** using a file magic. Last file checked: $potlib"
+ $echo "*** with $libname and none of the candidates passed a file format test"
+ $echo "*** using a file magic. Last file checked: $potlib"
fi
fi
else
@@ -2648,33 +3404,43 @@ EOF
name="`expr $a_deplib : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument.
if test -n "$name" && test "$name" != "0"; then
- libname=`eval \\$echo \"$libname_spec\"`
- for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
- potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
- for potent_lib in $potential_libs; do
- potlib="$potent_lib" # see symlink-check below in file_magic test
- if eval echo \"$potent_lib\" 2>/dev/null \
- | ${SED} 10q \
- | egrep "$match_pattern_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval $echo \"$potent_lib\" 2>/dev/null \
+ | ${SED} 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
done
- done
+ fi
if test -n "$a_deplib" ; then
droppeddeps=yes
- echo
- echo "*** Warning: linker path does not have real file for library $a_deplib."
- echo "*** I have the capability to make that library automatically link in when"
- echo "*** you link to this library. But I can only do this if you have a"
- echo "*** shared version of the library, which you do not appear to have"
- echo "*** because I did check the linker path looking for a file starting"
+ $echo
+ $echo "*** Warning: linker path does not have real file for library $a_deplib."
+ $echo "*** I have the capability to make that library automatically link in when"
+ $echo "*** you link to this library. But I can only do this if you have a"
+ $echo "*** shared version of the library, which you do not appear to have"
+ $echo "*** because I did check the linker path looking for a file starting"
if test -z "$potlib" ; then
- echo "*** with $libname but no candidates were found. (...for regex pattern test)"
+ $echo "*** with $libname but no candidates were found. (...for regex pattern test)"
else
- echo "*** with $libname and none of the candidates passed a file format test"
- echo "*** using a regex pattern. Last file checked: $potlib"
+ $echo "*** with $libname and none of the candidates passed a file format test"
+ $echo "*** using a regex pattern. Last file checked: $potlib"
fi
fi
else
@@ -2685,16 +3451,23 @@ EOF
;;
none | unknown | *)
newdeplibs=""
- if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
- -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
- grep . >/dev/null; then
- echo
+ tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+ -e 's/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"`
+ done
+ fi
+ if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \
+ | grep . >/dev/null; then
+ $echo
if test "X$deplibs_check_method" = "Xnone"; then
- echo "*** Warning: inter-library dependencies are not supported in this platform."
+ $echo "*** Warning: inter-library dependencies are not supported in this platform."
else
- echo "*** Warning: inter-library dependencies are not known to be supported."
+ $echo "*** Warning: inter-library dependencies are not known to be supported."
fi
- echo "*** All declared inter-library dependencies are being dropped."
+ $echo "*** All declared inter-library dependencies are being dropped."
droppeddeps=yes
fi
;;
@@ -2714,17 +3487,17 @@ EOF
if test "$droppeddeps" = yes; then
if test "$module" = yes; then
- echo
- echo "*** Warning: libtool could not satisfy all declared inter-library"
- echo "*** dependencies of module $libname. Therefore, libtool will create"
- echo "*** a static module, that should work as long as the dlopening"
- echo "*** application is linked with the -dlopen flag."
+ $echo
+ $echo "*** Warning: libtool could not satisfy all declared inter-library"
+ $echo "*** dependencies of module $libname. Therefore, libtool will create"
+ $echo "*** a static module, that should work as long as the dlopening"
+ $echo "*** application is linked with the -dlopen flag."
if test -z "$global_symbol_pipe"; then
- echo
- echo "*** However, this would only work if libtool was able to extract symbol"
- echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
- echo "*** not find such a program. So, this module is probably useless."
- echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ $echo
+ $echo "*** However, this would only work if libtool was able to extract symbol"
+ $echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $echo "*** not find such a program. So, this module is probably useless."
+ $echo "*** \`nm' from GNU binutils and a full rebuild may help."
fi
if test "$build_old_libs" = no; then
oldlibs="$output_objdir/$libname.$libext"
@@ -2734,16 +3507,16 @@ EOF
build_libtool_libs=no
fi
else
- echo "*** The inter-library dependencies that have been dropped here will be"
- echo "*** automatically added whenever a program is linked with this library"
- echo "*** or is declared to -dlopen it."
-
- if test $allow_undefined = no; then
- echo
- echo "*** Since this library must not contain undefined symbols,"
- echo "*** because either the platform does not support them or"
- echo "*** it was explicitly requested with -no-undefined,"
- echo "*** libtool will only create a static version of it."
+ $echo "*** The inter-library dependencies that have been dropped here will be"
+ $echo "*** automatically added whenever a program is linked with this library"
+ $echo "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ $echo
+ $echo "*** Since this library must not contain undefined symbols,"
+ $echo "*** because either the platform does not support them or"
+ $echo "*** it was explicitly requested with -no-undefined,"
+ $echo "*** libtool will only create a static version of it."
if test "$build_old_libs" = no; then
oldlibs="$output_objdir/$libname.$libext"
build_libtool_libs=module
@@ -2765,7 +3538,7 @@ EOF
# Test again, we may have decided not to build it any more
if test "$build_libtool_libs" = yes; then
- if test $hardcode_into_libs = yes; then
+ if test "$hardcode_into_libs" = yes; then
# Hardcode the library paths
hardcode_libdirs=
dep_rpath=
@@ -2801,7 +3574,11 @@ EOF
if test -n "$hardcode_libdir_separator" &&
test -n "$hardcode_libdirs"; then
libdir="$hardcode_libdirs"
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
fi
if test -n "$runpath_var" && test -n "$perm_rpath"; then
# We should set the runpath_var.
@@ -2821,6 +3598,7 @@ EOF
fi
# Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
eval library_names=\"$library_names_spec\"
set dummy $library_names
realname="$2"
@@ -2831,7 +3609,9 @@ EOF
else
soname="$realname"
fi
- test -z "$dlname" && dlname=$soname
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
lib="$output_objdir/$realname"
for link
@@ -2839,23 +3619,6 @@ EOF
linknames="$linknames $link"
done
- # Ensure that we have .o objects for linkers which dislike .lo
- # (e.g. aix) in case we are running --disable-static
- for obj in $libobjs; do
- xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$obj"; then
- xdir="."
- else
- xdir="$xdir"
- fi
- baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
- oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
- if test ! -f $xdir/$oldobj; then
- $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
- $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
- fi
- done
-
# Use standard objects if they are pic
test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
@@ -2865,17 +3628,26 @@ EOF
$show "generating symbol list for \`$libname.la'"
export_symbols="$output_objdir/$libname.exp"
$run $rm $export_symbols
- eval cmds=\"$export_symbols_cmds\"
+ cmds=$export_symbols_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
- $show "$cmd"
- $run eval "$cmd" || exit $?
+ eval cmd=\"$cmd\"
+ if len=`expr "X$cmd" : ".*"` &&
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ $show "using reloadable object file for export list..."
+ skipped_export=:
+ fi
done
IFS="$save_ifs"
if test -n "$export_symbols_regex"; then
- $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
- $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+ $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
$show "$mv \"${export_symbols}T\" \"$export_symbols\""
$run eval '$mv "${export_symbols}T" "$export_symbols"'
fi
@@ -2886,17 +3658,29 @@ EOF
$run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
fi
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ tmp_deplibs="$tmp_deplibs $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${outputname}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
- $show "mkdir $gentop"
- $run mkdir "$gentop"
+ $show "$mkdir $gentop"
+ $run $mkdir "$gentop"
status=$?
- if test $status -ne 0 && test ! -d "$gentop"; then
+ if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
@@ -2912,16 +3696,42 @@ EOF
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
- $show "mkdir $xdir"
- $run mkdir "$xdir"
+ $show "$mkdir $xdir"
+ $run $mkdir "$xdir"
status=$?
- if test $status -ne 0 && test ! -d "$xdir"; then
+ if test "$status" -ne 0 && test ! -d "$xdir"; then
exit $status
fi
+ # We will extract separately just the conflicting names and we will no
+ # longer touch any unique names. It is faster to leave these extract
+ # automatically by $AR in one run.
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+ if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+ $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+ $AR t "$xabs" | sort | uniq -cd | while read -r count name
+ do
+ i=1
+ while test "$i" -le "$count"
+ do
+ # Put our $i before any first dot (extension)
+ # Never overwrite any file
+ name_to="$name"
+ while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+ do
+ name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+ done
+ $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+ $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+ i=`expr $i + 1`
+ done
+ done
+ fi
- libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+ libobjs="$libobjs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
fi
fi
@@ -2937,25 +3747,147 @@ EOF
fi
# Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- eval cmds=\"$archive_expsym_cmds\"
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
else
- save_deplibs="$deplibs"
- for conv in $convenience; do
- tmp_deplibs=
- for test_deplib in $deplibs; do
- if test "$test_deplib" != "$conv"; then
- tmp_deplibs="$tmp_deplibs $test_deplib"
+ # The command line is too long to link in one step, link piecewise.
+ $echo "creating reloadable object files..."
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ delfiles=
+ last_robj=
+ k=1
+ output=$output_objdir/$save_output-${k}.$objext
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+ if test "X$objlist" = X ||
+ { len=`expr "X$test_cmds" : ".*"` &&
+ test "$len" -le "$max_cmd_len"; }; then
+ objlist="$objlist $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
fi
- done
- deplibs="$tmp_deplibs"
+ last_robj=$output_objdir/$save_output-${k}.$objext
+ k=`expr $k + 1`
+ output=$output_objdir/$save_output-${k}.$objext
+ objlist=$obj
+ len=1
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+ if ${skipped_export-false}; then
+ $show "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $run $rm $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+ fi
+
+ # Set up a command to remove the reloadale object files
+ # after they are used.
+ i=0
+ while test "$i" -lt "$k"
+ do
+ i=`expr $i + 1`
+ delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
+ done
+
+ $echo "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
done
- eval cmds=\"$archive_cmds\"
- deplibs="$save_deplibs"
+ IFS="$save_ifs"
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+
+ # Append the command to remove the reloadable object files
+ # to the just-reset $cmds.
+ eval cmds=\"\$cmds~\$rm $delfiles\"
fi
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
@@ -2964,7 +3896,7 @@ EOF
# Restore the uninstalled library and exit
if test "$mode" = relink; then
$run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
- exit 0
+ exit $EXIT_SUCCESS
fi
# Create links to the real library.
@@ -3012,7 +3944,7 @@ EOF
*.lo)
if test -n "$objs$old_deplibs"; then
$echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
libobj="$output"
obj=`$echo "X$output" | $Xsed -e "$lo2o"`
@@ -3043,10 +3975,10 @@ EOF
gentop="$output_objdir/${obj}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
- $show "mkdir $gentop"
- $run mkdir "$gentop"
+ $show "$mkdir $gentop"
+ $run $mkdir "$gentop"
status=$?
- if test $status -ne 0 && test ! -d "$gentop"; then
+ if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
@@ -3062,16 +3994,42 @@ EOF
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
- $show "mkdir $xdir"
- $run mkdir "$xdir"
+ $show "$mkdir $xdir"
+ $run $mkdir "$xdir"
status=$?
- if test $status -ne 0 && test ! -d "$xdir"; then
+ if test "$status" -ne 0 && test ! -d "$xdir"; then
exit $status
fi
+ # We will extract separately just the conflicting names and we will no
+ # longer touch any unique names. It is faster to leave these extract
+ # automatically by $AR in one run.
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+ if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+ $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+ $AR t "$xabs" | sort | uniq -cd | while read -r count name
+ do
+ i=1
+ while test "$i" -le "$count"
+ do
+ # Put our $i before any first dot (extension)
+ # Never overwrite any file
+ name_to="$name"
+ while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+ do
+ name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+ done
+ $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+ $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+ i=`expr $i + 1`
+ done
+ done
+ fi
- reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+ reload_conv_objs="$reload_objs "`find $xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
done
fi
fi
@@ -3080,10 +4038,11 @@ EOF
reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
output="$obj"
- eval cmds=\"$reload_cmds\"
+ cmds=$reload_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
@@ -3096,7 +4055,7 @@ EOF
$run ${rm}r $gentop
fi
- exit 0
+ exit $EXIT_SUCCESS
fi
if test "$build_libtool_libs" != yes; then
@@ -3107,37 +4066,24 @@ EOF
# Create an invalid libtool object if no PIC, so that we don't
# accidentally link it into a program.
- $show "echo timestamp > $libobj"
- $run eval "echo timestamp > $libobj" || exit $?
- exit 0
+ # $show "echo timestamp > $libobj"
+ # $run eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
fi
if test -n "$pic_flag" || test "$pic_mode" != default; then
# Only do commands if we really have different PIC objects.
reload_objs="$libobjs $reload_conv_objs"
output="$libobj"
- eval cmds=\"$reload_cmds\"
+ cmds=$reload_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
- else
- # Just create a symlink.
- $show $rm $libobj
- $run $rm $libobj
- xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$libobj"; then
- xdir="."
- else
- xdir="$xdir"
- fi
- baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
- oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
- $show "(cd $xdir && $LN_S $oldobj $baseobj)"
- $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
fi
if test -n "$gentop"; then
@@ -3145,12 +4091,12 @@ EOF
$run ${rm}r $gentop
fi
- exit 0
+ exit $EXIT_SUCCESS
;;
prog)
case $host in
- *cygwin*) output=`echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
+ *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;;
esac
if test -n "$vinfo"; then
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
@@ -3172,16 +4118,19 @@ EOF
# On Rhapsody replace the C library is the System framework
compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
- case $host in
- *darwin*)
- # Don't allow lazy linking, it breaks C++ global constructors
- compile_command="$compile_command ${wl}-bind_at_load"
- finalize_command="$finalize_command ${wl}-bind_at_load"
- ;;
- esac
;;
esac
+ case $host in
+ *darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ if test "$tagname" = CXX ; then
+ compile_command="$compile_command ${wl}-bind_at_load"
+ finalize_command="$finalize_command ${wl}-bind_at_load"
+ fi
+ ;;
+ esac
+
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"
@@ -3332,12 +4281,12 @@ extern \"C\" {
done
if test -n "$exclude_expsyms"; then
- $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
$run eval '$mv "$nlist"T "$nlist"'
fi
if test -n "$export_symbols_regex"; then
- $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
$run eval '$mv "$nlist"T "$nlist"'
fi
@@ -3355,8 +4304,8 @@ extern \"C\" {
for arg in $dlprefiles; do
$show "extracting global C symbols from \`$arg'"
- name=`echo "$arg" | ${SED} -e 's%^.*/%%'`
- $run eval 'echo ": $name " >> "$nlist"'
+ name=`$echo "$arg" | ${SED} -e 's%^.*/%%'`
+ $run eval '$echo ": $name " >> "$nlist"'
$run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
done
@@ -3365,7 +4314,7 @@ extern \"C\" {
test -f "$nlist" || : > "$nlist"
if test -n "$exclude_expsyms"; then
- egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
$mv "$nlist"T "$nlist"
fi
@@ -3385,7 +4334,7 @@ extern \"C\" {
if test -f "$nlist"S; then
eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
else
- echo '/* NONE */' >> "$output_objdir/$dlsyms"
+ $echo '/* NONE */' >> "$output_objdir/$dlsyms"
fi
$echo >> "$output_objdir/$dlsyms" "\
@@ -3437,18 +4386,18 @@ static const void *lt_preloaded_setup() {
*-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
case "$compile_command " in
*" -static "*) ;;
- *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
+ *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";;
esac;;
*-*-hpux*)
case "$compile_command " in
*" -static "*) ;;
- *) pic_flag_for_symtable=" $pic_flag -DPIC";;
+ *) pic_flag_for_symtable=" $pic_flag";;
esac
esac
# Now compile the dynamic symbol file.
- $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
- $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+ $show "(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $output_objdir && $LTCC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
# Clean up the generated files.
$show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
@@ -3460,7 +4409,7 @@ static const void *lt_preloaded_setup() {
;;
*)
$echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
else
@@ -3473,7 +4422,7 @@ static const void *lt_preloaded_setup() {
finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
fi
- if test $need_relink = no || test "$build_libtool_libs" != yes; then
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
# Replace the output file specification.
compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
link_command="$compile_command$compile_rpath"
@@ -3548,7 +4497,7 @@ static const void *lt_preloaded_setup() {
# Link the executable and exit
$show "$link_command"
$run eval "$link_command" || exit $?
- exit 0
+ exit $EXIT_SUCCESS
fi
if test "$hardcode_action" = relink; then
@@ -3603,10 +4552,10 @@ static const void *lt_preloaded_setup() {
fi
# Quote $echo for shipping.
- if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
- case $0 in
- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
- *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+ if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then
+ case $progpath in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
esac
qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
else
@@ -3618,15 +4567,230 @@ static const void *lt_preloaded_setup() {
# win32 will think the script is a binary if it has
# a .exe suffix, so we strip it off here.
case $output in
- *.exe) output=`echo $output|${SED} 's,.exe$,,'` ;;
+ *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;;
esac
# test for cygwin because mv fails w/o .exe extensions
case $host in
- *cygwin*) exeext=.exe ;;
+ *cygwin*)
+ exeext=.exe
+ outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;;
*) exeext= ;;
esac
+ case $host in
+ *cygwin* | *mingw* )
+ cwrappersource=`$echo ${objdir}/lt-${output}.c`
+ cwrapper=`$echo ${output}.exe`
+ $rm $cwrappersource $cwrapper
+ trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ cat > $cwrappersource <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+
+ Currently, it simply execs the wrapper *script* "/bin/sh $output",
+ but could eventually absorb all of the scripts functionality and
+ exec $objdir/$outputname directly.
+*/
+EOF
+ cat >> $cwrappersource<<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef DIR_SEPARATOR
+#define DIR_SEPARATOR '/'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+#define HAVE_DOS_BASED_FILE_SYSTEM
+#ifndef DIR_SEPARATOR_2
+#define DIR_SEPARATOR_2 '\\'
+#endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+const char *program_name = NULL;
+
+void * xmalloc (size_t num);
+char * xstrdup (const char *string);
+char * basename (const char *name);
+char * fnqualify(const char *path);
+char * strendzap(char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int i;
+
+ program_name = (char *) xstrdup ((char *) basename (argv[0]));
+ newargz = XMALLOC(char *, argc+2);
+EOF
+
+ cat >> $cwrappersource <<EOF
+ newargz[0] = "$SHELL";
+EOF
+
+ cat >> $cwrappersource <<"EOF"
+ newargz[1] = fnqualify(argv[0]);
+ /* we know the script has the same name, without the .exe */
+ /* so make sure newargz[1] doesn't end in .exe */
+ strendzap(newargz[1],".exe");
+ for (i = 1; i < argc; i++)
+ newargz[i+1] = xstrdup(argv[i]);
+ newargz[argc+1] = NULL;
+EOF
+
+ cat >> $cwrappersource <<EOF
+ execv("$SHELL",newargz);
+EOF
+
+ cat >> $cwrappersource <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void * p = (void *) malloc (num);
+ if (!p)
+ lt_fatal ("Memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL
+;
+}
+
+char *
+basename (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha (name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return (char *) base;
+}
+
+char *
+fnqualify(const char *path)
+{
+ size_t size;
+ char *p;
+ char tmp[LT_PATHMAX + 1];
+
+ assert(path != NULL);
+
+ /* Is it qualified already? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha (path[0]) && path[1] == ':')
+ return xstrdup (path);
+#endif
+ if (IS_DIR_SEPARATOR (path[0]))
+ return xstrdup (path);
+
+ /* prepend the current directory */
+ /* doesn't handle '~' */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ size = strlen(tmp) + 1 + strlen(path) + 1; /* +2 for '/' and '\0' */
+ p = XMALLOC(char, size);
+ sprintf(p, "%s%c%s", tmp, DIR_SEPARATOR, path);
+ return p;
+}
+
+char *
+strendzap(char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert(str != NULL);
+ assert(pat != NULL);
+
+ len = strlen(str);
+ patlen = strlen(pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp(str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+static void
+lt_error_core (int exit_status, const char * mode,
+ const char * message, va_list ap)
+{
+ fprintf (stderr, "%s: %s: ", program_name, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+ va_end (ap);
+}
+EOF
+ # we should really use a build-platform specific compiler
+ # here, but OTOH, the wrappers (shell script and this C one)
+ # are only useful if you want to execute the "real" binary.
+ # Since the "real" binary is built for $host, then this
+ # wrapper might as well be built for $host, too.
+ $run $LTCC -s -o $cwrapper $cwrappersource
+ ;;
+ esac
$rm $output
- trap "$rm $output; exit 1" 1 2 15
+ trap "$rm $output; exit $EXIT_FAILURE" 1 2 15
$echo > $output "\
#! $SHELL
@@ -3642,7 +4806,7 @@ static const void *lt_preloaded_setup() {
# Sed substitution that helps us do robust quoting. It backslashifies
# metacharacters that are still active within double-quoted strings.
-Xsed="${SED}"' -e 1s/^X//'
+Xsed='${SED} -e 1s/^X//'
sed_quote_subst='$sed_quote_subst'
# The HP-UX ksh and POSIX shell print the target directory to stdout
@@ -3702,7 +4866,7 @@ else
"
if test "$fast_install" = yes; then
- echo >> $output "\
+ $echo >> $output "\
program=lt-'$outputname'$exeext
progdir=\"\$thisdir/$objdir\"
@@ -3718,7 +4882,7 @@ else
$rm \"\$progdir/\$file\"
fi"
- echo >> $output "\
+ $echo >> $output "\
# relink executable if necessary
if test -n \"\$relink_command\"; then
@@ -3726,7 +4890,7 @@ else
else
$echo \"\$relink_command_output\" >&2
$rm \"\$progdir/\$file\"
- exit 1
+ exit $EXIT_FAILURE
fi
fi
@@ -3736,13 +4900,13 @@ else
$rm \"\$progdir/\$file\"
fi"
else
- echo >> $output "\
+ $echo >> $output "\
program='$outputname'
progdir=\"\$thisdir/$objdir\"
"
fi
- echo >> $output "\
+ $echo >> $output "\
if test -f \"\$progdir/\$program\"; then"
@@ -3753,7 +4917,7 @@ else
$shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
# Some systems cannot cope with colon-terminated $shlibpath_var
- # The second colon is a workaround for a bug in BeOS R4 ${SED}
+ # The second colon is a workaround for a bug in BeOS R4 sed
$shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
export $shlibpath_var
@@ -3773,14 +4937,6 @@ else
# Run the actual program with our arguments.
"
case $host in
- # win32 systems need to use the prog path for dll
- # lookup to work
- *-*-cygwin* | *-*-pw32*)
- $echo >> $output "\
- exec \$progdir/\$program \${1+\"\$@\"}
-"
- ;;
-
# Backslashes separate directories on plain windows
*-*-mingw | *-*-os2*)
$echo >> $output "\
@@ -3790,30 +4946,26 @@ else
*)
$echo >> $output "\
- # Export the path to the program.
- PATH=\"\$progdir:\$PATH\"
- export PATH
-
- exec \$program \${1+\"\$@\"}
+ exec \$progdir/\$program \${1+\"\$@\"}
"
;;
esac
$echo >> $output "\
\$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
- exit 1
+ exit $EXIT_FAILURE
fi
else
# The program doesn't exist.
\$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
\$echo \"This script is just a wrapper for \$program.\" 1>&2
- echo \"See the $PACKAGE documentation for more information.\" 1>&2
- exit 1
+ $echo \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit $EXIT_FAILURE
fi
fi\
"
chmod +x $output
fi
- exit 0
+ exit $EXIT_SUCCESS
;;
esac
@@ -3829,7 +4981,7 @@ fi\
oldobjs="$libobjs_save"
build_libtool_libs=no
else
- oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
+ oldobjs="$old_deplibs $non_pic_objects"
fi
addlibs="$old_convenience"
fi
@@ -3838,10 +4990,10 @@ fi\
gentop="$output_objdir/${outputname}x"
$show "${rm}r $gentop"
$run ${rm}r "$gentop"
- $show "mkdir $gentop"
- $run mkdir "$gentop"
+ $show "$mkdir $gentop"
+ $run $mkdir "$gentop"
status=$?
- if test $status -ne 0 && test ! -d "$gentop"; then
+ if test "$status" -ne 0 && test ! -d "$gentop"; then
exit $status
fi
generated="$generated $gentop"
@@ -3858,14 +5010,40 @@ fi\
$show "${rm}r $xdir"
$run ${rm}r "$xdir"
- $show "mkdir $xdir"
- $run mkdir "$xdir"
+ $show "$mkdir $xdir"
+ $run $mkdir "$xdir"
status=$?
- if test $status -ne 0 && test ! -d "$xdir"; then
+ if test "$status" -ne 0 && test ! -d "$xdir"; then
exit $status
fi
+ # We will extract separately just the conflicting names and we will no
+ # longer touch any unique names. It is faster to leave these extract
+ # automatically by $AR in one run.
$show "(cd $xdir && $AR x $xabs)"
$run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+ if ($AR t "$xabs" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "$modename: warning: object name conflicts; renaming object files" 1>&2
+ $echo "$modename: warning: to ensure that they will not overwrite" 1>&2
+ $AR t "$xabs" | sort | uniq -cd | while read -r count name
+ do
+ i=1
+ while test "$i" -le "$count"
+ do
+ # Put our $i before any first dot (extension)
+ # Never overwrite any file
+ name_to="$name"
+ while test "X$name_to" = "X$name" || test -f "$xdir/$name_to"
+ do
+ name_to=`$echo "X$name_to" | $Xsed -e "s/\([^.]*\)/\1-$i/"`
+ done
+ $show "(cd $xdir && $AR xN $i $xabs '$name' && $mv '$name' '$name_to')"
+ $run eval "(cd \$xdir && $AR xN $i \$xabs '$name' && $mv '$name' '$name_to')" || exit $?
+ i=`expr $i + 1`
+ done
+ done
+ fi
oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
done
@@ -3873,30 +5051,71 @@ fi\
# Do each command in the archive commands.
if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
- eval cmds=\"$old_archive_from_new_cmds\"
+ cmds=$old_archive_from_new_cmds
else
- # Ensure that we have .o objects in place in case we decided
- # not to build a shared library, and have fallen back to building
- # static libs even though --disable-static was passed!
- for oldobj in $oldobjs; do
- if test ! -f $oldobj; then
- xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
- if test "X$xdir" = "X$oldobj"; then
- xdir="."
+ eval cmds=\"$old_archive_cmds\"
+
+ if len=`expr "X$cmds" : ".*"` &&
+ test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ $echo "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ # GNU ar 2.10+ was changed to match POSIX; thus no paths are
+ # encoded into archives. This makes 'ar r' malfunction in
+ # this piecewise linking case whenever conflicting object
+ # names appear in distinct ar calls; check, warn and compensate.
+ if (for obj in $save_oldobjs
+ do
+ $echo "X$obj" | $Xsed -e 's%^.*/%%'
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
+ $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
+ AR_FLAGS=cq
+ fi
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ for obj in $save_oldobjs
+ do
+ oldobjs="$objlist $obj"
+ objlist="$objlist $obj"
+ eval test_cmds=\"$old_archive_cmds\"
+ if len=`expr "X$test_cmds" : ".*"` &&
+ test "$len" -le "$max_cmd_len"; then
+ :
else
- xdir="$xdir"
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
fi
- baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
- obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
- $show "(cd $xdir && ${LN_S} $obj $baseobj)"
- $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
fi
- done
-
- eval cmds=\"$old_archive_cmds\"
+ fi
fi
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
+ eval cmd=\"$cmd\"
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
@@ -3928,8 +5147,12 @@ fi\
fi
done
# Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args)"
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
# Only create the output if not a dry run.
if test -z "$run"; then
@@ -3948,7 +5171,7 @@ fi\
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
if test -z "$libdir"; then
$echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
newdependency_libs="$newdependency_libs $libdir/$name"
;;
@@ -3962,7 +5185,7 @@ fi\
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
if test -z "$libdir"; then
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
newdlfiles="$newdlfiles $libdir/$name"
done
@@ -3973,17 +5196,36 @@ fi\
eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
if test -z "$libdir"; then
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
newdlprefiles="$newdlprefiles $libdir/$name"
done
dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlfiles="$newdlfiles $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlprefiles="$newdlprefiles $abs"
+ done
+ dlprefiles="$newdlprefiles"
fi
$rm $output
# place dlname in correct position for cygwin
tdlname=$dlname
case $host,$output,$installed,$module,$dlname in
- *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
esac
$echo > $output "\
# $outputname - a libtool library file
@@ -4012,13 +5254,16 @@ revision=$revision
# Is this an already installed library?
installed=$installed
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
# Files to dlopen/dlpreopen
dlopen='$dlfiles'
dlpreopen='$dlprefiles'
# Directory that this library needs to be installed in:
libdir='$install_libdir'"
- if test "$installed" = no && test $need_relink = yes; then
+ if test "$installed" = no && test "$need_relink" = yes; then
$echo >> $output "\
relink_command=\"$relink_command\""
fi
@@ -4031,7 +5276,7 @@ relink_command=\"$relink_command\""
$run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
;;
esac
- exit 0
+ exit $EXIT_SUCCESS
;;
# libtool install mode
@@ -4120,13 +5365,13 @@ relink_command=\"$relink_command\""
if test -z "$install_prog"; then
$echo "$modename: you must specify an install program" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
if test -n "$prev"; then
$echo "$modename: the \`$prev' option requires an argument" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
if test -z "$files"; then
@@ -4136,7 +5381,7 @@ relink_command=\"$relink_command\""
$echo "$modename: you must specify a destination" 1>&2
fi
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# Strip any trailing slash from the destination.
@@ -4154,10 +5399,10 @@ relink_command=\"$relink_command\""
# Not a directory, so check to see that there is only one file specified.
set dummy $files
- if test $# -gt 2; then
+ if test "$#" -gt 2; then
$echo "$modename: \`$dest' is not a directory" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
fi
case $destdir in
@@ -4169,7 +5414,7 @@ relink_command=\"$relink_command\""
*)
$echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
done
@@ -4194,11 +5439,11 @@ relink_command=\"$relink_command\""
*.la)
# Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else
$echo "$modename: \`$file' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
library_names=
@@ -4229,12 +5474,33 @@ relink_command=\"$relink_command\""
dir="$dir$objdir"
if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ if test "$inst_prefix_dir" = "$destdir"; then
+ $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"`
+ fi
+
$echo "$modename: warning: relinking \`$file'" 1>&2
$show "$relink_command"
if $run eval "$relink_command"; then :
else
$echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
- continue
+ exit $EXIT_FAILURE
fi
fi
@@ -4256,7 +5522,7 @@ relink_command=\"$relink_command\""
$run eval "$striplib $destdir/$realname" || exit $?
fi
- if test $# -gt 0; then
+ if test "$#" -gt 0; then
# Delete the old symlinks, and create new ones.
for linkname
do
@@ -4269,10 +5535,11 @@ relink_command=\"$relink_command\""
# Do each command in the postinstall commands.
lib="$destdir/$realname"
- eval cmds=\"$postinstall_cmds\"
+ cmds=$postinstall_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
@@ -4312,7 +5579,7 @@ relink_command=\"$relink_command\""
*)
$echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
@@ -4330,7 +5597,7 @@ relink_command=\"$relink_command\""
$show "$install_prog $staticobj $staticdest"
$run eval "$install_prog \$staticobj \$staticdest" || exit $?
fi
- exit 0
+ exit $EXIT_SUCCESS
;;
*)
@@ -4342,29 +5609,49 @@ relink_command=\"$relink_command\""
destfile="$destdir/$destfile"
fi
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ file=`$echo $file|${SED} 's,.exe$,,'`
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
# Do a test to see if this is really a libtool program.
case $host in
*cygwin*|*mingw*)
- wrapper=`echo $file | ${SED} -e 's,.exe$,,'`
+ wrapper=`$echo $file | ${SED} -e 's,.exe$,,'`
;;
*)
wrapper=$file
;;
esac
- if (${SED} -e '4q' $wrapper | egrep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
+ if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then
notinst_deplibs=
relink_command=
+ # To insure that "foo" is sourced, and not "foo.exe",
+ # finese the cygwin/MSYS system by explicitly sourcing "foo."
+ # which disallows the automatic-append-.exe behavior.
+ case $build in
+ *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+ *) wrapperdot=${wrapper} ;;
+ esac
# If there is no directory component, then add one.
case $file in
- */* | *\\*) . $wrapper ;;
- *) . ./$wrapper ;;
+ */* | *\\*) . ${wrapperdot} ;;
+ *) . ./${wrapperdot} ;;
esac
# Check the variables that should have been set.
if test -z "$notinst_deplibs"; then
$echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
finalize=yes
@@ -4386,10 +5673,17 @@ relink_command=\"$relink_command\""
done
relink_command=
+ # To insure that "foo" is sourced, and not "foo.exe",
+ # finese the cygwin/MSYS system by explicitly sourcing "foo."
+ # which disallows the automatic-append-.exe behavior.
+ case $build in
+ *cygwin* | *mingw*) wrapperdot=${wrapper}. ;;
+ *) wrapperdot=${wrapper} ;;
+ esac
# If there is no directory component, then add one.
case $file in
- */* | *\\*) . $wrapper ;;
- *) . ./$wrapper ;;
+ */* | *\\*) . ${wrapperdot} ;;
+ *) . ./${wrapperdot} ;;
esac
outputname=
@@ -4398,12 +5692,16 @@ relink_command=\"$relink_command\""
tmpdir="/tmp"
test -n "$TMPDIR" && tmpdir="$TMPDIR"
tmpdir="$tmpdir/libtool-$$"
- if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
+ save_umask=`umask`
+ umask 0077
+ if $mkdir "$tmpdir"; then
+ umask $save_umask
else
+ umask $save_umask
$echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
continue
fi
- file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'`
outputname="$tmpdir/$file"
# Replace the output file specification.
relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
@@ -4421,14 +5719,14 @@ relink_command=\"$relink_command\""
fi
else
# Install the binary that we compiled earlier.
- file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
fi
fi
# remove .exe since cygwin /usr/bin/install will append another
# one anyways
case $install_prog,$host in
- /usr/bin/install*,*cygwin*)
+ */usr/bin/install*,*cygwin*)
case $file:$destfile in
*.exe:*.exe)
# this is ok
@@ -4437,7 +5735,7 @@ relink_command=\"$relink_command\""
destfile=$destfile.exe
;;
*:*.exe)
- destfile=`echo $destfile | ${SED} -e 's,.exe$,,'`
+ destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'`
;;
esac
;;
@@ -4458,16 +5756,17 @@ relink_command=\"$relink_command\""
$show "$install_prog $file $oldlib"
$run eval "$install_prog \$file \$oldlib" || exit $?
- if test -n "$stripme" && test -n "$striplib"; then
+ if test -n "$stripme" && test -n "$old_striplib"; then
$show "$old_striplib $oldlib"
$run eval "$old_striplib $oldlib" || exit $?
fi
# Do each command in the postinstall commands.
- eval cmds=\"$old_postinstall_cmds\"
+ cmds=$old_postinstall_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || exit $?
done
@@ -4481,9 +5780,9 @@ relink_command=\"$relink_command\""
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $0 --finish$current_libdirs'
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
else
- exit 0
+ exit $EXIT_SUCCESS
fi
;;
@@ -4502,10 +5801,11 @@ relink_command=\"$relink_command\""
for libdir in $libdirs; do
if test -n "$finish_cmds"; then
# Do each command in the finish commands.
- eval cmds=\"$finish_cmds\"
+ cmds=$finish_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd" || admincmds="$admincmds
$cmd"
@@ -4522,43 +5822,43 @@ relink_command=\"$relink_command\""
fi
# Exit here if they wanted silent mode.
- test "$show" = ":" && exit 0
+ test "$show" = : && exit $EXIT_SUCCESS
- echo "----------------------------------------------------------------------"
- echo "Libraries have been installed in:"
+ $echo "----------------------------------------------------------------------"
+ $echo "Libraries have been installed in:"
for libdir in $libdirs; do
- echo " $libdir"
+ $echo " $libdir"
done
- echo
- echo "If you ever happen to want to link against installed libraries"
- echo "in a given directory, LIBDIR, you must either use libtool, and"
- echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
- echo "flag during linking and do at least one of the following:"
+ $echo
+ $echo "If you ever happen to want to link against installed libraries"
+ $echo "in a given directory, LIBDIR, you must either use libtool, and"
+ $echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ $echo "flag during linking and do at least one of the following:"
if test -n "$shlibpath_var"; then
- echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
- echo " during execution"
+ $echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ $echo " during execution"
fi
if test -n "$runpath_var"; then
- echo " - add LIBDIR to the \`$runpath_var' environment variable"
- echo " during linking"
+ $echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ $echo " during linking"
fi
if test -n "$hardcode_libdir_flag_spec"; then
libdir=LIBDIR
eval flag=\"$hardcode_libdir_flag_spec\"
- echo " - use the \`$flag' linker flag"
+ $echo " - use the \`$flag' linker flag"
fi
if test -n "$admincmds"; then
- echo " - have your system administrator run these commands:$admincmds"
+ $echo " - have your system administrator run these commands:$admincmds"
fi
if test -f /etc/ld.so.conf; then
- echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
fi
- echo
- echo "See any operating system documentation about shared libraries for"
- echo "more information, such as the ld(1) and ld.so(8) manual pages."
- echo "----------------------------------------------------------------------"
- exit 0
+ $echo
+ $echo "See any operating system documentation about shared libraries for"
+ $echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ $echo "----------------------------------------------------------------------"
+ exit $EXIT_SUCCESS
;;
# libtool execute mode
@@ -4570,7 +5870,7 @@ relink_command=\"$relink_command\""
if test -z "$cmd"; then
$echo "$modename: you must specify a COMMAND" 1>&2
$echo "$help"
- exit 1
+ exit $EXIT_FAILURE
fi
# Handle -dlopen flags immediately.
@@ -4578,18 +5878,18 @@ relink_command=\"$relink_command\""
if test ! -f "$file"; then
$echo "$modename: \`$file' is not a file" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
dir=
case $file in
*.la)
# Check to see that this really is a libtool archive.
- if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
else
$echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
# Read the libtool library.
@@ -4616,7 +5916,7 @@ relink_command=\"$relink_command\""
dir="$dir/$objdir"
else
$echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
;;
@@ -4656,7 +5956,7 @@ relink_command=\"$relink_command\""
-*) ;;
*)
# Do a test to see if this is really a libtool program.
- if (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
# If there is no directory component, then add one.
case $file in
*/* | *\\*) . $file ;;
@@ -4679,7 +5979,7 @@ relink_command=\"$relink_command\""
eval "export $shlibpath_var"
fi
- # Restore saved enviroment variables
+ # Restore saved environment variables
if test "${save_LC_ALL+set}" = set; then
LC_ALL="$save_LC_ALL"; export LC_ALL
fi
@@ -4696,7 +5996,7 @@ relink_command=\"$relink_command\""
$echo "export $shlibpath_var"
fi
$echo "$cmd$args"
- exit 0
+ exit $EXIT_SUCCESS
fi
;;
@@ -4724,24 +6024,25 @@ relink_command=\"$relink_command\""
if test -z "$rm"; then
$echo "$modename: you must specify an RM program" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
rmdirs=
+ origobjdir="$objdir"
for file in $files; do
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
if test "X$dir" = "X$file"; then
dir=.
- objdir="$objdir"
+ objdir="$origobjdir"
else
- objdir="$dir/$objdir"
+ objdir="$dir/$origobjdir"
fi
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
- test $mode = uninstall && objdir="$dir"
+ test "$mode" = uninstall && objdir="$dir"
# Remember objdir for removal later, being careful to avoid duplicates
- if test $mode = clean; then
+ if test "$mode" = clean; then
case " $rmdirs " in
*" $objdir "*) ;;
*) rmdirs="$rmdirs $objdir" ;;
@@ -4765,7 +6066,7 @@ relink_command=\"$relink_command\""
case $name in
*.la)
# Possibly a libtool archive, so verify it.
- if (${SED} -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
. $dir/$name
# Delete the libtool libraries and symlinks.
@@ -4773,18 +6074,19 @@ relink_command=\"$relink_command\""
rmfiles="$rmfiles $objdir/$n"
done
test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
- test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ test "$mode" = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- if test $mode = uninstall; then
+ if test "$mode" = uninstall; then
if test -n "$library_names"; then
# Do each command in the postuninstall commands.
- eval cmds=\"$postuninstall_cmds\"
+ cmds=$postuninstall_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd"
- if test $? != 0 && test "$rmforce" != yes; then
+ if test "$?" -ne 0 && test "$rmforce" != yes; then
exit_status=1
fi
done
@@ -4793,13 +6095,14 @@ relink_command=\"$relink_command\""
if test -n "$old_library"; then
# Do each command in the old_postuninstall commands.
- eval cmds=\"$old_postuninstall_cmds\"
+ cmds=$old_postuninstall_cmds
save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
+ eval cmd=\"$cmd\"
$show "$cmd"
$run eval "$cmd"
- if test $? != 0 && test "$rmforce" != yes; then
+ if test "$?" -ne 0 && test "$rmforce" != yes; then
exit_status=1
fi
done
@@ -4811,22 +6114,52 @@ relink_command=\"$relink_command\""
;;
*.lo)
- if test "$build_old_libs" = yes; then
- oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
- rmfiles="$rmfiles $dir/$oldobj"
+ # Possibly a libtool object, so verify it.
+ if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+
+ # Read the .lo file
+ . $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" \
+ && test "$pic_object" != none; then
+ rmfiles="$rmfiles $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" \
+ && test "$non_pic_object" != none; then
+ rmfiles="$rmfiles $dir/$non_pic_object"
+ fi
fi
;;
*)
- # Do a test to see if this is a libtool program.
- if test $mode = clean &&
- (${SED} -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
- relink_command=
- . $dir/$file
+ if test "$mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ file=`$echo $file|${SED} 's,.exe$,,'`
+ noexename=`$echo $name|${SED} 's,.exe$,,'`
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ rmfiles="$rmfiles $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ relink_command=
+ . $dir/$noexename
- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
- if test "$fast_install" = yes && test -n "$relink_command"; then
- rmfiles="$rmfiles $objdir/lt-$name"
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ rmfiles="$rmfiles $objdir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+ fi
fi
fi
;;
@@ -4834,6 +6167,7 @@ relink_command=\"$relink_command\""
$show "$rm $rmfiles"
$run $rm $rmfiles || exit_status=1
done
+ objdir="$origobjdir"
# Try to remove the ${objdir}s in the directories where we deleted files
for dir in $rmdirs; do
@@ -4849,20 +6183,20 @@ relink_command=\"$relink_command\""
"")
$echo "$modename: you must specify a MODE" 1>&2
$echo "$generic_help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
if test -z "$exec_cmd"; then
$echo "$modename: invalid operation mode \`$mode'" 1>&2
$echo "$generic_help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
fi
fi # test -z "$show_help"
if test -n "$exec_cmd"; then
eval exec $exec_cmd
- exit 1
+ exit $EXIT_FAILURE
fi
# We need to display help for each of the modes.
@@ -4881,6 +6215,7 @@ Provide generalized library-building support services.
--mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
--quiet same as \`--silent'
--silent don't print informational messages
+ --tag=TAG use configuration variables from tag TAG
--version print version information
MODE must be one of the following:
@@ -4894,8 +6229,10 @@ MODE must be one of the following:
uninstall remove libraries from an installed directory
MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
-a more detailed description of MODE."
- exit 0
+a more detailed description of MODE.
+
+Report bugs to <bug-libtool@gnu.org>."
+ exit $EXIT_SUCCESS
;;
clean)
@@ -5006,6 +6343,9 @@ The following components of LINK-COMMAND are treated specially:
-no-install link a not-installable executable
-no-undefined declare that a library does not refer to external symbols
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
@@ -5047,14 +6387,34 @@ Otherwise, only FILE itself is deleted using RM."
*)
$echo "$modename: invalid operation mode \`$mode'" 1>&2
$echo "$help" 1>&2
- exit 1
+ exit $EXIT_FAILURE
;;
esac
-echo
+$echo
$echo "Try \`$modename --help' for more information about other modes."
-exit 0
+exit $EXIT_SUCCESS
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
# Local Variables:
# mode:shell-script
diff --git a/extras/freetype2/builds/unix/mkinstalldirs b/extras/freetype2/builds/unix/mkinstalldirs
index d2d5f21b6..6fbe5e117 100755
--- a/extras/freetype2/builds/unix/mkinstalldirs
+++ b/extras/freetype2/builds/unix/mkinstalldirs
@@ -1,20 +1,32 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+
+scriptversion=2004-02-15.20
+
+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
-# Public domain
+# Public domain.
+#
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
errstatus=0
dirmode=""
usage="\
-Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
+
+Create each directory DIR (with mode MODE, if specified), including all
+leading file name components.
+
+Report bugs to <bug-automake@gnu.org>."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
- echo "$usage" 1>&2
+ echo "$usage"
exit 0
;;
-m) # -m PERM arg
@@ -23,6 +35,10 @@ while test $# -gt 0 ; do
dirmode=$1
shift
;;
+ --version)
+ echo "$0 $scriptversion"
+ exit 0
+ ;;
--) # stop option processing
shift
break
@@ -50,17 +66,37 @@ case $# in
0) exit 0 ;;
esac
+# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
+# mkdir -p a/c at the same time, both will detect that a is missing,
+# one will create a, then the other will try to create a and die with
+# a "File exists" error. This is a problem when calling mkinstalldirs
+# from a parallel make. We use --version in the probe to restrict
+# ourselves to GNU mkdir, which is thread-safe.
case $dirmode in
'')
- if mkdir -p -- . 2>/dev/null; then
+ if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
+ else
+ # On NextStep and OpenStep, the `mkdir' command does not
+ # recognize any option. It will interpret all options as
+ # directories to create, and then abort because `.' already
+ # exists.
+ test -d ./-p && rmdir ./-p
+ test -d ./--version && rmdir ./--version
fi
;;
*)
- if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+ if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
+ test ! -d ./--version; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
+ else
+ # Clean up after NextStep and OpenStep mkdir.
+ for d in ./-m ./-p ./--version "./$dirmode";
+ do
+ test -d $d && rmdir $d
+ done
fi
;;
esac
@@ -84,17 +120,17 @@ do
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
- errstatus=$lasterr
+ errstatus=$lasterr
else
- if test ! -z "$dirmode"; then
+ if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
- lasterr=""
- chmod "$dirmode" "$pathcomp" || lasterr=$?
+ lasterr=""
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
- if test ! -z "$lasterr"; then
- errstatus=$lasterr
- fi
- fi
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
fi
fi
@@ -107,5 +143,8 @@ exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
# End:
-# mkinstalldirs ends here
diff --git a/extras/freetype2/builds/unix/unix-cc.in b/extras/freetype2/builds/unix/unix-cc.in
index 9de770db1..2d1f17e5f 100644
--- a/extras/freetype2/builds/unix/unix-cc.in
+++ b/extras/freetype2/builds/unix/unix-cc.in
@@ -1,10 +1,22 @@
-# template for Unix-specific compiler definitions
#
+# FreeType 2 template for Unix-specific compiler definitions
+#
+
+# Copyright 1996-2000, 2002, 2003 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
-CC := @CC@
+
+CC := @CC@
+COMPILER_SEP := $(SEP)
ifndef LIBTOOL
- LIBTOOL := $(BUILD)/libtool
+ LIBTOOL := $(BUILD_DIR)/libtool
endif
@@ -48,7 +60,7 @@ L := -l
# Target flag.
#
-T := -o # Don't remove this comment line! We need the space after `-o'.
+T := -o$(space)
# C flags
@@ -58,7 +70,10 @@ T := -o # Don't remove this comment line! We need the space after `-o'.
# Use the ANSIFLAGS variable to define the compiler flags used to enfore
# ANSI compliance.
#
-CFLAGS := -c @XX_CFLAGS@ @CFLAGS@
+# We use our own FreeType configuration file.
+#
+CFLAGS := -c @XX_CFLAGS@ @CPPFLAGS@ @CFLAGS@ \
+ -DFT_CONFIG_CONFIG_H="<ftconfig.h>"
# ANSIFLAGS: Put there the flags used to make your compiler ANSI-compliant.
#
@@ -81,4 +96,5 @@ LINK_LIBRARY = $(LIBTOOL) --mode=link $(CCraw) -o $@ $(OBJECTS_LIST) \
-rpath $(libdir) -version-info $(version_info) \
$(LDFLAGS)
+
# EOF
diff --git a/extras/freetype2/builds/unix/unix-def.in b/extras/freetype2/builds/unix/unix-def.in
index 790bf8976..c263e0e26 100644
--- a/extras/freetype2/builds/unix/unix-def.in
+++ b/extras/freetype2/builds/unix/unix-def.in
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002 by
+# Copyright 1996-2000, 2002, 2004 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -18,16 +18,13 @@ ifndef TOP_DIR
endif
TOP_DIR := $(shell cd $(TOP_DIR); pwd)
-DELETE := @RMF@
-DELDIR := @RMDIR@
-SEP := /
-HOSTSEP := $(SEP)
-BUILD := $(TOP_DIR)/builds/unix
-PLATFORM := unix
+DELETE := @RMF@
+DELDIR := @RMDIR@
+SEP := /
# this is used for `make distclean' and `make install'
ifndef OBJ_BUILD
- OBJ_BUILD := $(BUILD)
+ OBJ_BUILD := $(BUILD_DIR)
endif
# don't use `:=' here since the path stuff will be included after this file
@@ -38,7 +35,7 @@ INSTALL := @INSTALL@
INSTALL_DATA := @INSTALL_DATA@
INSTALL_PROGRAM := @INSTALL_PROGRAM@
INSTALL_SCRIPT := @INSTALL_SCRIPT@
-MKINSTALLDIRS := $(BUILD)/mkinstalldirs
+MKINSTALLDIRS := $(BUILD_DIR)/mkinstalldirs
DISTCLEAN += $(OBJ_BUILD)/config.cache \
$(OBJ_BUILD)/config.log \
@@ -47,6 +44,7 @@ DISTCLEAN += $(OBJ_BUILD)/config.cache \
$(OBJ_BUILD)/unix-cc.mk \
$(OBJ_BUILD)/ftconfig.h \
$(OBJ_BUILD)/freetype-config \
+ $(OBJ_BUILD)/freetype2.pc \
$(LIBTOOL) \
$(OBJ_BUILD)/Makefile
@@ -96,4 +94,5 @@ SYSTEM_ZLIB := @SYSTEM_ZLIB@
#
NO_OUTPUT := 2> /dev/null
+
# EOF
diff --git a/extras/freetype2/builds/unix/unix-dev.mk b/extras/freetype2/builds/unix/unix-dev.mk
index 2f10734f1..12c641af2 100644
--- a/extras/freetype2/builds/unix/unix-dev.mk
+++ b/extras/freetype2/builds/unix/unix-dev.mk
@@ -6,7 +6,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -17,9 +17,10 @@
include $(TOP_DIR)/builds/unix/unixddef.mk
-BUILD := $(TOP_DIR)/builds/devel
+BUILD_DIR := $(TOP_DIR)/devel
include $(TOP_DIR)/builds/compiler/gcc-dev.mk
include $(TOP_DIR)/builds/link_std.mk
+
# EOF
diff --git a/extras/freetype2/builds/unix/unix-lcc.mk b/extras/freetype2/builds/unix/unix-lcc.mk
index 4ade02c3a..6038e5239 100644
--- a/extras/freetype2/builds/unix/unix-lcc.mk
+++ b/extras/freetype2/builds/unix/unix-lcc.mk
@@ -20,4 +20,5 @@ include $(TOP_DIR)/builds/unix/unixddef.mk
include $(TOP_DIR)/builds/compiler/unix-lcc.mk
include $(TOP_DIR)/builds/link_std.mk
+
# EOF
diff --git a/extras/freetype2/builds/unix/unix.mk b/extras/freetype2/builds/unix/unix.mk
index fae08b396..c1555acf6 100644
--- a/extras/freetype2/builds/unix/unix.mk
+++ b/extras/freetype2/builds/unix/unix.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002 by
+# Copyright 1996-2000, 2002, 2004 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -12,10 +12,14 @@
# indicate that you have read the license and understand and accept it
# fully.
-have_mk := $(strip $(wildcard $(TOP_DIR)/builds/unix/unix-def.mk))
+# We need these declarations here since unix-def.mk is a generated file.
+BUILD_DIR := $(TOP_DIR)/builds/unix
+PLATFORM := unix
+
+have_mk := $(strip $(wildcard $(BUILD_DIR)/unix-def.mk))
ifneq ($(have_mk),)
- include $(TOP_DIR)/builds/unix/unix-def.mk
- include $(TOP_DIR)/builds/unix/unix-cc.mk
+ include $(BUILD_DIR)/unix-def.mk
+ include $(BUILD_DIR)/unix-cc.mk
else
# we are building FT2 not in the src tree
include $(OBJ_DIR)/unix-def.mk
diff --git a/extras/freetype2/builds/unix/unixddef.mk b/extras/freetype2/builds/unix/unixddef.mk
index 1ea1543ac..803ce755a 100644
--- a/extras/freetype2/builds/unix/unixddef.mk
+++ b/extras/freetype2/builds/unix/unixddef.mk
@@ -4,7 +4,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -19,12 +19,11 @@ ifndef TOP_DIR
endif
TOP_DIR := $(shell cd $(TOP_DIR); pwd)
-DELETE := rm -f
-SEP := /
-HOSTSEP := $(SEP)
+DELETE := rm -f
+SEP := /
# we use a special devel ftoption.h
-BUILD := $(TOP_DIR)/builds/devel
+BUILD_DIR := $(TOP_DIR)/devel
# do not set the platform to `unix', or libtool will trick you
PLATFORM := unixdev
@@ -50,7 +49,7 @@ LIBRARY := lib$(PROJECT)
LIB_DIR := $(OBJ_DIR)
-#
NO_OUTPUT := 2> /dev/null
+
# EOF
diff --git a/extras/freetype2/builds/vms/ftconfig.h b/extras/freetype2/builds/vms/ftconfig.h
index 3174ffeab..dcce1e090 100644
--- a/extras/freetype2/builds/vms/ftconfig.h
+++ b/extras/freetype2/builds/vms/ftconfig.h
@@ -4,7 +4,7 @@
/* */
/* VMS-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -34,8 +34,8 @@
/*************************************************************************/
-#ifndef FTCONFIG_H
-#define FTCONFIG_H
+#ifndef __FTCONFIG_H__
+#define __FTCONFIG_H__
/* Include the header file containing all developer build options */
@@ -43,6 +43,7 @@
#include FT_CONFIG_OPTIONS_H
#include FT_CONFIG_STANDARD_LIBRARY_H
+
FT_BEGIN_HEADER
/*************************************************************************/
@@ -66,6 +67,8 @@ FT_BEGIN_HEADER
#define FT_SIZEOF_INT 4
#define FT_SIZEOF_LONG 4
+#define FT_CHAR_BIT 8
+
/* Preferred alignment of data */
#define FT_ALIGNMENT 8
@@ -91,6 +94,19 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* Mac support */
+ /* */
+ /* This is the only necessary change, so it is defined here instead */
+ /* providing a new configuration file. */
+ /* */
+#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
+ ( defined( __MWERKS__ ) && defined( macintosh ) )
+#define FT_MACINTOSH 1
+#endif
+
+
+ /*************************************************************************/
+ /* */
/* IntN types */
/* */
/* Used to guarantee the size of some specific integers. */
@@ -112,32 +128,84 @@ FT_BEGIN_HEADER
#error "no 32bit type found -- please check your configuration files"
#endif
+ /* look up an integer type that is at least 32 bits */
+#if FT_SIZEOF_INT >= 4
+
+ typedef int FT_Fast;
+ typedef unsigned int FT_UFast;
+
+#elif FT_SIZEOF_LONG >= 4
+
+ typedef long FT_Fast;
+ typedef unsigned long FT_UFast;
+
+#endif
+
+
+ /* determine whether we have a 64-bit int type for platforms without */
+ /* Autoconf */
#if FT_SIZEOF_LONG == 8
/* FT_LONG64 must be defined if a 64-bit type is available */
#define FT_LONG64
-#define FT_INT64 long
+#define FT_INT64 long
+
+#elif defined( _MSC_VER ) && _MSC_VER >= 900 /* Visual C++ (and Intel C++) */
+
+ /* this compiler provides the __int64 type */
+#define FT_LONG64
+#define FT_INT64 __int64
+
+#elif defined( __BORLANDC__ ) /* Borland C++ */
+
+ /* XXXX: We should probably check the value of __BORLANDC__ in order */
+ /* to test the compiler version. */
+
+ /* this compiler provides the __int64 type */
+#define FT_LONG64
+#define FT_INT64 __int64
+
+#elif defined( __WATCOMC__ ) /* Watcom C++ */
+
+ /* Watcom doesn't provide 64-bit data types */
+
+#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
+
+#define FT_LONG64
+#define FT_INT64 long long int
+
+#elif defined( __GNUC__ )
+
+ /* GCC provides the "long long" type */
+#define FT_LONG64
+#define FT_INT64 long long int
+
+#endif /* FT_SIZEOF_LONG == 8 */
+
+
+#define FT_BEGIN_STMNT do {
+#define FT_END_STMNT } while ( 0 )
+#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
-#else
/*************************************************************************/
/* */
- /* Many compilers provide the non-ANSI `long long' 64-bit type. You can */
- /* activate it by defining the FTCALC_USE_LONG_LONG macro in */
- /* `ftoption.h'. */
+ /* A 64-bit data type will create compilation problems if you compile */
+ /* in strict ANSI mode. To avoid them, we disable their use if */
+ /* __STDC__ is defined. You can however ignore this rule by */
+ /* defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
/* */
- /* Note that this will produce many -ansi warnings during library */
- /* compilation, and that in many cases, the generated code will be */
- /* neither smaller nor faster! */
- /* */
-#ifdef FTCALC_USE_LONG_LONG
+#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
-#define FT_LONG64
-#define FT_INT64 long long
+#ifdef __STDC__
-#endif /* FTCALC_USE_LONG_LONG */
+ /* undefine the 64-bit macros in strict ANSI compilation mode */
+#undef FT_LONG64
+#undef FT_INT64
-#endif /* FT_SIZEOF_LONG == 8 */
+#endif /* __STDC__ */
+
+#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT
@@ -157,6 +225,7 @@ FT_BEGIN_HEADER
#endif /* FT_MAKE_OPTION_SINGLE_OBJECT */
+
#ifndef FT_BASE
#ifdef __cplusplus
@@ -167,15 +236,16 @@ FT_BEGIN_HEADER
#endif /* !FT_BASE */
-#ifndef BASE_DEF
+
+#ifndef FT_BASE_DEF
#ifdef __cplusplus
-#define BASE_DEF( x ) extern "C" x
+#define FT_BASE_DEF( x ) extern "C" x
#else
-#define BASE_DEF( x ) extern x
+#define FT_BASE_DEF( x ) extern x
#endif
-#endif /* !BASE_DEF */
+#endif /* !FT_BASE_DEF */
#ifndef FT_EXPORT
@@ -188,6 +258,7 @@ FT_BEGIN_HEADER
#endif /* !FT_EXPORT */
+
#ifndef FT_EXPORT_DEF
#ifdef __cplusplus
@@ -209,6 +280,9 @@ FT_BEGIN_HEADER
#endif /* !FT_EXPORT_VAR */
+ /* The following macros are needed to compile the library with a */
+ /* C++ compiler and with 16bit compilers. */
+ /* */
/* This is special. Within C++, you must specify `extern "C"' for */
/* functions which are used via function pointers, and you also */
@@ -216,23 +290,42 @@ FT_BEGIN_HEADER
/* assure C linkage -- it's not possible to have (local) anonymous */
/* functions which are accessed by (global) function pointers. */
/* */
+ /* */
+ /* FT_CALLBACK_DEF is used to _define_ a callback function. */
+ /* */
+ /* FT_CALLBACK_TABLE is used to _declare_ a constant variable that */
+ /* contains pointers to callback functions. */
+ /* */
+ /* FT_CALLBACK_TABLE_DEF is used to _define_ a constant variable */
+ /* that contains pointers to callback functions. */
+ /* */
+ /* */
+ /* Some 16bit compilers have to redefine these macros to insert */
+ /* the infamous `_cdecl' or `__fastcall' declarations. */
+ /* */
+#ifndef FT_CALLBACK_DEF
#ifdef __cplusplus
-
-#define FT_CALLBACK_DEF( x ) extern "C" x
-#define FT_CALLBACK_TABLE extern "C"
-#define FT_CALLBACK_TABLE_DEF extern "C"
-
+#define FT_CALLBACK_DEF( x ) extern "C" x
#else
+#define FT_CALLBACK_DEF( x ) static x
+#endif
+#endif /* FT_CALLBACK_DEF */
-#define FT_CALLBACK_DEF( x ) static x
-#define FT_CALLBACK_TABLE extern
-#define FT_CALLBACK_TABLE_DEF
+#ifndef FT_CALLBACK_TABLE
+#ifdef __cplusplus
+#define FT_CALLBACK_TABLE extern "C"
+#define FT_CALLBACK_TABLE_DEF extern "C"
+#else
+#define FT_CALLBACK_TABLE extern
+#define FT_CALLBACK_TABLE_DEF /* nothing */
+#endif
+#endif /* FT_CALLBACK_TABLE */
-#endif /* __cplusplus */
FT_END_HEADER
-#endif /* FTCONFIG_H */
+
+#endif /* __FTCONFIG_H__ */
/* END */
diff --git a/extras/freetype2/builds/win32/detect.mk b/extras/freetype2/builds/win32/detect.mk
index c28d67f96..f24538fdb 100644
--- a/extras/freetype2/builds/win32/detect.mk
+++ b/extras/freetype2/builds/win32/detect.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -46,12 +46,12 @@ endif # test PLATFORM ansi
ifeq ($(PLATFORM),win32)
- DELETE := del
- COPY := copy
+ DELETE := del
+ COPY := copy
+ SEP := $(BACKSLASH)
# gcc Makefile by default
CONFIG_FILE := w32-gcc.mk
- SEP := /
ifeq ($(firstword $(CC)),cc)
CC := gcc
endif
@@ -80,7 +80,6 @@ ifeq ($(PLATFORM),win32)
#
ifneq ($(findstring visualc,$(MAKECMDGOALS)),) # Visual C/C++
CONFIG_FILE := w32-vcc.mk
- SEP := $(BACKSLASH)
CC := cl
visualc: setup
.PHONY: visualc
@@ -88,7 +87,6 @@ ifeq ($(PLATFORM),win32)
ifneq ($(findstring intelc,$(MAKECMDGOALS)),) # Intel C/C++
CONFIG_FILE := w32-intl.mk
- SEP := $(BACKSLASH)
CC := cl
visualc: setup
.PHONY: intelc
@@ -96,7 +94,6 @@ ifeq ($(PLATFORM),win32)
ifneq ($(findstring watcom,$(MAKECMDGOALS)),) # Watcom C/C++
CONFIG_FILE := w32-wat.mk
- SEP := $(BACKSLASH)
CC := wcc386
watcom: setup
.PHONY: watcom
@@ -104,7 +101,6 @@ ifeq ($(PLATFORM),win32)
ifneq ($(findstring visualage,$(MAKECMDGOALS)),) # Visual Age C++
CONFIG_FILE := w32-icc.mk
- SEP := $(BACKSLASH)
CC := icc
visualage: setup
.PHONY: visualage
@@ -112,7 +108,6 @@ ifeq ($(PLATFORM),win32)
ifneq ($(findstring lcc,$(MAKECMDGOALS)),) # LCC-Win32
CONFIG_FILE := w32-lcc.mk
- SEP := $(BACKSLASH)
CC := lcc
lcc: setup
.PHONY: lcc
@@ -120,7 +115,6 @@ ifeq ($(PLATFORM),win32)
ifneq ($(findstring mingw32,$(MAKECMDGOALS)),) # mingw32
CONFIG_FILE := w32-mingw32.mk
- SEP := $(BACKSLASH)
CC := gcc
mingw32: setup
.PHONY: mingw32
@@ -128,7 +122,6 @@ ifeq ($(PLATFORM),win32)
ifneq ($(findstring bcc32,$(MAKECMDGOALS)),) # Borland C++
CONFIG_FILE := w32-bcc.mk
- SEP := $(BACKSLASH)
CC := bcc32
bcc32: setup
.PHONY: bcc32
@@ -137,7 +130,6 @@ ifeq ($(PLATFORM),win32)
ifneq ($(findstring devel-bcc,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := w32-bccd.mk
CC := bcc32
- SEP := /
devel-bcc: setup
.PHONY: devel-bcc
endif
@@ -145,11 +137,11 @@ ifeq ($(PLATFORM),win32)
ifneq ($(findstring devel-gcc,$(MAKECMDGOALS)),) # development target
CONFIG_FILE := w32-dev.mk
CC := gcc
- SEP := /
devel-gcc: setup
.PHONY: devel-gcc
endif
endif # test PLATFORM win32
+
# EOF
diff --git a/extras/freetype2/builds/win32/visualc/freetype.dsp b/extras/freetype2/builds/win32/visualc/freetype.dsp
index 1512059fd..bb353dec0 100644
--- a/extras/freetype2/builds/win32/visualc/freetype.dsp
+++ b/extras/freetype2/builds/win32/visualc/freetype.dsp
@@ -54,7 +54,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype218.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug"
@@ -78,7 +78,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype218_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Multithreaded"
@@ -103,7 +103,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8_D.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214MT_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype218MT_D.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Multithreaded"
@@ -127,7 +127,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"lib\freetype200b8.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214MT.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype218MT.lib"
!ELSEIF "$(CFG)" == "freetype - Win32 Release Singlethreaded"
@@ -152,7 +152,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype206.lib"
-# ADD LIB32 /out:"..\..\..\objs\freetype214ST.lib"
+# ADD LIB32 /out:"..\..\..\objs\freetype218ST.lib"
# SUBTRACT LIB32 /nologo
!ELSEIF "$(CFG)" == "freetype - Win32 Debug Singlethreaded"
@@ -178,7 +178,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LIB32=link.exe -lib
# ADD BASE LIB32 /nologo /out:"..\..\..\objs\freetype206_D.lib"
-# ADD LIB32 /nologo /out:"..\..\..\objs\freetype214ST_D.lib"
+# ADD LIB32 /nologo /out:"..\..\..\objs\freetype218ST_D.lib"
!ENDIF
@@ -235,6 +235,10 @@ SOURCE=..\..\..\src\gzip\ftgzip.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\src\lzw\ftlzw.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\src\base\ftinit.c
# SUBTRACT CPP /Fr
# End Source File
diff --git a/extras/freetype2/builds/win32/visualc/freetype.sln b/extras/freetype2/builds/win32/visualc/freetype.sln
new file mode 100644
index 000000000..0afd3a3b6
--- /dev/null
+++ b/extras/freetype2/builds/win32/visualc/freetype.sln
@@ -0,0 +1,33 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "freetype", "freetype.vcproj", "{78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Debug Multithreaded = Debug Multithreaded
+ Debug Singlethreaded = Debug Singlethreaded
+ Release = Release
+ Release Multithreaded = Release Multithreaded
+ Release Singlethreaded = Release Singlethreaded
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug.ActiveCfg = Debug|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug.Build.0 = Debug|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded.ActiveCfg = Debug Multithreaded|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Multithreaded.Build.0 = Debug Multithreaded|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded.ActiveCfg = Debug Singlethreaded|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Debug Singlethreaded.Build.0 = Debug Singlethreaded|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release.ActiveCfg = Release|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release.Build.0 = Release|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded.ActiveCfg = Release Multithreaded|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Multithreaded.Build.0 = Release Multithreaded|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded.ActiveCfg = Release Singlethreaded|Win32
+ {78B079BD-9FC7-4B9E-B4A6-96DA0F00248B}.Release Singlethreaded.Build.0 = Release Singlethreaded|Win32
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/extras/freetype2/builds/win32/visualc/freetype.vcproj b/extras/freetype2/builds/win32/visualc/freetype.vcproj
new file mode 100644
index 000000000..fefe7c7d0
--- /dev/null
+++ b/extras/freetype2/builds/win32/visualc/freetype.vcproj
@@ -0,0 +1,1717 @@
+<?xml version="1.0" encoding="windows-1251"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ Name="freetype"
+ ProjectGUID="{D0087BEB-3E7B-4004-BD4A-E4D071CF8D92}"
+ SccProjectName=""
+ SccLocalPath="">
+ <Platforms>
+ <Platform
+ Name="Win32"/>
+ </Platforms>
+ <Configurations>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory=".\..\..\..\objs\release"
+ IntermediateDirectory=".\..\..\..\objs\release"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ ImproveFloatingPointConsistency="TRUE"
+ AdditionalIncludeDirectories="..\..\..\include"
+ PreprocessorDefinitions="NDEBUG;WIN32;_LIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="2"
+ EnableFunctionLevelLinking="TRUE"
+ DisableLanguageExtensions="TRUE"
+ PrecompiledHeaderFile=".\..\..\..\objs\release/freetype.pch"
+ AssemblerListingLocation=".\..\..\..\objs\release/"
+ ObjectFile=".\..\..\..\objs\release/"
+ ProgramDataBaseFileName=".\..\..\..\objs\release/"
+ WarningLevel="4"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="..\..\..\objs\freetype218.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release Multithreaded|Win32"
+ OutputDirectory=".\..\..\..\objs\release_mt"
+ IntermediateDirectory=".\..\..\..\objs\release_mt"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ ImproveFloatingPointConsistency="TRUE"
+ AdditionalIncludeDirectories="..\..\..\include"
+ PreprocessorDefinitions="NDEBUG;WIN32;_LIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="0"
+ EnableFunctionLevelLinking="TRUE"
+ DisableLanguageExtensions="TRUE"
+ PrecompiledHeaderFile=".\..\..\..\objs\release_mt/freetype.pch"
+ AssemblerListingLocation=".\..\..\..\objs\release_mt/"
+ ObjectFile=".\..\..\..\objs\release_mt/"
+ ProgramDataBaseFileName=".\..\..\..\objs\release_mt/"
+ WarningLevel="4"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="..\..\..\objs\freetype218MT.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Release Singlethreaded|Win32"
+ OutputDirectory=".\..\..\..\objs\release_st"
+ IntermediateDirectory=".\..\..\..\objs\release_st"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ InlineFunctionExpansion="1"
+ ImproveFloatingPointConsistency="TRUE"
+ AdditionalIncludeDirectories="..\..\..\include"
+ PreprocessorDefinitions="NDEBUG;WIN32;_LIB"
+ StringPooling="TRUE"
+ RuntimeLibrary="4"
+ EnableFunctionLevelLinking="TRUE"
+ DisableLanguageExtensions="TRUE"
+ PrecompiledHeaderFile=".\..\..\..\objs\release_st/freetype.pch"
+ AssemblerListingLocation=".\..\..\..\objs\release_st/"
+ ObjectFile=".\..\..\..\objs\release_st/"
+ ProgramDataBaseFileName=".\..\..\..\objs\release_st/"
+ WarningLevel="4"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="..\..\..\objs\freetype218ST.lib"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory=".\..\..\..\objs\debug"
+ IntermediateDirectory=".\..\..\..\objs\debug"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ ImproveFloatingPointConsistency="TRUE"
+ AdditionalIncludeDirectories="..\..\..\include"
+ PreprocessorDefinitions="_DEBUG;WIN32;_LIB;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ DisableLanguageExtensions="TRUE"
+ PrecompiledHeaderFile=".\..\..\..\objs\debug/freetype.pch"
+ AssemblerListingLocation=".\..\..\..\objs\debug/"
+ ObjectFile=".\..\..\..\objs\debug/"
+ ProgramDataBaseFileName=".\..\..\..\objs\debug/"
+ WarningLevel="4"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="..\..\..\objs\freetype218_D.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug Singlethreaded|Win32"
+ OutputDirectory=".\..\..\..\objs\debug_st"
+ IntermediateDirectory=".\..\..\..\objs\debug_st"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ ImproveFloatingPointConsistency="TRUE"
+ AdditionalIncludeDirectories="..\..\..\include"
+ PreprocessorDefinitions="_DEBUG;WIN32;_LIB;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="5"
+ DisableLanguageExtensions="TRUE"
+ PrecompiledHeaderFile=".\..\..\..\objs\debug_st/freetype.pch"
+ AssemblerListingLocation=".\..\..\..\objs\debug_st/"
+ ObjectFile=".\..\..\..\objs\debug_st/"
+ ProgramDataBaseFileName=".\..\..\..\objs\debug_st/"
+ WarningLevel="4"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="..\..\..\objs\freetype218ST_D.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ <Configuration
+ Name="Debug Multithreaded|Win32"
+ OutputDirectory=".\..\..\..\objs\debug_mt"
+ IntermediateDirectory=".\..\..\..\objs\debug_mt"
+ ConfigurationType="4"
+ UseOfMFC="0"
+ ATLMinimizesCRunTimeLibraryUsage="FALSE"
+ CharacterSet="2">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ ImproveFloatingPointConsistency="TRUE"
+ AdditionalIncludeDirectories="..\..\..\include"
+ PreprocessorDefinitions="_DEBUG;WIN32;_LIB;FT_DEBUG_LEVEL_ERROR;FT_DEBUG_LEVEL_TRACE"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="1"
+ DisableLanguageExtensions="TRUE"
+ PrecompiledHeaderFile=".\..\..\..\objs\debug_mt/freetype.pch"
+ AssemblerListingLocation=".\..\..\..\objs\debug_mt/"
+ ObjectFile=".\..\..\..\objs\debug_mt/"
+ ProgramDataBaseFileName=".\..\..\..\objs\debug_mt/"
+ WarningLevel="4"
+ DebugInformationFormat="3"
+ CompileAs="0"/>
+ <Tool
+ Name="VCCustomBuildTool"/>
+ <Tool
+ Name="VCLibrarianTool"
+ OutputFile="..\..\..\objs\freetype218MT_D.lib"
+ SuppressStartupBanner="TRUE"/>
+ <Tool
+ Name="VCMIDLTool"/>
+ <Tool
+ Name="VCPostBuildEventTool"/>
+ <Tool
+ Name="VCPreBuildEventTool"/>
+ <Tool
+ Name="VCPreLinkEventTool"/>
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="_DEBUG"
+ Culture="1033"/>
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"/>
+ <Tool
+ Name="VCXMLDataGeneratorTool"/>
+ <Tool
+ Name="VCManagedWrapperGeneratorTool"/>
+ <Tool
+ Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
+ <File
+ RelativePath="..\..\..\src\autofit\autofit.c">
+ </File>
+ <File
+ RelativePath="..\..\..\src\autohint\autohint.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\bdf\bdf.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\cff\cff.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\base\ftbase.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\cache\ftcache.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\ftdebug.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ DisableLanguageExtensions="FALSE"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ DisableLanguageExtensions="FALSE"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ DisableLanguageExtensions="FALSE"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ DisableLanguageExtensions="FALSE"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ DisableLanguageExtensions="FALSE"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"
+ DisableLanguageExtensions="FALSE"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\base\ftglyph.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\gzip\ftgzip.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\lzw\ftlzw.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\base\ftinit.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\base\ftmm.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\base\ftsystem.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\pcf\pcf.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\pfr\pfr.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\psaux\psaux.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\pshinter\pshinter.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\psnames\psmodule.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\raster\raster.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\sfnt\sfnt.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\smooth\smooth.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\truetype\truetype.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\type1\type1.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\cid\type1cid.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\type42\type42.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\..\src\winfonts\winfnt.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl">
+ <File
+ RelativePath="..\..\..\include\ft2build.h">
+ </File>
+ <File
+ RelativePath="..\..\..\include\freetype\config\ftconfig.h">
+ </File>
+ <File
+ RelativePath="..\..\..\include\freetype\config\ftheader.h">
+ </File>
+ <File
+ RelativePath="..\..\..\include\freetype\config\ftmodule.h">
+ </File>
+ <File
+ RelativePath="..\..\..\include\freetype\config\ftoption.h">
+ </File>
+ <File
+ RelativePath="..\..\..\include\freetype\config\ftstdlib.h">
+ </File>
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/extras/freetype2/builds/win32/visualc/index.html b/extras/freetype2/builds/win32/visualc/index.html
index d491c5a5d..657460ac0 100644
--- a/extras/freetype2/builds/win32/visualc/index.html
+++ b/extras/freetype2/builds/win32/visualc/index.html
@@ -1,27 +1,38 @@
<html>
<header>
-<title>FreeType 2 Project Files for Visual C++</title>
+<title>
+ FreeType&nbsp;2 Project Files for Visual&nbsp;C++ and VS.NET&nbsp;2003
+</title>
</header>
<body>
-<h1>FreeType 2 Project Files for Visual C++</h1>
+<h1>
+ FreeType&nbsp;2 Project Files for Visual&nbsp;C++ and VS.NET&nbsp;2003
+</h1>
-<p>This directory contains a project file for Visual C++, named
- <tt>freetype.dsp</tt>. It will compile the following libraries
- from the FreeType 2.1.4 sources:</p>
+<p>This directory contains a project files for Visual C++, named
+<tt>freetype.dsp</tt>, and Visual Studio, called <tt>freetype.sln</tt>. It
+will compile the following libraries from the FreeType 2.1.8 sources:</p>
<ul>
<pre>
- freetype214.lib - release build; single threaded
- freetype214_D.lib - debug build; single threaded
- freetype214MT.lib - release build; multi-threaded
- freetype214MT_D.lib - debug build; multi-threaded
- </pre>
+ freetype218.lib - release build; single threaded
+ freetype218_D.lib - debug build; single threaded
+ freetype218MT.lib - release build; multi-threaded
+ freetype218MT_D.lib - debug build; multi-threaded</pre>
</ul>
-<p>Build directories are placed in the top-level "objs" directory</p>
+<p>Be sure to extract the files with the Windows (CR+LF) line endings. ZIP
+archives are already stored this way, so no further step is required. If
+you use some <tt>.tar.*z</tt> archives, be sure to configure your extracting
+tool to convert the line endings. For example, with <a
+href="http://www.winzip.com">WinZip</a>, you should activate the <it>TAR
+file smart CR/LF Conversion</it> option. Alternatively, you may consider
+using the <tt>unix2dos</tt> or <tt>u2d</tt> utilities that are floating
+around, which specifically deal with this particular problem.
-<p>Enjoy :-)</p>
+<p>Build directories are placed in the top-level <tt>objs</tt>
+directory.</p>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/extras/freetype2/builds/win32/w32-bcc.mk b/extras/freetype2/builds/win32/w32-bcc.mk
index 5c2472479..522d6b378 100644
--- a/extras/freetype2/builds/win32/w32-bcc.mk
+++ b/extras/freetype2/builds/win32/w32-bcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -13,11 +13,11 @@
# fully.
-SEP := /
include $(TOP_DIR)/builds/win32/win32-def.mk
include $(TOP_DIR)/builds/compiler/bcc.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
+
# EOF
diff --git a/extras/freetype2/builds/win32/w32-bccd.mk b/extras/freetype2/builds/win32/w32-bccd.mk
index 80e44ffa8..29519995a 100644
--- a/extras/freetype2/builds/win32/w32-bccd.mk
+++ b/extras/freetype2/builds/win32/w32-bccd.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -13,14 +13,13 @@
# fully.
-SEP := /
-
include $(TOP_DIR)/builds/win32/win32-def.mk
-BUILD := $(TOP_DIR)/builds/devel
+BUILD_DIR := $(TOP_DIR)/devel
include $(TOP_DIR)/builds/compiler/bcc-dev.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
+
# EOF
diff --git a/extras/freetype2/builds/win32/w32-dev.mk b/extras/freetype2/builds/win32/w32-dev.mk
index 17aa0aa4b..0b665dee5 100644
--- a/extras/freetype2/builds/win32/w32-dev.mk
+++ b/extras/freetype2/builds/win32/w32-dev.mk
@@ -5,7 +5,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -23,10 +23,8 @@ ifndef TOP_DIR
TOP_DIR := .
endif
-SEP := /
-
include $(TOP_DIR)/builds/win32/win32-def.mk
-BUILD := $(TOP_DIR)/builds/devel
+BUILD_DIR := $(TOP_DIR)/devel
include $(TOP_DIR)/builds/compiler/gcc-dev.mk
@@ -34,5 +32,4 @@ include $(TOP_DIR)/builds/compiler/gcc-dev.mk
include $(TOP_DIR)/builds/link_dos.mk
-
# EOF
diff --git a/extras/freetype2/builds/win32/w32-gcc.mk b/extras/freetype2/builds/win32/w32-gcc.mk
index 86f6dddaa..91d11338d 100644
--- a/extras/freetype2/builds/win32/w32-gcc.mk
+++ b/extras/freetype2/builds/win32/w32-gcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -13,10 +13,6 @@
# fully.
-# the separator must be set before including win32-def
-# as it defaults to "\" on Win32
-SEP := /
-
# include Win32-specific definitions
include $(TOP_DIR)/builds/win32/win32-def.mk
@@ -26,4 +22,5 @@ include $(TOP_DIR)/builds/compiler/gcc.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
+
# EOF
diff --git a/extras/freetype2/builds/win32/w32-icc.mk b/extras/freetype2/builds/win32/w32-icc.mk
index 8b63ce0ef..1e18202ce 100644
--- a/extras/freetype2/builds/win32/w32-icc.mk
+++ b/extras/freetype2/builds/win32/w32-icc.mk
@@ -19,4 +19,5 @@ include $(TOP_DIR)/builds/compiler/visualage.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
+
# EOF
diff --git a/extras/freetype2/builds/win32/w32-intl.mk b/extras/freetype2/builds/win32/w32-intl.mk
index 4f6a0342d..5c42ad3c4 100644
--- a/extras/freetype2/builds/win32/w32-intl.mk
+++ b/extras/freetype2/builds/win32/w32-intl.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -13,11 +13,11 @@
# fully.
-SEP := /
include $(TOP_DIR)/builds/win32/win32-def.mk
include $(TOP_DIR)/builds/compiler/intelc.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
+
# EOF
diff --git a/extras/freetype2/builds/win32/w32-mingw32.mk b/extras/freetype2/builds/win32/w32-mingw32.mk
index 236e81001..01f71b343 100644
--- a/extras/freetype2/builds/win32/w32-mingw32.mk
+++ b/extras/freetype2/builds/win32/w32-mingw32.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -13,10 +13,6 @@
# fully.
-# the separator must be set before including win32-def
-# as it defaults to "\" on Win32
-SEP := /
-
# include Win32-specific definitions
include $(TOP_DIR)/builds/win32/win32-def.mk
@@ -28,4 +24,5 @@ include $(TOP_DIR)/builds/compiler/gcc.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
+
# EOF
diff --git a/extras/freetype2/builds/win32/w32-vcc.mk b/extras/freetype2/builds/win32/w32-vcc.mk
index 459e187d1..37bfec30b 100644
--- a/extras/freetype2/builds/win32/w32-vcc.mk
+++ b/extras/freetype2/builds/win32/w32-vcc.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -13,11 +13,11 @@
# fully.
-SEP := /
include $(TOP_DIR)/builds/win32/win32-def.mk
include $(TOP_DIR)/builds/compiler/visualc.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
+
# EOF
diff --git a/extras/freetype2/builds/win32/w32-wat.mk b/extras/freetype2/builds/win32/w32-wat.mk
index ab250dc9b..accafc52f 100644
--- a/extras/freetype2/builds/win32/w32-wat.mk
+++ b/extras/freetype2/builds/win32/w32-wat.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -13,14 +13,11 @@
# fully.
-SEP := /
-ISEP := $(strip \ )
-
include $(TOP_DIR)/builds/win32/win32-def.mk
include $(TOP_DIR)/builds/compiler/watcom.mk
# include linking instructions
include $(TOP_DIR)/builds/link_dos.mk
-# EOF
+# EOF
diff --git a/extras/freetype2/builds/win32/win32-def.mk b/extras/freetype2/builds/win32/win32-def.mk
index 9b43a039b..a9db459e8 100644
--- a/extras/freetype2/builds/win32/win32-def.mk
+++ b/extras/freetype2/builds/win32/win32-def.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -13,17 +13,10 @@
# fully.
-DELETE := del
-HOSTSEP := $(strip \ )
-BUILD := $(TOP_DIR)$(SEP)builds$(SEP)win32
-PLATFORM := win32
-
-# by default, we use "\" as a separator on Win32
-# but certain compilers accept "/" as well
-#
-ifndef SEP
- SEP := $(HOSTSEP)
-endif
+DELETE := del
+SEP := $(strip \ )
+BUILD_DIR := $(TOP_DIR)/builds/win32
+PLATFORM := win32
# The directory where all object files are placed.
@@ -36,7 +29,7 @@ endif
# make -f %TOP_DIR%/Makefile
#
ifndef OBJ_DIR
- OBJ_DIR := $(TOP_DIR)$(SEP)objs
+ OBJ_DIR := $(TOP_DIR)/objs
endif
@@ -58,4 +51,5 @@ LIBRARY := $(PROJECT)
#
NO_OUTPUT = 2> nul
+
# EOF
diff --git a/extras/freetype2/configure b/extras/freetype2/configure
index 1198380df..8621c0e5a 100755
--- a/extras/freetype2/configure
+++ b/extras/freetype2/configure
@@ -5,7 +5,6 @@
# This should re-generate the following files:
#
# config.mk
-# Jamfile
# install
#
@@ -14,9 +13,14 @@ if test "x$GNUMAKE" = x; then
fi
if test -z "`$GNUMAKE -v 2>/dev/null | grep GNU`"; then
- echo "Sorry, GNU make is required to build FreeType2." >&2
- echo "Please try \`GNUMAKE=<GNU make command name> $0'." >&2
- exit 1
+ if test -z "`$GNUMAKE -v 2>/dev/null | grep makepp`"; then
+ echo "GNU make (>= 3.79.1) or makepp (>= 1.19) is required to build FreeType2." >&2
+ echo "Please try" >&2
+ echo " \`GNUMAKE=<GNU make command name> $0'." >&2
+ echo "or >&2"
+ echo " \`GNUMAKE=\"makepp --norc-substitution\" $0'." >&2
+ exit 1
+ fi
fi
# Uh, oh. This is taken from autoconf. They know what they are doing...
@@ -46,11 +50,13 @@ abs_ft2_dir=`cd "$ft2_dir" && pwd`
# build a dummy Makefile if we are not building in the source tree
if test "$abs_curr_dir" != "$abs_ft2_dir"; then
- echo "OBJ_DIR=$abs_curr_dir" > Makefile
- echo "TOP_DIR=$abs_ft2_dir" >> Makefile
- echo "OBJ_BUILD=$abs_curr_dir" >> Makefile
- echo "LIBTOOL=$abs_curr_dir/libtool" >> Makefile
- echo "include $abs_ft2_dir/Makefile" >> Makefile
+ mkdir reference
+ echo "TOP_DIR=$abs_ft2_dir" > Makefile
+ echo "OBJ_DIR=$abs_curr_dir" >> Makefile
+ echo "OBJ_BUILD=$abs_curr_dir" >> Makefile
+ echo "DOC_DIR=$abs_curr_dir/reference" >> Makefile
+ echo "LIBTOOL=$abs_curr_dir/libtool" >> Makefile
+ echo "include $abs_ft2_dir/Makefile" >> Makefile
fi
# call make
diff --git a/extras/freetype2/devel/ft2build.h b/extras/freetype2/devel/ft2build.h
index da8b65555..242ac1e85 100644
--- a/extras/freetype2/devel/ft2build.h
+++ b/extras/freetype2/devel/ft2build.h
@@ -5,7 +5,7 @@
/* FreeType 2 build and setup macros. */
/* (Generic version) */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,24 +18,24 @@
/*
- * this is a development version of <ft2build.h> that is used
- * to build the library in debug mode. Its only difference with
- * the reference is that is forces the use of the local "ftoption.h"
- * which contains different settings for all configuration macros
+ * This is a development version of <ft2build.h> that is used
+ * to build the library in debug mode. Its only difference with
+ * the reference is that it forces the use of the local "ftoption.h"
+ * which contains different settings for all configuration macros.
*
- * to use it, you must define the environment variable FT2_BUILD_INCLUDE
+ * To use it, you must define the environment variable FT2_BUILD_INCLUDE
* to point to the directory containing these two files ("ft2build.h" and
- * "ftoption.h"), then invoke Jam as usual
+ * "ftoption.h"), then invoke Jam as usual.
*/
-#ifndef __FT2_BUILD_GENERIC_H__
-#define __FT2_BUILD_GENERIC_H__
+#ifndef __FT2_BUILD_DEVEL_H__
+#define __FT2_BUILD_DEVEL_H__
#define FT_CONFIG_OPTIONS_H <ftoption.h>
#include <freetype/config/ftheader.h>
-#endif /* __FT2_BUILD_GENERIC_H__ */
+#endif /* __FT2_BUILD_DEVEL_H__ */
/* END */
diff --git a/extras/freetype2/devel/ftoption.h b/extras/freetype2/devel/ftoption.h
index df14c5a64..d8f699f27 100644
--- a/extras/freetype2/devel/ftoption.h
+++ b/extras/freetype2/devel/ftoption.h
@@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,11 +22,6 @@
#include <ft2build.h>
- /*
- * this is a special developer version of "ftoption.h", it is used
- * to define all debugging options, as well as the TrueType bytecode
- * interpreter
- */
FT_BEGIN_HEADER
@@ -86,32 +81,46 @@ FT_BEGIN_HEADER
/* by FreeType to speed up some computations. However, this will create */
/* some problems when compiling the library in strict ANSI mode. */
/* */
- /* For this reason, the use of 64-bit ints is normally disabled when */
+ /* For this reason, the use of 64-bit integers is normally disabled when */
/* the __STDC__ macro is defined. You can however disable this by */
- /* defining here the macro FT_CONFIG_OPTION_FORCE_INT64. */
+ /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */
/* */
- /* For most compilers, this will only create compilation warnings */
- /* when building the library. */
+ /* For most compilers, this will only create compilation warnings when */
+ /* building the library. */
/* */
/* ObNote: The compiler-specific 64-bit integers are detected in the */
- /* file "ftconfig.h" either statically, or through Autoconf */
- /* on platforms that support it. */
+ /* file "ftconfig.h" either statically or through the */
+ /* `configure' script on supported platforms. */
/* */
#undef FT_CONFIG_OPTION_FORCE_INT64
/*************************************************************************/
/* */
+ /* LZW-compressed file support. */
+ /* */
+ /* FreeType now handles font files that have been compressed with the */
+ /* 'compress' program. This is mostly used to parse many of the PCF */
+ /* files that come with various X11 distributions. The implementation */
+ /* uses NetBSD's `zopen' to partially uncompress the file on the fly */
+ /* (see src/lzw/ftgzip.c). */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+#define FT_CONFIG_OPTION_USE_LZW
+
+
+ /*************************************************************************/
+ /* */
/* Gzip-compressed file support. */
/* */
/* FreeType now handles font files that have been compressed with the */
- /* 'gzip' program. This is mostly used to parse many of the PCF files */
- /* that come with XFree86. The implementation uses 'zlib' to */
- /* partially uncompress the file on the fly (see src/base/ftgzip.c). */
+ /* 'gzip' program. This is mostly used to parse many of the PCF files */
+ /* that come with XFree86. The implementation uses `zlib' to */
+ /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */
/* */
- /* Define this macro if you want to enable this "feature". Note that */
- /* this will however force you to link the zlib to any program that */
- /* also uses FreeType. */
+ /* Define this macro if you want to enable this `feature'. See also */
+ /* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */
/* */
#define FT_CONFIG_OPTION_USE_ZLIB
@@ -121,18 +130,18 @@ FT_BEGIN_HEADER
/* ZLib library selection */
/* */
/* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */
- /* It allows FreeType's "ftgzip" component to link to the system's */
- /* installation of the ZLib library. This is useful on systems like */
+ /* It allows FreeType's `ftgzip' component to link to the system's */
+ /* installation of the ZLib library. This is useful on systems like */
/* Unix or VMS where it generally is already available. */
/* */
/* If you let it undefined, the component will use its own copy */
- /* of the zlib sources instead. These have been modified to be */
+ /* of the zlib sources instead. These have been modified to be */
/* included directly within the component and *not* export external */
- /* function names. This allows you to link any program with FreeType */
+ /* function names. This allows you to link any program with FreeType */
/* _and_ ZLib without linking conflicts. */
/* */
- /* do not #undef this macro here, since the build system might */
- /* define for certain configurations */
+ /* Do not #undef this macro here since the build system might define */
+ /* it for certain configurations only. */
/* */
/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
@@ -172,6 +181,9 @@ FT_BEGIN_HEADER
/* will be later automatically defined as `extern return_type' to */
/* allow normal compilation. */
/* */
+ /* Do not #undef these macros here since the build system might define */
+ /* them for certain configurations only. */
+ /* */
/* #define FT_EXPORT(x) extern x */
/* #define FT_EXPORT_DEF(x) x */
@@ -221,12 +233,48 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* Support for Mac fonts */
+ /* */
+ /* Define this macro if you want support for outline fonts in Mac */
+ /* format (mac dfont, mac resource, macbinary containing a mac */
+ /* resource) on non-Mac platforms. */
+ /* */
+ /* Note that the `FOND' resource isn't checked. */
+ /* */
+#define FT_CONFIG_OPTION_MAC_FONTS
+
+
+ /*************************************************************************/
+ /* */
+ /* Guessing methods to access embedded resource forks */
+ /* */
+ /* Enable extra Mac fonts support on non-Mac platforms (e.g. */
+ /* GNU/Linux). */
+ /* */
+ /* Resource forks which include fonts data are stored sometimes in */
+ /* locations which users or developers don't expected. In some cases, */
+ /* resource forks start with some offset from the head of a file. In */
+ /* other cases, the actual resource fork is stored in file different */
+ /* from what the user specifies. If this option is activated, */
+ /* FreeType tries to guess whether such offsets or different file */
+ /* names must be used. */
+ /* */
+ /* Note that normal, direct access of resource forks is controlled via */
+ /* the FT_CONFIG_OPTION_MAC_FONTS option. */
+ /* */
+#ifdef FT_CONFIG_OPTION_MAC_FONTS
+#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
+#endif
+
+
+ /*************************************************************************/
+ /* */
/* Allow the use of FT_Incremental_Interface to load typefaces that */
/* contain no glyph data, but supply it via a callback function. */
/* This allows FreeType to be used with the PostScript language, using */
/* the GhostScript interpreter. */
/* */
-/* #define FT_CONFIG_OPTION_INCREMENTAL */
+/* #define FT_CONFIG_OPTION_INCREMENTAL */
/*************************************************************************/
@@ -234,7 +282,7 @@ FT_BEGIN_HEADER
/* The size in bytes of the render pool used by the scan-line converter */
/* to do all of its work. */
/* */
- /* This must be greater than 4kByte. */
+ /* This must be greater than 4KByte. */
/* */
#define FT_RENDER_POOL_SIZE 16384L
@@ -263,8 +311,11 @@ FT_BEGIN_HEADER
/* */
/* Don't define any of these macros to compile in `release' mode! */
/* */
-#define FT_DEBUG_LEVEL_ERROR
-#define FT_DEBUG_LEVEL_TRACE
+ /* Do not #undef these macros here since the build system might define */
+ /* them for certain configurations only. */
+ /* */
+#define FT_DEBUG_LEVEL_ERROR
+#define FT_DEBUG_LEVEL_TRACE
/*************************************************************************/
@@ -277,10 +328,12 @@ FT_BEGIN_HEADER
/* should define FT_DEBUG_MEMORY here. */
/* */
/* Note that the memory debugger is only activated at runtime when */
- /* when the _environment_ variable "FT_DEBUG_MEMORY" is also defined! */
+ /* when the _environment_ variable "FT2_DEBUG_MEMORY" is defined also! */
/* */
-#define FT_DEBUG_MEMORY
-
+ /* Do not #undef this macro here since the build system might define */
+ /* it for certain configurations only. */
+ /* */
+#define FT_DEBUG_MEMORY
/*************************************************************************/
@@ -380,10 +433,22 @@ FT_BEGIN_HEADER
/* By undefining this, you will only compile the code necessary to load */
/* TrueType glyphs without hinting. */
/* */
- /* do not #undef this macro here, since the build system might */
- /* define for certain configurations */
+ /* Do not #undef this macro here, since the build system might */
+ /* define it for certain configurations only. */
+ /* */
+#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+
+
+ /*************************************************************************/
+ /* */
+ /* Define TT_CONFIG_OPTION_UNPATENTED_HINTING (in addition to */
+ /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER) to compile the unpatented */
+ /* work-around hinting system. Note that for the moment, the algorithm */
+ /* is only used when selected at runtime through the parameter tag */
+ /* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook */
+ /* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally actived */
/* */
-#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+#define TT_CONFIG_OPTION_UNPATENTED_HINTING
/*************************************************************************/
@@ -475,21 +540,21 @@ FT_BEGIN_HEADER
/* */
/*
- * the FT_CONFIG_OPTION_CHESTER_XXXX macros are used to toggle some recent
- * improvements to the auto-hinter contributed by David Chester. They will
- * most likely disappear completely in the next release. For now, you should
- * always keep them defined
+ * The FT_CONFIG_OPTION_CHESTER_XXXX macros are used to toggle some recent
+ * improvements to the auto-hinter contributed by David Chester. They will
+ * most likely disappear completely in the next release. For now, you
+ * should always keep them defined.
*
*/
#define FT_CONFIG_OPTION_CHESTER_HINTS
#ifdef FT_CONFIG_OPTION_CHESTER_HINTS
-# define FT_CONFIG_CHESTER_SMALL_F
-# define FT_CONFIG_CHESTER_ASCENDER
-# define FT_CONFIG_CHESTER_SERIF
-# define FT_CONFIG_CHESTER_STEM
-# define FT_CONFIG_CHESTER_BLUE_SCALE
+#define FT_CONFIG_CHESTER_SMALL_F
+#define FT_CONFIG_CHESTER_ASCENDER
+#define FT_CONFIG_CHESTER_SERIF
+#define FT_CONFIG_CHESTER_STEM
+#define FT_CONFIG_CHESTER_BLUE_SCALE
#endif /* FT_CONFIG_OPTION_CHESTER_HINTS */
diff --git a/extras/freetype2/docs/CHANGES b/extras/freetype2/docs/CHANGES
index 0a8e3f8c0..2bb57b559 100644
--- a/extras/freetype2/docs/CHANGES
+++ b/extras/freetype2/docs/CHANGES
@@ -1,203 +1,568 @@
-LATEST CHANGES BETWEEN 2.1.4 and 2.1.3
+
+LATEST CHANGES BETWEEN 2.1.8 and 2.1.7
I. IMPORTANT BUG FIXES
- - updated to newest libtool version, fixes build problems on various
- platforms.
+ - The native TrueType hinter contained some bugs which prevented
+ some fonts to be rendered correctly, most notably Legendum.otf.
+
+ - The PostScript hinter now produces improved results.
+
+ - The linear advance width and height values were incorrectly
+ rounded, making them virtually unusable if not loaded with
+ FT_LOAD_LINEAR_DESIGN.
+
+ - Indexing CID-keyed CFF fonts is now working: The glyph index is
+ correctly treated as a CID, similar to FreeType's CID driver
+ module. Note that CID CMap support is still missing.
+
+ - The FT_FACE_FLAGS_GLYPH_NAMES flag is now set correctly for all
+ font formats.
+
+ - Some subsetted Type 1 fonts weren't parsed correctly. This bug
+ has been introduced in 2.1.7. In summary, the Type 1 parser has
+ become more robust.
+
+ - Non-decimal numbers weren't parsed correctly in PS fonts.
+
+ - The WinFNT driver now correctly reports FT_ENCODING_NONE for all
+ but one encoding. Use the new FT_WinFNT_ID_XXX values together
+ with FT_Get_WinFNT_Header() to get the WinFNT charset ID.
+
+ - The descender metrics (face->size->metrics.descender) for WinFNT
+ bitmap fonts had the wrong sign.
+
+ - The (emulated) `seac' support for CFF fonts was broken.
+
+ - The `flex' operator didn't work for CFF fonts.
+
+ - PS glyphs which use the `hintmask' operator haven't been
+ rendered correctly in some cases.
+
+ - Metrics for BDF and PCF bitmap font formats have been fixed.
+
+ - Autohinting is now disabled for glyphs which are vertically
+ distorted or mirrored (using a transformation matrix). This
+ fixes a bug which produced zero-height glyphs.
+
+ - The `freetype-config' script now handles --prefix and
+ --exec-prefix correctly; it also returns the proper --rpath (or
+ -R) value if FreeType has been built as a shared library.
+
+
+ II. IMPORTANT CHANGES
+
+ - Both PCF and BDF drivers now handle the SETWIDTH_NAME and
+ ADD_STYLE_NAME properties. Values are appended to
+ face->style_name; example: `Bold SemiCondensed'.
+
+ - The PCF driver now handles bitmap fonts compressed with the LZW
+ algorithm (extension .pcf.Z, compressed with `compress').
+
+ - A new API function `FT_Get_CMap_Language_ID' (declared in
+ `tttables.h') is available to get the language ID of a
+ TrueType/SFNT cmap.
+
+ - The hexadecimal format of data after the `StartData' command in
+ CID-keyed Type 1 fonts is now supported. While this can't occur
+ in file-based fonts, it can happen in document-embedded
+ resources of PostScript documents.
+
+ - Embedded bitmaps in SFNT-based CFF fonts are now supported.
+
+ - A simple API is now available to control FreeType's tracing
+ mechanism if compiled with FT_DEBUG_LEVEL_TRACE. See the file
+ `ftdebug.h' for more details.
+
+ - YAMATO Masatake contributed improved handling of MacOS resource
+ forks on non-MacOS platforms (for example, Linux can mount MacOS
+ file systems).
+
+ - Support for MacOS has been improved; there is now a new function
+ `FT_New_Face_From_FSSpec' similar to `FT_New_Face' except that
+ it accepts an FSSpec instead of a path.
+
+ - The cache sub-system has been rewritten.
+
+ - There is now support for deinstallation of faces.
+
+ - A new API function `FTC_Manager_RemoveFaceID' has been added
+ to delete all `idle' nodes that correspond to a given
+ FTC_FaceID. All `locked' nodes (i.e., those with a reference
+ count > 0), will be modified to prevent them from appearing in
+ further lookups (they will be cleaned normally when their
+ reference count reaches 0).
+
+ - There is now support for point scaling (i.e., providing
+ character sizes in points + dpis, instead of pixels).
+
+ - Three abstract cache classes are now available:
+
+ FTC_GCache: Used to store one glyph item per cache node,
+ with the ability to group common attributes into
+ `families'. This replaces the old
+ FTC_GlyphCache class.
+
+ FTC_ICache: Used to store one FT_Glyph per cache node. This
+ extends FTC_GCache. Family definition, family
+ comparison, and glyph loading are however left
+ to sub-classes.
+
+ FTC_SCache: Used to store up to 16 small bitmaps per cache
+ node. This extends FTC_GCache. Family
+ definition, family comparison and glyph loading
+ are however left to sub-classes.
+
+ - The file `src/cache/ftcbasic.c' implements:
+
+ FTC_ImageCache: Extends FTC_ICache; implements family
+ definitions and glyph loading similar to the
+ old API.
+
+ FTC_SBitCache: Extends FTC_SCache, implements family
+ definitions and glyph loading similar to the
+ old API
+
+ Client applications should be able to extend FTC_GCache,
+ FTC_ICache, or FTC_SCache much more easily (i.e., less code to
+ write, and less callbacks). For example, one could envision
+ caches that are capable of storing transformed (obliqued),
+ stroked, emboldened, or colored glyph images. Use
+ `ftcbasic.c' as an example.
+
+ - All public APIs are now in `include/freetype/ftcache.h', (to
+ be accessed as `FT_CACHE_H'). The contents of
+ `include/freetype/cache/' is only needed by applications that
+ wish to implement their own caches.
+
+ - There were some major performance improvements through the use
+ of various programming tricks. Cache hits are up to 70%
+ faster than in the old code.
+
+ - The FTC_CMapCache has been simplied. Charmaps can only be
+ accessed by index right now. There is also a new API named
+ `FT_Charmap_GetIndex' for this purpose.
+
+ - The demo programs have been updated to the new code. The
+ previous versions will not work with the current one.
+
+ - Using an invalid face index in FT_Open_Face and friends now
+ causes an error even if the font contains a single face only.
+
+
+ III. MISCELLANEOUS
+
+ - Wolfgang Domrse contributed support files for building FreeType
+ on the Atari using the PureC compiler. Note that the Atari is a
+ 16bit platform.
+
+ - Vitaliy Pasternak contributed project files for VS.NET 2003.
+
+
+======================================================================
+
+LATEST CHANGES BETWEEN 2.1.7 and 2.1.6
+
+ I. IMPORTANT BUG FIXES
+
+ - Updated to newest libtool version, fixing build problems on
+ various platforms.
+
+ - On Unix platforms, `make install' didn't copy the correct
+ `ftconfig.h' file.
+
+ Note that version 2.1.7 contains the same library C source code as
+ version 2.1.6.
+
+
+======================================================================
+
+LATEST CHANGES BETWEEN 2.1.6 and 2.1.5
+
+ I. IMPORTANT BUG FIXES
+
+ - The PFR font driver didn't load kerning tables correctly, and
+ the functions in FT_PFR_H didn't work at all.
+
+ - Type 1 font files in binary format (PFB) with an end-of-file
+ indicator weren't accepted by the FreeType engine.
+
+ - Fonts which contain /PaintType and /StrokeWidth no longer cause
+ a segfault. This bug has been introduced in version 2.1.5.
+
+ - Fonts loaded with FT_LOAD_RENDER no longer cause strange
+ results. This bug has been introduced in version 2.1.5.
+
+ - Some Windows (bitmap) FNT/FON files couldn't be handled
+ correctly.
+
+
+ II. IMPORTANT CHANGES
+
+ - The internal module API has been heavily changed in favor of
+ massive simplifications within the font engine. This also means
+ that authors of third-party modules must adapt their code to the
+ new scheme.
+
+ NOTE: THE NEW SCHEME IS NOT COMPLETED YET. PLEASE WAIT UNTIL A
+ FINAL ANNOUNCEMENT!
+
+ - The PostScript parser has been enhanced to handle comments and
+ strings correctly. Additionally, more syntax forms are
+ recognized.
+
+ - Added the optional unpatented hinting system for TrueType. It
+ allows typefaces which need hinting to produce correct glyph
+ forms (e.g., Chinese typefaces from Dynalab) to work acceptably
+ without infringing Apple patents. This system is compiled only
+ if TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING is defined in
+ ftoption.h (activated by default).
+
+
+ III. MISCELLANEOUS
+
+ - There is now a guard in the public header files to protect
+ against inclusion of freetype.h from FreeType 1.
+
+ - Direct inclusion of freetype.h and other public header files no
+ longer works. You have to use the documented scheme
- - a fix in the Gzip stream reader, it couldn't read certain .gz files
- properly due to a small typo. In certain cases, FreeType could also
- loop endlessly when trying to load tiny gzipped files.
+ #include <ft2build.h>
+ #include FT_FREETYPE_H
+
+ to load freetype.h with a symbolic name. This protects against
+ renaming of public header files (which shouldn't happen but
+ actually has, avoiding two public header files with the same
+ name).
+
+
+======================================================================
+
+LATEST CHANGES BETWEEN 2.1.5 and 2.1.4
+
+ I. IMPORTANT BUG FIXES
+
+ - Parsing the /CIDFontName field now removes the leading slash to
+ be in sync with other font drivers.
+
+ - gzip support was buggy. Some fonts could not be read.
- - the configure script now tries to use the system-wide zlib when
- it finds one (instead of the copy found in src/gzip). And
- "freetype-config" has been updated to return relevant flags in this
- case when invoked with "--libs" (e.g. "-lzlib")
+ - Fonts which have nested subglyphs more than one level deep no
+ longer cause a segfault.
- - certain fonts couldn't be loaded by 2.1.3 because they lacked a
- Unicode charmap (e.g. SYMBOL.TTF). FreeType erroneously rejected
- them.
+ - Creation of synthetic cmaps for fonts in CFF format was broken
+ partially.
- - the CFF loader was modified to accept fonts which only
- contain a subset of their reference charset. This prevented the
- correct use of PDF-embedded fonts.
+ - Numeric font dictionary entries for synthetic fonts are no
+ longer overwritten.
- - the logic to detect Unicode charmaps has been modified. this is required
- to support fonts which include both 16-bit and 32-bit charmaps (like
- very recent asian ones) using the new 10 and 12 SFNT formats.
+ - The font matrix wasn't applied to the advance width for Type1,
+ CID, and CFF fonts. This caused problems when loading certain
+ synthetic Type 1 fonts like `Helvetica Narrow'.
- - the TrueType loader now limits the depth of composite glyphs. This is
- necessary to prevent broken fonts to break the engine by blowing the
- stack with recursive glyph definitions.
+ - The test for the charset registry in BDF and PCF fonts is now
+ case-insensitive.
- - the CMap cache is now capable of managing UCS-4 character codes that
- are mapped through extended charmaps in recent TrueType/OpenType fonts
+ - FT_Vector_Rotate sometimes returned strange values due to
+ rounding errors.
- - the cache sub-system now properly manages out-of-memory conditions,
- instead of blindly reporting them to the caller. This means that it
- will try to empty the cache before restarting its allocations to see
- if that can help.
+ - The PCF driver now returns the correct number of glyphs
+ (including an artificial `notdef' glyph at index 0).
- - the PFR driver didn't return the list of available embedded bitmaps
+ - FreeType now supports buggy CMaps which are contained in many
+ CJK fonts from Dynalab.
+
+ - Opening an invalid font on a Mac caused a segfault due to
+ double-freeing memory.
+
+ - BDF fonts with more than 32768 glyphs weren't supported
properly.
+
+ II. IMPORTANT CHANGES
+
+ - Accessing bitmap font formats has been synchronized. To do that
+ the FT_Bitmap_Size structure has been extended to contain new
+ fields `size', `x_ppem', and `y_ppem'.
+
+ - The FNT driver now returns multiple faces, not multiple strikes.
+
+ - The `psnames' module has been updated to the Adobe Glyph List
+ version 2.0.
+
+ - The `psnames' module now understands `uXXXX[X[X]]' glyph names.
+
+ - The algorithm for guessing the font style has been improved.
+
+ - For fonts in SFNT format, root->height is no longer increased if
+ the line gap is zero. There exist fonts (containing e.g. form
+ drawing characters) which intentionally have a zero line gap
+ value.
+
+ - ft_glyph_bbox_xxx flags are now deprecated in favour of
+ FT_GLYPH_BBOX_XXX.
+
+ - ft_module_xxx flags are now deprecated in favour of
+ FT_MODULE_XXX.
+
+ - FT_ENCODING_MS_{SJIS,GB2312,BIG5,WANSUNG,JOHAB} are now
+ deprecated in favour of
+ FT_ENCODING_{SJIS,GB2312,GIB5,WANSONG,JOHAB} -- those encodings
+ are not specific to Microsoft.
+
+
+ III. MISCELLANEOUS
+
+ - The autohinter has been further improved; for example, `m'
+ glyphs now retain its vertical symmetry.
+
+ - Partial support of Mac fonts on non-Mac platforms.
+
+ - `make refdoc' (after first `make') builds the HTML
+ documentation. You need Python for this.
+
+ - The make build system should now work more reliably on DOS-like
+ platforms.
+
+ - Support for EMX gcc and Watson C/C++ compilers on MS-DOS has
+ been added.
+
+ - Better VMS build support.
+
+ - Support for the pkg-config package by providing a `freetype.pc'
+ file.
+
+ - New configure option --with-old-mac-fonts for Darwin.
+
+ - Some source files have been renamed (mainly to fit into the 8.3
+ naming scheme).
+
+
+======================================================================
+
+LATEST CHANGES BETWEEN 2.1.4 and 2.1.3
+
+ I. IMPORTANT BUG FIXES
+
+ - Updated to newest libtool version, fixing build problems on
+ various platforms.
+
+ - A fix in the Gzip stream reader: It couldn't read certain .gz
+ files properly due to a small typo. In certain cases, FreeType
+ could also loop endlessly when trying to load tiny gzipped
+ files.
+
+ - The configure script now tries to use the system-wide zlib when
+ it finds one (instead of the copy found in src/gzip). And
+ "freetype-config" has been updated to return relevant flags in
+ this case when invoked with "--libs" (e.g. "-lzlib").
+
+ - Certain fonts couldn't be loaded by 2.1.3 because they lacked a
+ Unicode charmap (e.g. SYMBOL.TTF). FreeType erroneously
+ rejected them.
+
+ - The CFF loader was modified to accept fonts which only contain a
+ subset of their reference charset. This prevented the correct
+ use of PDF-embedded fonts.
+
+ - The logic to detect Unicode charmaps has been modified. This is
+ required to support fonts which include both 16-bit and 32-bit
+ charmaps (like very recent asian ones) using the new 10 and 12
+ SFNT formats.
+
+ - The TrueType loader now limits the depth of composite glyphs.
+ This is necessary to prevent broken fonts to break the engine by
+ blowing the stack with recursive glyph definitions.
+
+ - The CMap cache is now capable of managing UCS-4 character codes
+ that are mapped through extended charmaps in recent
+ TrueType/OpenType fonts.
+
+ - The cache sub-system now properly manages out-of-memory
+ conditions instead of blindly reporting them to the caller.
+ This means that it will try to empty the cache before restarting
+ its allocations to see if that can help.
+
+ - The PFR driver didn't return the list of available embedded
+ bitmaps properly.
+
+ - There was a nasty memory leak when using embedded bitmaps in
+ certain font formats.
+
+
II. IMPORTANT CHANGES
- - David Chester contributed some enhancements to the auto-hinter that
- significantly increase the quality of its output. The Postscript hinter
- was also improved in several ways..
+ - David Chester contributed some enhancements to the auto-hinter
+ that significantly increase the quality of its output. The
+ Postscript hinter was also improved in several ways.
- - the FT_RENDER_MODE_LIGHT render mode was implemented
+ - The FT_RENDER_MODE_LIGHT render mode was implemented.
- - a new API, called FT_Get_BDF_Property has been added to FT_BDF_H to
- retrieve BDF properties from BDF _and_ PCF font files. THIS IS STILL
- EXPERIMENTAL, since it hasn't been properly tested yet.
+ - A new API function called `FT_Get_BDF_Property' has been added
+ to FT_BDF_H to retrieve BDF properties from BDF _and_ PCF font
+ files. THIS IS STILL EXPERIMENTAL, since it hasn't been
+ properly tested yet.
- - a Windows FNT specific API has been added, mostly to access font
- headers. This is used by Wine
+ - A Windows FNT specific API has been added, mostly to access font
+ headers. This is used by Wine.
- - TrueType tables without a "hmtx" table are now tolerated when an
- incremental interface is used. This happens for certain Type42 fonts
- passed from Ghostscript to FreeType.
+ - TrueType tables without an "hmtx" table are now tolerated when
+ an incremental interface is used. This happens for certain
+ Type42 fonts passed from Ghostscript to FreeType.
+
+ - The PFR font driver is now capable of returning the font family
+ and style names when they are available (instead of the sole
+ "FontID"). This is performed by parsing an *undocumented*
+ portion of the font file!
- - the PFR font driver is now capable of returning the font family and
- style names when they're available (instead of the sole "FontID"). This
- is performed by parsing an *undocumented* portion of the font file !!
III. MISCELLANEOUS
- - the path stroker in FT_STROKER_H has entered beta stage. It now works
- very well, but it's interface might change a bit in the future. More
- on this in later releases
+ - The path stroker in FT_STROKER_H has entered beta stage. It now
+ works very well, but its interface might change a bit in the
+ future. More on this in later releases.
+
+ - The documentation for FT_Size_Metrics didn't appear properly in
+ the API reference.
- - the documentation for FT_Size_Metrics didn't appear properly in the
- API reference
+ - The file docs/VERSION.DLL has been updated to explain versioning
+ with FreeType (i.e., comparing release/libtool/so numbers, and
+ how to use them in autoconf scripts).
- - the file docs/VERSION.DLL has been updated to explain versioning
- with FreeType (i.e. comparing release/libtool/so numbers, and how
- to use them in Autoconf scripts)
+ - The installation documentation has been seriously revamped.
+ Everything is now in the "docs" directory.
- - the installation documentation has been seriously revamped. Everything
- is now in the "docs" directory.
-==============================================================================
+======================================================================
+
LATEST CHANGES BETWEEN 2.1.3 and 2.1.2
I. IMPORTANT BUG FIXES
- - FT_Vector_Transform had been incorrectly modified in 2.1.2, resulting
- in incorrect transformations being applied (for example, rotations
- were processed in opposite angles).
+ - FT_Vector_Transform had been incorrectly modified in 2.1.2,
+ resulting in incorrect transformations being applied (for
+ example, rotations were processed in opposite angles).
- - The format 8 and 12 TrueType charmap enumeration routines have been
- fixed (FT_Get_Next_Char returned invalid values).
+ - The format 8 and 12 TrueType charmap enumeration routines have
+ been fixed (FT_Get_Next_Char returned invalid values).
- - The PFR font driver returned incorrect advance widths if the outline
- and metrics resolution defined in the font file were different.
+ - The PFR font driver returned incorrect advance widths if the
+ outline and metrics resolution defined in the font file were
+ different.
- - FT_Glyph_To_Bitmap now returns successfully when called with an
+ - FT_Glyph_To_Bitmap now returns successfully when called with an
FT_BitmapGlyph argument (it previously returned an error).
- - A bug in the Type 1 loader that prevented valid font bounding boxes to
- be loaded from multiple master fonts.
+ - A bug in the Type 1 loader that prevented valid font bounding
+ boxes to be loaded from multiple master fonts.
- - The SFNT validation code has been rewritten. FreeType can now load
- "broken" fonts that were usable on Windows, but not with previous
- versions of the library.
+ - The SFNT validation code has been rewritten. FreeType can now
+ load "broken" fonts that were usable on Windows, but not with
+ previous versions of the library.
- The computation of bearings in the BDF driver has been fixed.
- - The Postscript hinter crashed when trying to hint certain glyphs (more
- precisely, when trying to apply hints to an empty glyph outline).
+ - The Postscript hinter crashed when trying to hint certain glyphs
+ (more precisely, when trying to apply hints to an empty glyph
+ outline).
+
+ - The TrueType glyph loader now supports composites in "Apple
+ format" (they differ slightly from Microsoft/OpenType ones in
+ the way transformation offsets are computed).
+
+ - FreeType was very slow at opening certain asian CID/CFF fonts,
+ due to fixed increment in dynamic array re-allocations. This
+ has been changed to exponential behaviour to get acceptable
+ performance.
- - The TrueType glyph loader now supports composites in "Apple format"
- (they differ slightly from Microsoft/OpenType ones in the way transform
- offsets are computed).
- - FreeType was very slow at opening certain asian CID/CFF fonts, due
- to fixed increment in dynamic array re-allocations. This has been
- changed to exponential behaviour to get acceptable performance
II. IMPORTANT CHANGES
- - the PCF driver now supports gzip-compressed font files natively. This
- means that you'll be able to use all these bitmap fonts that come
- with XFree86 with FreeType (and libXft/libXft2, by extension).
+ - The PCF driver now supports gzip-compressed font files natively.
+ This means that you will be able to use all these bitmap fonts
+ that come with XFree86 with FreeType (and libXft/libXft2, by
+ extension).
- - The automatic and postscript hinters have both been updated. This
- results in a relatively important increase of rendering quality since
- many nasty defaults have been supressed. Please visit the web page:
+ - The automatic and postscript hinters have both been updated.
+ This results in a relatively important increase of rendering
+ quality since many nasty defaults have been supressed. Please
+ visit the web page:
http://www.freetype.org/hinting/smooth-hinting.html
for additional details on this topic.
- - The "load_flags" parameter of FT_Load_Glyph is now an FT_Int32
- (instead of just being an FT_Int). This breaks source and binary
- compatibility for 16bit systems only, while retaining both of them for
- 32 and 64 bit ones.
+ - The "load_flags" parameter of FT_Load_Glyph is now an FT_Int32
+ (instead of just being an FT_Int). This breaks source and
+ binary compatibility for 16bit systems only, while retaining
+ both of them for 32 and 64 bit ones.
Some new flags have been added consequently:
FT_LOAD_NO_AUTOHINT :: Disable the use of the auto-hinter
(but not native format hinters).
- FT_LOAD_TARGET_NORMAL :: Hint and render for normal anti-aliased
- displays.
+ FT_LOAD_TARGET_NORMAL :: Hint and render for normal
+ anti-aliased displays.
FT_LOAD_TARGET_MONO :: Hint and render for 1-bit displays.
- FT_LOAD_TARGET_LCD :: Hint and render for horizontal RGB or BGR
- sub-pixel displays (like LCD screens).
- THIS IS STILL EXPERIMENTAL!
+ FT_LOAD_TARGET_LCD :: Hint and render for horizontal RGB or
+ BGR sub-pixel displays (like LCD
+ screens). THIS IS STILL
+ EXPERIMENTAL!
- FT_LOAD_TARGET_LCD_V :: Same as FT_LOAD_TARGET_LCD, for vertical
- sub-pixel displays (like rotated LCD
- screens). THIS IS STILL EXPERIMENTAL!
+ FT_LOAD_TARGET_LCD_V :: Same as FT_LOAD_TARGET_LCD, for
+ vertical sub-pixel displays (like
+ rotated LCD screens). THIS IS STILL
+ EXPERIMENTAL!
- FT_LOAD_MONOCHROME is still supported, but only affects rendering, not
- the hinting.
+ FT_LOAD_MONOCHROME is still supported, but only affects
+ rendering, not the hinting.
- Note that the 'ftview' demo program available in the 'ft2demos' package
- has been updated to support LCD-optimized display on non-paletted
- displays (under Win32 and X11)
+ Note that the `ftview' demo program available in the `ft2demos'
+ package has been updated to support LCD-optimized display on
+ non-paletted displays (under Win32 and X11).
- - The PFR driver now supports embedded bitmaps (all formats supported),
- and returns correct kerning metrics for all glyphs
+ - The PFR driver now supports embedded bitmaps (all formats
+ supported), and returns correct kerning metrics for all glyphs.
- - The TrueType charmap loader now supports certain "broken" fonts that
- load under Windows without problems.
+ - The TrueType charmap loader now supports certain `broken' fonts
+ that load under Windows without problems.
- The cache API has been slightly modified (it's still a beta!):
- - The type FTC_ImageDesc has been removed; it is now replaced by
- FTC_ImageTypeRec. Note that one of its fields is a `load_flag'
- parameter for FT_Load_Glyph.
+ - The type FTC_ImageDesc has been removed; it is now replaced
+ by FTC_ImageTypeRec. Note that one of its fields is a
+ `load_flag' parameter for FT_Load_Glyph.
- - The field "num_grays" of FT_SBitRec has been changed to "max_grays"
- in order to fit within a single byte. Its maximum value is thus 255
- (instead of 256 as previously).
+ - The field "num_grays" of FT_SBitRec has been changed to
+ "max_grays" in order to fit within a single byte. Its
+ maximum value is thus 255 (instead of 256 as previously).
III. MISCELLANEOUS
- - Added support for the DESTDIR variable during "make install". This
- simplifies packaging of FreeType.
+ - Added support for the DESTDIR variable during "make install".
+ This simplifies packaging of FreeType.
- - included modified copies of the ZLib sources in 'src/gzip' in order
- to support gzip-compressed PCF fonts. We do not use the system-provided
- zlib for now, though this is a probable enhancement for future releases
+ - Included modified copies of the ZLib sources in `src/gzip' in
+ order to support gzip-compressed PCF fonts. We do not use the
+ system-provided zlib for now, though this is a probable
+ enhancement for future releases.
- - The DocMaker tool used to generate the on-line API reference has been
- completely rewritten. It is now located in
+ - The DocMaker tool used to generate the on-line API reference has
+ been completely rewritten. It is now located in
"src/tools/docmaker/docmaker.py". Features:
- better cross-referenced output
- more polished output
- - uses Python regular expressions (though it didn't speed the
+ - uses Python regular expressions (though it didn't speed the
program)
- - much more modular structure, which allows for different "backends"
- in order to generate HTML, XML, or whatever format.
+ - much more modular structure, which allows for different
+ "backends" in order to generate HTML, XML, or whatever
+ format.
One can regenerate the API reference by calling:
@@ -210,86 +575,92 @@ LATEST CHANGES BETWEEN 2.1.3 and 2.1.2
include/freetype/cache/*.h
- A new, experimental, support for incremental font loading (i.e.,
- loading of fonts where the glyphs are not in the font file itself, but
- provided by an external component, like a Postscript interpreter) has
- been added by Graham Asher. This is still work in progress, however.
-
- - A new, EXPERIMENTAL, path stroker has been added. It doesn't suffer
- from severe rounding errors and treat bezier arcs directly. Still
- work in progress (i.e. not part of the official API). See the file
- <freetype/ftstroker.h> for some of the details.
+ loading of fonts where the glyphs are not in the font file
+ itself, but provided by an external component, like a Postscript
+ interpreter) has been added by Graham Asher. This is still work
+ in progress, however.
+
+ - A new, EXPERIMENTAL, path stroker has been added. It doesn't
+ suffer from severe rounding errors and treat bezier arcs
+ directly. Still work in progress (i.e. not part of the official
+ API). See the file <freetype/ftstroker.h> for some of the
+ details.
- - The massive re-formatting of sources and internal re-design is still
- under-way. Many internal functions, constants, and types have been
- renamed.
+ - The massive re-formatting of sources and internal re-design is
+ still under-way. Many internal functions, constants, and types
+ have been renamed.
-========================================================================
+======================================================================
LATEST CHANGES BETWEEN 2.1.2 and 2.1.1
I. IMPORTANT BUG FIXES
- - Many font drivers didn't select a Unicode charmap by default when
- a new face was opened (with the FT_CONFIG_OPTION_USE_CMAPS options
- enabled), causing many applications to not be able to display text
- correctly with the 2.1.x releases.
+ - Many font drivers didn't select a Unicode charmap by default
+ when a new face was opened (with the FT_CONFIG_OPTION_USE_CMAPS
+ options enabled), causing many applications to not be able to
+ display text correctly with the 2.1.x releases.
- - The PFR driver had a bug in its composite loading code that produces
- incorrectly placed accents with many fonts.
+ - The PFR driver had a bug in its composite loading code that
+ produces incorrectly placed accents with many fonts.
- The Type42 driver crashed sometimes due to a nasty bug.
- - The Type 1 custom encoding charmap didn't handle the case where the
- first glyph index wasn't 0.
+ - The Type 1 custom encoding charmap didn't handle the case where
+ the first glyph index wasn't 0.
- - A serious typo in the TrueType composite loader produced incorrectly
- placed glyphs in fonts like "Wingdings" and a few others.
+ - A serious typo in the TrueType composite loader produced
+ incorrectly placed glyphs in fonts like "Wingdings" and a few
+ others.
II. MISCELLANEOUS
- - The Win32 Visual C++ project file has been updated to include the
- PFR driver as well.
+ - The Win32 Visual C++ project file has been updated to include
+ the PFR driver as well.
- - "freetype.m4" is now installed by default by "make install" on Unix
- systems.
+ - "freetype.m4" is now installed by default by "make install" on
+ Unix systems.
- - The function FT_Get_PS_Font_Info now works with CID and Type42 fonts
- as well.
+ - The function FT_Get_PS_Font_Info now works with CID and Type42
+ fonts as well.
-========================================================================
+======================================================================
LATEST CHANGES BETWEEN 2.1.1 and 2.1.0
I. IMPORTANT BUG FIXES
- - The `version_info' returned by `freetype-config' in 2.1.0 returned an
- invalid value. It now returns 9:1:3 (2.0.9 returned 9:0:3).
+ - The `version_info' returned by `freetype-config' in 2.1.0
+ returned an invalid value. It now returns 9:1:3 (2.0.9 returned
+ 9:0:3).
- - Version 2.1.0 couldn't be linked against applications on Win32 and
- Amiga systems due to a new debug function that wasn't properly
- propagated to the system-specific directory in `builds'.
+ - Version 2.1.0 couldn't be linked against applications on Win32
+ and Amiga systems due to a new debug function that wasn't
+ properly propagated to the system-specific directory in
+ `builds'.
- Various MacOS and Mac OS X specific fixes.
- - Fixed a bug in the TrueType charmap validation routines that made
- version 2.1.0 too restrictive -- many popular fonts have been
- rejected.
+ - Fixed a bug in the TrueType charmap validation routines that
+ made version 2.1.0 too restrictive -- many popular fonts have
+ been rejected.
- - There was still a very small difference between the monochrome glyph
- bitmaps produced by FreeType 1.x and FreeType 2.x with the bytecode
- interpreter enabled. This was caused by an invalid flag setting in
- the TrueType glyph loader, making the rasterizer change its drop-out
- control mode. Now theresults should _really_ be completely identical.
+ - There was still a very small difference between the monochrome
+ glyph bitmaps produced by FreeType 1.x and FreeType 2.x with the
+ bytecode interpreter enabled. This was caused by an invalid
+ flag setting in the TrueType glyph loader, making the rasterizer
+ change its drop-out control mode. Now theresults should
+ _really_ be completely identical.
- The TrueType name table loader has been improved to support many
- popular though buggy Asian fonts. It now ignores empty name entries,
- invalid pointer offsets and a few other incorrect subtleties.
- Moreover, name strings are now loaded on demand, which reduces the
- memory load of many faces (e.g. the ARIAL.TTF font file contains a
- 10kByte name table with 70 names).
+ popular though buggy Asian fonts. It now ignores empty name
+ entries, invalid pointer offsets and a few other incorrect
+ subtleties. Moreover, name strings are now loaded on demand,
+ which reduces the memory load of many faces (e.g. the ARIAL.TTF
+ font file contains a 10kByte name table with 70 names).
- Fixed a bug in the Postscript hinter that prevented family blues
substitution to happen correctly.
@@ -299,116 +670,119 @@ LATEST CHANGES BETWEEN 2.1.1 and 2.1.0
- Three new font drivers in this release:
- * A BDF font driver, contributed by Franco Zappa Nardelli, heavily
- modified by Werner Lemberg. It also supports anti-aliased bitmaps
- (using a slightly extended BDF format).
+ * A BDF font driver, contributed by Franco Zappa Nardelli,
+ heavily modified by Werner Lemberg. It also supports
+ anti-aliased bitmaps (using a slightly extended BDF format).
- * A Type42 font driver, contributed by Roberto Alameda. It is
+ * A Type42 font driver, contributed by Roberto Alameda. It is
still experimental but seems to work relatively well.
- * A PFR font driver, contributed by David Turner himself. It doesn't
- support PFR hinting -- note that BitStream has at least two patents
- on this format!
+ * A PFR font driver, contributed by David Turner himself. It
+ doesn't support PFR hinting -- note that BitStream has at
+ least two patents on this format!
III. MISCELLANEOUS
- - The cache sub-system has been optimized in important ways. Cache hits
- are now significantly faster. For example, using the CMap cache is
- about twice faster than calling FT_Get_Char_Index on most platforms.
- Similarly, using an SBit cache is about five times faster than loading
- the bitmaps from a bitmap file, and 300 to 500 times faster than
- generating them from a scalable format.
+ - The cache sub-system has been optimized in important ways.
+ Cache hits are now significantly faster. For example, using the
+ CMap cache is about twice faster than calling FT_Get_Char_Index
+ on most platforms. Similarly, using an SBit cache is about five
+ times faster than loading the bitmaps from a bitmap file, and
+ 300 to 500 times faster than generating them from a scalable
+ format.
- Note that you should recompile your sources if you designed a custom
- cache class for the FT2 Cache subsystem, since the changes performed
- are source, but not binary, compatible.
+ Note that you should recompile your sources if you designed a
+ custom cache class for the FT2 Cache subsystem, since the
+ changes performed are source, but not binary, compatible.
-========================================================================
+======================================================================
LATEST CHANGES BETWEEN 2.1.0 and 2.0.9
I. IMPORTANT BUG FIXES
- - The TrueType bytecode interpreter has been fixed to produce
+ - The TrueType bytecode interpreter has been fixed to produce
_exactly_ the same output as FreeType 1.x. Previous differences
- were due to slightly distinct fixed-point computation routines
+ were due to slightly distinct fixed-point computation routines
used to perform dot products and vector length measurements.
- It seems that native TrueType hinting is _extremely_ sensitive
- to rounding errors. The required vector computation routines have
- been optimized and placed within the "ttinterp.c" file.
+ It seems that native TrueType hinting is _extremely_ sensitive
+ to rounding errors. The required vector computation routines
+ have been optimized and placed within the "ttinterp.c" file.
- Fixed the parsing of accelerator tables in the PCF font driver.
- - Fixed the Type1 glyph loader routine used to compute the font's
+ - Fixed the Type1 glyph loader routine used to compute the font's
maximum advance width.
+
II. NEW FEATURES
- The `configure' script used on Unix systems has been modified to
- check that GNU Make is being used to build the library. Otherwise,
- it will display a message proposing to use the GNUMAKE environment
- variable to name it.
+ check that GNU Make is being used to build the library.
+ Otherwise, it will display a message proposing to use the
+ GNUMAKE environment variable to name it.
The Unix-specific file README.UNX has been modified accordingly.
III. MISCELLANEOUS
- - The FreeType License in `docs/FTL.txt' has been updated to include
- a proposed preferred disclaimer. If you are using FreeType in your
- products, you are encouraged (but not mandated) to use the following
- text in your documentation:
+ - The FreeType License in `docs/FTL.txt' has been updated to
+ include a proposed preferred disclaimer. If you are using
+ FreeType in your products, you are encouraged (but not mandated)
+ to use the following text in your documentation:
"""
- Portions of this software are copyright 1996-2002 The FreeType
- Project (www.freetype.org). All rights reserved.
+ Portions of this software are copyright 1996-2002 The
+ FreeType Project (www.freetype.org). All rights reserved.
"""
- The default size of the render pool has been reduced to 16kByte.
- This shouldn't result in any noticeable performance penalty, unless
- you are using the engine as-is to render very large and complex
- glyphs.
+ This shouldn't result in any noticeable performance penalty,
+ unless you are using the engine as-is to render very large and
+ complex glyphs.
- - The FreeType 2 redesign has begun. More information can be found
- at this URL:
+ - The FreeType 2 redesign has begun. More information can be
+ found at this URL:
http://www.freetype.org/freetype2/redesign.html
- The following internal changes have been performed within the sources
- of this release:
+ The following internal changes have been performed within the
+ sources of this release:
- - Many internal types have been renamed to increase consistency.
- The following should be true, except for public types:
+ - Many internal types have been renamed to increase
+ consistency. The following should be true, except for
+ public types:
- * All structure types have a name ending in "Rec" (short for
- `record').
+ * All structure types have a name ending in "Rec" (short
+ for `record').
- * A pointer-to-structure type has the same name as the
+ * A pointer-to-structure type has the same name as the
structure, _without_ the "Rec" suffix.
- Example:
+ Example:
- typedef struct FooRec_
- {
- ...
+ typedef struct FooRec_
+ {
+ ...
- } FooRec, *Foo;
+ } FooRec, *Foo;
- - Many internal macros have been renamed to increase consistency.
- The following should be true:
+ - Many internal macros have been renamed to increase
+ consistency. The following should be true:
- * All macros have a name beginning with "FT_". This required
- a few changes like
+ * All macros have a name beginning with "FT_". This
+ required a few changes like
ALLOC => FT_ALLOC
FREE => FT_FREE
REALLOC => FT_REALLOC
- * All macros are completely UPPERCASE. This required a few
- changes like:
+ * All macros are completely UPPERCASE. This required a
+ few changes like:
READ_Short => FT_READ_SHORT
NEXT_Short => FT_NEXT_SHORT
@@ -417,7 +791,7 @@ LATEST CHANGES BETWEEN 2.1.0 and 2.0.9
MEM_Copy => FT_MEM_COPY
etc.
- * Whenever possible, all macro names follow the
+ * Whenever possible, all macro names follow the
FT_<OBJECT>_<METHOD> pattern. For example
ACCESS_Frame => FT_FRAME_ENTER
@@ -431,7 +805,7 @@ LATEST CHANGES BETWEEN 2.1.0 and 2.0.9
FILE_ReadAt => FT_STREAM_READ_AT
READ_Fields => FT_STREAM_READ_FIELDS
- - Many internal functions have been renamed to follow the
+ - Many internal functions have been renamed to follow the
FT_<Object>_<Method> pattern. For example:
FT_Seek_Stream => FT_Stream_Seek
@@ -443,288 +817,299 @@ LATEST CHANGES BETWEEN 2.1.0 and 2.0.9
Note that method names do not contain "_".
- - The FT_ALLOC_ARRAY and FT_REALLOC_ARRAY have been replaced
- with FT_NEW_ARRAY and FT_RENEW_ARRAY which do not take a type
- as the fourth argument. Instead, the array element type size
- is computed automatically from the type of the target pointer
- used.
+ - The FT_ALLOC_ARRAY and FT_REALLOC_ARRAY have been replaced
+ with FT_NEW_ARRAY and FT_RENEW_ARRAY which do not take a
+ type as the fourth argument. Instead, the array element
+ type size is computed automatically from the type of the
+ target pointer used.
- - A new object class, FT_CMap, has been introduced. These
- internal objects are used to model character maps. This eases
- the support of additional charmap types within the engine.
+ - A new object class, FT_CMap, has been introduced. These
+ internal objects are used to model character maps. This
+ eases the support of additional charmap types within the
+ engine.
- - A new configuration file named "ftstdlib.h" has been added
- to `include/freetype/config'. It is used to define aliases
- for _every_ routine of the ISO C library that the font engine
- uses. Each aliases has a "ft_" prefix (e.g. "ft_strlen" is an
- alias for "strlen").
+ - A new configuration file named "ftstdlib.h" has been added
+ to `include/freetype/config'. It is used to define aliases
+ for _every_ routine of the ISO C library that the font
+ engine uses. Each aliases has a "ft_" prefix
+ (e.g. "ft_strlen" is an alias for "strlen").
- This is used to ease the porting of FreeType 2 to exotic runtime
- environments where the ISO C Library isn't available (e.g.
- XFree86 extension modules).
+ This is used to ease the porting of FreeType 2 to exotic
+ runtime environments where the ISO C Library isn't available
+ (e.g. XFree86 extension modules).
More details are available in the "ChangeLog" file.
-============================================================================
+======================================================================
LATEST CHANGES BETWEEN 2.0.9 and 2.0.8
I. IMPORTANT BUG FIXES
- Certain fonts like "foxjump.ttf" contain broken name tables with
- invalid entries and wild offsets. This caused FreeType to crash when
- trying to load them.
+ invalid entries and wild offsets. This caused FreeType to crash
+ when trying to load them.
- The SFNT `name' table loader has been fixed to be able to support
- these strange fonts.
+ The SFNT `name' table loader has been fixed to be able to
+ support these strange fonts.
- Moreover, the code in charge of processing this table has been changed
- to always favour Windows-formatted entries over other ones. Hence, a
- font that works on Windows but not on the Mac will load cleanly in
- FreeType and report accurate values for Family & PostScript names.
+ Moreover, the code in charge of processing this table has been
+ changed to always favour Windows-formatted entries over other
+ ones. Hence, a font that works on Windows but not on the Mac
+ will load cleanly in FreeType and report accurate values for
+ Family & PostScript names.
- The CID font driver has been fixed. It unfortunately returned a
- Postscript Font name with a leading slash, as in
+ Postscript Font name with a leading slash, as in
"/MunhwaGothic-Regular".
- - FreeType 2 should now compile fine on AIX 4.3.3 as a shared library.
+ - FreeType 2 should now compile fine on AIX 4.3.3 as a shared
+ library.
- - A bug in the Postscript hinter has been found and fixed, removing
- un-even stem widths at small pixel sizes (like 14-17).
+ - A bug in the Postscript hinter has been found and fixed,
+ removing un-even stem widths at small pixel sizes (like 14-17).
- This improves the quality of a certain number of Postscript fonts.
+ This improves the quality of a certain number of Postscript
+ fonts.
II. NEW FEATURES
- - A new function named `FT_Library_Version' has been added to return
- the current library's major, minor, and patch version numbers. This
- is important since the macros FREETYPE_MAJOR, FREETYPE_MINOR, and
- FREETYPE_PATCH cannot be used when the library is dynamically linked
- by a program.
+ - A new function named `FT_Library_Version' has been added to
+ return the current library's major, minor, and patch version
+ numbers. This is important since the macros FREETYPE_MAJOR,
+ FREETYPE_MINOR, and FREETYPE_PATCH cannot be used when the
+ library is dynamically linked by a program.
- - Two new APIs have been added: `FT_Get_First_Char' and
+ - Two new APIs have been added: `FT_Get_First_Char' and
`FT_Get_Next_Char'.
- Together, these can be used to iterate efficiently over the currently
- selected charmap of a given face. Read the API reference for more
- details.
+ Together, these can be used to iterate efficiently over the
+ currently selected charmap of a given face. Read the API
+ reference for more details.
III. MISCELLANEOUS
- - The FreeType sources are under heavy internal re-factoring. As a
- consequence, we have created a branch named "STABLE" on the CVS to
- hold all future releases/fixes in the 2.0.x family.
+ - The FreeType sources are under heavy internal re-factoring. As
+ a consequence, we have created a branch named "STABLE" on the
+ CVS to hold all future releases/fixes in the 2.0.x family.
- The HEAD branch now contains the re-factored sources and shouldn't be
- used for testing or packaging new releases. In case you would like
- to access the 2.0.9 sources from our CVS repository, use the tag
- `VER-2-0-9'.
+ The HEAD branch now contains the re-factored sources and
+ shouldn't be used for testing or packaging new releases. In
+ case you would like to access the 2.0.9 sources from our CVS
+ repository, use the tag `VER-2-0-9'.
-============================================================================
+======================================================================
LATEST CHANGES BETWEEN 2.0.8 and 2.0.7
I. IMPORTANT BUG FIXES
- - There was a small but nasty bug in "freetype-config.in" which
+ - There was a small but nasty bug in "freetype-config.in" which
caused the "freetype-config" script to fail on Unix.
- This didn't prevent the installation of the library or even
- its execution, but caused problems when trying to compile many
- Unix packages that depend on it.
+ This didn't prevent the installation of the library or even its
+ execution, but caused problems when trying to compile many Unix
+ packages that depend on it.
- - Some TrueType or OpenType fonts embedded in PDF documents do
- not have a 'cmap', 'post' and 'name' as is required by the
+ - Some TrueType or OpenType fonts embedded in PDF documents do not
+ have a 'cmap', 'post' and 'name' as is required by the
specification. FreeType no longer refuses to load such fonts.
- - various fixes to the PCF font driver
+ - Various fixes to the PCF font driver.
-============================================================================
+======================================================================
LATEST CHANGES BETWEEN 2.0.7 and 2.0.6
I. IMPORTANT BUG FIXES
- - Fixed two bugs in the Type 1 font driver. The first one resulted in a
- memory leak in subtle cases. The other one caused FreeType to crash
- when trying to load ".gsf" files (Ghostscript so-called Postscript
- fonts).
+ - Fixed two bugs in the Type 1 font driver. The first one
+ resulted in a memory leak in subtle cases. The other one caused
+ FreeType to crash when trying to load ".gsf" files (Ghostscript
+ so-called Postscript fonts).
- (This made _many_ KDE applications crash on certain systems. FreeType
- _is_ becoming a critical system component on Linux :-)
+ (This made _many_ KDE applications crash on certain systems.
+ FreeType _is_ becoming a critical system component on Linux :-)
- Fixed a memory leak in the CFF font driver.
- Fixed a memory leak in the PCF font driver.
- - Fixed the Visual C++ project file "builds/win32/visualc/freetype.dsp"
- since it didn't include the Postscript hinter component, causing
- errors at build time.
+ - Fixed the Visual C++ project file
+ "builds/win32/visualc/freetype.dsp" since it didn't include the
+ Postscript hinter component, causing errors at build time.
- - Fixed a small rendering bug in the anti-aliased renderer that only
- occurred when trying to draw thin (less than 1 pixel) strokes.
+ - Fixed a small rendering bug in the anti-aliased renderer that
+ only occurred when trying to draw thin (less than 1 pixel)
+ strokes.
- - Fixed "builds/unix/freetype2.a4" which is used to generate a valid
- "freetype2.m4" for use with autoconf.
+ - Fixed "builds/unix/freetype2.a4" which is used to generate a
+ valid "freetype2.m4" for use with autoconf.
- Fixed the OpenVMS Makefiles.
II. MISCELLANEOUS
- - Added "configure" and "install" scripts to the top-level directory.
- A GNU-style installation is thus now easily possible with
+ - Added "configure" and "install" scripts to the top-level
+ directory. A GNU-style installation is thus now easily possible
+ with
- ./configure <options>
- make
- make install
+ ./configure <options>
+ make
+ make install
-============================================================================
+======================================================================
LATEST CHANGES BETWEEN 2.0.6 and 2.0.5
I. IMPORTANT BUG FIXES
- - It wasn't possible to load embedded bitmaps when the auto-hinter was
- used. This is now fixed.
+ - It wasn't possible to load embedded bitmaps when the auto-hinter
+ was used. This is now fixed.
- - The TrueType font driver didn't load some composites properly (the
- sub-glyphs were slightly shifted, and this was only noticeable when
- using monochrome rendering).
+ - The TrueType font driver didn't load some composites properly
+ (the sub-glyphs were slightly shifted, and this was only
+ noticeable when using monochrome rendering).
- - Various fixes to the auto-hinter. They merely improve the output of
- sans-serif fonts. Note that there are still problems with serifed
- fonts and composites (accented characters).
+ - Various fixes to the auto-hinter. They merely improve the
+ output of sans-serif fonts. Note that there are still problems
+ with serifed fonts and composites (accented characters).
- - All scalable font drivers erroneously returned un-fitted glyph
- advances when hinting was requested. This created problems for a
- number of layout applications. This is a very old bug that got
- undetected mainly because most test/demo program perform rounding
- explicitly or implicitly (through the cache).
+ - All scalable font drivers erroneously returned un-fitted glyph
+ advances when hinting was requested. This created problems for
+ a number of layout applications. This is a very old bug that
+ got undetected mainly because most test/demo program perform
+ rounding explicitly or implicitly (through the cache).
- - FT_Glyph_To_Bitmap() did erroneously modify the source glyph in
+ - FT_Glyph_To_Bitmap() did erroneously modify the source glyph in
certain cases.
- - "glnames.py" still contained a bug that made FreeType return invalid
- names for certain glyphs.
+ - "glnames.py" still contained a bug that made FreeType return
+ invalid names for certain glyphs.
- - The library crashed when loading certain Type 1 fonts like "sadn.pfb"
- ("Stalingrad Normal"), which appear to contain pathetic font info
- dictionaries.
+ - The library crashed when loading certain Type 1 fonts like
+ "sadn.pfb" ("Stalingrad Normal"), which appear to contain
+ pathetic font info dictionaries.
- - The TrueType glyph loader is now much more paranoid and checks everything
- when loading a given glyph image. This was necessary to avoid
- problems (crashes and/or memory overwrites) with broken fonts that
- came from a really buggy automatic font converter.
+ - The TrueType glyph loader is now much more paranoid and checks
+ everything when loading a given glyph image. This was necessary
+ to avoid problems (crashes and/or memory overwrites) with broken
+ fonts that came from a really buggy automatic font converter.
II. IMPORTANT UPDATES AND NEW FEATURES
- Important updates to the Mac-specific parts of the library.
- - The caching sub-system has been completely re-designed, and its API
- has evolved (the old one is still supported for backwards
+ - The caching sub-system has been completely re-designed, and its
+ API has evolved (the old one is still supported for backwards
compatibility).
- The documentation for it is not yet completed, sorry. For now, you
- are encouraged to continue using the old API. However, the ftview
- demo program in the ft2demos package has already been updated to use
- the new caching functions.
+ The documentation for it is not yet completed, sorry. For now,
+ you are encouraged to continue using the old API. However, the
+ ftview demo program in the ft2demos package has already been
+ updated to use the new caching functions.
- - A new charmap cache is provided too. See FTC_CMapCache(). This is
- useful to perform character code -> glyph index translations quickly,
- without the need for an opened FT_Face.
+ - A new charmap cache is provided too. See FTC_CMapCache(). This
+ is useful to perform character code -> glyph index translations
+ quickly, without the need for an opened FT_Face.
- - A NEW POSTSCRIPT HINTER module has been added to support native hints
- in the following formats: PostScript Type 1, PostScript CID, and
- CFF/CEF.
+ - A NEW POSTSCRIPT HINTER module has been added to support native
+ hints in the following formats: PostScript Type 1, PostScript
+ CID, and CFF/CEF.
- Please test! Note that the auto-hinter produces better results for a
- number of badly-hinted fonts (mostly auto-generated ones) though.
+ Please test! Note that the auto-hinter produces better results
+ for a number of badly-hinted fonts (mostly auto-generated ones)
+ though.
- - A memory debugger is now part of the standard FreeType sources. To
- enable it, define FT_DEBUG_MEMORY in <freetype/config/ftoption.h>, and
- recompile the library.
+ - A memory debugger is now part of the standard FreeType sources.
+ To enable it, define FT_DEBUG_MEMORY in
+ <freetype/config/ftoption.h>, and recompile the library.
- Additionally, define the _environment_ variable FT_DEBUG_MEMORY and
- run any program using FreeType. When the library is exited, a summary
- of memory footprints and possible leaks will be displayed.
+ Additionally, define the _environment_ variable FT_DEBUG_MEMORY
+ and run any program using FreeType. When the library is exited,
+ a summary of memory footprints and possible leaks will be
+ displayed.
- This works transparently with _any_ program that uses FreeType.
- However, you will need a lot of memory to use this (allocated blocks
- are never released to the heap to detect double deletes easily).
+ This works transparently with _any_ program that uses FreeType.
+ However, you will need a lot of memory to use this (allocated
+ blocks are never released to the heap to detect double deletes
+ easily).
III. MISCELLANEOUS
- - We are aware of subtle differences between the output of FreeType
- versions 1 and 2 when it comes to monochrome TrueType-hinted glyphs.
- These are most probably due to small differences in the monochrome
- rasterizers and will be worked out in an upcoming release.
+ - We are aware of subtle differences between the output of
+ FreeType versions 1 and 2 when it comes to monochrome
+ TrueType-hinted glyphs. These are most probably due to small
+ differences in the monochrome rasterizers and will be worked out
+ in an upcoming release.
- We have decided to fork the sources in a "stable" branch, and an
- "unstable" one, since FreeType is becoming a critical component of
- many Unix systems.
+ "unstable" one, since FreeType is becoming a critical component
+ of many Unix systems.
- The next bug-fix releases of the library will be named 2.0.7, 2.0.8,
- etc., while the "2.1" branch will contain a version of the sources
- where we will start major reworking of the library's internals, in
- order to produce FreeType 2.2.0 (or even 3.0) in a more distant
- future.
+ The next bug-fix releases of the library will be named 2.0.7,
+ 2.0.8, etc., while the "2.1" branch will contain a version of
+ the sources where we will start major reworking of the library's
+ internals, in order to produce FreeType 2.2.0 (or even 3.0) in a
+ more distant future.
- We also hope that this scheme will allow much more frequent releases
- than in the past.
+ We also hope that this scheme will allow much more frequent
+ releases than in the past.
-============================================================================
+======================================================================
LATEST CHANGES BETWEEN 2.0.5 and 2.0.4
- NOTE THAT 2.0.5 DOES NOT CONTAIN THE POSTSCRIPT HINTER. THIS MODULE WILL
- BE PART OF THE NEXT RELEASE (EITHER 2.0.6 or 2.1)
+ NOTE THAT 2.0.5 DOES NOT CONTAIN THE POSTSCRIPT HINTER. THIS MODULE
+ WILL BE PART OF THE NEXT RELEASE (EITHER 2.0.6 or 2.1)
- - Fixed a bug that made certain glyphs, like "Cacute", "cacute" and
- "lslash" unavailable from Unicode charmaps of Postscript fonts. This
- prevented the correct display of Polish text, for example.
+ - Fixed a bug that made certain glyphs, like "Cacute", "cacute" and
+ "lslash" unavailable from Unicode charmaps of Postscript fonts.
+ This prevented the correct display of Polish text, for example.
- - The kerning table of Type 1 fonts was loaded by FreeType, when its AFM
- file was attached to its face, but the FT_FACE_FLAG_HAS_KERNING bit
- flags was not set correctly, preventing FT_Get_Kerning to return
- meaningful values.
+ - The kerning table of Type 1 fonts was loaded by FreeType, when its
+ AFM file was attached to its face, but the
+ FT_FACE_FLAG_HAS_KERNING bit flags was not set correctly,
+ preventing FT_Get_Kerning to return meaningful values.
- - Improved SFNT (TrueType & OpenType) charmap support. Slightly better
- performance, as well as support for the new formats defined by the
- OpenType 1.3 specification (8, 10, and 12)
+ - Improved SFNT (TrueType & OpenType) charmap support. Slightly
+ better performance, as well as support for the new formats defined
+ by the OpenType 1.3 specification (8, 10, and 12)
- - Fixed a serious typo in "src/base/ftcalc.c" which caused invalid
+ - Fixed a serious typo in "src/base/ftcalc.c" which caused invalid
computations in certain rare cases, producing ugly artefacts.
- - The size of the EM square is computed with a more accurate algorithm
- for Postscript fonts. The old one caused slight errors with embedded
- fonts found in PDF documents.
+ - The size of the EM square is computed with a more accurate
+ algorithm for Postscript fonts. The old one caused slight errors
+ with embedded fonts found in PDF documents.
- - Fixed a bug in the cache manager that prevented normal LRU behaviour
- within the cache manager, causing unnecessary reloads (for FT_Face and
- FT_Size objects only).
+ - Fixed a bug in the cache manager that prevented normal LRU
+ behaviour within the cache manager, causing unnecessary reloads
+ (for FT_Face and FT_Size objects only).
- - Added a new function named "FT_Get_Name_Index" to retrieve the glyph
- index of a given glyph name, when found in a face.
+ - Added a new function named "FT_Get_Name_Index" to retrieve the
+ glyph index of a given glyph name, when found in a face.
- - Added a new function named "FT_Get_Postscript_Name" to retrieve the
- "unique" Postscript font name of a given face.
+ - Added a new function named "FT_Get_Postscript_Name" to retrieve
+ the "unique" Postscript font name of a given face.
- - Added a new public header size named FT_SIZES_H (or
- <freetype/ftsizes.h>) providing new FT_Size-management functions:
+ - Added a new public header size named FT_SIZES_H (or
+ <freetype/ftsizes.h>) providing new FT_Size-management functions:
FT_New_Size, FT_Activate_Size, FT_Done_Size.
- - Fixed a reallocation bug that generated a dangling pointer (and possibly
- memory leaks) with Postscript fonts (in src/psaux/psobjs.c).
+ - Fixed a reallocation bug that generated a dangling pointer (and
+ possibly memory leaks) with Postscript fonts (in
+ src/psaux/psobjs.c).
- Many fixes for 16-bit correctness.
@@ -732,148 +1117,155 @@ LATEST CHANGES BETWEEN 2.0.5 and 2.0.4
- Added an Amiga build directory in "builds/amiga".
-============================================================================
+
+======================================================================
LATEST CHANGES BETWEEN 2.0.4 and 2.0.3
- - Fixed a rather annoying bug that was introduced in 2.0.3. Namely, the
- font transformation set through FT_Set_Transform was applied twice to
- auto-hinted glyphs, resulting in incorrectly rotated text output.
+ - Fixed a rather annoying bug that was introduced in 2.0.3. Namely,
+ the font transformation set through FT_Set_Transform was applied
+ twice to auto-hinted glyphs, resulting in incorrectly rotated text
+ output.
- - Fixed _many_ compiler warnings. FT2 should now compile cleanly with
- Visual C++'s most pedantic warning level (/W4). It already compiled
- fine with GCC and a few other compilers.
+ - Fixed _many_ compiler warnings. FT2 should now compile cleanly
+ with Visual C++'s most pedantic warning level (/W4). It already
+ compiled fine with GCC and a few other compilers.
- - Fixed a bug that prevented the linear advance width of composite
+ - Fixed a bug that prevented the linear advance width of composite
TrueType glyphs to be correctly returned.
- - Fixed the Visual C++ project files located in "builds/win32/visualc"
- (previous versions used older names of the library).
+ - Fixed the Visual C++ project files located in
+ "builds/win32/visualc" (previous versions used older names of the
+ library).
+
+ - Many 32-bit constants have an "L" appended to their value, in
+ order to improve the 16-bitness of the code. Someone is actually
+ trying to use FT2 on an Atari ST machine!
- - Many 32-bit constants have an "L" appended to their value, in order
- to improve the 16-bitness of the code. Someone is actually trying to
- use FT2 on an Atari ST machine!
+ - Updated the "builds/detect.mk" file in order to automatically
+ build FT2 on AIX systems. AIX uses "/usr/sbin/init" instead of
+ "/sbin/init" and wasn't previously detected as a Unix platform by
+ the FreeType build system.
- - Updated the "builds/detect.mk" file in order to automatically build
- FT2 on AIX systems. AIX uses "/usr/sbin/init" instead of "/sbin/init"
- and wasn't previously detected as a Unix platform by the FreeType build
- system.
+ - Updated the Unix-specific portions of the build system (new
+ libtool version, etc.).
- - Updated the Unix-specific portions of the build system (new libtool
- version, etc.).
+ - The SFNT kerning lodaer now ensures that the table is sorted
+ (since some problem fonts do not meet this requirement).
- - The SFNT kerning lodaer now ensures that the table is sorted (since some
- problem fonts do not meet this requirement).
-============================================================================
+=======================================================================
LATEST CHANGES BETWEEN 2.0.3 and 2.0.2
I. CHANGES TO THE MODULES / FONT DRIVERS
- - THE AUTO-HINTER HAS BEEN SLIGHTLY IMPROVED, in order to fix several
- annoying artefacts, mainly:
+ - THE AUTO-HINTER HAS BEEN SLIGHTLY IMPROVED, in order to fix
+ several annoying artefacts, mainly:
- - Blue zone alignement of horizontal stems wasn't performed
- correctly, resulting in artefacts like the "d" being placed one
- pixel below the "b" in some fonts like Time New Roman.
+ - Blue zone alignement of horizontal stems wasn't performed
+ correctly, resulting in artefacts like the "d" being placed
+ one pixel below the "b" in some fonts like Time New Roman.
- - Overshoot thresholding wasn't performed correctly, creating
+ - Overshoot thresholding wasn't performed correctly, creating
unpleasant artefacts at large character pixel sizes.
- - Composite glyph loading has been simplified. This gets rid
- of various artefacts where the components of a composite glyphs
- were not correctly spaced.
+ - Composite glyph loading has been simplified. This gets rid
+ of various artefacts where the components of a composite
+ glyphs were not correctly spaced.
- These are the last changes to the current auto-hinting module. A new
- hinting sub-system is currently in the work in order to support native
- hints in Type 1 / CFF / OpenType fonts, as well as globally improve
- rendering.
+ These are the last changes to the current auto-hinting module.
+ A new hinting sub-system is currently in the work in order to
+ support native hints in Type 1 / CFF / OpenType fonts, as well
+ as globally improve rendering.
- - The PCF driver has been fixed. It reported invalid glyph dimensions
- for the fonts available on Solaris.
+ - The PCF driver has been fixed. It reported invalid glyph
+ dimensions for the fonts available on Solaris.
- - The Type 1, CID and CFF drivers have been modified to fix the
+ - The Type 1, CID and CFF drivers have been modified to fix the
computation of the EM size.
- - The Type 1 driver has been fixed to avoid a dangerous bug that
- crashed the library with non-conforming fonts (i.e. ones that do not
- place the .notdef glyph at position 0).
+ - The Type 1 driver has been fixed to avoid a dangerous bug that
+ crashed the library with non-conforming fonts (i.e. ones that do
+ not place the .notdef glyph at position 0).
- - The TrueType driver had a rather subtle bug (dangling pointer when
- loading composite glyphs) that could crash the library in rare
- occasions!
+ - The TrueType driver had a rather subtle bug (dangling pointer
+ when loading composite glyphs) that could crash the library in
+ rare occasions!
II. HIGH-LEVEL API CHANGES
- - The error code enumeration values have been changed. An error value
- is decomposed in a generic error code, and a module number. see
- <freetype/fterrors.h> for details.
+ - The error code enumeration values have been changed. An error
+ value is decomposed in a generic error code, and a module
+ number. see <freetype/fterrors.h> for details.
- - A new public header file has been introduced, named FT_TRIGONOMETRY_H
- (include/freetype/fttrig.h), providing trigonometric functions to
- compute sines, cosines, arctangents, etc. with 16.16 fixed precision.
- The implementation is based on the CORDIC algorithm and is very fast
- while being sufficiently accurate.
+ - A new public header file has been introduced, named
+ FT_TRIGONOMETRY_H (include/freetype/fttrig.h), providing
+ trigonometric functions to compute sines, cosines, arctangents,
+ etc. with 16.16 fixed precision. The implementation is based on
+ the CORDIC algorithm and is very fast while being sufficiently
+ accurate.
III. INTERNALS
- - Added BeOS-specific files in the old build sub-system. Note that
- no changes were required to compile the library with Jam.
+ - Added BeOS-specific files in the old build sub-system. Note
+ that no changes were required to compile the library with Jam.
- - The configuration is now capable of automatically detecting 64-bit
- integers on a set of predefined compilers (GCC, Visual C++, Borland
- C++) and will use them by default. This provides a small performance
- boost.
+ - The configuration is now capable of automatically detecting
+ 64-bit integers on a set of predefined compilers (GCC, Visual
+ C++, Borland C++) and will use them by default. This provides a
+ small performance boost.
- - A small memory leak that happened when opening 0-sized files (duh!)
- have been fixed.
+ - A small memory leak that happened when opening 0-sized files
+ (duh!) have been fixed.
- - Fixed bezier stack depth bug in the routines provided by the
- FT_BBOX_H header file. Also fixed similar bugs in the rasterizers.
+ - Fixed bezier stack depth bug in the routines provided by the
+ FT_BBOX_H header file. Also fixed similar bugs in the
+ rasterizers.
- - The outline bounding box code has been rewritten to use direct
- computations, instead of bezier sub-division, to compute the exact
- bounding box of glyphs. This is slightly slower but more accurate.
+ - The outline bounding box code has been rewritten to use direct
+ computations, instead of bezier sub-division, to compute the
+ exact bounding box of glyphs. This is slightly slower but more
+ accurate.
- - The build system has been improved and fixed, mainly to support "make"
- on Windows 2000 correctly, avoid problems with "make distclean" on non
- Unix systems, etc.
+ - The build system has been improved and fixed, mainly to support
+ "make" on Windows 2000 correctly, avoid problems with "make
+ distclean" on non Unix systems, etc.
- - Hexadecimal constants have been suffixed with "U" to avoid problems
- with certain compilers on 64-bit platforms.
+ - Hexadecimal constants have been suffixed with "U" to avoid
+ problems with certain compilers on 64-bit platforms.
- A new directory named "src/tools" has been created. It contains
Python scripts and simple unit test programs used to develop the
library.
- - The DocMaker tool has been moved from "docs" to "src/tools" and
+ - The DocMaker tool has been moved from "docs" to "src/tools" and
has been updated with the following:
- Now accepts the "--title=XXXX" or "-t XXXX" option from the
command line to set the project's name in the generated API
reference.
- - Now accepts the "--output=DIR" or "-o DIR" option from the
- command line to set the output directory for all generated HTML
- files.
+ - Now accepts the "--output=DIR" or "-o DIR" option from the
+ command line to set the output directory for all generated
+ HTML files.
- Now accepts the "--prefix=XXXX" or "-p XXX" option from the
- command line to set the file prefix to use for all generated HTML
- files.
+ command line to set the file prefix to use for all
+ generated HTML files.
- - Now generates the current time/data on each generated page
+ - Now generates the current time/data on each generated page
in order to distinguish between versions.
- DocMaker can be used with other projects now, not only FT2 (e.g. MLib,
- FTLayout, etc.).
+ DocMaker can be used with other projects now, not only FT2
+ (e.g. MLib, FTLayout, etc.).
-===========================================================================
-LATEST CHANGES BETWEEN 2.0.2 and 2.0.1
+======================================================================
+LATEST CHANGES BETWEEN 2.0.2 and 2.0.1
I. CHANGES TO THE MODULES / FONT DRIVERS
@@ -1315,7 +1707,7 @@ BETA-8 (RELEASE CANDIDATE) CHANGES
* Support for transforms and direct rendering in FT_Load_Glyph:
Most of the functionality found in <freetype/ftglyph.h> has been
- moved to the core library. Hence, the following:
+ moved to the core library. Hence, the following:
- A transform can be specified for a face through
FT_Set_Transform. this transform is applied by FT_Load_Glyph
@@ -1346,7 +1738,7 @@ BETA-8 (RELEASE CANDIDATE) CHANGES
OLD CHANGES FOR BETA 7
- - bug-fixed the OpenType/CFF parser. It now loads and displays my
+ - bug-fixed the OpenType/CFF parser. It now loads and displays my
two fonts nicely, but I'm pretty certain that more testing is
needed :-)
@@ -1354,20 +1746,20 @@ OLD CHANGES FOR BETA 7
correctly (well, the accent is not always well placed, but that's
another problem..)
- - added the CID-keyed Type 1 driver in "src/cid". Works pretty well
+ - added the CID-keyed Type 1 driver in "src/cid". Works pretty well
for only 13 Kb of code ;-) Doesn't read AFM files though, nor the
really useful CMAP files..
- - fixed two bugs in the smooth renderer (src/base/ftgrays.c). Thanks
- to Boris Letocha for spotting them and providing a fix..
+ - fixed two bugs in the smooth renderer (src/base/ftgrays.c).
+ Thanks to Boris Letocha for spotting them and providing a fix.
- - fixed potential "divide by zero" bugs in ftcalc.c.. my god..
+ - fixed potential "divide by zero" bugs in ftcalc.c.
- added source code for the OpenType/CFF driver (still incomplete
though..)
- modified the SFNT driver slightly to perform more robust header
- checks in TT_Load_SFNT_Header. This prevents certain font files
+ checks in TT_Load_SFNT_Header. This prevents certain font files
(e.g. some Type 1 Multiple Masters) from being incorrectly
"recognized" as TrueType font files..
@@ -1378,8 +1770,8 @@ OLD CHANGES FOR BETA 7
- added a tiny segment cache to the SFNT Charmap 4 decoder, in order
to minimally speed it up..
- - added support for Multiple Master fonts in "type1z". There is also
- a new file named <freetype/ftmm.h> which defines functions to
+ - added support for Multiple Master fonts in "type1z". There is
+ also a new file named <freetype/ftmm.h> which defines functions to
manage them from client applications.
The new file "src/base/ftmm.c" is also optional to the engine..
@@ -1391,7 +1783,7 @@ OLD CHANGES FOR BETA 7
correctly (used for many oblique fonts..)
- some fixes for 64-bit systems (mainly changing some FT_TRACE calls
- to use %p instead of %lx).. Thanks to Karl Robillard
+ to use %p instead of %lx). Thanks to Karl Robillard.
- fixed some bugs in the sbit loader (src/base/sfnt/ttsbit.c) +
added a new flag, FT_LOAD_CROP_BITMAP to query that bitmaps be
@@ -1410,7 +1802,7 @@ OLD CHANGES FOR BETA 7
OLD CHANGES 16 May 2000
- - tagged "BETA-6" in the CVS tree. This one is a serious release
+ - tagged "BETA-6" in the CVS tree. This one is a serious release
candidate even though it doesn't incorporate the auto-hinter yet..
- various obsolete files were removed, and copyright header updated
@@ -1440,8 +1832,8 @@ OLD CHANGES 16 May 2000
|
| It seems the C pre-processor that comes with LCC is broken, it
| doesn't recognize the ANSI standard directives # and ##
- | correctly when one of the argument is a macro. Also, something
- | like:
+ | correctly when one of the argument is a macro. Also,
+ | something like:
|
| #define F(x) print##x
|
@@ -1451,12 +1843,12 @@ OLD CHANGES 16 May 2000
|
| print "hello")
|
- | by its pre-processor. For this reason, you simply cannot build
+ | by its pre-processor. For this reason, you simply cannot build
| FreeType 2 in debug mode with this compiler..
- - yet another massive grunt work. I've changed the definition of the
- EXPORT_DEF, EXPORT_FUNC, BASE_DEF & BASE_FUNC macros. These now
- take an argument, which is the function's return value type.
+ - yet another massive grunt work. I've changed the definition of
+ the EXPORT_DEF, EXPORT_FUNC, BASE_DEF & BASE_FUNC macros. These
+ now take an argument, which is the function's return value type.
This is necessary to compile FreeType as a DLL on Windows and
OS/2. Depending on the compiler used, a compiler-specific keyword
@@ -1464,7 +1856,7 @@ OLD CHANGES 16 May 2000
after (BorlandC++) the type..
Of course, this needed a lot of changes throughout the source code
- to make it compile again... All cleaned up now, apparently..
+ to make it compile again... All cleaned up now, apparently..
Note also that there is a new EXPORT_VAR macro defined to allow
the _declaration_ of an exportable public (constant)
@@ -1493,17 +1885,17 @@ OLD CHANGES 16 May 2000
(the implementation was already in "ftobjs.c").
- the file <freetype/fterrors.h> has been seriously updated in order
- to allow the automatic generation of error message tables. See the
- comments within it for more information.
+ to allow the automatic generation of error message tables. See
+ the comments within it for more information.
- - major directory hierarchy re-organisation. This was done for two
+ - major directory hierarchy re-organisation. This was done for two
things:
* first, to ease the "manual" compilation of the library by
requiring at lot less include paths :-)
* second, to allow external programs to effectively access
- internal data fields. For example, this can be extremely
+ internal data fields. For example, this can be extremely
useful if someone wants to write a font producer or a font
manager on top of FreeType.
@@ -1516,14 +1908,15 @@ OLD CHANGES 16 May 2000
Some new include sub-directories are available:
a. the "freetype/config" directory, contains two files used to
- configure the build of the library. Client applications should
- not need to look at these normally, but they can if they want.
+ configure the build of the library. Client applications
+ should not need to look at these normally, but they can if
+ they want.
#include <freetype/config/ftoption.h>
#include <freetype/config/ftconfig.h>
b. the "freetype/internal" directory, contains header files that
- describes library internals. These are the header files that
+ describes library internals. These are the header files that
were previously found in the "src/base" and "src/shared"
directories.
@@ -1606,9 +1999,9 @@ OLD CHANGES - 14-apr-2000
to handle the new XFree86 4.0 fonts (and a few other ones..)
- the smooth renderer is now complete and supports sub-banding to
- render large glyphs at high speed. However, it is still located in
- "demos/src/ftgrays.c" and should move to the library itself in the
- next beta.. NOTE: The smooth renderer doesn't compile in
+ render large glyphs at high speed. However, it is still located
+ in "demos/src/ftgrays.c" and should move to the library itself in
+ the next beta. NOTE: The smooth renderer doesn't compile in
stand-alone mode anymore, but this should be fixed RSN..
- introduced convenience functions to more easily deal with glyph
@@ -1621,14 +2014,14 @@ OLD CHANGES - 14-apr-2000
results).
- changed the raster interface, in order to allow client
- applications to provide their own span-drawing callbacks. However,
- only the smooth renderer supports this. See "FT_Raster_Params" in
- the file "include/ftimage.h"
+ applications to provide their own span-drawing callbacks.
+ However, only the smooth renderer supports this. See
+ "FT_Raster_Params" in the file "include/ftimage.h".
- fixed a small bug in FT_MulFix that caused incorrect transform
computation!
- - Note: The tutorial is out-of-date, grumpf.. :-(
+ - Note: The tutorial is out-of-date.
======================================================================
@@ -1670,7 +2063,7 @@ OLD CHANGES - 12-mar-2000
OLD CHANGES - 22-feb-2000
- - introduced the "psnames" module. It is used to:
+ - introduced the "psnames" module. It is used to:
o convert a Postscript glyph name into the equivalent Unicode
character code (used by the Type 1 driver(s) to synthetize on
@@ -1682,16 +2075,16 @@ OLD CHANGES - 22-feb-2000
names support routines, while the other two tables are used by
the Type 1 driver(s)).
- - introduced the "type1z" alternate Type 1 driver. This is a (still
+ - introduced the "type1z" alternate Type 1 driver. This is a (still
experimental) driver for the Type 1 format that will ultimately
- replace the one in "src/type1". It uses pattern matching to load
- data from the font, instead of a finite state analyzer. It works
- much better than the "old" driver with "broken" fonts. It is also
+ replace the one in "src/type1". It uses pattern matching to load
+ data from the font, instead of a finite state analyzer. It works
+ much better than the "old" driver with "broken" fonts. It is also
much smaller (under 15 Kb).
- the Type 1 drivers (both in "src/type1" and "src/type1z") are
nearly complete. They both provide automatic Unicode charmap
- synthesis through the "psnames" module. No re-encoding vector is
+ synthesis through the "psnames" module. No re-encoding vector is
needed. (note that they still leak memory due to some code
missing, and I'm getting lazy).
@@ -1699,7 +2092,7 @@ OLD CHANGES - 22-feb-2000
wasn't exactly tested as it should ;-)
- The TrueType glyph loader has been seriously rewritten (see the
- file "src/truetype/ttgload.c". It is now much, much simpler as
+ file "src/truetype/ttgload.c". It is now much, much simpler as
well as easier to read, maintain and understand :-) Preliminary
versions introduced a memory leak that has been reported by Jack
Davis, and is now fixed..
@@ -1750,7 +2143,7 @@ OLDER CHANGES - 27-jan-2000
drivers to co-exist peacefully
- updated the "T1_Face" type to better separate Postscript font
- content from the rest of the FT_Face structure. Might be used
+ content from the rest of the FT_Face structure. Might be used
later by the CFF/Type2 driver..
- added an experimental replacement Type 1 driver featuring advanced
@@ -1802,9 +2195,9 @@ High-Level Interface:
field "face->glyph.format"
- the list of available charmaps is directly accessible through
- "face->charmaps", counting "face->num_charmaps" elements. Each
+ "face->charmaps", counting "face->num_charmaps" elements. Each
charmap has an 'encoding' field which specifies which known
- encoding it deals with. Valid values are, for example :
+ encoding it deals with. Valid values are, for example:
ft_encoding_unicode (for ASCII, Latin-1 and Unicode)
ft_encoding_apple_roman
@@ -1812,7 +2205,7 @@ High-Level Interface:
ft_encoding_adobe_standard
ft_encoding_adobe_expert
- other values may be added in the future. Each charmap still
+ other values may be added in the future. Each charmap still
holds its "platform_id" and "encoding_id" values in case the
encoding is too exotic for the current library
@@ -1862,12 +2255,12 @@ Glyph Image Formats:
should encompass all known bitmap types.
Each new image format must provide at least one "raster", i.e. a
- module capable of transforming the glyph image into a bitmap. It's
+ module capable of transforming the glyph image into a bitmap. It's
also possible to change the default raster used for a given glyph
image format.
The default outline scan-converter now uses 128 levels of grays by
- default, which tends to smooth many things. Note that the demo
+ default, which tends to smooth many things. Note that the demo
programs have been updated significantly in order to display these..
@@ -1882,7 +2275,7 @@ Build system:
it is not detected, with pseudo-standard compilation flags)
- the ability to compile from the Makefiles with very different and
- exotic compilers. Note that linking the library can be difficult
+ exotic compilers. Note that linking the library can be difficult
for some platforms.
For example, the file `config/win32/lcclib.bat' is invoked by the
@@ -1893,9 +2286,9 @@ Build system:
Here's how it works:
- the first time you type `make', the build system runs a series of
- sub-makefiles in order to detect your host platform. It then dumps
- what it found, and creates a file called `config.mk' in the
- current directory. This is a sub-Makefile used to define many
+ sub-makefiles in order to detect your host platform. It then
+ dumps what it found, and creates a file called `config.mk' in the
+ current directory. This is a sub-Makefile used to define many
important Make variables used to build the library.
- the second time, the build system detects the `config.mk' then use
@@ -1909,7 +2302,7 @@ Build system:
re-run make.
Finally, the default compiler for all platforms is gcc (for now,
- this will hopefully changed in the future). You can however specify
+ this will hopefully changed in the future). You can however specify
a different compiler by specifying it after the 'setup' target as
in:
@@ -1933,7 +2326,7 @@ Portability:
In the previous beta, a single FT_System object was used to
encompass all low-level operations like thread synchronisation,
- memory management and i/o access. This has been greatly simplified:
+ memory management and i/o access. This has been greatly simplified:
- thread synchronisation has been dropped, for the simple reason
that the library is already re-entrant, and that if you really
@@ -1947,12 +2340,12 @@ Portability:
- resources have disappeared (they created more problems than they
solved), and i/o management have been simplified greatly as a
- result. Streams are defined through FT_Stream objects, which can
- be either memory-based or disk-based.
+ result. Streams are defined through FT_Stream objects, which
+ can be either memory-based or disk-based.
Note that each face has its own stream, which is closed only
when the face object is destroyed. Hence, a function like
- TT_Flush_Face in 1.x cannot be directly supported. However, if
+ TT_Flush_Face in 1.x cannot be directly supported. However, if
you really need something like this, you can easily tailor your
own streams to achieve the same feature at a lower level (and
use FT_Open_Face instead of FT_New_Face to create the face).
@@ -1973,18 +2366,19 @@ Font Drivers:
library at compile time is managed through a new configuration file
called `config/<platform>/ftmodule.h'.
- This file is autogenerated when invoking `make modules'. This target
- will parse all sub-directories of 'src', looking for a "module.mk"
- rules file, used to describe the driver to the build system.
+ This file is autogenerated when invoking `make modules'. This
+ target will parse all sub-directories of 'src', looking for a
+ "module.mk" rules file, used to describe the driver to the build
+ system.
Hence, one should call `make modules' each time a font driver is
added or removed from the `src' directory.
- Finally, this version provides a "pseudo-driver" in `src/sfnt'. This
- driver doesn't support font files directly, but provides services
- used by all TrueType-like font drivers. Hence, its code is shared
- between the TrueType & OpenType font formats, and possibly more
- formats to come if we're lucky..
+ Finally, this version provides a "pseudo-driver" in `src/sfnt'.
+ This driver doesn't support font files directly, but provides
+ services used by all TrueType-like font drivers. Hence, its code is
+ shared between the TrueType & OpenType font formats, and possibly
+ more formats to come if we're lucky..
----------------------------------------------------------------------
@@ -1998,14 +2392,14 @@ Extensions support:
driver.
Extension ids are now strings, rather than 4-byte tags, as this is
- usually more readable..
+ usually more readable.
Each extension has:
- some data, associated to each face object
- an interface (table of function pointers)
An extension that is format-specific should simply register itself
- to the correct font driver. Here is some example code:
+ to the correct font driver. Here is some example code:
// Registering an extensions
//
diff --git a/extras/freetype2/docs/CUSTOMIZE b/extras/freetype2/docs/CUSTOMIZE
index 397c2c33f..8709b3dec 100644
--- a/extras/freetype2/docs/CUSTOMIZE
+++ b/extras/freetype2/docs/CUSTOMIZE
@@ -1,79 +1,85 @@
How to customize the compilation of the library:
================================================
- FreeType is highly customizable to fit various needs, and this document
- details how it is possible to select options and components at compilation
- time.
+ FreeType is highly customizable to fit various needs, and this
+ document describes how it is possible to select options and components
+ at compilation time.
-I. Configuration macros:
+I. Configuration macros
- the file found in "include/freetype/config/ftoption.h" contains a list
+ The file found in "include/freetype/config/ftoption.h" contains a list
of commented configuration macros that can be toggled by developers to
- indicate which features to activate in their build of the library.
+ indicate which features should be active while building the library.
- these options range from debug level to availability of certain
+ These options range from debug level to availability of certain
features, like native TrueType hinting through a bytecode interpreter.
- we invite you to read this file for more information. You can change
- the file's content to suit your needs, or override it with one of the
- techniques described below..
+ We invite you to read this file for more information. You can change
+ the file's content to suit your needs, or override it with one of the
+ techniques described below.
-II. Modules list:
+II. Modules list
- the file found in "include/freetype/config/ftmodule.h" contains a list
- of names corresponding to the modules / font drivers to be statically
- compiled in the FreeType library during the build.
+ The file found in "include/freetype/config/ftmodule.h" contains a list
+ of names corresponding to the modules and font drivers to be
+ statically compiled in the FreeType library during the build.
- you can change it to suit your own preferences. Be aware that certain
- modules depend on others, as described by the file "modules.txt" in
+ You can change it to suit your own preferences. Be aware that certain
+ modules depend on others, as described by the file "modules.txt" in
this directory.
- you can modify the file's content to suit your needs, or override it
- at compile time with one of the methods described below
+ You can modify the file's content to suit your needs, or override it
+ at compile time with one of the methods described below.
-III. System interface:
+III. System interface
- FreeType's default interface to the system (i.e. the parts that deal with
- memory management and i/o streams) is located in "src/base/ftsystem.c".
+ FreeType's default interface to the system (i.e., the parts that deal
+ with memory management and i/o streams) is located in
+ "src/base/ftsystem.c".
- the current implementation uses standard C library calls to manage
- memory and read font files. It is however possible to write custom
+ The current implementation uses standard C library calls to manage
+ memory and to read font files. It is however possible to write custom
implementations to suit specific systems.
- to tell the GNU Make-based build system to use a custom system interface,
- you'll need to define the environment variable FTSYS_SRC to point to
- the relevant implementation, like in:
+ To tell the GNU Make-based build system to use a custom system
+ interface, you have to define the environment variable FTSYS_SRC to
+ point to the relevant implementation:
- on Unix:
- ./configure <youroptions>
- export FTSYS_SRC=foo/my_ftsystem.c
- make
- make install
+ on Unix:
+
+ ./configure <your options>
+ export FTSYS_SRC=foo/my_ftsystem.c
+ make
+ make install
- on Windows:
- make setup <compiler>
- set FTSYS_SRC=foo/my_ftsystem.c
- make
+ on Windows:
+
+ make setup <compiler>
+ set FTSYS_SRC=foo/my_ftsystem.c
+ make
-IV. Overriding default configuration and module headers:
+IV. Overriding default configuration and module headers
+
+ It is possible to override the default configuration and module
+ headers without changing the original files. There are two ways to do
+ that:
- it is possible to over-ride the default configuration and module headers
- without changing the original files. There are two ways to do that:
- 1. Using the C include path:
+ 1. Using the C include path
- use the C include path to ensure that your own versions of the
- files are used at compile time when the lines:
+ Use the C include path to ensure that your own versions of the files
+ are used at compile time when the lines
#include FT_CONFIG_OPTIONS_H
#include FT_CONFIG_MODULES_H
- are compiled. Their default values being <freetype/config/ftoption.h>
- and <freetype/config/ftmodule.h>, you can do something like:
+ are compiled. Their default values being
+ <freetype/config/ftoption.h> and <freetype/config/ftmodule.h>, you
+ can do something like:
custom/
freetype/
@@ -82,36 +88,38 @@ IV. Overriding default configuration and module headers:
ftmodule.h => custom modules list
include/ => normal FreeType 2 include
- freetype/
- ...
+ freetype/
+ ...
- then change the C include path to always give the path to "custom"
- before the FreeType 2 "include"
+ then change the C include path to always give the path to "custom"
+ before the FreeType 2 "include".
2. Re-defining FT_CONFIG_OPTIONS_H and FT_CONFIG_MODULES_H
- another way to do the same thing is to re-define the macros used
- to name the configuration headers. To do so, you'll need a custom
- "ft2build.h", whose content can be as simple as:
+ Another way to do the same thing is to redefine the macros used to
+ name the configuration headers. To do so, you need a custom
+ "ft2build.h" whose content can be as simple as:
- #ifndef __FT2_BUILD_GENERIC_H__
- #define __FT2_BUILD_GENERIC_H__
+ #ifndef __FT2_BUILD_MY_PLATFORM_H__
+ #define __FT2_BUILD_MY_PLATFORM_H__
- #define FT_CONFIG_OPTIONS_H <custom/my-ftoption.h>
- #define FT_CONFIG_MACROS_H <custom/my-ftmodule.h>
+ #define FT_CONFIG_OPTIONS_H <custom/my-ftoption.h>
+ #define FT_CONFIG_MODULES_H <custom/my-ftmodule.h>
- #include <freetype/config/ftheader.h>
+ #include <freetype/config/ftheader.h>
- #endif /* __FT2_BUILD_GENERIC_H__ */
+ #endif /* __FT2_BUILD_MY_PLATFORM_H__ */
- place them in:
+ Place those files in a separate directory, e.g.:
- custom/
- ft2build.h => custom version described above
- my-ftoption.h => custom options header
- my-ftmodule.h => custom modules list header
+ custom/
+ ft2build.h => custom version described above
+ my-ftoption.h => custom options header
+ my-ftmodule.h => custom modules list header
+
+ and change the C include path to ensure that "custom" is always
+ placed before the FT2 "include" during compilation.
- and change the C include path to ensure that "custom" is always placed
- before the FT2 "include" during compilation.
+--- end of CUSTOMIZE ---
diff --git a/extras/freetype2/docs/DEBUG b/extras/freetype2/docs/DEBUG
index 03ed70311..c85ef3cb1 100644
--- a/extras/freetype2/docs/DEBUG
+++ b/extras/freetype2/docs/DEBUG
@@ -1,5 +1,5 @@
-Debugging within the FreeType sources:
-======================================
+Debugging within the FreeType sources
+=====================================
I. Configuration macros
-----------------------
@@ -12,15 +12,15 @@ located in the file "ftoptions.h". The macros are:
FT_DEBUG_LEVEL_ERROR
#define this macro if you want to compile the FT_ERROR macro calls
- used to print error messages during program execution. This will
- not stop the program, but is very useful to spot invalid fonts
- during development and code workarounds for them.
+ to print error messages during program execution. This will not
+ stop the program. Very useful to spot invalid fonts during
+ development and to code workarounds for them.
FT_DEBUG_LEVEL_TRACE
- #define this macro if you want to compile both the FT_ERROR macro
- and the FT_TRACE one. This also includes the variants FT_TRACE0,
- FT_TRACE1, FT_TRACE2, ..., FT_TRACE6.
+ #define this macro if you want to compile both macros FT_ERROR and
+ FT_TRACE. This also includes the variants FT_TRACE0, FT_TRACE1,
+ FT_TRACE2, ..., FT_TRACE6.
The trace macros are used to send debugging messages when an
appropriate "debug level" is configured at runtime through the
@@ -28,21 +28,21 @@ located in the file "ftoptions.h". The macros are:
FT_DEBUG_MEMORY
- If this macro is #defined, the FreeType engines is linked with a
+ If this macro is #defined, the FreeType engine is linked with a
small but effective debugging memory manager that tracks all
allocations and frees that are performed within the font engine.
When the FT2_DEBUG_MEMORY environment variable is defined at
runtime, a call to FT_Done_FreeType will dump memory statistics,
including the list of leaked memory blocks with the source locations
- where these were allocated. It's always a very good idea to define
+ where these were allocated. It is always a very good idea to define
this in development builds. This works with _any_ program linked to
FreeType, but requires a big deal of memory (the debugging memory
manager never frees the blocks to the heap in order to detect double
frees).
When FT2_DEBUG_MEMORY isn't defined at runtime, the debugging memory
- manager is ignored, and performance is un-affected.
+ manager is ignored, and performance is unaffected.
II. Debugging macros
@@ -59,7 +59,7 @@ its code:
either FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined in
"ftoption.h".
- Note that you must use with a printf-like signature, but with double
+ Note that you have to use a printf-like signature, but with double
parentheses, like in:
FT_ERROR(( "your %s is not %s\n", "foo", "bar" ));
@@ -93,9 +93,9 @@ its code:
trace_XXXX where XXXX is one of the component names defined in the
internal file <freetype/internal/fttrace.h>.
- Each such component is assigned a "debug level", ranging from 0 to 6
- when a program linked with FreeType starts, through the use of the
- FT2_DEBUG environment variable, described later.
+ Each such component is assigned a "debug level", ranging from 0
+ to 6, through the use of the FT2_DEBUG environment variable
+ (described below) when a program linked with FreeType starts.
When FT_TRACE is called, its level is compared to the one of the
corresponding component. Messages with trace levels *higher* than
@@ -106,7 +106,7 @@ its code:
least* 2.
The second parameter to FT_TRACE must contain parentheses and
- correspond to a print-like call, as in:
+ correspond to a printf-like call, as in:
FT_TRACE( 2, ( "your %s is not %s\n", "foo", "bar" ) )
@@ -123,7 +123,6 @@ III. Environment variables
The following environment variables control debugging output and
behaviour of FreeType at runtime:
-
FT2_DEBUG
This variable is only used when FreeType is built with
@@ -133,51 +132,52 @@ behaviour of FreeType at runtime:
component1:level1 component2:level2 component3:level3 ...
where "componentX" is the name of a tracing component, as defined in
- "fttrace.h", but without the "trace_" prefix, and "levelX" is the
+ "fttrace.h", but without the "trace_" prefix. "levelX" is the
corresponding level to use at runtime.
"any" is a special component name that will be interpreted as
"any/all components". For example, the following definitions
set FT2_DEBUG=any:2 memory:5 io:4 (on Windows)
- export FT2_DEBUG="any:2 memory:5 io:4" (on Linux)
+ export FT2_DEBUG="any:2 memory:5 io:4" (on Linux with bash)
both stipulate that all components should have level 2, except for
- the memory and io components which will be set to trace levels 5 and
- 4 respectively.
+ the memory and io components which will be set to trace levels 5
+ and 4, respectively.
FT2_DEBUG_MEMORY
This environment variable, when defined, tells FreeType to use a
- debugging memory manager that will track leaked memory blocks as
+ debugging memory manager that will track leaking memory blocks as
well as other common errors like double frees. It is also capable
- of reporting _where_ the leaked blocks were allocated, which
+ of reporting _where_ the leaking blocks were allocated, which
considerably saves time when debugging new additions to the library.
This code is only compiled when FreeType is built with the
FT_DEBUG_MEMORY macro #defined in "ftoption.h" though, it will be
ignored in other builds.
-
FT2_ALLOC_TOTAL_MAX
- this variable is ignored if FT2_DEBUG_MEMORY is not defined. It allows
- you to specify a maximum heap size for all memory allocations performed
- by FreeType. This is very useful to test the robustness of the font
- engine and programs that use it in tight memory conditions.
+ This variable is ignored if FT2_DEBUG_MEMORY is not defined. It
+ allows you to specify a maximum heap size for all memory allocations
+ performed by FreeType. This is very useful to test the robustness
+ of the font engine and programs that use it in tight memory
+ conditions.
- If it is undefined, or if its value is not strictly positive, then no
- allocation bounds are checked at runtime.
-
+ If it is undefined, or if its value is not strictly positive, then
+ no allocation bounds are checked at runtime.
FT2_ALLOC_COUNT_MAX
- this variable is ignored if FT2_DEBUG_MEMORY is not defined. It allows
- you to sepcify a maximum number of memory allocations performed by
- FreeType before returning the error FT_Err_Out_Of_Memory. This is
- useful for debugging and testing the engine's robustness.
+ This variable is ignored if FT2_DEBUG_MEMORY is not defined. It
+ allows you to specify a maximum number of memory allocations
+ performed by FreeType before returning the error
+ FT_Err_Out_Of_Memory. This is useful for debugging and testing the
+ engine's robustness.
- If it is undefined, or if its value is not strictly positive, then no
- allocation bounsd are checked at runtime.
+ If it is undefined, or if its value is not strictly positive, then
+ no allocation bounsd are checked at runtime.
+
-End of file
+--- end of DEBUG ---
diff --git a/extras/freetype2/docs/INSTALL b/extras/freetype2/docs/INSTALL
index 8f5bc320c..8fb665759 100644
--- a/extras/freetype2/docs/INSTALL
+++ b/extras/freetype2/docs/INSTALL
@@ -1,65 +1,67 @@
-Welcome
-There are several ways to build the FreeType library, depending on your
-system and the level of customization you need. Here's a short overview
-of the documentation available:
+There are several ways to build the FreeType library, depending on your
+system and the level of customization you need. Here is a short
+overview of the documentation available:
-I. Normal installation and upgrades:
- 1. Native TrueType Hinting:
-
- Native TrueType hinting is disabled by default[1]. If you really need it,
- read the file "TRUETYPE" for information.
+I. Normal installation and upgrades
+===================================
+
+ 1. Native TrueType Hinting
+
+ Native TrueType hinting is disabled by default[1]. If you really
+ need it, read the file "TRUETYPE" for information.
-
- 2. Unix Systems (as well as Cygwin or MSys on Windows):
+ 2. Unix Systems (as well as Cygwin or MSys on Windows)
Please read *both* UPGRADE.UNX and INSTALL.UNX to install or upgrade
- FreeType 2 on a Unix system. Note that you *will* need GNU Make, since
- other make tools won't work (this includes BSD Make !!)
+ FreeType 2 on a Unix system. Note that you *will* need GNU Make,
+ since other make tools won't work (this includes BSD Make).
- 3. On VMS with the "mms" build tool:
+ 3. On VMS with the "mms" build tool
- see INSTALL.VMS for installation instructions on this platform
+ See INSTALL.VMS for installation instructions on this platform.
- 4. Other systems using GNU Make:
+ 4. Other systems using GNU Make
- on non-Unix platforms, it's possible to build the library using
- GNU Make utility. Note that *NO OTHER MAKE TOOL WILL WORK* !!
- This methods supports several compilers on Windows, OS/2 and BeOS,
+ On non-Unix platforms, it is possible to build the library using GNU
+ Make utility. Note that *NO OTHER MAKE TOOL WILL WORK*[2]! This
+ methods supports several compilers on Windows, OS/2, and BeOS,
including Mingw, Visual C++, Borland C++, and more.
- instructions are provided in the file "INSTALL.GNU"
+ Instructions are provided in the file "INSTALL.GNU".
-
- 5. With an IDE Project File (e.g. for Visual Studio or CodeWarrior):
+ 5. With an IDE Project File (e.g. for Visual Studio or CodeWarrior)
- we provide a small number of "project files" for various IDEs to
- automatically build the library as well. Note that these files are
- not supported and sporadically maintained by FreeType developers,
- so don't expect them to work in each release.
+ We provide a small number of "project files" for various IDEs to
+ automatically build the library as well. Note that these files are
+ not supported and sporadically maintained by FreeType developers, so
+ don't expect them to work in each release.
- to find them, have a look at the content of the "builds/<system>"
+ To find them, have a look at the content of the "builds/<system>"
directory, where <system> stands for your OS or environment.
-
- 6. From you own IDE, or own Makefiles:
+ 6. From you own IDE, or own Makefiles
If you want to create your own project file, follow the instructions
given in the "INSTALL.ANY" document of this directory.
-II. Custom builds of the library:
+II. Custom builds of the library
+================================
- Customizing the compilation of FreeType is easy, and allows you to select
- only the components of the font engine that you really need. For more details
- read the file "CUSTOMIZE"
+ Customizing the compilation of FreeType is easy, and allows you to
+ select only the components of the font engine that you really need.
+ For more details read the file "CUSTOMIZE".
---------------------------------------------------------------------
+------------------------------------------------------------------------
[1] More details on: http://www.freetype.org/patents.html
-End of file
+[2] make++, a make tool written in Perl, has sufficient support of GNU
+ make extensions to build FreeType. See
+ http://makepp.sourceforge.net for more information; you need version
+ 1.19 or newer, and you must pass option `--norc-substitution'.
- \ No newline at end of file
+--- end of INSTALL ---
diff --git a/extras/freetype2/docs/INSTALL.ANY b/extras/freetype2/docs/INSTALL.ANY
index 5e2cf0eea..af3f6e7a3 100644
--- a/extras/freetype2/docs/INSTALL.ANY
+++ b/extras/freetype2/docs/INSTALL.ANY
@@ -1,96 +1,99 @@
-Instructions on how to build FreeType with your own build tool:
+Instructions on how to build FreeType with your own build tool
+==============================================================
- see the file "CUSTOMIZE" to learn how to customize FreeType to
- specific environments.
+See the file "CUSTOMIZE" to learn how to customize FreeType to specific
+environments.
- follow these simple steps:
-I. Normal way:
---------------
+I. Standard procedure
+---------------------
- * DISABLE PRE-COMPILED HEADERS ! This is very important for Visual
+ * DISABLE PRE-COMPILED HEADERS! This is very important for Visual
C++, because FreeType uses lines like:
- #include FT_FREETYPE_H
+ #include FT_FREETYPE_H
- which are not correctly supported by this compiler, while being
- ISO C compliant !!
+ which are not correctly supported by this compiler while being ISO C
+ compliant!
* You need to add the directories "freetype2/include" to your include
path when compiling the library.
- * FreeType 2 is made of several components; each one of them is
- located in a subdirectory of "freetype2/src". For example,
+ * FreeType 2 is made of several components; each of them is located in
+ a subdirectory of "freetype2/src". For example,
'freetype2/src/truetype/' contains the TrueType font driver.
* DO NOT COMPILE ALL C FILES! Rather, compile the following ones:
- -- base components (required)
-
- src/base/ftsystem.c
- src/base/ftinit.c
- src/base/ftdebug.c
- src/base/ftbase.c
- src/base/ftglyph.c
- src/base/ftbbox.c
- src/base/ftmm.c
- src/base/ftpfr.c -- optional, see <freetype/ftpfr.h>
- src/base/ftbdf.c -- optional, see <freetype/ftbdf.h>
- src/base/ftwinfnt.c -- optional, see <freetype/ftwinfnt.h>
-
- src/base/ftmac.c -- only on the Macintosh
-
- -- other components are optional
-
- src/autohint/autohint.c -- auto hinting module
- src/cache/ftcache.c -- cache sub-system (in beta)
- src/sfnt/sfnt.c -- SFNT files support
- (TrueType & OpenType)
- src/cff/cff.c -- CFF/OpenType font driver
- src/pfr/pfr.c -- PFR/TrueDoc font driver
- src/bdf/bdf.c -- BDF font driver
- src/pcf/pcf.c -- PCF font driver
- src/psnames/psnames.c -- Postscript glyph names support
- src/psaux/psaux.c -- Postscript Type 1 parsing
- src/truetype/truetype.c -- TrueType font driver
- src/type1/type1.c -- Type 1 font driver
- src/cid/type1cid.c -- Type 1 CID-keyed font driver
- src/winfonts/winfonts.c -- Windows FONT / FNT font driver
- src/raster1/raster1.c -- monochrome rasterizer
- src/smooth/smooth.c -- anti-aliasing rasterizer
-
- Note:
+ -- base components (required)
+
+ src/base/ftsystem.c
+ src/base/ftinit.c
+ src/base/ftdebug.c
+ src/base/ftbase.c
+ src/base/ftglyph.c
+ src/base/ftbbox.c
+ src/base/ftmm.c
+ src/base/ftpfr.c -- optional, see <freetype/ftpfr.h>
+ src/base/ftbdf.c -- optional, see <freetype/ftbdf.h>
+ src/base/ftwinfnt.c -- optional, see <freetype/ftwinfnt.h>
+
+ src/base/ftmac.c -- only on the Macintosh
+
+ -- other components (optional)
+
+ src/autohint/autohint.c -- auto hinting module
+ src/cache/ftcache.c -- cache sub-system (in beta)
+ src/sfnt/sfnt.c -- SFNT files support
+ (TrueType & OpenType)
+ src/cff/cff.c -- CFF/OpenType font driver
+ src/pfr/pfr.c -- PFR/TrueDoc font driver
+ src/bdf/bdf.c -- BDF font driver
+ src/pcf/pcf.c -- PCF font driver
+ src/psnames/psnames.c -- PostScript glyph names support
+ src/psaux/psaux.c -- PostScript Type 1 parsing
+ src/truetype/truetype.c -- TrueType font driver
+ src/type1/type1.c -- Type 1 font driver
+ src/cid/type1cid.c -- Type 1 CID-keyed font driver
+ src/winfonts/winfonts.c -- Windows FONT / FNT font driver
+ src/raster1/raster1.c -- monochrome rasterizer
+ src/smooth/smooth.c -- anti-aliasing rasterizer
+
+ Notes:
`truetype.c' needs `sfnt.c' and `psnames.c'
`type1.c' needs `psaux.c' and `psnames.c'
`type1cid.c' needs `psaux.c' and `psnames.c'
`cff.c' needs `sfnt.c', `psaux.c', and `psnames.c'
- that should be it ! in case of problems, see the archives of
- the FreeType development mailing list.
+
+ You are done. In case of problems, see the archives of the FreeType
+ development mailing list.
II. Support for flat-directory compilation
------------------------------------------
- It is possible to put all FreeType 2 source files into a single
+ It is possible to put all FreeType 2 source files into a single
directory, with the *exception* of the `include' hierarchy.
- 1. Copy all files in current directory:
+ 1. Copy all files in current directory
+
+ cp freetype2/src/base/*.[hc] .
+ cp freetype2/src/raster1/*.[hc] .
+ cp freetype2/src/smooth/*.[hc] .
+ etc.
- cp freetype2/src/base/*.[hc] .
- cp freetype2/src/raster1/*.[hc] .
- cp freetype2/src/smooth/*.[hc] .
- etc.
+ 2. Compile sources
- 2. Compile sources:
+ cc -c -Ifreetype2/include ftsystem.c
+ cc -c -Ifreetype2/include ftinit.c
+ cc -c -Ifreetype2/include ftdebug.c
+ cc -c -Ifreetype2/include ftbase.c
+ etc.
- cc -c -Ifreetype2/include ftsystem.c
- cc -c -Ifreetype2/include ftinit.c
- cc -c -Ifreetype2/include ftdebug.c
- cc -c -Ifreetype2/include ftbase.c
- etc.
+ You don't need to define the FT_FLAT_COMPILATION macro (as this was
+ required in previous releases of FreeType 2).
- You don't need to define the FT_FLAT_COMPILATION macro (as this was
- required in previous releases of FreeType 2).
+--- end of INSTALL.ANY ---
diff --git a/extras/freetype2/docs/INSTALL.GNU b/extras/freetype2/docs/INSTALL.GNU
index df6f012e3..4a56d6d6d 100644
--- a/extras/freetype2/docs/INSTALL.GNU
+++ b/extras/freetype2/docs/INSTALL.GNU
@@ -1,128 +1,140 @@
-This document contains instructions on how to build the FreeType library
-on non-Unix systems with the help of GNU Make. Note that if you're running
-Cygwin or MSys in Windows, you should follow the instructions of INSTALL.UNX
-instead.
+This document contains instructions how to build the FreeType library on
+non-Unix systems with the help of GNU Make. Note that if you are
+running Cygwin or MSys in Windows, you should follow the instructions in
+the file INSTALL.UNX instead.
- FreeType 2 includes a powerful and flexible build system that allows
- you to easily compile it on a great variety of platforms from the
+ FreeType 2 includes a powerful and flexible build system that allows
+ you to easily compile it on a great variety of platforms from the
command line. To do so, just follow these simple instructions:
- a. Install GNU Make
+ 1. Install GNU Make
+ -------------------
- Because GNU Make is the only Make tool supported to compile
+ Because GNU Make is the only Make tool supported to compile
FreeType 2, you should install it on your machine.
- The FreeType 2 build system relies on many features special to GNU
- Make -- trying to build the library with any other Make tool will
+ The FreeType 2 build system relies on many features special to GNU
+ Make -- trying to build the library with any other Make tool will
*fail*.
- NEARLY ALL OTHER MAKE TOOLS WILL FAIL, INCLUDING "BSD MAKE", SO
+ NEARLY ALL OTHER MAKE TOOLS WILL FAIL, INCLUDING "BSD MAKE", SO
REALLY INSTALL A RECENT VERSION OF GNU MAKE ON YOUR SYSTEM!
- Make sure that you are invoking GNU Make from the command line, by
+ Note that make++, a make tool written in Perl, supports enough
+ features of GNU make to compile FreeType. See
+ http://makepp.sourceforge.net for more information; you need version
+ 1.19 or newer, and you must pass option `--norc-substitution'.
+
+ Make sure that you are invoking GNU Make from the command line, by
typing something like:
- make -v
+ make -v
to display its version number.
VERSION 3.78.1 OR NEWER IS NEEDED!
+ 2. Invoke 'make'
+ ----------------
- b. Invoke 'make'
-
- Go to the root directory of FreeType 2, then simply invoke GNU
- Make from the command line. This will launch the FreeType 2 host
- platform detection routines. A summary will be displayed, for
+ Go to the root directory of FreeType 2, then simply invoke GNU Make
+ from the command line. This will launch the FreeType 2 host
+ platform detection routines. A summary will be displayed, for
example, on Win32:
- ==============================================================
- FreeType build system -- automatic system detection
+ ==============================================================
+ FreeType build system -- automatic system detection
- The following settings are used:
+ The following settings are used:
- platform win32
- compiler gcc
- configuration directory ./builds/win32
- configuration rules ./builds/win32/w32-gcc.mk
+ platform win32
+ compiler gcc
+ configuration directory ./builds/win32
+ configuration rules ./builds/win32/w32-gcc.mk
- If this does not correspond to your system or settings please
- remove the file 'config.mk' from this directory then read the
- INSTALL file for help.
+ If this does not correspond to your system or settings please
+ remove the file 'config.mk' from this directory then read the
+ INSTALL file for help.
- Otherwise, simply type 'make' again to build the library.
- =============================================================
+ Otherwise, simply type 'make' again to build the library.
+ =============================================================
- If the detected settings correspond to your platform and compiler,
- skip to step e. Note that if your platform is completely alien to
+ If the detected settings correspond to your platform and compiler,
+ skip to step 5. Note that if your platform is completely alien to
the build system, the detected platform will be 'ansi'.
- c. Configure the build system for a different compiler
+ 3. Configure the build system for a different compiler
+ ------------------------------------------------------
- If the build system correctly detected your platform, but you want
- to use a different compiler than the one specified in the summary
- (for most platforms, gcc is the defaut compiler), invoke GNU Make
+ If the build system correctly detected your platform, but you want
+ to use a different compiler than the one specified in the summary
+ (for most platforms, gcc is the defaut compiler), invoke GNU Make
with
- make setup <compiler>
+ make setup <compiler>
- For example:
+ Examples:
- to use Visual C++ on Win32, type: "make setup visualc"
- to use Borland C++ on Win32, type "make setup bcc32"
- to use Watcom C++ on Win32, type "make setup watcom"
- to use Intel C++ on Win32, type "make setup intelc"
- to use LCC-Win32 on Win32, type: "make setup lcc"
- to use Watcom C++ on OS/2, type "make setup watcom"
- to use VisualAge C++ on OS/2, type "make setup visualage"
+ to use Visual C++ on Win32, type: "make setup visualc"
+ to use Borland C++ on Win32, type "make setup bcc32"
+ to use Watcom C++ on Win32, type "make setup watcom"
+ to use Intel C++ on Win32, type "make setup intelc"
+ to use LCC-Win32 on Win32, type: "make setup lcc"
+ to use Watcom C++ on OS/2, type "make setup watcom"
+ to use VisualAge C++ on OS/2, type "make setup visualage"
- The <compiler> name to use is platform-dependent. The list of
- available compilers for your system is available in the file
+ The <compiler> name to use is platform-dependent. The list of
+ available compilers for your system is available in the file
`builds/<system>/detect.mk'
- If you are satisfied by the new configuration summary, skip to
- step e.
+ If you are satisfied by the new configuration summary, skip to
+ step 5.
- d. Configure the build system for an unknown platform/compiler
- The auto-detection/setup phase of the build system copies a file
- to the current directory under the name `config.mk'.
+ 4. Configure the build system for an unknown platform/compiler
+ --------------------------------------------------------------
- For example, on OS/2+gcc, it would simply copy
+ The auto-detection/setup phase of the build system copies a file to
+ the current directory under the name `config.mk'.
+
+ For example, on OS/2+gcc, it would simply copy
`builds/os2/os2-gcc.mk' to `./config.mk'.
- If for some reason your platform isn't correctly detected, copy
- manually the configuration sub-makefile to `./config.mk' and go to
- step e.
+ If for some reason your platform isn't correctly detected, copy
+ manually the configuration sub-makefile to `./config.mk' and go to
+ step 5.
- Note that this file is a sub-Makefile used to specify Make
- variables for compiler and linker invocation during the build.
- You can easily create your own version from one of the existing
- configuration files, then copy it to the current directory under
- the name `./config.mk'.
+ Note that this file is a sub-Makefile used to specify Make variables
+ for compiler and linker invocation during the build. You can easily
+ create your own version from one of the existing configuration
+ files, then copy it to the current directory under the name
+ `./config.mk'.
- e. Build the library
- The auto-detection/setup phase should have copied a file in the
- current directory, called `./config.mk'. This file contains
- definitions of various Make variables used to invoke the compiler
- and linker during the build.
+ 5. Build the library
+ --------------------
- To launch the build, simply invoke GNU Make again: The top
- Makefile will detect the configuration file and run the build with
- it.
+ The auto-detection/setup phase should have copied a file in the
+ current directory, called `./config.mk'. This file contains
+ definitions of various Make variables used to invoke the compiler
+ and linker during the build.
+ To launch the build, simply invoke GNU Make again: The top Makefile
+ will detect the configuration file and run the build with it.
- Final note:
+ Final note
- the build system builds a statically linked library of the font engine
- in the "objs" directory. It does _not_ support the build of DLLs on
- Windows and OS/2, if you need these, you'll have to either use
- a IDE-specific project file, or follow the instructions in
+ The build system builds a statically linked library of the font
+ engine in the "objs" directory. It does _not_ support the build of
+ DLLs on Windows and OS/2. If you need these, you have to either use
+ a IDE-specific project file, or follow the instructions in
"INSTALL.ANY" to create your own Makefiles.
+
+
+--- end of INSTALL.GNU ---
diff --git a/extras/freetype2/docs/INSTALL.UNX b/extras/freetype2/docs/INSTALL.UNX
index 6af176dba..d5a45c042 100644
--- a/extras/freetype2/docs/INSTALL.UNX
+++ b/extras/freetype2/docs/INSTALL.UNX
@@ -1,181 +1,65 @@
This document contains instructions on how to build the FreeType library
-on Unix systems. This also works for emulations like Cygwin or MSys on
+on Unix systems. This also works for emulations like Cygwin or MSys on
Win32:
- I. Ensure that you are using GNU Make
+ 1. Ensure that you are using GNU Make
-------------------------------------
- The FreeType build system _exclusively_ works with GNU Make. You
- will not be able to compile the library with the instructions
- below using any other alternative (including BSD Make).
+ The FreeType build system _exclusively_ works with GNU Make. You
+ will not be able to compile the library with the instructions below
+ using any other alternative (including BSD Make).
- Trying to compile the library with a different Make tool will
- print a message like:
+ [Well, this is not really correct. Recently, a perl implementation
+ of make called `makepp' has appeared which can also build FreeType 2
+ successfully on Unix platforms. See http://makepp.sourceforge.net
+ for more details; you need version 1.19 or newer, and you must pass
+ option `--norc-substitution'.]
- Sorry, GNU make is required to build FreeType2.
+ Trying to compile the library with a different Make tool will print
+ a message like:
- and the build process will be aborted. If this happens, install
- GNU Make on your system, and use the GNUMAKE environment variable
- to name it.
+ Sorry, GNU make is required to build FreeType2.
+ and the build process will be aborted. If this happens, install GNU
+ Make on your system, and use the GNUMAKE environment variable to
+ name it.
- IV. Build and install the library
- ---------------------------------
+ 2. Build and install the library
+ --------------------------------
- The following should work on all Unix systems where the 'make'
+ The following should work on all Unix systems where the `make'
command invokes GNU Make:
- ./configure --prefix=<yourprefix>
+ ./configure [options]
make
make install (as root)
- where "<yourprefix>" must be replaced by the prefix returned by
- the "freetype-config" command.
+ The default installation path is "/usr/local". It can be changed
+ with the `--prefix=<path>' option. Example:
- When using a different command to invoke GNU Make, use the GNUMAKE
- variable. For example, if `gmake' is the command to use on your
+ ./configure --prefix=/usr
+
+ When using a different command to invoke GNU Make, use the GNUMAKE
+ variable. For example, if `gmake' is the command to use on your
system, do something like:
- GNUMAKE=gmake ./configure --prefix=<yourprefix>
+ GNUMAKE=gmake ./configure [options]
gmake
gmake install (as root)
- If this still doesn't work, something's rotten on your system(
- (e.g. you're using a very old version of GNU Make)
-
-
-
-I. Unix systems
----------------
-
- If you have GNU Make installed, simply type
-
- ./configure
- make
- make install
-
- on the command line to configure, build and install FreeType on your
- system. Note that the default installation path is "/usr/local".
-
- Please read the file README.UNX, it contains _critical_ information
- regarding the installation of FreeType on many Unix systems.
-
-
-II. From the command line
--------------------------
-
- If you are not using Unix, there are two ways to quickly build
- FreeType 2 from the command line.
-
- The first, and favorite one, is to use the "Jam" build tool. Jam is
- a highly portable replacement for Make whose control files do not
- depend on the current platform or compiler toolset.
-
- For more information, please see:
-
- http://www.freetype.org/jam/index.html
-
- The second one is to use "GNU Make" (and NO OTHER MAKE TOOL).
-
-
- 1. Building FT2 with "Jam"
- --------------------------
-
- Once you've got *our version* of the Jam tool installed on your
- system, simply go to the top-level FT2 directory, then type
-
- "jam"
-
- on the command line. This will build the library and place it in
- the "objs" directory.
-
- By default, a static library is built. On Unix systems, it is
- possible to build a shared library through the "libtool" script.
- You need to have libtool installed on your system, then re-define
- a few environment variables before invoking Jam, as in
-
- export CC="libtool --mode=compile cc"
- export LINK="libtool --mode=link cc"
- jam
-
- In later releases of FT2, building shared libraries with Jam
- should become automatic on Unix systems.
+ If this still doesn't work, something's rotten on your system
+ (e.g. you are using a very old version of GNU Make).
+ It is possible to compile FreeType in a different directory.
+ Assuming the FreeType source files in directory `/src/freetype' a
+ compilation in directory `foo' works as follows:
- 2. Building FT2 with "GNU Make"
- -------------------------------
-
- You need to have GNU Make (version 3.78.1 or newer) installed on
- your system to compile the library from the command line. This will
- _NOT_ work with other make tools (including BSD make)!
-
- [Well, this is not really correct. Recently, a perl implementation
- of make called `makepp' has appeared which can also build FreeType 2
- successfully on Unix platforms. See http://makepp.sourceforge.net
- for more details.]
-
- - Go to the `freetype2' directory.
-
- - Unix (any C compiler should work):
-
- - make setup (don't worry, this will invoke a configure script)
- - make
- - make install
-
- Alternatively, you can pass parameters to the configure script
- within the CFG variable, as in:
-
- - make setup CFG="--prefix=/usr"
- - make
- - make install
-
- If the configure script isn't run, try to add `unix' as a target
- on the command line, e.g.:
-
- - make setup unix CFG="--prefix=/opt/experimental"
-
-
- - Windows:
-
- We provide a version of GNU Make for Win32 on the FreeType site.
- See http://www.freetype.org/download.html for details.
-
- - gcc (Mingw, _not_ CygWin):
-
- - make setup
- - make
-
-
- - Visual C++:
-
- - make setup visualc
- - make
-
-
- - other compilers:
-
- - make setup bcc32 -> Borland C++ 32 bits
- - make setup intelc -> Intel C++
- - make setup watcom -> Watcom C++
- - make setup lcc -> Win32-LCC
-
-
- If you want to build FreeType 2 in another directory, you must set
- two environment variables, `OJB_DIR' and `TOP_DIR'. The former
- gives the directory where the object files and the library should be
- created (this directory must exist), the latter the top directory of
- the FreeType 2 source tree. Example:
-
- OBJ_DIR=~/freetype2.compiled TOP_DIR=~/freetype2 \
- make -f$TOP_DIR/Makefile setup ansi
- OBJ_DIR=~/freetype2.compiled TOP_DIR=~/freetype2 \
- make -f$TOP_DIR/Makefile
-
- On Unix boxes, calling `configure' from the build directory is
- sufficient; it will build a small Makefile which calls the
- FreeType 2 Makefile with the necessary parameters.
+ cd foo
+ /src/freetype/configure [options]
+ make
+ make install
---- end of INSTALL --
+--- end of INSTALL.UNX --
diff --git a/extras/freetype2/docs/INSTALL.VMS b/extras/freetype2/docs/INSTALL.VMS
index a82b9fd01..4d9d64ca2 100644
--- a/extras/freetype2/docs/INSTALL.VMS
+++ b/extras/freetype2/docs/INSTALL.VMS
@@ -1,8 +1,8 @@
How to build the freetype2 library on VMS
-----------------------------------------
-Just type one of the following depending on the type of external entries you
-want:
+Just type one of the following depending on the type of external entries
+you want:
mms
@@ -14,22 +14,23 @@ The library is avalaible in the directory
[.LIB]
-To compile applications using freetype2 you'll need to define the logical
+To compile applications using FreeType 2 you have to define the logical
FREETYPE pointing to the directory
[.INCLUDE.FREETYPE]
-(i.e., if the directory in which this README.VMS file is located is
+i.e., if the directory in which this INSTALL.VMS file is located is
$disk:[freetype] then define the logical with
define freetype $disk:[freetype.include.freetype]
-This version has been tested with Compaq C V6.2-006 on OpenVMS Alpha V7.2-1.
+This version has been tested with Compaq C V6.2-006 on OpenVMS Alpha
+V7.2-1.
Any problems can be reported to
- joukj@hrem.stm.tudelft.nl
+ Jouk Jansen <joukj@hrem.stm.tudelft.nl>
- Jouk Jansen
+--- end of INSTALL.VMS ---
diff --git a/extras/freetype2/docs/TODO b/extras/freetype2/docs/TODO
index b0abb6875..592809acf 100644
--- a/extras/freetype2/docs/TODO
+++ b/extras/freetype2/docs/TODO
@@ -1,13 +1,23 @@
-Note that the list of known bugs for FreeType 2 is now located in the
-document "docs/BUGS".
-
Here is a list of items that need to be addressed in FreeType 2; they are
not exactly bugs, but should be considered though:
* Implement stem3/counter hints properly in the Postscript hinter.
-* FInalize the cache sub-system. If has been in beta for too long :-)
+* Finalize the cache sub-system. It has been in beta far too long :-)
* The automatic and Postscript hinters have been improved to increase
- the quality of AA text, but Monochrome and LCD hinting still suck. we
- need to do something about that..
+ the quality of AA text, but Monochrome and LCD hinting still suck. We
+ need to do something about that.
+
+* Add CIDCMap support to the CID driver.
+
+* Add track kerning support to the Type1 and PFR driver and the API
+ (The degree of kerning, e.g. light, normal or tight, and
+ the glyph size has to be passed as parameter).
+
+* Add kerning (AFM file) support to the CID driver.
+
+* Possibly add support for reading PFM files.
+
+
+--- end of TODO ---
diff --git a/extras/freetype2/docs/TRUETYPE b/extras/freetype2/docs/TRUETYPE
index 4ec4001b2..68ecf1971 100644
--- a/extras/freetype2/docs/TRUETYPE
+++ b/extras/freetype2/docs/TRUETYPE
@@ -1,14 +1,14 @@
How to enable the TrueType native hinter if you need it
--------------------------------------------------------
- The TrueType bytecode interpreter is disabled in all public
- releases of the FreeType packages for patents reasons (see
+ The TrueType bytecode interpreter is disabled in all public releases
+ of the FreeType packages for patents reasons (see
http://www.freetype.org/patents.html for more details).
- However, many Linux distributions do enable the interpreter in the
- FreeType packages (DEB/RPM/etc.) they produce for their platforms.
- If you are using TrueType fonts on your system, you most probably
- want to enable it manually by doing the following:
+ However, many Linux distributions do enable the interpreter in the
+ FreeType packages (DEB/RPM/etc.) they produce for their platforms. If
+ you are using TrueType fonts on your system, you most probably want to
+ enable it manually by doing the following:
- open the file "include/freetype/config/ftoption.h"
@@ -20,4 +20,7 @@ How to enable the TrueType native hinter if you need it
#define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
- of course, this must be done _before_ compiling the library
+ These steps must be done _before_ compiling the library.
+
+
+--- end of TRUETYPE ---
diff --git a/extras/freetype2/docs/UPGRADE.UNX b/extras/freetype2/docs/UPGRADE.UNX
index 0e67f9077..0246b97c7 100644
--- a/extras/freetype2/docs/UPGRADE.UNX
+++ b/extras/freetype2/docs/UPGRADE.UNX
@@ -2,87 +2,88 @@
SPECIAL NOTE FOR UNIX USERS
===========================
- If you are installing this release of FreeType on a system that
- already uses release 2.0.5 (or even an older version), you have to
+ If you are installing this release of FreeType on a system that
+ already uses release 2.0.5 (or even an older version), you have to
perform a few special steps to ensure that everything goes well.
- I. Enable the TrueType bytecode hinter if you need it
+ 1. Enable the TrueType bytecode hinter if you need it
-----------------------------------------------------
See the instructions in the file "TRUETYPE" of this directory.
- Note that FreeType supports TrueType fonts without the bytecode
- interpreter through its auto-hinter, which now generate relatively good
- results with most fonts.
+ Note that FreeType supports TrueType fonts without the bytecode
+ interpreter through its auto-hinter, which now generates relatively
+ good results with most fonts.
- II. Determine the correct installation path
- --------------------------------------------
+ 2. Determine the correct installation path
+ ------------------------------------------
- By default, the source package will install the library in
- "/usr/local". However, many Unix distributions now install the
- library in "/usr", since FreeType is becoming a critical system
+ By default, the configure script will install the library in
+ "/usr/local". However, many Unix distributions now install the
+ library in "/usr", since FreeType is becoming a critical system
component.
If FreeType is already installed on your system, type
freetype-config --prefix
- on the command line. This should return the installation path to
- use below (e.g. "/usr" or "/usr/local"). Otherwise, simply use
- "/usr" (or what you think is adequate for your installation).
+ on the command line. This should return the installation path
+ (e.g., "/usr" or "/usr/local"). To avoid problems of parallel
+ FreeType versions, use this path for the --prefix option of the
+ configure script.
+ Otherwise, simply use "/usr" (or whatever you think is adequate for
+ your installation).
- III. Ensure that you are using GNU Make
- ---------------------------------------
+ 3. Ensure that you are using GNU Make
+ -------------------------------------
- The FreeType build system _exclusively_ works with GNU Make. You
- will not be able to compile the library with the instructions
- below using any other alternative (including BSD Make).
+ The FreeType build system _exclusively_ works with GNU Make (as an
+ exception you can use make++ which emulates GNU Make sufficiently;
+ see http://makepp.sourceforge.net). You will not be able to compile
+ the library with the instructions below using any other alternative
+ (including BSD Make).
- Trying to compile the library with a different Make tool will
- print a message like:
+ Trying to compile the library with a different Make tool will print
+ a message like:
Sorry, GNU make is required to build FreeType2.
- and the build process will be aborted. If this happens, install
- GNU Make on your system, and use the GNUMAKE environment variable
- to name it.
+ and the build process will be aborted. If this happens, install GNU
+ Make on your system, and use the GNUMAKE environment variable to
+ name it.
+ 4. Build and install the library
+ --------------------------------
- IV. Build and install the library
- ---------------------------------
-
- The following should work on all Unix systems where the `make'
+ The following should work on all Unix systems where the `make'
command invokes GNU Make:
./configure --prefix=<yourprefix>
make
make install (as root)
- where "<yourprefix>" must be replaced by the prefix returned by
- the "freetype-config" command.
+ where "<yourprefix>" must be replaced by the prefix returned by the
+ "freetype-config" command.
- When using a different command to invoke GNU Make, use the GNUMAKE
- variable. For example, if `gmake' is the command to use on your
+ When using a different command to invoke GNU Make, use the GNUMAKE
+ variable. For example, if `gmake' is the command to use on your
system, do something like:
GNUMAKE=gmake ./configure --prefix=<yourprefix>
gmake
gmake install (as root)
- If this still doesn't work, read the detailed compilation
- procedure available in the file "docs/BUILD" for troubleshooting.
-
- V. Take care of XFree86 version 4
+ 5. Take care of XFree86 version 4
---------------------------------
- Certain recent Linux distributions will install _several_ versions
- of FreeType on your system. For example, on a fresh Mandrake 8.1
+ Certain recent Linux distributions will install _several_ versions
+ of FreeType on your system. For example, on a fresh Mandrake 8.1
system, you can find the following files:
/usr/lib/libfreetype.so which links to
@@ -93,22 +94,21 @@ SPECIAL NOTE FOR UNIX USERS
/usr/X11R6/lib/libfreetype.so which links to
/usr/X11R6/lib/libfreetype.6.0.so
- Note that these files correspond to two distinct versions of the
- library! It seems that this surprising issue is due to the
- install scripts of recent XFree86 servers (from 4.1.0) which
- irremediably install their own (dated) version of the library in
- "/usr/X11R6/lib".
+ Note that these files correspond to two distinct versions of the
+ library! It seems that this surprising issue is due to the install
+ scripts of recent XFree86 servers (from 4.1.0) which install their
+ own (dated) version of the library in "/usr/X11R6/lib".
- In certain _rare_ cases you may experience minor problems if you
- install this release of the library in "/usr" only, namely, that
- certain applications will not benefit from the bug fixes and
- rendering improvements you'd expect.
+ In certain _rare_ cases you may experience minor problems if you
+ install this release of the library in "/usr" only, namely, that
+ certain applications will not benefit from the bug fixes and
+ rendering improvements you would expect.
There are two good ways to deal with this situation:
- - Install the library _twice_, in "/usr" and in "/usr/X11R6"
- (you have to do that each time you install a new FreeType
- release though).
+ - Install the library _twice_, in "/usr" and in "/usr/X11R6" (you
+ have to do that each time you install a new FreeType release
+ though).
- Change the link in /usr/X11R6/lib/libfreetype.so to point to
@@ -118,7 +118,10 @@ SPECIAL NOTE FOR UNIX USERS
/usr/X11R6/lib/libfreetype.6.0.so
- The FreeType Team is not responsible for this problem, so please
- contact either the XFree86 development team or your Linux
- distributor to help clear this issue in case the information given
+ The FreeType Team is not responsible for this problem, so please
+ contact either the XFree86 development team or your Linux
+ distributor to help clear this issue in case the information given
here doesn't help.
+
+
+---- end of UPGRADE.UNX ---
diff --git a/extras/freetype2/docs/VERSION.DLL b/extras/freetype2/docs/VERSION.DLL
index ec4f4c61b..5b178bdc4 100644
--- a/extras/freetype2/docs/VERSION.DLL
+++ b/extras/freetype2/docs/VERSION.DLL
@@ -1,90 +1,109 @@
-Due to our use of "libtool" to generate and install the FreeType 2 libraries
-on Unix systems, as well as other historical events, it is generally very
-difficult to know precisely which release of the font engine is installed
-on a given system.
+Due to our use of "libtool" to generate and install the FreeType 2
+libraries on Unix systems, as well as other historical events, it is
+generally very difficult to know precisely which release of the font
+engine is installed on a given system.
-This file tries to explain why and to document ways to properly detect
+This file tries to explain why and to document ways to properly detect
FreeType on Unix.
-I. Version & Release numbers:
+1. Version & Release numbers
+----------------------------
-For each new public release of FreeType 2, there are generally *three*
+For each new public release of FreeType 2, there are generally *three*
distinct "version" numbers to consider:
- * the official FT2 release number, like 2.0.9, or 2.1.3
+ * The official FT2 release number, like 2.0.9, or 2.1.3.
- * the libtool (and Unix) specific version number, like "9.2.3". This
- is what "freetype-config --version" will return
+ * The libtool (and Unix) specific version number, like "9.2.3". This
+ is what "freetype-config --version" will return.
- * the platform-specific shared object number, used for example when
- the library is installed as "/usr/lib/libfreetype.so.6.3.2"
+ * The platform-specific shared object number, used for example when
+ the library is installed as "/usr/lib/libfreetype.so.6.3.2".
+The platform-specific number is, unsurprisingly, platform-specific and
+varies with the operating system you are using (several variants of
+Linux, FreeBSD, Solaris, etc.). You should thus _never_ use it, even
+for simple tests.
-the platform-specific number is, unsurprisingly, platform-specific and varies
-with the operating system you're using (several variants of Linux, FreeBSD,
-Solaris, etc...). You should thus _never_ use it, even for simple tests.
+The libtool-specific number does not equal the release number but is
+tied to it.
-the libtool-specific number does not equal the release number but is tied
-to it.
-
-the release number is available at *compile* time through the following
+The release number is available at *compile* time through the following
macros defined in FT_FREETYPE_H:
- FREETYPE_MAJOR : major release number
- FREETYPE_MINOR : minor release number
- FREETYPE_PATCH : patch release number
-see below for some Autoconf fragment to
+See below for a small autoconf fragment.
+
+The release number is also available at *runtime* through the
+"FT_Library_Version" API. Unfortunately, this one wasn't available or
+working correctly before the 2.1.3 official release.
-the release number is also available at *runtime* through the
-"FT_Library_Version" API. Unfortunately, this one wasn't available or
-working correctly before the 2.1.3 official release !!
+2. History
+----------
+The following table gives, for each official release, the corresponding
+libtool number, as well as the shared object number found on _most_
+systems, but not all of them:
-II. Table:
+ release libtool so
+ -------------------------------
+ 2.1.8 9.6.3 6.3.6
+ 2.1.7 9.5.3 6.3.5
+ 2.1.6 9.5.3 6.3.5
+ 2.1.5 9.4.3 6.3.4
+ 2.1.4 9.3.3 6.3.3
+ 2.1.3 9.2.3 6.3.2
+ 2.1.2 9.1.3 6.3.1
+ 2.1.1 9.0.3 ?
+ 2.1.0 8.0.2 ?
+ 2.0.9 9.0.3 ?
+ 2.0.8 8.0.2 ?
+ 2.0.4 7.0.1 ?
+ 2.0.1 6.1.0 ?
-the following is a simple table that gives, for each official release,
-the corresponding libtool number, as well as the shared object number
-found on _most_ systems, but not all of them:
+The libtool numbers are a bit inconsistent due to the library's history:
- release libtool so
--------------------------------------
- 2.1.4 9.3.3 6.3.3
- 2.1.3 9.2.3 6.3.2
- 2.1.2 9.1.3 6.3.1
- 2.1.1 9.0.3 ?
- 2.1.0 8.0.2 ?
- 2.0.9 9.0.3 ?
- 2.0.8 8.0.2 ?
+ - 2.1.0 was created as a development branch from 2.0.8 (hence the same
+ libtool numbers).
-the libtool numbers are a bit inconsistent due to the library's history:
+ - 2.0.9 was a bug-fix release of the "stable" branch, and we
+ incorrectly increased its libtool number.
- - 2.1.0 was created as a development branch from 2.0.8
- (hence the same libtool numbers)
+ - 2.1.4 is still in the "development" branch, however it is stable
+ enough to be the basis of an upcoming 2.2.0 release.
- - 2.0.9 was a bug-fix release of the "stable" branch, we
- apparently incorrectly increased its libtool number
- - 2.1.4 is still in the "development" branch, however it's stable enough
- to be the basis of an upcoming 2.2.0 release
+3. Autoconf Code Fragment
+-------------------------
+Lars Clausen contributed the following autoconf fragment to detect which
+version of FreeType is installed on a system. This one tests for a
+version that is at least 2.0.9; you should change it to check against
+other release numbers.
-III. AutoConf Code Fragment:
+ AC_MSG_CHECKING([whether FreeType version is 2.0.9 or higher])
+ old_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS=`freetype-config --cflags`
+ AC_TRY_CPP([
-Lars Clausen contributed the following Autoconf fragment to detect at
-which version of FreeType is installed on your system. This one tests
-for a version that is at least 2.0.9, you should change the last line to
-check against other release numbers.
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#if (FREETYPE_MAJOR*1000 + FREETYPE_MINOR)*1000 + FREETYPE_PATCH < 2000009
+#error Freetype version too low.
+#endif
+ ],
+ [AC_MSG_RESULT(yes)
+ FREETYPE_LIBS=`freetype-config --libs`
+ AC_SUBST(FREETYPE_LIBS)
+ AC_DEFINE(HAVE_FREETYPE,1,[Define if you have the FreeType2 library])
+ CPPFLAGS="$old_CPPFLAGS"],
+ [AC_MSG_ERROR([Need FreeType library version 2.0.9 or higher])])
- AC_MSG_CHECKING([for version of FreeType])
- FREETYPE_INCLUDE=`freetype-config --cflags | cut -c3-`
- FREETYPE_MAJOR=`grep '^#define FREETYPE_MAJOR' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
- FREETYPE_MINOR=`grep '^#define FREETYPE_MINOR' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
- FREETYPE_PATCH=`grep '^#define FREETYPE_PATCH' $FREETYPE_INCLUDE/freetype/freetype.h | cut -d' ' -f3`
- FREETYPE_VERSION=`echo | awk "BEGIN { printf \"%d\", ($FREETYPE_MAJOR * 1000 + $FREETYPE_MINOR) * 1000 + $FREETYPE_PATCH;}"`
- AC_MSG_RESULT([$FREETYPE_MAJOR.$FREETYPE_MINOR.$FREETYPE_PATCH])
- if test "$FREETYPE_VERSION" -ge 2000009; then
+--- end of VERSION.DLL ---
diff --git a/extras/freetype2/docs/license.txt b/extras/freetype2/docs/license.txt
index 51b52bf87..876cc4b93 100644
--- a/extras/freetype2/docs/license.txt
+++ b/extras/freetype2/docs/license.txt
@@ -1,28 +1,28 @@
- The FreeType 2 font engine is copyrighted work, and cannot be
- used legally without a software license. In order to make this
- project usable to a vast majority of developers, we distribute it
- under two dual licenses.
+The FreeType 2 font engine is copyrighted work and cannot be used
+legally without a software license. In order to make this project
+usable to a vast majority of developers, we distribute it under two
+mutually exclusive open-source licenses.
- What this means is that *you* must choose *one* license among those
- described below, then obey all its terms and conditions when using
- FreeType 2 in any of your projects or products:
+This means that *you* must choose *one* of the two licenses described
+below, then obey all its terms and conditions when using FreeType 2 in
+any of your projects or products.
+ - The FreeType License, found in the file `FTL.TXT', which is similar
+ to the original BSD license *with* an advertising clause that forces
+ you to explicitly cite the FreeType project in your product's
+ documentation. All details are in the license file. This license
+ is suited to products which don't use the GNU General Public
+ License.
- - The FreeType License, found in the file "FTL.TXT", which is
- an BSD-style open-source license *with* an advertising
- clause that forces you to explicitely cite the
- FreeType project in your product's documentation. All
- details are in the license file
+ - The GNU General Public License version 2, found in `GPL.TXT' (any
+ later version can be used also), for programs which already use the
+ GPL. Note that the FTL is incompatible with the GPL due to its
+ advertisement clause.
+The contributed PCF driver comes with a license similar to that of the X
+Window System. It is compatible to the above two licenses (see file
+src/pcf/readme).
- - The GNU General Public License, found in "GPL.TXT", which is
- the traditionnal and "viral" GPL license, that
- forces you to redistribute the _complete_ sources of all
- your products that simply use FreeType 2.
-
-
- Note that the contributed PCF driver comes with a license similar to
- that of X Window System which is compatible to the above two
- licenses (see file src/pcf/readme).
+--- end of licence.txt ---
diff --git a/extras/freetype2/docs/raster.txt b/extras/freetype2/docs/raster.txt
new file mode 100644
index 000000000..078c51aa1
--- /dev/null
+++ b/extras/freetype2/docs/raster.txt
@@ -0,0 +1,624 @@
+
+ How FreeType's rasterizer work
+
+ by David Turner
+
+ Revised 2003-Dec-08
+
+
+This file is an attempt to explain the internals of the FreeType
+rasterizer. The rasterizer is of quite general purpose and could
+easily be integrated into other programs.
+
+
+ I. Introduction
+
+ II. Rendering Technology
+ 1. Requirements
+ 2. Profiles and Spans
+ a. Sweeping the Shape
+ b. Decomposing Outlines into Profiles
+ c. The Render Pool
+ d. Computing Profiles Extents
+ e. Computing Profiles Coordinates
+ f. Sweeping and Sorting the Spans
+
+
+I. Introduction
+===============
+
+ A rasterizer is a library in charge of converting a vectorial
+ representation of a shape into a bitmap. The FreeType rasterizer
+ has been originally developed to render the glyphs found in
+ TrueType files, made up of segments and second-order Bziers.
+ Meanwhile it has been extended to render third-order Bzier curves
+ also. This document is an explanation of its design and
+ implementation.
+
+ While these explanations start from the basics, a knowledge of
+ common rasterization techniques is assumed.
+
+
+II. Rendering Technology
+========================
+
+1. Requirements
+---------------
+
+ We assume that all scaling, rotating, hinting, etc., has been
+ already done. The glyph is thus described by a list of points in
+ the device space.
+
+ - All point coordinates are in the 26.6 fixed float format. The
+ used orientation is:
+
+
+ ^ y
+ | reference orientation
+ |
+ *----> x
+ 0
+
+
+ `26.6' means that 26 bits are used for the integer part of a
+ value and 6 bits are used for the fractional part.
+ Consequently, the `distance' between two neighbouring pixels is
+ 64 `units' (1 unit = 1/64th of a pixel).
+
+ Note that, for the rasterizer, pixel centers are located at
+ integer coordinates. The TrueType bytecode interpreter,
+ however, assumes that the lower left edge of a pixel (which is
+ taken to be a square with a length of 1 unit) has integer
+ coordinates.
+
+
+ ^ y ^ y
+ | |
+ | (1,1) | (0.5,0.5)
+ +-----------+ +-----+-----+
+ | | | | |
+ | | | | |
+ | | | o-----+-----> x
+ | | | (0,0) |
+ | | | |
+ o-----------+-----> x +-----------+
+ (0,0) (-0.5,-0.5)
+
+ TrueType bytecode interpreter FreeType rasterizer
+
+
+ A pixel line in the target bitmap is called a `scanline'.
+
+ - A glyph is usually made of several contours, also called
+ `outlines'. A contour is simply a closed curve that delimits an
+ outer or inner region of the glyph. It is described by a series
+ of successive points of the points table.
+
+ Each point of the glyph has an associated flag that indicates
+ whether it is `on' or `off' the curve. Two successive `on'
+ points indicate a line segment joining the two points.
+
+ One `off' point amidst two `on' points indicates a second-degree
+ (conic) Bzier parametric arc, defined by these three points
+ (the `off' point being the control point, and the `on' ones the
+ start and end points). Similarly, a third-degree (cubic) Bzier
+ curve is described by four points (two `off' control points
+ between two `on' points).
+
+ Finally, for second-order curves only, two successive `off'
+ points forces the rasterizer to create, during rendering, an
+ `on' point amidst them, at their exact middle. This greatly
+ facilitates the definition of successive Bzier arcs.
+
+ The parametric form of a second-order Bzier curve is:
+
+ P(t) = (1-t)^2*P1 + 2*t*(1-t)*P2 + t^2*P3
+
+ (P1 and P3 are the end points, P2 the control point.)
+
+ The parametric form of a third-order Bzier curve is:
+
+ P(t) = (1-t)^3*P1 + 3*t*(1-t)^2*P2 + 3*t^2*(1-t)*P3 + t^3*P4
+
+ (P1 and P4 are the end points, P2 and P3 the control points.)
+
+ For both formulae, t is a real number in the range [0..1].
+
+ Note that the rasterizer does not use these formulae directly.
+ They exhibit, however, one very useful property of Bzier arcs:
+ Each point of the curve is a weighted average of the control
+ points.
+
+ As all weights are positive and always sum up to 1, whatever the
+ value of t, each arc point lies within the triangle (polygon)
+ defined by the arc's three (four) control points.
+
+ In the following, only second-order curves are discussed since
+ rasterization of third-order curves is completely identical.
+
+ Here some samples for second-order curves.
+
+
+ * # on curve
+ * off curve
+ __---__
+ #-__ _-- -_
+ --__ _- -
+ --__ # \
+ --__ #
+ -#
+ Two `on' points
+ Two `on' points and one `off' point
+ between them
+
+ *
+ # __ Two `on' points with two `off'
+ \ - - points between them. The point
+ \ / \ marked `0' is the middle of the
+ - 0 \ `off' points, and is a `virtual
+ -_ _- # on' point where the curve passes.
+ -- It does not appear in the point
+ * list.
+
+
+2. Profiles and Spans
+---------------------
+
+ The following is a basic explanation of the _kind_ of computations
+ made by the rasterizer to build a bitmap from a vector
+ representation. Note that the actual implementation is slightly
+ different, due to performance tuning and other factors.
+
+ However, the following ideas remain in the same category, and are
+ more convenient to understand.
+
+
+ a. Sweeping the Shape
+
+ The best way to fill a shape is to decompose it into a number of
+ simple horizontal segments, then turn them on in the target
+ bitmap. These segments are called `spans'.
+
+ __---__
+ _-- -_
+ _- -
+ - \
+ / \
+ / \
+ | \
+
+ __---__ Example: filling a shape
+ _----------_ with spans.
+ _--------------
+ ----------------\
+ /-----------------\ This is typically done from the top
+ / \ to the bottom of the shape, in a
+ | | \ movement called a `sweep'.
+ V
+
+ __---__
+ _----------_
+ _--------------
+ ----------------\
+ /-----------------\
+ /-------------------\
+ |---------------------\
+
+
+ In order to draw a span, the rasterizer must compute its
+ coordinates, which are simply the x coordinates of the shape's
+ contours, taken on the y scanlines.
+
+
+ /---/ |---| Note that there are usually
+ /---/ |---| several spans per scanline.
+ | /---/ |---|
+ | /---/_______|---| When rendering this shape to the
+ V /----------------| current scanline y, we must
+ /-----------------| compute the x values of the
+ a /----| |---| points a, b, c, and d.
+ - - - * * - - - - * * - - y -
+ / / b c| |d
+
+
+ /---/ |---|
+ /---/ |---| And then turn on the spans a-b
+ /---/ |---| and c-d.
+ /---/_______|---|
+ /----------------|
+ /-----------------|
+ a /----| |---|
+ - - - ####### - - - - ##### - - y -
+ / / b c| |d
+
+
+ b. Decomposing Outlines into Profiles
+
+ For each scanline during the sweep, we need the following
+ information:
+
+ o The number of spans on the current scanline, given by the
+ number of shape points intersecting the scanline (these are
+ the points a, b, c, and d in the above example).
+
+ o The x coordinates of these points.
+
+ x coordinates are computed before the sweep, in a phase called
+ `decomposition' which converts the glyph into *profiles*.
+
+ Put it simply, a `profile' is a contour's portion that can only
+ be either ascending or descending, i.e., it is monotonic in the
+ vertical direction (we also say y-monotonic). There is no such
+ thing as a horizontal profile, as we shall see.
+
+ Here are a few examples:
+
+
+ this square
+ 1 2
+ ---->---- is made of two
+ | | | |
+ | | profiles | |
+ ^ v ^ + v
+ | | | |
+ | | | |
+ ----<----
+
+ up down
+
+
+ this triangle
+
+ P2 1 2
+
+ |\ is made of two | \
+ ^ | \ \ | \
+ | | \ \ profiles | \ |
+ | | \ v ^ | \ |
+ | \ | | + \ v
+ | \ | | \
+ P1 ---___ \ ---___ \
+ ---_\ ---_ \
+ <--__ P3 up down
+
+
+
+ A more general contour can be made of more than two profiles:
+
+ __ ^
+ / | / ___ / |
+ / | / | / | / |
+ | | / / => | v / /
+ | | | | | | ^ |
+ ^ | |___| | | ^ + | + | + v
+ | | | v | |
+ | | | up |
+ |___________| | down |
+
+ <-- up down
+
+
+ Successive profiles are always joined by horizontal segments
+ that are not part of the profiles themselves.
+
+ For the rasterizer, a profile is simply an *array* that
+ associates one horizontal *pixel* coordinate to each bitmap
+ *scanline* crossed by the contour's section containing the
+ profile. Note that profiles are *oriented* up or down along the
+ glyph's original flow orientation.
+
+ In other graphics libraries, profiles are also called `edges' or
+ `edgelists'.
+
+
+ c. The Render Pool
+
+ FreeType has been designed to be able to run well on _very_
+ light systems, including embedded systems with very few memory.
+
+ A render pool will be allocated once; the rasterizer uses this
+ pool for all its needs by managing this memory directly in it.
+ The algorithms that are used for profile computation make it
+ possible to use the pool as a simple growing heap. This means
+ that this memory management is actually quite easy and faster
+ than any kind of malloc()/free() combination.
+
+ Moreover, we'll see later that the rasterizer is able, when
+ dealing with profiles too large and numerous to lie all at once
+ in the render pool, to immediately decompose recursively the
+ rendering process into independent sub-tasks, each taking less
+ memory to be performed (see `sub-banding' below).
+
+ The render pool doesn't need to be large. A 4KByte pool is
+ enough for nearly all renditions, though nearly 100% slower than
+ a more confortable 16KByte or 32KByte pool (that was tested with
+ complex glyphs at sizes over 500 pixels).
+
+
+ d. Computing Profiles Extents
+
+ Remember that a profile is an array, associating a _scanline_ to
+ the x pixel coordinate of its intersection with a contour.
+
+ Though it's not exactly how the FreeType rasterizer works, it is
+ convenient to think that we need a profile's height before
+ allocating it in the pool and computing its coordinates.
+
+ The profile's height is the number of scanlines crossed by the
+ y-monotonic section of a contour. We thus need to compute these
+ sections from the vectorial description. In order to do that,
+ we are obliged to compute all (local and global) y extrema of
+ the glyph (minima and maxima).
+
+
+ P2 For instance, this triangle has only
+ two y-extrema, which are simply
+ |\
+ | \ P2.y as a vertical maximum
+ | \ P3.y as a vertical minimum
+ | \
+ | \ P1.y is not a vertical extremum (though
+ | \ it is a horizontal minimum, which we
+ P1 ---___ \ don't need).
+ ---_\
+ P3
+
+
+ Note that the extrema are expressed in pixel units, not in
+ scanlines. The triangle's height is certainly (P3.y-P2.y+1)
+ pixel units, but its profiles' heights are computed in
+ scanlines. The exact conversion is simple:
+
+ - min scanline = FLOOR ( min y )
+ - max scanline = CEILING( max y )
+
+ A problem arises with Bzier Arcs. While a segment is always
+ necessarily y-monotonic (i.e., flat, ascending, or descending),
+ which makes extrema computations easy, the ascent of an arc can
+ vary between its control points.
+
+
+ P2
+ *
+ # on curve
+ * off curve
+ __-x--_
+ _-- -_
+ P1 _- - A non y-monotonic Bzier arc.
+ # \
+ - The arc goes from P1 to P3.
+ \
+ \ P3
+ #
+
+
+ We first need to be able to easily detect non-monotonic arcs,
+ according to their control points. I will state here, without
+ proof, that the monotony condition can be expressed as:
+
+ P1.y <= P2.y <= P3.y for an ever-ascending arc
+
+ P1.y >= P2.y >= P3.y for an ever-descending arc
+
+ with the special case of
+
+ P1.y = P2.y = P3.y where the arc is said to be `flat'.
+
+ As you can see, these conditions can be very easily tested.
+ They are, however, extremely important, as any arc that does not
+ satisfy them necessarily contains an extremum.
+
+ Note also that a monotonic arc can contain an extremum too,
+ which is then one of its `on' points:
+
+
+ P1 P2
+ #---__ * P1P2P3 is ever-descending, but P1
+ -_ is an y-extremum.
+ -
+ ---_ \
+ -> \
+ \ P3
+ #
+
+
+ Let's go back to our previous example:
+
+
+ P2
+ *
+ # on curve
+ * off curve
+ __-x--_
+ _-- -_
+ P1 _- - A non-y-monotonic Bzier arc.
+ # \
+ - Here we have
+ \ P2.y >= P1.y &&
+ \ P3 P2.y >= P3.y (!)
+ #
+
+
+ We need to compute the vertical maximum of this arc to be able
+ to compute a profile's height (the point marked by an `x'). The
+ arc's equation indicates that a direct computation is possible,
+ but we rely on a different technique, which use will become
+ apparent soon.
+
+ Bzier arcs have the special property of being very easily
+ decomposed into two sub-arcs, which are themselves Bzier arcs.
+ Moreover, it is easy to prove that there is at most one vertical
+ extremum on each Bzier arc (for second-degree curves; similar
+ conditions can be found for third-order arcs).
+
+ For instance, the following arc P1P2P3 can be decomposed into
+ two sub-arcs Q1Q2Q3 and R1R2R3:
+
+
+ P2
+ *
+ # on curve
+ * off curve
+
+
+ original Bzier arc P1P2P3.
+ __---__
+ _-- --_
+ _- -_
+ - -
+ / \
+ / \
+ # #
+ P1 P3
+
+
+
+ P2
+ *
+
+
+
+ Q3 Decomposed into two subarcs
+ Q2 R2 Q1Q2Q3 and R1R2R3
+ * __-#-__ *
+ _-- --_
+ _- R1 -_ Q1 = P1 R3 = P3
+ - - Q2 = (P1+P2)/2 R2 = (P2+P3)/2
+ / \
+ / \ Q3 = R1 = (Q2+R2)/2
+ # #
+ Q1 R3 Note that Q2, R2, and Q3=R1
+ are on a single line which is
+ tangent to the curve.
+
+
+ We have then decomposed a non-y-monotonic Bzier curve into two
+ smaller sub-arcs. Note that in the above drawing, both sub-arcs
+ are monotonic, and that the extremum is then Q3=R1. However, in
+ a more general case, only one sub-arc is guaranteed to be
+ monotonic. Getting back to our former example:
+
+
+ Q2
+ *
+
+ __-x--_ R1
+ _-- #_
+ Q1 _- Q3 - R2
+ # \ *
+ -
+ \
+ \ R3
+ #
+
+
+ Here, we see that, though Q1Q2Q3 is still non-monotonic, R1R2R3
+ is ever descending: We thus know that it doesn't contain the
+ extremum. We can then re-subdivide Q1Q2Q3 into two sub-arcs and
+ go on recursively, stopping when we encounter two monotonic
+ subarcs, or when the subarcs become simply too small.
+
+ We will finally find the vertical extremum. Note that the
+ iterative process of finding an extremum is called `flattening'.
+
+
+ e. Computing Profiles Coordinates
+
+ Once we have the height of each profile, we are able to allocate
+ it in the render pool. The next task is to compute coordinates
+ for each scanline.
+
+ In the case of segments, the computation is straightforward,
+ using the Euclidian algorithm (also known as Bresenham).
+ However, for Bzier arcs, the job is a little more complicated.
+
+ We assume that all Bziers that are part of a profile are the
+ result of flattening the curve, which means that they are all
+ y-monotonic (ascending or descending, and never flat). We now
+ have to compute the intersections of arcs with the profile's
+ scanlines. One way is to use a similar scheme to flattening
+ called `stepping'.
+
+
+ Consider this arc, going from P1 to
+ --------------------- P3. Suppose that we need to
+ compute its intersections with the
+ drawn scanlines. As already
+ --------------------- mentioned this can be done
+ directly, but the involed algorithm
+ * P2 _---# P3 is far too slow.
+ ------------- _-- --
+ _-
+ _/ Instead, it is still possible to
+ ---------/----------- use the decomposition property in
+ / the same recursive way, i.e.,
+ | subdivide the arc into subarcs
+ ------|-------------- until these get too small to cross
+ | more than one scanline!
+ |
+ -----|--------------- This is very easily done using a
+ | rasterizer-managed stack of
+ | subarcs.
+ # P1
+
+
+ f. Sweeping and Sorting the Spans
+
+ Once all our profiles have been computed, we begin the sweep to
+ build (and fill) the spans.
+
+ As both the TrueType and Type 1 specifications use the winding
+ fill rule (but with opposite directions), we place, on each
+ scanline, the present profiles in two separate lists.
+
+ One list, called the `left' one, only contains ascending
+ profiles, while the other `right' list contains the descending
+ profiles.
+
+ As each glyph is made of closed curves, a simple geometric
+ property ensures that the two lists contain the same number of
+ elements.
+
+ Creating spans is thus straightforward:
+
+ 1. We sort each list in increasing horizontal order.
+
+ 2. We pair each value of the left list with its corresponding
+ value in the right list.
+
+
+ / / | | For example, we have here
+ / / | | four profiles. Two of
+ >/ / | | | them are ascending (1 &
+ 1// / ^ | | | 2 3), while the two others
+ // // 3| | | v are descending (2 & 4).
+ / //4 | | | On the given scanline,
+ a / /< | | the left list is (1,3),
+ - - - *-----* - - - - *---* - - y - and the right one is
+ / / b c| |d (4,2) (sorted).
+
+ There are then two spans, joining
+ 1 to 4 (i.e. a-b) and 3 to 2
+ (i.e. c-d)!
+
+
+ Sorting doesn't necessarily take much time, as in 99 cases out
+ of 100, the lists' order is kept from one scanline to the next.
+ We can thus implement it with two simple singly-linked lists,
+ sorted by a classic bubble-sort, which takes a minimum amount of
+ time when the lists are already sorted.
+
+ A previous version of the rasterizer used more elaborate
+ structures, like arrays to perform `faster' sorting. It turned
+ out that this old scheme is not faster than the one described
+ above.
+
+ Once the spans have been `created', we can simply draw them in
+ the target bitmap.
+
+
+--- end of raster.txt ---
+
+Local Variables:
+coding: latin-1
+End:
diff --git a/extras/freetype2/docs/reference/.cvsignore b/extras/freetype2/docs/reference/.cvsignore
new file mode 100644
index 000000000..2d19fc766
--- /dev/null
+++ b/extras/freetype2/docs/reference/.cvsignore
@@ -0,0 +1 @@
+*.html
diff --git a/extras/freetype2/docs/reference/README b/extras/freetype2/docs/reference/README
new file mode 100644
index 000000000..7c3467b53
--- /dev/null
+++ b/extras/freetype2/docs/reference/README
@@ -0,0 +1,2 @@
+After saying `make refdoc' this directory contains the FreeType API
+reference. You need python to make this target.
diff --git a/extras/freetype2/docs/release b/extras/freetype2/docs/release
new file mode 100644
index 000000000..7cf37b849
--- /dev/null
+++ b/extras/freetype2/docs/release
@@ -0,0 +1,32 @@
+How to prepare a new release
+----------------------------
+
+. include/freetype/freetype.h: Update FREETYPE_MAJOR, FREETYPE_MINOR, and
+ FREETYPE_PATCH.
+
+. builds/unix/configure.ac (version_info): Update according to the libtool
+ rules, then regenerate the configure script.
+
+. builds/freetype.mk (refdoc): Update the `--title' option.
+
+. docs/CHANGES: Document differences to last release.
+
+. README: Update.
+
+. docs/VERSION.DLL: Document changed `version_info'.
+
+. ChangeLog: Announce new release.
+
+. Call `make refdoc' to update HTML reference. Copy it to
+ freetype2/docs/reference in the `www' CVS module and update the CVS.
+ Then call `update-www' in ~/cvs/scripts on www.freetype.org to
+ update and distribute everything to sourceforge.
+
+. Tag the CVS (freetype, ft2demos, www/freetype2/docs).
+
+. Update `make-release' and `make-current' in ~/cvs/scripts/ on
+ www.freetype.org, then call them.
+
+. Create an md5 checksum file (with md5sum).
+
+. Announce new release on announce@freetype.org and to relevant newsgroups.
diff --git a/extras/freetype2/include/freetype/cache/ftccache.h b/extras/freetype2/include/freetype/cache/ftccache.h
index 701b13eb0..7c7688dba 100644
--- a/extras/freetype2/include/freetype/cache/ftccache.h
+++ b/extras/freetype2/include/freetype/cache/ftccache.h
@@ -4,7 +4,7 @@
/* */
/* FreeType internal cache interface (specification). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,9 +20,7 @@
#define __FTCCACHE_H__
-/* define to allow cache lookup inlining */
-#define FTC_CACHE_USE_INLINE
-
+#include FT_CACHE_INTERNAL_MRU_H
FT_BEGIN_HEADER
@@ -30,13 +28,7 @@ FT_BEGIN_HEADER
typedef struct FTC_CacheRec_* FTC_Cache;
/* handle to cache class */
- typedef const struct FTC_Cache_ClassRec_* FTC_Cache_Class;
-
- /* handle to cache node family */
- typedef struct FTC_FamilyRec_* FTC_Family;
-
- /* handle to cache root query */
- typedef struct FTC_QueryRec_* FTC_Query;
+ typedef const struct FTC_CacheClassRec_* FTC_CacheClass;
/*************************************************************************/
@@ -62,12 +54,11 @@ FT_BEGIN_HEADER
/* structure size should be 20 bytes on 32-bits machines */
typedef struct FTC_NodeRec_
{
- FTC_Node mru_next; /* circular mru list pointer */
- FTC_Node mru_prev; /* circular mru list pointer */
- FTC_Node link; /* used for hashing */
- FT_UInt32 hash; /* used for hashing too */
- FT_UShort fam_index; /* index of family the node belongs to */
- FT_Short ref_count; /* reference count for this node */
+ FTC_MruNodeRec mru; /* circular mru list pointer */
+ FTC_Node link; /* used for hashing */
+ FT_UInt32 hash; /* used for hashing too */
+ FT_UShort cache_index; /* index of cache the node belongs to */
+ FT_Short ref_count; /* reference count for this node */
} FTC_NodeRec;
@@ -75,6 +66,9 @@ FT_BEGIN_HEADER
#define FTC_NODE( x ) ( (FTC_Node)(x) )
#define FTC_NODE_P( x ) ( (FTC_Node*)(x) )
+#define FTC_NODE__NEXT(x) FTC_NODE( (x)->mru.next )
+#define FTC_NODE__PREV(x) FTC_NODE( (x)->mru.prev )
+
/*************************************************************************/
/* */
@@ -83,11 +77,6 @@ FT_BEGIN_HEADER
/* cache sub-system internals. */
/* */
- /* can be used as a FTC_Node_DoneFunc */
- FT_EXPORT( void )
- ftc_node_done( FTC_Node node,
- FTC_Cache cache );
-
/* reserved for manager's use */
FT_EXPORT( void )
ftc_node_destroy( FTC_Node node,
@@ -97,135 +86,17 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
/***** *****/
- /***** CACHE QUERY DEFINITIONS *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
- /* A structure modelling a cache node query. The following fields must */
- /* all be set by the @FTC_Family_CompareFunc method of a cache's family */
- /* list. */
- /* */
- typedef struct FTC_QueryRec_
- {
- FTC_Family family;
- FT_UFast hash;
-
- } FTC_QueryRec;
-
-
-#define FTC_QUERY( x ) ( (FTC_Query)(x) )
-#define FTC_QUERY_P( x ) ( (FTC_Query*)(x) )
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** CACHE FAMILY DEFINITIONS *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
- typedef struct FTC_FamilyRec_
- {
- FT_LruNodeRec lru;
- FTC_Cache cache;
- FT_UInt num_nodes;
- FT_UInt fam_index;
-
- } FTC_FamilyRec;
-
-
-#define FTC_FAMILY( x ) ( (FTC_Family)(x) )
-#define FTC_FAMILY_P( x ) ( (FTC_Family*)(x) )
-
-
- /*************************************************************************/
- /* */
- /* These functions are exported so that they can be called from */
- /* user-provided cache classes; otherwise, they are really part of the */
- /* cache sub-system internals. */
- /* */
-
- /* must be called by any FTC_Node_InitFunc routine */
- FT_EXPORT( FT_Error )
- ftc_family_init( FTC_Family family,
- FTC_Query query,
- FTC_Cache cache );
-
-
- /* can be used as a FTC_Family_DoneFunc; otherwise, must be called */
- /* by any family finalizer function */
- FT_EXPORT( void )
- ftc_family_done( FTC_Family family );
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
/***** CACHE DEFINITIONS *****/
/***** *****/
/*************************************************************************/
/*************************************************************************/
- /* each cache really implements a dynamic hash table to manage its nodes */
- typedef struct FTC_CacheRec_
- {
- FTC_Manager manager;
- FT_Memory memory;
- FTC_Cache_Class clazz;
-
- FT_UInt cache_index; /* in manager's table */
- FT_Pointer cache_data; /* used by cache node methods */
-
- FT_UFast p;
- FT_UFast mask;
- FT_Long slack;
- FTC_Node* buckets;
-
- FT_LruList_ClassRec family_class;
- FT_LruList families;
-
- } FTC_CacheRec;
-
-
-#define FTC_CACHE( x ) ( (FTC_Cache)(x) )
-#define FTC_CACHE_P( x ) ( (FTC_Cache*)(x) )
-
-
- /* initialize a given cache */
- typedef FT_Error
- (*FTC_Cache_InitFunc)( FTC_Cache cache );
-
- /* clear a cache */
- typedef void
- (*FTC_Cache_ClearFunc)( FTC_Cache cache );
-
- /* finalize a given cache */
- typedef void
- (*FTC_Cache_DoneFunc)( FTC_Cache cache );
-
-
- typedef FT_Error
- (*FTC_Family_InitFunc)( FTC_Family family,
- FTC_Query query,
- FTC_Cache cache );
-
- typedef FT_Int
- (*FTC_Family_CompareFunc)( FTC_Family family,
- FTC_Query query );
-
- typedef void
- (*FTC_Family_DoneFunc)( FTC_Family family,
- FTC_Cache cache );
-
/* initialize a new cache node */
typedef FT_Error
- (*FTC_Node_InitFunc)( FTC_Node node,
- FT_Pointer type,
- FTC_Cache cache );
+ (*FTC_Node_NewFunc)( FTC_Node *pnode,
+ FT_Pointer query,
+ FTC_Cache cache );
- /* compute the weight of a given cache node */
typedef FT_ULong
(*FTC_Node_WeightFunc)( FTC_Node node,
FTC_Cache cache );
@@ -236,62 +107,159 @@ FT_BEGIN_HEADER
FT_Pointer key,
FTC_Cache cache );
- /* finalize a given cache node */
+
typedef void
- (*FTC_Node_DoneFunc)( FTC_Node node,
+ (*FTC_Node_FreeFunc)( FTC_Node node,
FTC_Cache cache );
+ typedef FT_Error
+ (*FTC_Cache_InitFunc)( FTC_Cache cache );
- typedef struct FTC_Cache_ClassRec_
+ typedef void
+ (*FTC_Cache_DoneFunc)( FTC_Cache cache );
+
+
+ typedef struct FTC_CacheClassRec_
{
- FT_UInt cache_size;
- FTC_Cache_InitFunc cache_init;
- FTC_Cache_ClearFunc cache_clear;
- FTC_Cache_DoneFunc cache_done;
+ FTC_Node_NewFunc node_new;
+ FTC_Node_WeightFunc node_weight;
+ FTC_Node_CompareFunc node_compare;
+ FTC_Node_CompareFunc node_remove_faceid;
+ FTC_Node_FreeFunc node_free;
- FT_UInt family_size;
- FTC_Family_InitFunc family_init;
- FTC_Family_CompareFunc family_compare;
- FTC_Family_DoneFunc family_done;
+ FT_UInt cache_size;
+ FTC_Cache_InitFunc cache_init;
+ FTC_Cache_DoneFunc cache_done;
- FT_UInt node_size;
- FTC_Node_InitFunc node_init;
- FTC_Node_WeightFunc node_weight;
- FTC_Node_CompareFunc node_compare;
- FTC_Node_DoneFunc node_done;
+ } FTC_CacheClassRec;
- } FTC_Cache_ClassRec;
+ /* each cache really implements a dynamic hash table to manage its nodes */
+ typedef struct FTC_CacheRec_
+ {
+ FT_UFast p;
+ FT_UFast mask;
+ FT_Long slack;
+ FTC_Node* buckets;
- /* */
+ FTC_CacheClassRec clazz; /* local copy, for speed */
+ FTC_Manager manager;
+ FT_Memory memory;
+ FT_UInt index; /* in manager's table */
- /*************************************************************************/
- /* */
- /* These functions are exported so that they can be called from */
- /* user-provided cache classes; otherwise, they are really part of the */
- /* cache sub-system internals. */
- /* */
+ FTC_CacheClass org_class; /* original class pointer */
+
+ } FTC_CacheRec;
+
+
+#define FTC_CACHE( x ) ( (FTC_Cache)(x) )
+#define FTC_CACHE_P( x ) ( (FTC_Cache*)(x) )
- /* can be used directly as FTC_Cache_DoneFunc(), or called by custom */
- /* cache finalizers */
- FT_EXPORT( void )
- ftc_cache_done( FTC_Cache cache );
- /* can be used directly as FTC_Cache_ClearFunc(), or called by custom */
- /* cache clear routines */
+ /* default cache initialize */
+ FT_EXPORT( FT_Error )
+ FTC_Cache_Init( FTC_Cache cache );
+
+ /* default cache finalizer */
FT_EXPORT( void )
- ftc_cache_clear( FTC_Cache cache );
+ FTC_Cache_Done( FTC_Cache cache );
- /* initalize the hash table within the cache */
+ /* Call this function to lookup the cache. If no corresponding
+ * node is found, a new one is automatically created. This function
+ * is capable of flushing the cache adequately to make room for the
+ * new cache object.
+ */
FT_EXPORT( FT_Error )
- ftc_cache_init( FTC_Cache cache );
+ FTC_Cache_Lookup( FTC_Cache cache,
+ FT_UInt32 hash,
+ FT_Pointer query,
+ FTC_Node *anode );
- /* can be called when the key's hash value has been computed */
FT_EXPORT( FT_Error )
- ftc_cache_lookup( FTC_Cache cache,
- FTC_Query query,
- FTC_Node *anode );
+ FTC_Cache_NewNode( FTC_Cache cache,
+ FT_UInt32 hash,
+ FT_Pointer query,
+ FTC_Node *anode );
+
+ /* Remove all nodes that relate to a given face_id. This is useful
+ * when un-installing fonts. Note that if a cache node relates to
+ * the face_id, but is locked (i.e., has 'ref_count > 0'), the node
+ * will _not_ be destroyed, but its internal face_id reference will
+ * be modified.
+ *
+ * The final result will be that the node will never come back
+ * in further lookup requests, and will be flushed on demand from
+ * the cache normally when its reference count reaches 0.
+ */
+ FT_EXPORT( void )
+ FTC_Cache_RemoveFaceID( FTC_Cache cache,
+ FTC_FaceID face_id );
+
+
+#ifdef FTC_INLINE
+
+#define FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error ) \
+ FT_BEGIN_STMNT \
+ FTC_Node *_bucket, *_pnode, _node; \
+ FTC_Cache _cache = FTC_CACHE(cache); \
+ FT_UInt32 _hash = (FT_UInt32)(hash); \
+ FTC_Node_CompareFunc _nodcomp = (FTC_Node_CompareFunc)(nodecmp); \
+ FT_UInt _idx; \
+ \
+ \
+ error = 0; \
+ node = NULL; \
+ _idx = _hash & _cache->mask; \
+ if ( _idx < _cache->p ) \
+ _idx = _hash & ( _cache->mask*2 + 1 ); \
+ \
+ _bucket = _pnode = _cache->buckets + _idx; \
+ for (;;) \
+ { \
+ _node = *_pnode; \
+ if ( _node == NULL ) \
+ goto _NewNode; \
+ \
+ if ( _node->hash == _hash && _nodcomp( _node, query, _cache ) ) \
+ break; \
+ \
+ _pnode = &_node->link; \
+ } \
+ \
+ if ( _node != *_bucket ) \
+ { \
+ *_pnode = _node->link; \
+ _node->link = *_bucket; \
+ *_bucket = _node; \
+ } \
+ \
+ { \
+ FTC_Manager _manager = _cache->manager; \
+ \
+ \
+ if ( _node != _manager->nodes_list ) \
+ FTC_MruNode_Up( (FTC_MruNode*)&_manager->nodes_list, \
+ (FTC_MruNode)_node ); \
+ } \
+ goto _Ok; \
+ \
+ _NewNode: \
+ error = FTC_Cache_NewNode( _cache, _hash, query, &_node ); \
+ \
+ _Ok: \
+ *(FTC_Node*)&(node) = _node; \
+ FT_END_STMNT
+
+#else /* !FTC_INLINE */
+
+#define FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error ) \
+ FT_BEGIN_STMNT \
+ error = FTC_Cache_Lookup( FTC_CACHE( cache ), hash, query, \
+ (FTC_Node*)&(node) ); \
+ FT_END_STMNT
+
+#endif /* !FTC_INLINE */
/* */
diff --git a/extras/freetype2/include/freetype/cache/ftccmap.h b/extras/freetype2/include/freetype/cache/ftccmap.h
index 11f7b03b6..a41989b28 100644
--- a/extras/freetype2/include/freetype/cache/ftccmap.h
+++ b/extras/freetype2/include/freetype/cache/ftccmap.h
@@ -4,7 +4,7 @@
/* */
/* FreeType charmap cache (specification). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -36,7 +36,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* @type: */
- /* FTC_CmapCache */
+ /* FTC_CMapCache */
/* */
/* @description: */
/* An opaque handle used to manager a charmap cache. This cache is */
@@ -54,8 +54,8 @@ FT_BEGIN_HEADER
/* A handle to an @FTC_CMapDescRec structure used to describe a given */
/* charmap in a charmap cache. */
/* */
- /* Each @FTC_CMapDesc describes which charmap (of which @FTC_Face) we */
- /* want to use in @FTC_CMapCache_Lookup. */
+ /* Each @FTC_CMapDesc describes which charmap (of which @FTC_FaceID) */
+ /* we want to use in @FTC_CMapCache_Lookup. */
/* */
typedef struct FTC_CMapDescRec_* FTC_CMapDesc;
@@ -66,8 +66,8 @@ FT_BEGIN_HEADER
/* FTC_CMapType */
/* */
/* @description: */
- /* The list of valid @FTC_CMap types. They indicate how we want to */
- /* address a charmap within an @FTC_FaceID. */
+ /* The list of valid @FTC_CMapDesc types. They indicate how we want */
+ /* to address a charmap within an @FTC_FaceID. */
/* */
/* @values: */
/* FTC_CMAP_BY_INDEX :: */
diff --git a/extras/freetype2/include/freetype/cache/ftcglyph.h b/extras/freetype2/include/freetype/cache/ftcglyph.h
index 3d14cf024..be237f934 100644
--- a/extras/freetype2/include/freetype/cache/ftcglyph.h
+++ b/extras/freetype2/include/freetype/cache/ftcglyph.h
@@ -4,7 +4,7 @@
/* */
/* FreeType abstract glyph cache (specification). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,13 +16,84 @@
/***************************************************************************/
+ /*
+ *
+ * FTC_GCache is an _abstract_ cache object optimized to store glyph
+ * data. It works as follows:
+ *
+ * - It manages FTC_GNode objects. Each one of them can hold one or more
+ * glyph `items'. Item types are not specified in the FTC_GCache but
+ * in classes that extend it.
+ *
+ * - Glyph attributes, like face ID, character size, render mode, etc.,
+ * can be grouped into abstract `glyph families'. This avoids storing
+ * the attributes within the FTC_GCache, since it is likely that many
+ * FTC_GNodes will belong to the same family in typical uses.
+ *
+ * - Each FTC_GNode is thus an FTC_Node with two additional fields:
+ *
+ * * gindex: A glyph index, or the first index in a glyph range.
+ * * family: A pointer to a glyph `family'.
+ *
+ * - Family types are not fully specific in the FTC_Family type, but
+ * by classes that extend it.
+ *
+ * Note that both FTC_ImageCache and FTC_SBitCache extend FTC_GCache.
+ * They share an FTC_Family sub-class called FTC_BasicFamily which is
+ * used to store the following data: face ID, pixel/point sizes, load
+ * flags. For more details see the file `src/cache/ftcbasic.c'.
+ *
+ * Client applications can extend FTC_GNode with their own FTC_GNode
+ * and FTC_Family sub-classes to implement more complex caches (e.g.,
+ * handling automatic synthesis, like obliquing & emboldening, colored
+ * glyphs, etc.).
+ *
+ * See also the FTC_ICache & FTC_SCache classes in `ftcimage.h' and
+ * `ftcsbits.h', which both extend FTC_GCache with additional
+ * optimizations.
+ *
+ * A typical FTC_GCache implementation must provide at least the
+ * following:
+ *
+ * - FTC_GNode sub-class, e.g. MyNode, with relevant methods:
+ * my_node_new (must call FTC_GNode_Init)
+ * my_node_free (must call FTC_GNode_Done)
+ * my_node_compare (must call FTC_GNode_Compare)
+ * my_node_remove_faceid (must call ftc_gnode_unselect in case
+ * of match)
+ *
+ * - FTC_Family sub-class, e.g. MyFamily, with relevant methods:
+ * my_family_compare
+ * my_family_init
+ * my_family_reset (optional)
+ * my_family_done
+ *
+ * - FTC_GQuery sub-class, e.g. MyQuery, to hold cache-specific query
+ * data.
+ *
+ * - Constant structures for a FTC_GNodeClass.
+ *
+ * - MyCacheNew() can be implemented easily as a call to the convenience
+ * function FTC_GCache_New.
+ *
+ * - MyCacheLookup with a call to FTC_GCache_Lookup. This function will
+ * automatically:
+ *
+ * - Search for the corresponding family in the cache, or create
+ * a new one if necessary. Put it in FTC_GQUERY(myquery).family
+ *
+ * - Call FTC_Cache_Lookup.
+ *
+ * If it returns NULL, you should create a new node, then call
+ * ftc_cache_add as usual.
+ */
+
+
/*************************************************************************/
/* */
/* Important: The functions defined in this file are only used to */
/* implement an abstract glyph cache class. You need to */
/* provide additional logic to implement a complete cache. */
- /* For example, see `ftcimage.h' and `ftcimage.c' which */
- /* implement a FT_Glyph cache based on this code. */
/* */
/*************************************************************************/
@@ -47,99 +118,53 @@
#include <ft2build.h>
-#include FT_CACHE_H
-#include FT_CACHE_MANAGER_H
-
-#include <stddef.h>
+#include FT_CACHE_INTERNAL_MANAGER_H
FT_BEGIN_HEADER
- /* each glyph set is characterized by a "glyph set type" which must be */
- /* defined by sub-classes */
- typedef struct FTC_GlyphFamilyRec_* FTC_GlyphFamily;
-
- /* handle to a glyph cache node */
- typedef struct FTC_GlyphNodeRec_* FTC_GlyphNode;
-
+ /*
+ * We can group glyphs into `families'. Each family correspond to a
+ * given face ID, character size, transform, etc.
+ *
+ * Families are implemented as MRU list nodes. They are
+ * reference-counted.
+ */
- /* size should be 24 + chunk size on 32-bit machines; */
- /* note that the node's hash is ((gfam->hash << 16) | glyph_index) -- */
- /* this _must_ be set properly by the glyph node initializer */
- /* */
- typedef struct FTC_GlyphNodeRec_
+ typedef struct FTC_FamilyRec_
{
- FTC_NodeRec node;
- FT_UShort item_count;
- FT_UShort item_start;
+ FTC_MruNodeRec mrunode;
+ FT_UInt num_nodes; /* current number of nodes in this family */
+ FTC_Cache cache;
+ FTC_MruListClass clazz;
- } FTC_GlyphNodeRec;
+ } FTC_FamilyRec, *FTC_Family;
+#define FTC_FAMILY(x) ( (FTC_Family)(x) )
+#define FTC_FAMILY_P(x) ( (FTC_Family*)(x) )
-#define FTC_GLYPH_NODE( x ) ( (FTC_GlyphNode)(x) )
-#define FTC_GLYPH_NODE_P( x ) ( (FTC_GlyphNode*)(x) )
-
- typedef struct FTC_GlyphQueryRec_
+ typedef struct FTC_GNodeRec_
{
- FTC_QueryRec query;
- FT_UInt gindex;
-
- } FTC_GlyphQueryRec, *FTC_GlyphQuery;
+ FTC_NodeRec node;
+ FTC_Family family;
+ FT_UInt gindex;
+ } FTC_GNodeRec, *FTC_GNode;
-#define FTC_GLYPH_QUERY( x ) ( (FTC_GlyphQuery)(x) )
+#define FTC_GNODE( x ) ( (FTC_GNode)(x) )
+#define FTC_GNODE_P( x ) ( (FTC_GNode*)(x) )
- /* a glyph set is used to categorize glyphs of a given type */
- typedef struct FTC_GlyphFamilyRec_
+ typedef struct FTC_GQueryRec_
{
- FTC_FamilyRec family;
- FT_UInt32 hash;
- FT_UInt item_total; /* total number of glyphs in family */
- FT_UInt item_count; /* number of glyph items per node */
-
- } FTC_GlyphFamilyRec;
-
-
-#define FTC_GLYPH_FAMILY( x ) ( (FTC_GlyphFamily)(x) )
-#define FTC_GLYPH_FAMILY_P( x ) ( (FTC_GlyphFamily*)(x) )
+ FT_UInt gindex;
+ FTC_Family family;
-#define FTC_GLYPH_FAMILY_MEMORY( x ) FTC_FAMILY(x)->cache->memory
+ } FTC_GQueryRec, *FTC_GQuery;
-
- /* each glyph node contains a 'chunk' of glyph items; */
- /* translate a glyph index into a chunk index */
-#define FTC_GLYPH_FAMILY_CHUNK( gfam, gindex ) \
- ( ( gindex ) / FTC_GLYPH_FAMILY( gfam )->item_count )
-
- /* find a glyph index's chunk, and return its start index */
-#define FTC_GLYPH_FAMILY_START( gfam, gindex ) \
- ( FTC_GLYPH_FAMILY_CHUNK( gfam, gindex ) * \
- FTC_GLYPH_FAMILY( gfam )->item_count )
-
- /* compute a glyph request's hash value */
-#define FTC_GLYPH_FAMILY_HASH( gfam, gindex ) \
- ( (FT_UFast)( \
- ( FTC_GLYPH_FAMILY( gfam )->hash << 16 ) | \
- ( FTC_GLYPH_FAMILY_CHUNK( gfam, gindex ) & 0xFFFF ) ) )
-
- /* must be called in an FTC_Family_CompareFunc to update the query */
- /* whenever a glyph set is matched in the lookup, or when it */
- /* is created */
-#define FTC_GLYPH_FAMILY_FOUND( gfam, gquery ) \
- do \
- { \
- FTC_QUERY( gquery )->family = FTC_FAMILY( gfam ); \
- FTC_QUERY( gquery )->hash = \
- FTC_GLYPH_FAMILY_HASH( gfam, \
- FTC_GLYPH_QUERY( gquery )->gindex ); \
- } while ( 0 )
-
- /* retrieve glyph index of glyph node */
-#define FTC_GLYPH_NODE_GINDEX( x ) \
- ( (FT_UInt)( FTC_GLYPH_NODE( x )->node.hash & 0xFFFF ) )
+#define FTC_GQUERY( x ) ( (FTC_GQuery)(x) )
/*************************************************************************/
@@ -151,39 +176,116 @@ FT_BEGIN_HEADER
/* must be called by derived FTC_Node_InitFunc routines */
FT_EXPORT( void )
- ftc_glyph_node_init( FTC_GlyphNode node,
- FT_UInt gindex, /* glyph index for node */
- FTC_GlyphFamily gfam );
+ FTC_GNode_Init( FTC_GNode node,
+ FT_UInt gindex, /* glyph index for node */
+ FTC_Family family );
/* returns TRUE iff the query's glyph index correspond to the node; */
/* this assumes that the "family" and "hash" fields of the query are */
/* already correctly set */
FT_EXPORT( FT_Bool )
- ftc_glyph_node_compare( FTC_GlyphNode gnode,
- FTC_GlyphQuery gquery );
+ FTC_GNode_Compare( FTC_GNode gnode,
+ FTC_GQuery gquery );
+
+ /* call this function to clear a node's family -- this is necessary */
+ /* to implement the `node_remove_faceid' cache method correctly */
+ FT_EXPORT( void )
+ FTC_GNode_UnselectFamily( FTC_GNode gnode,
+ FTC_Cache cache );
/* must be called by derived FTC_Node_DoneFunc routines */
FT_EXPORT( void )
- ftc_glyph_node_done( FTC_GlyphNode node,
- FTC_Cache cache );
+ FTC_GNode_Done( FTC_GNode node,
+ FTC_Cache cache );
+
+
+ FT_EXPORT( void )
+ FTC_Family_Init( FTC_Family family,
+ FTC_Cache cache );
+ typedef struct FTC_GCacheRec_
+ {
+ FTC_CacheRec cache;
+ FTC_MruListRec families;
+
+ } FTC_GCacheRec, *FTC_GCache;
+
+#define FTC_GCACHE( x ) ((FTC_GCache)(x))
- /* must be called by derived FTC_Family_InitFunc; */
- /* calls "ftc_family_init" */
+
+ /* can be used as @FTC_Cache_InitFunc */
FT_EXPORT( FT_Error )
- ftc_glyph_family_init( FTC_GlyphFamily gfam,
- FT_UInt32 hash,
- FT_UInt item_count,
- FT_UInt item_total,
- FTC_GlyphQuery gquery,
- FTC_Cache cache );
+ FTC_GCache_Init( FTC_GCache cache );
+
+ /* can be used as @FTC_Cache_DoneFunc */
FT_EXPORT( void )
- ftc_glyph_family_done( FTC_GlyphFamily gfam );
+ FTC_GCache_Done( FTC_GCache cache );
+
+
+ /* the glyph cache class adds fields for the family implementation */
+ typedef struct FTC_GCacheClassRec_
+ {
+ FTC_CacheClassRec clazz;
+ FTC_MruListClass family_class;
+
+ } FTC_GCacheClassRec;
+
+ typedef const FTC_GCacheClassRec* FTC_GCacheClass;
+#define FTC_GCACHE_CLASS( x ) ((FTC_GCacheClass)(x))
+#define FTC_CACHE__GCACHE_CLASS( x ) \
+ FTC_GCACHE_CLASS( FTC_CACHE(x)->org_class )
+#define FTC_CACHE__FAMILY_CLASS( x ) \
+ ((FTC_MruListClass) FTC_CACHE__GCACHE_CLASS(x)->family_class)
+
+
+ /* convenience function; use it instead of FTC_Manager_Register_Cache */
+ FT_EXPORT( FT_Error )
+ FTC_GCache_New( FTC_Manager manager,
+ FTC_GCacheClass clazz,
+ FTC_GCache *acache );
+
+ FT_EXPORT( FT_Error )
+ FTC_GCache_Lookup( FTC_GCache cache,
+ FT_UInt32 hash,
+ FT_UInt gindex,
+ FTC_GQuery query,
+ FTC_Node *anode );
+
+
+#ifdef FTC_INLINE
+
+#define FTC_GCACHE_LOOKUP_CMP( cache, famcmp, nodecmp, hash, \
+ gindex, query, node, error ) \
+ FT_BEGIN_STMNT \
+ FTC_GCache _gcache = FTC_GCACHE( cache ); \
+ FTC_GQuery _gquery = (FTC_GQuery)( query ); \
+ FTC_MruNode_CompareFunc _fcompare = (FTC_MruNode_CompareFunc)(famcmp); \
+ \
+ \
+ _gquery->gindex = (gindex); \
+ \
+ FTC_MRULIST_LOOKUP_CMP( &_gcache->families, _gquery, _fcompare, \
+ _gquery->family, error ); \
+ if ( !error ) \
+ FTC_CACHE_LOOKUP_CMP( cache, nodecmp, hash, query, node, error ); \
+ FT_END_STMNT
/* */
-
+
+#else /* !FTC_INLINE */
+
+#define FTC_GCACHE_LOOKUP_CMP( cache, famcmp, nodecmp, hash, \
+ gindex, query, node, error ) \
+ FT_BEGIN_STMNT \
+ error = FTC_GCache_Lookup( FTC_GCACHE( cache ), hash, gindex, \
+ FTC_GQUERY( query ), (FTC_Node*)&(node) ); \
+ FT_END_STMNT
+
+#endif /* !FTC_INLINE */
+
+
FT_END_HEADER
diff --git a/extras/freetype2/include/freetype/cache/ftcimage.h b/extras/freetype2/include/freetype/cache/ftcimage.h
index 382d991d3..1bf12db13 100644
--- a/extras/freetype2/include/freetype/cache/ftcimage.h
+++ b/extras/freetype2/include/freetype/cache/ftcimage.h
@@ -2,9 +2,9 @@
/* */
/* ftcimage.h */
/* */
-/* FreeType Image cache (specification). */
+/* FreeType Generic Image cache (specification) */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,6 +16,15 @@
/***************************************************************************/
+ /*
+ * FTC_ICache is an _abstract_ cache used to store a single FT_Glyph
+ * image per cache node.
+ *
+ * FTC_ICache extends FTC_GCache. For an implementation example,
+ * see FTC_ImageCache in `src/cache/ftbasic.c'.
+ */
+
+
/*************************************************************************/
/* */
/* Each image cache really manages FT_Glyph objects. */
@@ -29,283 +38,66 @@
#include <ft2build.h>
#include FT_CACHE_H
-
+#include FT_CACHE_INTERNAL_GLYPH_H
FT_BEGIN_HEADER
- /*************************************************************************/
- /* */
- /* <Section> */
- /* cache_subsystem */
- /* */
- /*************************************************************************/
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** IMAGE CACHE OBJECT *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /**************************************************************************
- *
- * @struct:
- * FTC_ImageTypeRec
- *
- * @description:
- * A simple structure used to describe the type of glyph image to be
- * loaded into the cache.
- *
- * @fields:
- * font :: An @FTC_FontRec used to describe the glyph's face and size.
- *
- * flags :: The load flags to be applied when loading the glyph; see
- * the @FT_LOAD_XXX constants for details.
- *
- * @note:
- * This type completely replaces the @FTC_Image_Desc structure which is
- * now obsolete.
- */
- typedef struct FTC_ImageTypeRec_
+ /* the FT_Glyph image node type - we store only 1 glyph per node */
+ typedef struct FTC_INodeRec_
{
- FTC_FontRec font;
- FT_Int32 flags;
-
- } FTC_ImageTypeRec;
-
- typedef struct FTC_ImageTypeRec_* FTC_ImageType;
-
- /* */
-
-#define FTC_IMAGE_TYPE_COMPARE( d1, d2 ) \
- ( FTC_FONT_COMPARE( &(d1)->font, &(d2)->font ) && \
- (d1)->flags == (d2)->flags )
-
-#define FTC_IMAGE_TYPE_HASH( d ) \
- (FT_UFast)( FTC_FONT_HASH( &(d)->font ) ^ \
- ( (d)->flags << 4 ) )
-
-
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FTC_ImageCache */
- /* */
- /* <Description> */
- /* A handle to an glyph image cache object. They are designed to */
- /* hold many distinct glyph images while not exceeding a certain */
- /* memory threshold. */
- /* */
- typedef struct FTC_ImageCacheRec_* FTC_ImageCache;
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FTC_ImageCache_New */
- /* */
- /* <Description> */
- /* Creates a new glyph image cache. */
- /* */
- /* <Input> */
- /* manager :: The parent manager for the image cache. */
- /* */
- /* <Output> */
- /* acache :: A handle to the new glyph image cache object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- FT_EXPORT( FT_Error )
- FTC_ImageCache_New( FTC_Manager manager,
- FTC_ImageCache *acache );
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FTC_ImageCache_Lookup */
- /* */
- /* <Description> */
- /* Retrieves a given glyph image from a glyph image cache. */
- /* */
- /* <Input> */
- /* cache :: A handle to the source glyph image cache. */
- /* */
- /* type :: A pointer to a glyph image type descriptor. */
- /* */
- /* gindex :: The glyph index to retrieve. */
- /* */
- /* <Output> */
- /* aglyph :: The corresponding @FT_Glyph object. 0 in case of */
- /* failure. */
- /* */
- /* anode :: Used to return the address of of the corresponding cache */
- /* node after incrementing its reference count (see note */
- /* below). */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The returned glyph is owned and managed by the glyph image cache. */
- /* Never try to transform or discard it manually! You can however */
- /* create a copy with @FT_Glyph_Copy and modify the new one. */
- /* */
- /* If "anode" is _not_ NULL, it receives the address of the cache */
- /* node containing the glyph image, after increasing its reference */
- /* count. This ensures that the node (as well as the FT_Glyph) will */
- /* always be kept in the cache until you call @FTC_Node_Unref to */
- /* "release" it. */
- /* */
- /* If "anode" is NULL, the cache node is left unchanged, which means */
- /* that the FT_Glyph could be flushed out of the cache on the next */
- /* call to one of the caching sub-system APIs. Don't assume that it */
- /* is persistent! */
- /* */
- FT_EXPORT( FT_Error )
- FTC_ImageCache_Lookup( FTC_ImageCache cache,
- FTC_ImageType type,
- FT_UInt gindex,
- FT_Glyph *aglyph,
- FTC_Node *anode );
-
- /* */
-
-#define ftc_image_format( x ) ( (x) & 7 )
+ FTC_GNodeRec gnode;
+ FT_Glyph glyph;
+ } FTC_INodeRec, *FTC_INode;
-#define ftc_image_format_bitmap 0x0000
-#define ftc_image_format_outline 0x0001
+#define FTC_INODE( x ) ( (FTC_INode)( x ) )
+#define FTC_INODE_GINDEX( x ) FTC_GNODE(x)->gindex
+#define FTC_INODE_FAMILY( x ) FTC_GNODE(x)->family
-#define ftc_image_format_mask 0x000F
+ typedef FT_Error
+ (*FTC_IFamily_LoadGlyphFunc)( FTC_Family family,
+ FT_UInt gindex,
+ FTC_Cache cache,
+ FT_Glyph *aglyph );
-#define ftc_image_flag_monochrome 0x0010
-#define ftc_image_flag_unhinted 0x0020
-#define ftc_image_flag_autohinted 0x0040
-#define ftc_image_flag_unscaled 0x0080
-#define ftc_image_flag_no_sbits 0x0100
-
- /* monochrome bitmap */
-#define ftc_image_mono ftc_image_format_bitmap | \
- ftc_image_flag_monochrome
-
- /* anti-aliased bitmap */
-#define ftc_image_grays ftc_image_format_bitmap
-
- /* scaled outline */
-#define ftc_image_outline ftc_image_format_outline
-
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* FTC_Image_Desc */
- /* */
- /* <Description> */
- /* THIS TYPE IS DEPRECATED. Use @FTC_ImageDesc instead. */
- /* */
- /* A simple structure used to describe a given glyph image category. */
- /* */
- /* <Fields> */
- /* size :: An @FTC_SizeRec used to describe the glyph's face */
- /* and size. */
- /* */
- /* image_type :: The glyph image's type. */
- /* */
- typedef struct FTC_Image_Desc_
+ typedef struct FTC_IFamilyClassRec_
{
- FTC_FontRec font;
- FT_UInt image_type;
+ FTC_MruListClassRec clazz;
+ FTC_IFamily_LoadGlyphFunc family_load_glyph;
- } FTC_Image_Desc;
+ } FTC_IFamilyClassRec;
+ typedef const FTC_IFamilyClassRec* FTC_IFamilyClass;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FTC_Image_Cache */
- /* */
- /* <Description> */
- /* THIS TYPE IS DEPRECATED. Use @FTC_ImageCache instead. */
- /* */
- typedef FTC_ImageCache FTC_Image_Cache;
+#define FTC_IFAMILY_CLASS( x ) ((FTC_IFamilyClass)(x))
+#define FTC_CACHE__IFAMILY_CLASS( x ) \
+ FTC_IFAMILY_CLASS( FTC_CACHE__GCACHE_CLASS(x)->family_class )
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FTC_Image_Cache_New */
- /* */
- /* <Description> */
- /* THIS FUNCTION IS DEPRECATED. Use @FTC_ImageCache_New instead. */
- /* */
- /* Creates a new glyph image cache. */
- /* */
- /* <Input> */
- /* manager :: The parent manager for the image cache. */
- /* */
- /* <Output> */
- /* acache :: A handle to the new glyph image cache object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- FT_EXPORT( FT_Error )
- FTC_Image_Cache_New( FTC_Manager manager,
- FTC_Image_Cache *acache );
+ /* can be used as a @FTC_Node_FreeFunc */
+ FT_EXPORT( void )
+ FTC_INode_Free( FTC_INode inode,
+ FTC_Cache cache );
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FTC_Image_Cache_Lookup */
- /* */
- /* <Description> */
- /* THIS FUNCTION IS DEPRECATED. Use @FTC_ImageCache_Lookup instead. */
- /* */
- /* <Input> */
- /* cache :: A handle to the source glyph image cache. */
- /* */
- /* desc :: A pointer to a glyph image descriptor. */
- /* */
- /* gindex :: The glyph index to retrieve. */
- /* */
- /* <Output> */
- /* aglyph :: The corresponding @FT_Glyph object. 0 in case of */
- /* failure. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The returned glyph is owned and managed by the glyph image cache. */
- /* Never try to transform or discard it manually! You can however */
- /* create a copy with @FT_Glyph_Copy and modify the new one. */
- /* */
- /* Because the glyph image cache limits the total amount of memory */
- /* taken by the glyphs it holds, the returned glyph might disappear */
- /* on a later invocation of this function! It is a cache after */
- /* all... */
- /* */
- /* Use this function to "lock" the glyph as long as it is needed. */
- /* */
+ /* Can be used as @FTC_Node_NewFunc. `gquery.index' and `gquery.family'
+ * must be set correctly. This function will call the `family_load_glyph'
+ * method to load the FT_Glyph into the cache node.
+ */
FT_EXPORT( FT_Error )
- FTC_Image_Cache_Lookup( FTC_Image_Cache cache,
- FTC_Image_Desc* desc,
- FT_UInt gindex,
- FT_Glyph *aglyph );
+ FTC_INode_New( FTC_INode *pinode,
+ FTC_GQuery gquery,
+ FTC_Cache cache );
+
+ /* can be used as @FTC_Node_WeightFunc */
+ FT_EXPORT( FT_ULong )
+ FTC_INode_Weight( FTC_INode inode );
/* */
FT_END_HEADER
-
#endif /* __FTCIMAGE_H__ */
diff --git a/extras/freetype2/include/freetype/cache/ftcmanag.h b/extras/freetype2/include/freetype/cache/ftcmanag.h
index 97c77591b..526584822 100644
--- a/extras/freetype2/include/freetype/cache/ftcmanag.h
+++ b/extras/freetype2/include/freetype/cache/ftcmanag.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache Manager (specification). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -65,7 +65,7 @@
#include <ft2build.h>
#include FT_CACHE_H
-#include FT_CACHE_INTERNAL_LRU_H
+#include FT_CACHE_INTERNAL_MRU_H
#include FT_CACHE_INTERNAL_CACHE_H
@@ -88,91 +88,25 @@ FT_BEGIN_HEADER
#define FTC_MAX_CACHES 16
- typedef struct FTC_FamilyEntryRec_
- {
- FTC_Family family;
- FTC_Cache cache;
- FT_UInt index;
- FT_UInt link;
-
- } FTC_FamilyEntryRec, *FTC_FamilyEntry;
-
-
-#define FTC_FAMILY_ENTRY_NONE ( (FT_UInt)-1 )
-
-
- typedef struct FTC_FamilyTableRec_
- {
- FT_UInt count;
- FT_UInt size;
- FTC_FamilyEntry entries;
- FT_UInt free;
-
- } FTC_FamilyTableRec, *FTC_FamilyTable;
-
-
- FT_EXPORT( FT_Error )
- ftc_family_table_alloc( FTC_FamilyTable table,
- FT_Memory memory,
- FTC_FamilyEntry *aentry );
-
- FT_EXPORT( void )
- ftc_family_table_free( FTC_FamilyTable table,
- FT_UInt idx );
-
-
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* FTC_ManagerRec */
- /* */
- /* <Description> */
- /* The cache manager structure. */
- /* */
- /* <Fields> */
- /* library :: A handle to a FreeType library instance. */
- /* */
- /* faces_list :: The lru list of @FT_Face objects in the cache. */
- /* */
- /* sizes_list :: The lru list of @FT_Size objects in the cache. */
- /* */
- /* max_weight :: The maximum cache pool weight. */
- /* */
- /* cur_weight :: The current cache pool weight. */
- /* */
- /* num_nodes :: The current number of nodes in the manager. */
- /* */
- /* nodes_list :: The global lru list of all cache nodes. */
- /* */
- /* caches :: A table of installed/registered cache objects. */
- /* */
- /* request_data :: User-provided data passed to the requester. */
- /* */
- /* request_face :: User-provided function used to implement a mapping */
- /* between abstract @FTC_FaceID values and real */
- /* @FT_Face objects. */
- /* */
- /* families :: Global table of families. */
- /* */
typedef struct FTC_ManagerRec_
{
FT_Library library;
- FT_LruList faces_list;
- FT_LruList sizes_list;
+ FT_Memory memory;
+ FTC_Node nodes_list;
FT_ULong max_weight;
FT_ULong cur_weight;
-
FT_UInt num_nodes;
- FTC_Node nodes_list;
-
+
FTC_Cache caches[FTC_MAX_CACHES];
+ FT_UInt num_caches;
+
+ FTC_MruListRec faces;
+ FTC_MruListRec sizes;
FT_Pointer request_data;
FTC_Face_Requester request_face;
- FTC_FamilyTableRec families;
-
} FTC_ManagerRec;
@@ -201,43 +135,40 @@ FT_BEGIN_HEADER
FTC_Manager_Compress( FTC_Manager manager );
+ /* try to flush `count' old nodes from the cache; return the number
+ * of really flushed nodes
+ */
+ FT_EXPORT( FT_UInt )
+ FTC_Manager_FlushN( FTC_Manager manager,
+ FT_UInt count );
+
+
/* this must be used internally for the moment */
FT_EXPORT( FT_Error )
- FTC_Manager_Register_Cache( FTC_Manager manager,
- FTC_Cache_Class clazz,
- FTC_Cache *acache );
-
+ FTC_Manager_RegisterCache( FTC_Manager manager,
+ FTC_CacheClass clazz,
+ FTC_Cache *acache );
- /* can be called to increment a node's reference count */
- FT_EXPORT( void )
- FTC_Node_Ref( FTC_Node node,
- FTC_Manager manager );
+ /* */
+#define FTC_SCALER_COMPARE( a, b ) \
+ ( (a)->face_id == (b)->face_id && \
+ (a)->width == (b)->width && \
+ (a)->height == (b)->height && \
+ ((a)->pixel != 0) == ((b)->pixel != 0) && \
+ ( (a)->pixel || \
+ ( (a)->x_res == (b)->x_res && \
+ (a)->y_res == (b)->y_res ) ) )
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FTC_Node_Unref */
- /* */
- /* <Description> */
- /* Decrement a cache node's internal reference count. When the count */
- /* reaches 0, it is not destroyed but becomes eligible for subsequent */
- /* cache flushes. */
- /* */
- /* <Input> */
- /* node :: The cache node handle. */
- /* */
- /* manager :: The cache manager handle. */
- /* */
- FT_EXPORT( void )
- FTC_Node_Unref( FTC_Node node,
- FTC_Manager manager );
+#define FTC_SCALER_HASH( q ) \
+ ( FTC_FACE_ID_HASH( (q)->face_id ) + \
+ (q)->width + (q)->height*7 + \
+ ( (q)->pixel ? 0 : ( (q)->x_res*33 ^ (q)->y_res*61 ) ) )
/* */
FT_END_HEADER
-
#endif /* __FTCMANAG_H__ */
diff --git a/extras/freetype2/include/freetype/cache/ftcmru.h b/extras/freetype2/include/freetype/cache/ftcmru.h
new file mode 100644
index 000000000..9556f58e7
--- /dev/null
+++ b/extras/freetype2/include/freetype/cache/ftcmru.h
@@ -0,0 +1,246 @@
+/***************************************************************************/
+/* */
+/* ftcmru.h */
+/* */
+/* Simple MRU list-cache (specification). */
+/* */
+/* Copyright 2000-2001, 2003, 2004 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* An MRU is a list that cannot hold more than a certain number of */
+ /* elements (`max_elements'). All elements in the list are sorted in */
+ /* least-recently-used order, i.e., the `oldest' element is at the tail */
+ /* of the list. */
+ /* */
+ /* When doing a lookup (either through `Lookup()' or `Lookup_Node()'), */
+ /* the list is searched for an element with the corresponding key. If */
+ /* it is found, the element is moved to the head of the list and is */
+ /* returned. */
+ /* */
+ /* If no corresponding element is found, the lookup routine will try to */
+ /* obtain a new element with the relevant key. If the list is already */
+ /* full, the oldest element from the list is discarded and replaced by a */
+ /* new one; a new element is added to the list otherwise. */
+ /* */
+ /* Note that it is possible to pre-allocate the element list nodes. */
+ /* This is handy if `max_elements' is sufficiently small, as it saves */
+ /* allocations/releases during the lookup process. */
+ /* */
+ /*************************************************************************/
+
+
+#ifndef __FTCMRU_H__
+#define __FTCMRU_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+#define xxFT_DEBUG_ERROR
+#define FTC_INLINE
+
+FT_BEGIN_HEADER
+
+ typedef struct FTC_MruNodeRec_* FTC_MruNode;
+
+ typedef struct FTC_MruNodeRec_
+ {
+ FTC_MruNode next;
+ FTC_MruNode prev;
+
+ } FTC_MruNodeRec;
+
+
+ FT_EXPORT( void )
+ FTC_MruNode_Prepend( FTC_MruNode *plist,
+ FTC_MruNode node );
+
+ FT_EXPORT( void )
+ FTC_MruNode_Up( FTC_MruNode *plist,
+ FTC_MruNode node );
+
+ FT_EXPORT( void )
+ FTC_MruNode_Remove( FTC_MruNode *plist,
+ FTC_MruNode node );
+
+
+ typedef struct FTC_MruListRec_* FTC_MruList;
+
+ typedef struct FTC_MruListClassRec_ const * FTC_MruListClass;
+
+
+ typedef FT_Int
+ (*FTC_MruNode_CompareFunc)( FTC_MruNode node,
+ FT_Pointer key );
+
+ typedef FT_Error
+ (*FTC_MruNode_InitFunc)( FTC_MruNode node,
+ FT_Pointer key,
+ FT_Pointer data );
+
+ typedef FT_Error
+ (*FTC_MruNode_ResetFunc)( FTC_MruNode node,
+ FT_Pointer key,
+ FT_Pointer data );
+
+ typedef void
+ (*FTC_MruNode_DoneFunc)( FTC_MruNode node,
+ FT_Pointer data );
+
+
+ typedef struct FTC_MruListClassRec_
+ {
+ FT_UInt node_size;
+ FTC_MruNode_CompareFunc node_compare;
+ FTC_MruNode_InitFunc node_init;
+ FTC_MruNode_ResetFunc node_reset;
+ FTC_MruNode_DoneFunc node_done;
+
+ } FTC_MruListClassRec;
+
+ typedef struct FTC_MruListRec_
+ {
+ FT_UInt num_nodes;
+ FT_UInt max_nodes;
+ FTC_MruNode nodes;
+ FT_Pointer data;
+ FTC_MruListClassRec clazz;
+ FT_Memory memory;
+
+ } FTC_MruListRec;
+
+
+ FT_EXPORT( void )
+ FTC_MruList_Init( FTC_MruList list,
+ FTC_MruListClass clazz,
+ FT_UInt max_nodes,
+ FT_Pointer data,
+ FT_Memory memory );
+
+ FT_EXPORT( void )
+ FTC_MruList_Reset( FTC_MruList list );
+
+
+ FT_EXPORT( void )
+ FTC_MruList_Done( FTC_MruList list );
+
+ FT_EXPORT( FTC_MruNode )
+ FTC_MruList_Find( FTC_MruList list,
+ FT_Pointer key );
+
+ FT_EXPORT( FT_Error )
+ FTC_MruList_New( FTC_MruList list,
+ FT_Pointer key,
+ FTC_MruNode *anode );
+
+ FT_EXPORT( FT_Error )
+ FTC_MruList_Lookup( FTC_MruList list,
+ FT_Pointer key,
+ FTC_MruNode *pnode );
+
+
+ FT_EXPORT( void )
+ FTC_MruList_Remove( FTC_MruList list,
+ FTC_MruNode node );
+
+ FT_EXPORT( void )
+ FTC_MruList_RemoveSelection( FTC_MruList list,
+ FTC_MruNode_CompareFunc selection,
+ FT_Pointer key );
+
+
+#ifdef FTC_INLINE
+
+#define FTC_MRULIST_LOOKUP_CMP( list, key, compare, node, error ) \
+ FT_BEGIN_STMNT \
+ FTC_MruNode* _pfirst = &(list)->nodes; \
+ FTC_MruNode_CompareFunc _compare = (FTC_MruNode_CompareFunc)(compare); \
+ FTC_MruNode _first, _node; \
+ \
+ \
+ error = 0; \
+ _first = *(_pfirst); \
+ _node = NULL; \
+ \
+ if ( _first ) \
+ { \
+ _node = _first; \
+ do \
+ { \
+ if ( _compare( _node, (key) ) ) \
+ { \
+ if ( _node != _first ) \
+ FTC_MruNode_Up( _pfirst, _node ); \
+ \
+ *(FTC_MruNode*)&(node) = _node; \
+ goto _MruOk; \
+ } \
+ _node = _node->next; \
+ \
+ } while ( _node != _first) ; \
+ } \
+ \
+ error = FTC_MruList_New( (list), (key), (FTC_MruNode*)&(node) ); \
+ _MruOk: \
+ ; \
+ FT_END_STMNT
+
+#define FTC_MRULIST_LOOKUP( list, key, node, error ) \
+ FTC_MRULIST_LOOKUP_CMP( list, key, (list)->clazz.node_compare, node, error )
+
+#else /* !FTC_INLINE */
+
+#define FTC_MRULIST_LOOKUP( list, key, node, error ) \
+ error = FTC_MruList_Lookup( (list), (key), (FTC_MruNode*)&(node) )
+
+#endif /* !FTC_INLINE */
+
+
+#define FTC_MRULIST_LOOP( list, node ) \
+ FT_BEGIN_STMNT \
+ FTC_MruNode _first = (list)->nodes; \
+ \
+ \
+ if ( _first ) \
+ { \
+ FTC_MruNode _node = _first; \
+ \
+ \
+ do \
+ { \
+ *(FTC_MruNode*)&(node) = _node;
+
+
+#define FTC_MRULIST_LOOP_END() \
+ _node = _node->next; \
+ \
+ } while ( _node != _first ); \
+ } \
+ FT_END_STMNT
+
+ /* */
+
+FT_END_HEADER
+
+
+#endif /* __FTCMRU_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/cache/ftcsbits.h b/extras/freetype2/include/freetype/cache/ftcsbits.h
index 6f8ef99cf..b2ef0f181 100644
--- a/extras/freetype2/include/freetype/cache/ftcsbits.h
+++ b/extras/freetype2/include/freetype/cache/ftcsbits.h
@@ -4,7 +4,7 @@
/* */
/* A small-bitmap cache (specification). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,251 +22,72 @@
#include <ft2build.h>
#include FT_CACHE_H
-#include FT_CACHE_IMAGE_H
+#include FT_CACHE_INTERNAL_GLYPH_H
FT_BEGIN_HEADER
+#define FTC_SBIT_ITEMS_PER_NODE 16
- /*************************************************************************/
- /* */
- /* <Section> */
- /* cache_subsystem */
- /* */
- /*************************************************************************/
+ typedef struct FTC_SNodeRec_
+ {
+ FTC_GNodeRec gnode;
+ FT_UInt count;
+ FTC_SBitRec sbits[FTC_SBIT_ITEMS_PER_NODE];
+ } FTC_SNodeRec, *FTC_SNode;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FTC_SBit */
- /* */
- /* <Description> */
- /* A handle to a small bitmap descriptor. See the @FTC_SBitRec */
- /* structure for details. */
- /* */
- typedef struct FTC_SBitRec_* FTC_SBit;
+#define FTC_SNODE( x ) ( (FTC_SNode)( x ) )
+#define FTC_SNODE_GINDEX( x ) FTC_GNODE( x )->gindex
+#define FTC_SNODE_FAMILY( x ) FTC_GNODE( x )->family
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* FTC_SBitRec */
- /* */
- /* <Description> */
- /* A very compact structure used to describe a small glyph bitmap. */
- /* */
- /* <Fields> */
- /* width :: The bitmap width in pixels. */
- /* */
- /* height :: The bitmap height in pixels. */
- /* */
- /* left :: The horizontal distance from the pen position to the */
- /* left bitmap border (a.k.a. `left side bearing', or */
- /* `lsb'). */
- /* */
- /* top :: The vertical distance from the pen position (on the */
- /* baseline) to the upper bitmap border (a.k.a. `top */
- /* side bearing'). The distance is positive for upwards */
- /* Y coordinates. */
- /* */
- /* format :: The format of the glyph bitmap (monochrome or gray). */
- /* */
- /* max_grays :: Maximum gray level value (in the range 1 to 255). */
- /* */
- /* pitch :: The number of bytes per bitmap line. May be positive */
- /* or negative. */
- /* */
- /* xadvance :: The horizontal advance width in pixels. */
- /* */
- /* yadvance :: The vertical advance height in pixels. */
- /* */
- /* buffer :: A pointer to the bitmap pixels. */
- /* */
- typedef struct FTC_SBitRec_
- {
- FT_Byte width;
- FT_Byte height;
- FT_Char left;
- FT_Char top;
+ typedef FT_UInt
+ (*FTC_SFamily_GetCountFunc)( FTC_Family family,
+ FTC_Manager manager );
- FT_Byte format;
- FT_Byte max_grays;
- FT_Short pitch;
- FT_Char xadvance;
- FT_Char yadvance;
+ typedef FT_Error
+ (*FTC_SFamily_LoadGlyphFunc)( FTC_Family family,
+ FT_UInt gindex,
+ FTC_Manager manager,
+ FT_Face *aface );
- FT_Byte* buffer;
+ typedef struct FTC_SFamilyClassRec_
+ {
+ FTC_MruListClassRec clazz;
+ FTC_SFamily_GetCountFunc family_get_count;
+ FTC_SFamily_LoadGlyphFunc family_load_glyph;
- } FTC_SBitRec;
+ } FTC_SFamilyClassRec;
+ typedef const FTC_SFamilyClassRec* FTC_SFamilyClass;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FTC_SBitCache */
- /* */
- /* <Description> */
- /* A handle to a small bitmap cache. These are special cache objects */
- /* used to store small glyph bitmaps (and anti-aliased pixmaps) in a */
- /* much more efficient way than the traditional glyph image cache */
- /* implemented by @FTC_ImageCache. */
- /* */
- typedef struct FTC_SBitCacheRec_* FTC_SBitCache;
+#define FTC_SFAMILY_CLASS( x ) ((FTC_SFamilyClass)(x))
+#define FTC_CACHE__SFAMILY_CLASS( x ) \
+ FTC_SFAMILY_CLASS( FTC_CACHE__GCACHE_CLASS( x )->family_class )
- /*************************************************************************/
- /* */
- /* <Type> */
- /* FTC_SBit_Cache */
- /* */
- /* <Description> */
- /* DEPRECATED. Use @FTC_SBitCache instead. */
- /* */
- typedef FTC_SBitCache FTC_SBit_Cache;
+ FT_EXPORT( void )
+ FTC_SNode_Free( FTC_SNode snode,
+ FTC_Cache cache );
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FTC_SBitCache_New */
- /* */
- /* <Description> */
- /* Creates a new cache to store small glyph bitmaps. */
- /* */
- /* <Input> */
- /* manager :: A handle to the source cache manager. */
- /* */
- /* <Output> */
- /* acache :: A handle to the new sbit cache. NULL in case of error. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
FT_EXPORT( FT_Error )
- FTC_SBitCache_New( FTC_Manager manager,
- FTC_SBitCache *acache );
+ FTC_SNode_New( FTC_SNode *psnode,
+ FTC_GQuery gquery,
+ FTC_Cache cache );
+ FT_EXPORT( FT_ULong )
+ FTC_SNode_Weight( FTC_SNode inode );
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FTC_SBitCache_Lookup */
- /* */
- /* <Description> */
- /* Looks up a given small glyph bitmap in a given sbit cache and */
- /* "lock" it to prevent its flushing from the cache until needed */
- /* */
- /* <Input> */
- /* cache :: A handle to the source sbit cache. */
- /* */
- /* type :: A pointer to the glyph image type descriptor. */
- /* */
- /* gindex :: The glyph index. */
- /* */
- /* <Output> */
- /* sbit :: A handle to a small bitmap descriptor. */
- /* */
- /* anode :: Used to return the address of of the corresponding cache */
- /* node after incrementing its reference count (see note */
- /* below). */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The small bitmap descriptor and its bit buffer are owned by the */
- /* cache and should never be freed by the application. They might */
- /* as well disappear from memory on the next cache lookup, so don't */
- /* treat them as persistent data. */
- /* */
- /* The descriptor's `buffer' field is set to 0 to indicate a missing */
- /* glyph bitmap. */
- /* */
- /* If "anode" is _not_ NULL, it receives the address of the cache */
- /* node containing the bitmap, after increasing its reference count. */
- /* This ensures that the node (as well as the image) will always be */
- /* kept in the cache until you call @FTC_Node_Unref to "release" it. */
- /* */
- /* If "anode" is NULL, the cache node is left unchanged, which means */
- /* that the bitmap could be flushed out of the cache on the next */
- /* call to one of the caching sub-system APIs. Don't assume that it */
- /* is persistent! */
- /* */
- FT_EXPORT( FT_Error )
- FTC_SBitCache_Lookup( FTC_SBitCache cache,
- FTC_ImageType type,
- FT_UInt gindex,
- FTC_SBit *sbit,
- FTC_Node *anode );
+ FT_EXPORT( FT_Bool )
+ FTC_SNode_Compare( FTC_SNode snode,
+ FTC_GQuery gquery,
+ FTC_Cache cache );
/* */
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FTC_SBit_Cache_New */
- /* */
- /* <Description> */
- /* DEPRECATED. Use @FTC_SBitCache_New instead. */
- /* */
- /* Creates a new cache to store small glyph bitmaps. */
- /* */
- /* <Input> */
- /* manager :: A handle to the source cache manager. */
- /* */
- /* <Output> */
- /* acache :: A handle to the new sbit cache. NULL in case of error. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- FT_EXPORT( FT_Error )
- FTC_SBit_Cache_New( FTC_Manager manager,
- FTC_SBit_Cache *acache );
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* FTC_SBit_Cache_Lookup */
- /* */
- /* <Description> */
- /* DEPRECATED. Use @FTC_SBitCache_Lookup instead. */
- /* */
- /* Looks up a given small glyph bitmap in a given sbit cache. */
- /* */
- /* <Input> */
- /* cache :: A handle to the source sbit cache. */
- /* */
- /* desc :: A pointer to the glyph image descriptor. */
- /* */
- /* gindex :: The glyph index. */
- /* */
- /* <Output> */
- /* sbit :: A handle to a small bitmap descriptor. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The small bitmap descriptor and its bit buffer are owned by the */
- /* cache and should never be freed by the application. They might */
- /* as well disappear from memory on the next cache lookup, so don't */
- /* treat them as persistent data. */
- /* */
- /* The descriptor's `buffer' field is set to 0 to indicate a missing */
- /* glyph bitmap. */
- /* */
- FT_EXPORT( FT_Error )
- FTC_SBit_Cache_Lookup( FTC_SBit_Cache cache,
- FTC_Image_Desc* desc,
- FT_UInt gindex,
- FTC_SBit *sbit );
-
-
FT_END_HEADER
#endif /* __FTCSBITS_H__ */
diff --git a/extras/freetype2/include/freetype/config/ftconfig.h b/extras/freetype2/include/freetype/config/ftconfig.h
index 72bee0cc5..4bd8cf617 100644
--- a/extras/freetype2/include/freetype/config/ftconfig.h
+++ b/extras/freetype2/include/freetype/config/ftconfig.h
@@ -4,7 +4,7 @@
/* */
/* ANSI-specific configuration file (specification only). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -58,24 +58,37 @@ FT_BEGIN_HEADER
/*************************************************************************/
- /* The number of bytes in an `int' type. */
+ /* There are systems (like the Texas Instruments 'C54x) where a `char' */
+ /* has 16 bits. ANSI C says that sizeof(char) is always 1. Since an */
+ /* `int' has 16 bits also for this system, sizeof(int) gives 1 which */
+ /* is probably unexpected. */
+ /* */
+ /* `CHAR_BIT' (defined in limits.h) gives the number of bits in a */
+ /* `char' type. */
+
+#ifndef FT_CHAR_BIT
+#define FT_CHAR_BIT CHAR_BIT
+#endif
+
+
+ /* The size of an `int' type. */
#if FT_UINT_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_INT 4
+#define FT_SIZEOF_INT (32 / FT_CHAR_BIT)
#elif FT_UINT_MAX == 0xFFFFU
-#define FT_SIZEOF_INT 2
+#define FT_SIZEOF_INT (16 / FT_CHAR_BIT)
#elif FT_UINT_MAX > 0xFFFFFFFFU && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFU
-#define FT_SIZEOF_INT 8
+#define FT_SIZEOF_INT (64 / FT_CHAR_BIT)
#else
-#error "Unsupported number of bytes in `int' type!"
+#error "Unsupported size of `int' type!"
#endif
- /* The number of bytes in a `long' type. */
+ /* The size of a `long' type. */
#if FT_ULONG_MAX == 0xFFFFFFFFUL
-#define FT_SIZEOF_LONG 4
+#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
#elif FT_ULONG_MAX > 0xFFFFFFFFU && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFU
-#define FT_SIZEOF_LONG 8
+#define FT_SIZEOF_LONG (64 / FT_CHAR_BIT)
#else
-#error "Unsupported number of bytes in `long' type!"
+#error "Unsupported size of `long' type!"
#endif
@@ -108,7 +121,8 @@ FT_BEGIN_HEADER
/* This is the only necessary change, so it is defined here instead */
/* providing a new configuration file. */
/* */
-#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) )
+#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
+ ( defined( __MWERKS__ ) && defined( macintosh ) )
#define FT_MACINTOSH 1
#endif
@@ -122,12 +136,12 @@ FT_BEGIN_HEADER
typedef signed short FT_Int16;
typedef unsigned short FT_UInt16;
-#if FT_SIZEOF_INT == 4
+#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT)
typedef signed int FT_Int32;
typedef unsigned int FT_UInt32;
-#elif FT_SIZEOF_LONG == 4
+#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT)
typedef signed long FT_Int32;
typedef unsigned long FT_UInt32;
@@ -136,13 +150,13 @@ FT_BEGIN_HEADER
#error "no 32bit type found -- please check your configuration files"
#endif
- /* now, lookup for an integer type that is at least 32 bits */
-#if FT_SIZEOF_INT >= 4
+ /* look up an integer type that is at least 32 bits */
+#if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT)
typedef int FT_Fast;
typedef unsigned int FT_UFast;
-#elif FT_SIZEOF_LONG >= 4
+#elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT)
typedef long FT_Fast;
typedef unsigned long FT_UFast;
@@ -152,7 +166,7 @@ FT_BEGIN_HEADER
/* determine whether we have a 64-bit int type for platforms without */
/* Autoconf */
-#if FT_SIZEOF_LONG == 8
+#if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT)
/* FT_LONG64 must be defined if a 64-bit type is available */
#define FT_LONG64
@@ -177,10 +191,10 @@ FT_BEGIN_HEADER
/* Watcom doesn't provide 64-bit data types */
-#elif defined( __MWKS__ ) /* Metrowerks CodeWarrior */
+#elif defined( __MWERKS__ ) /* Metrowerks CodeWarrior */
- /* I don't know if it provides 64-bit data types, any suggestion */
- /* is welcome. */
+#define FT_LONG64
+#define FT_INT64 long long int
#elif defined( __GNUC__ )
@@ -188,7 +202,12 @@ FT_BEGIN_HEADER
#define FT_LONG64
#define FT_INT64 long long int
-#endif /* FT_SIZEOF_LONG == 8 */
+#endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
+
+
+#define FT_BEGIN_STMNT do {
+#define FT_END_STMNT } while ( 0 )
+#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
/*************************************************************************/
diff --git a/extras/freetype2/include/freetype/config/ftheader.h b/extras/freetype2/include/freetype/config/ftheader.h
index e5ae7e469..b996a7a6f 100644
--- a/extras/freetype2/include/freetype/config/ftheader.h
+++ b/extras/freetype2/include/freetype/config/ftheader.h
@@ -4,7 +4,7 @@
/* */
/* Build macros of the FreeType 2 library. */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -150,6 +150,7 @@
#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h>
#endif
+
/* public headers */
/*************************************************************************/
@@ -281,7 +282,7 @@
/* A macro used in #include statements to name the file containing */
/* the module management API of FreeType 2. */
/* */
-#define FT_MODULE_H <freetype/ftmodule.h>
+#define FT_MODULE_H <freetype/ftmodapi.h>
/*************************************************************************/
@@ -376,6 +377,18 @@
/*************************************************************************/
/* */
/* @macro: */
+ /* FT_LZW_H */
+ /* */
+ /* @description: */
+ /* A macro used in #include statements to name the file containing */
+ /* the definitions of an API to support for LZW-compressed files. */
+ /* */
+#define FT_LZW_H <freetype/ftlzw.h>
+
+
+ /*************************************************************************/
+ /* */
+ /* @macro: */
/* FT_WINFONTS_H */
/* */
/* @description: */
@@ -384,6 +397,7 @@
/* */
#define FT_WINFONTS_H <freetype/ftwinfnt.h>
+
/*************************************************************************/
/* */
/* @macro: */
@@ -433,7 +447,10 @@
/* see the API defined in @FT_CACHE_SMALL_BITMAPS_H if you only need */
/* to store small glyph bitmaps, as it will use less memory. */
/* */
-#define FT_CACHE_IMAGE_H <freetype/cache/ftcimage.h>
+ /* This macro is deprecated. Simply include @FT_CACHE_H to have all */
+ /* glyph image-related cache declarations. */
+ /* */
+#define FT_CACHE_IMAGE_H FT_CACHE_H
/*************************************************************************/
@@ -450,7 +467,10 @@
/* in @FT_CACHE_IMAGE_H if you want to cache arbitrary glyph images, */
/* including scalable outlines. */
/* */
-#define FT_CACHE_SMALL_BITMAPS_H <freetype/cache/ftcsbits.h>
+ /* This macro is deprecated. Simply include @FT_CACHE_H to have all */
+ /* small bitmaps-related cache declarations. */
+ /* */
+#define FT_CACHE_SMALL_BITMAPS_H FT_CACHE_H
/*************************************************************************/
@@ -462,7 +482,10 @@
/* A macro used in #include statements to name the file containing */
/* the `charmap' API of the FreeType 2 cache sub-system. */
/* */
-#define FT_CACHE_CHARMAP_H <freetype/cache/ftccmap.h>
+ /* This macro is deprecated. Simply include @FT_CACHE_H to have all */
+ /* charmap-based cache declarations. */
+ /* */
+#define FT_CACHE_CHARMAP_H FT_CACHE_H
/*************************************************************************/
@@ -508,24 +531,30 @@
/* */
-#define FT_TRIGONOMETRY_H <freetype/fttrigon.h>
-#define FT_STROKER_H <freetype/ftstroker.h>
-#define FT_SYNTHESIS_H <freetype/ftsynth.h>
-#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h>
+#define FT_TRIGONOMETRY_H <freetype/fttrigon.h>
+#define FT_STROKER_H <freetype/ftstroke.h>
+#define FT_SYNTHESIS_H <freetype/ftsynth.h>
+#define FT_ERROR_DEFINITIONS_H <freetype/fterrdef.h>
+
+#define FT_CACHE_MANAGER_H <freetype/cache/ftcmanag.h>
+
+#define FT_CACHE_INTERNAL_MRU_H <freetype/cache/ftcmru.h>
+#define FT_CACHE_INTERNAL_MANAGER_H <freetype/cache/ftcmanag.h>
+#define FT_CACHE_INTERNAL_CACHE_H <freetype/cache/ftccache.h>
+#define FT_CACHE_INTERNAL_GLYPH_H <freetype/cache/ftcglyph.h>
+#define FT_CACHE_INTERNAL_IMAGE_H <freetype/cache/ftcimage.h>
+#define FT_CACHE_INTERNAL_SBITS_H <freetype/cache/ftcsbits.h>
-#define FT_CACHE_MANAGER_H <freetype/cache/ftcmanag.h>
-#define FT_CACHE_INTERNAL_LRU_H <freetype/cache/ftlru.h>
-#define FT_CACHE_INTERNAL_GLYPH_H <freetype/cache/ftcglyph.h>
-#define FT_CACHE_INTERNAL_CACHE_H <freetype/cache/ftccache.h>
+#define FT_XFREE86_H <freetype/ftxf86.h>
-#define FT_XFREE86_H <freetype/ftxf86.h>
+#define FT_INCREMENTAL_H <freetype/ftincrem.h>
-#define FT_INCREMENTAL_H <freetype/ftincrem.h>
+#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
/* now include internal headers definitions from <freetype/internal/...> */
-#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
+#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
#include FT_INTERNAL_INTERNAL_H
diff --git a/extras/freetype2/include/freetype/config/ftoption.h b/extras/freetype2/include/freetype/config/ftoption.h
index 4e3457f73..a527ec12d 100644
--- a/extras/freetype2/include/freetype/config/ftoption.h
+++ b/extras/freetype2/include/freetype/config/ftoption.h
@@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -81,32 +81,46 @@ FT_BEGIN_HEADER
/* by FreeType to speed up some computations. However, this will create */
/* some problems when compiling the library in strict ANSI mode. */
/* */
- /* For this reason, the use of 64-bit ints is normally disabled when */
+ /* For this reason, the use of 64-bit integers is normally disabled when */
/* the __STDC__ macro is defined. You can however disable this by */
- /* defining here the macro FT_CONFIG_OPTION_FORCE_INT64. */
+ /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */
/* */
- /* For most compilers, this will only create compilation warnings */
- /* when building the library. */
+ /* For most compilers, this will only create compilation warnings when */
+ /* building the library. */
/* */
/* ObNote: The compiler-specific 64-bit integers are detected in the */
- /* file "ftconfig.h" either statically, or through Autoconf */
- /* on platforms that support it. */
+ /* file "ftconfig.h" either statically or through the */
+ /* `configure' script on supported platforms. */
/* */
#undef FT_CONFIG_OPTION_FORCE_INT64
/*************************************************************************/
/* */
+ /* LZW-compressed file support. */
+ /* */
+ /* FreeType now handles font files that have been compressed with the */
+ /* 'compress' program. This is mostly used to parse many of the PCF */
+ /* files that come with various X11 distributions. The implementation */
+ /* uses NetBSD's `zopen' to partially uncompress the file on the fly */
+ /* (see src/lzw/ftgzip.c). */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+#define FT_CONFIG_OPTION_USE_LZW
+
+
+ /*************************************************************************/
+ /* */
/* Gzip-compressed file support. */
/* */
/* FreeType now handles font files that have been compressed with the */
- /* 'gzip' program. This is mostly used to parse many of the PCF files */
- /* that come with XFree86. The implementation uses 'zlib' to */
- /* partially uncompress the file on the fly (see src/base/ftgzip.c). */
+ /* 'gzip' program. This is mostly used to parse many of the PCF files */
+ /* that come with XFree86. The implementation uses `zlib' to */
+ /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */
/* */
- /* Define this macro if you want to enable this "feature". Note that */
- /* this will however force you to link the zlib to any program that */
- /* also uses FreeType. */
+ /* Define this macro if you want to enable this `feature'. See also */
+ /* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */
/* */
#define FT_CONFIG_OPTION_USE_ZLIB
@@ -116,18 +130,18 @@ FT_BEGIN_HEADER
/* ZLib library selection */
/* */
/* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */
- /* It allows FreeType's "ftgzip" component to link to the system's */
- /* installation of the ZLib library. This is useful on systems like */
+ /* It allows FreeType's `ftgzip' component to link to the system's */
+ /* installation of the ZLib library. This is useful on systems like */
/* Unix or VMS where it generally is already available. */
/* */
/* If you let it undefined, the component will use its own copy */
- /* of the zlib sources instead. These have been modified to be */
+ /* of the zlib sources instead. These have been modified to be */
/* included directly within the component and *not* export external */
- /* function names. This allows you to link any program with FreeType */
+ /* function names. This allows you to link any program with FreeType */
/* _and_ ZLib without linking conflicts. */
/* */
- /* do not #undef this macro here, since the build system might */
- /* define for certain configurations */
+ /* Do not #undef this macro here since the build system might define */
+ /* it for certain configurations only. */
/* */
/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
@@ -167,6 +181,9 @@ FT_BEGIN_HEADER
/* will be later automatically defined as `extern return_type' to */
/* allow normal compilation. */
/* */
+ /* Do not #undef these macros here since the build system might define */
+ /* them for certain configurations only. */
+ /* */
/* #define FT_EXPORT(x) extern x */
/* #define FT_EXPORT_DEF(x) x */
@@ -216,12 +233,48 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* Support for Mac fonts */
+ /* */
+ /* Define this macro if you want support for outline fonts in Mac */
+ /* format (mac dfont, mac resource, macbinary containing a mac */
+ /* resource) on non-Mac platforms. */
+ /* */
+ /* Note that the `FOND' resource isn't checked. */
+ /* */
+#define FT_CONFIG_OPTION_MAC_FONTS
+
+
+ /*************************************************************************/
+ /* */
+ /* Guessing methods to access embedded resource forks */
+ /* */
+ /* Enable extra Mac fonts support on non-Mac platforms (e.g. */
+ /* GNU/Linux). */
+ /* */
+ /* Resource forks which include fonts data are stored sometimes in */
+ /* locations which users or developers don't expected. In some cases, */
+ /* resource forks start with some offset from the head of a file. In */
+ /* other cases, the actual resource fork is stored in file different */
+ /* from what the user specifies. If this option is activated, */
+ /* FreeType tries to guess whether such offsets or different file */
+ /* names must be used. */
+ /* */
+ /* Note that normal, direct access of resource forks is controlled via */
+ /* the FT_CONFIG_OPTION_MAC_FONTS option. */
+ /* */
+#ifdef FT_CONFIG_OPTION_MAC_FONTS
+#define FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
+#endif
+
+
+ /*************************************************************************/
+ /* */
/* Allow the use of FT_Incremental_Interface to load typefaces that */
/* contain no glyph data, but supply it via a callback function. */
/* This allows FreeType to be used with the PostScript language, using */
/* the GhostScript interpreter. */
/* */
-/* #define FT_CONFIG_OPTION_INCREMENTAL */
+/* #define FT_CONFIG_OPTION_INCREMENTAL */
/*************************************************************************/
@@ -229,7 +282,7 @@ FT_BEGIN_HEADER
/* The size in bytes of the render pool used by the scan-line converter */
/* to do all of its work. */
/* */
- /* This must be greater than 4kByte. */
+ /* This must be greater than 4KByte. */
/* */
#define FT_RENDER_POOL_SIZE 16384L
@@ -258,8 +311,11 @@ FT_BEGIN_HEADER
/* */
/* Don't define any of these macros to compile in `release' mode! */
/* */
-/* #define FT_DEBUG_LEVEL_ERROR */
-/* #define FT_DEBUG_LEVEL_TRACE */
+ /* Do not #undef these macros here since the build system might define */
+ /* them for certain configurations only. */
+ /* */
+/* #define FT_DEBUG_LEVEL_ERROR */
+/* #define FT_DEBUG_LEVEL_TRACE */
/*************************************************************************/
@@ -272,10 +328,12 @@ FT_BEGIN_HEADER
/* should define FT_DEBUG_MEMORY here. */
/* */
/* Note that the memory debugger is only activated at runtime when */
- /* when the _environment_ variable "FT_DEBUG_MEMORY" is also defined! */
+ /* when the _environment_ variable "FT2_DEBUG_MEMORY" is defined also! */
/* */
-/* #define FT_DEBUG_MEMORY */
-
+ /* Do not #undef this macro here since the build system might define */
+ /* it for certain configurations only. */
+ /* */
+/* #define FT_DEBUG_MEMORY */
/*************************************************************************/
@@ -375,14 +433,26 @@ FT_BEGIN_HEADER
/* By undefining this, you will only compile the code necessary to load */
/* TrueType glyphs without hinting. */
/* */
- /* do not #undef this macro here, since the build system might */
- /* define for certain configurations */
+ /* Do not #undef this macro here, since the build system might */
+ /* define it for certain configurations only. */
/* */
/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
/*************************************************************************/
/* */
+ /* Define TT_CONFIG_OPTION_UNPATENTED_HINTING (in addition to */
+ /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER) to compile the unpatented */
+ /* work-around hinting system. Note that for the moment, the algorithm */
+ /* is only used when selected at runtime through the parameter tag */
+ /* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook */
+ /* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally actived */
+ /* */
+#define TT_CONFIG_OPTION_UNPATENTED_HINTING
+
+
+ /*************************************************************************/
+ /* */
/* Define TT_CONFIG_OPTION_INTERPRETER_SWITCH to compile the TrueType */
/* bytecode interpreter with a huge switch statement, rather than a call */
/* table. This results in smaller and faster code for a number of */
@@ -470,21 +540,21 @@ FT_BEGIN_HEADER
/* */
/*
- * the FT_CONFIG_OPTION_CHESTER_XXXX macros are used to toggle some recent
- * improvements to the auto-hinter contributed by David Chester. They will
- * most likely disappear completely in the next release. For now, you should
- * always keep them defined
+ * The FT_CONFIG_OPTION_CHESTER_XXXX macros are used to toggle some recent
+ * improvements to the auto-hinter contributed by David Chester. They will
+ * most likely disappear completely in the next release. For now, you
+ * should always keep them defined.
*
*/
#define FT_CONFIG_OPTION_CHESTER_HINTS
#ifdef FT_CONFIG_OPTION_CHESTER_HINTS
-# define FT_CONFIG_CHESTER_SMALL_F
-# define FT_CONFIG_CHESTER_ASCENDER
-# define FT_CONFIG_CHESTER_SERIF
-# define FT_CONFIG_CHESTER_STEM
-# define FT_CONFIG_CHESTER_BLUE_SCALE
+#define FT_CONFIG_CHESTER_SMALL_F
+#define FT_CONFIG_CHESTER_ASCENDER
+#define FT_CONFIG_CHESTER_SERIF
+#define FT_CONFIG_CHESTER_STEM
+#define FT_CONFIG_CHESTER_BLUE_SCALE
#endif /* FT_CONFIG_OPTION_CHESTER_HINTS */
diff --git a/extras/freetype2/include/freetype/config/ftstdlib.h b/extras/freetype2/include/freetype/config/ftstdlib.h
index 6c060912d..297d6f017 100644
--- a/extras/freetype2/include/freetype/config/ftstdlib.h
+++ b/extras/freetype2/include/freetype/config/ftstdlib.h
@@ -5,7 +5,7 @@
/* ANSI-specific library and header configuration file (specification */
/* only). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -73,23 +73,27 @@
#include <ctype.h>
-#define ft_isalnum isalnum
-#define ft_isupper isupper
-#define ft_islower islower
-#define ft_xdigit isxdigit
+#define ft_isalnum isalnum
+#define ft_isupper isupper
+#define ft_islower islower
+#define ft_isdigit isdigit
+#define ft_isxdigit isxdigit
#include <string.h>
-#define ft_strlen strlen
-#define ft_strcmp strcmp
-#define ft_strncmp strncmp
+#define ft_memcmp memcmp
#define ft_memcpy memcpy
+#define ft_memmove memmove
+#define ft_memset memset
+#define ft_strcat strcat
+#define ft_strcmp strcmp
#define ft_strcpy strcpy
+#define ft_strlen strlen
+#define ft_strncmp strncmp
#define ft_strncpy strncpy
-#define ft_memset memset
-#define ft_memmove memmove
-#define ft_memcmp memcmp
+#define ft_strrchr strrchr
+
#include <stdio.h>
@@ -108,7 +112,7 @@
#define ft_qsort qsort
#define ft_exit exit /* only used to exit from unhandled exceptions */
-#define ft_atoi atoi
+#define ft_atol atol
/**********************************************************************/
diff --git a/extras/freetype2/include/freetype/freetype.h b/extras/freetype2/include/freetype/freetype.h
index 4d6c5a2cd..6acf16611 100644
--- a/extras/freetype2/include/freetype/freetype.h
+++ b/extras/freetype2/include/freetype/freetype.h
@@ -4,7 +4,7 @@
/* */
/* FreeType high-level API and common types (specification only). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,6 +16,15 @@
/***************************************************************************/
+#ifndef FT_FREETYPE_H
+#error "`ft2build.h' hasn't been included yet!"
+#error "Please always use macros to include FreeType header files."
+#error "Example:"
+#error " #include <ft2build.h>"
+#error " #include FT_FREETYPE_H"
+#endif
+
+
#ifndef __FREETYPE_H__
#define __FREETYPE_H__
@@ -35,7 +44,7 @@
/* */
#define FREETYPE_MAJOR 2
#define FREETYPE_MINOR 1
-#define FREETYPE_PATCH 4
+#define FREETYPE_PATCH 8
#include <ft2build.h>
@@ -113,7 +122,6 @@ FT_BEGIN_HEADER
/* FT_New_Memory_Face */
/* FT_Open_Face */
/* FT_Open_Args */
- /* FT_Open_Flags */
/* FT_Parameter */
/* FT_Attach_File */
/* FT_Attach_Stream */
@@ -126,6 +134,12 @@ FT_BEGIN_HEADER
/* FT_Get_Name_Index */
/* FT_Load_Char */
/* */
+ /* FT_OPEN_MEMORY */
+ /* FT_OPEN_STREAM */
+ /* FT_OPEN_PATHNAME */
+ /* FT_OPEN_DRIVER */
+ /* FT_OPEN_PARAMS */
+ /* */
/* FT_LOAD_DEFAULT */
/* FT_LOAD_RENDER */
/* FT_LOAD_MONOCHROME */
@@ -142,6 +156,12 @@ FT_BEGIN_HEADER
/* FT_LOAD_NO_RECURSE */
/* FT_LOAD_PEDANTIC */
/* */
+ /* FT_LOAD_TARGET_NORMAL */
+ /* FT_LOAD_TARGET_LIGHT */
+ /* FT_LOAD_TARGET_MONO */
+ /* FT_LOAD_TARGET_LCD */
+ /* FT_LOAD_TARGET_LCD_V */
+ /* */
/* FT_Render_Glyph */
/* FT_Render_Mode */
/* FT_Get_Kerning */
@@ -162,9 +182,10 @@ FT_BEGIN_HEADER
/* FT_Glyph_Metrics */
/* */
/* <Description> */
- /* A structure used to model the metrics of a single glyph. Note */
- /* that values are expressed in 26.6 fractional pixel format or in */
- /* font units, depending on context. */
+ /* A structure used to model the metrics of a single glyph. The */
+ /* values are expressed in 26.6 fractional pixel format; if the flag */
+ /* FT_LOAD_NO_SCALE is used, values are returned in font units */
+ /* instead. */
/* */
/* <Fields> */
/* width :: The glyph's width. */
@@ -205,21 +226,62 @@ FT_BEGIN_HEADER
/* FT_Bitmap_Size */
/* */
/* <Description> */
- /* An extremely simple structure used to model the size of a bitmap */
- /* strike (i.e., a bitmap instance of the font for a given */
- /* resolution) in a fixed-size font face. This is used for the */
- /* `available_sizes' field of the FT_Face_Properties structure. */
+ /* This structure models the size of a bitmap strike (i.e., a bitmap */
+ /* instance of the font for a given resolution) in a fixed-size font */
+ /* face. It is used for the `available_sizes' field of the */
+ /* @FT_FaceRec structure. */
/* */
/* <Fields> */
- /* height :: The character height in pixels. */
+ /* height :: The (vertical) baseline-to-baseline distance in pixels. */
+ /* It makes most sense to define the height of a bitmap */
+ /* font in this way. */
+ /* */
+ /* width :: The average width of the font (in pixels). Since the */
+ /* algorithms to compute this value are different for the */
+ /* various bitmap formats, it can only give an additional */
+ /* hint if the `height' value isn't sufficient to select */
+ /* the proper font. For monospaced fonts the average width */
+ /* is the same as the maximum width. */
+ /* */
+ /* size :: The point size in 26.6 fractional format this font shall */
+ /* represent (for a given vertical resolution). */
+ /* */
+ /* x_ppem :: The horizontal ppem value (in 26.6 fractional format). */
+ /* */
+ /* y_ppem :: The vertical ppem value (in 26.6 fractional format). */
+ /* */
+ /* <Note> */
+ /* The values in this structure are taken from the bitmap font. If */
+ /* the font doesn't provide a parameter it is set to zero to indicate */
+ /* that the information is not available. */
+ /* */
+ /* The following formula converts from dpi to ppem: */
+ /* */
+ /* ppem = size * dpi / 72 */
+ /* */
+ /* where `size' is in points. */
+ /* */
+ /* Windows FNT: */
+ /* The `size', `x_ppem', and `y_ppem' parameters are not reliable: */
+ /* There exist fonts (e.g. app850.fon) which have a wrong size for */
+ /* some subfonts; since FNT files don't contain ppem but dpi values */
+ /* the computed x_ppem and y_ppem numbers are thus wrong also. */
/* */
- /* width :: The character width in pixels. */
+ /* TrueType embedded bitmaps: */
+ /* `size', `width', and `height' values are not contained in the */
+ /* bitmap strike itself. They are computed from the global font */
+ /* parameters. */
/* */
typedef struct FT_Bitmap_Size_
{
FT_Short height;
FT_Short width;
+ FT_Pos size;
+
+ FT_Pos x_ppem;
+ FT_Pos y_ppem;
+
} FT_Bitmap_Size;
@@ -386,6 +448,10 @@ FT_BEGIN_HEADER
/* @FT_Open_Face), the library looks for a Unicode charmap within */
/* the list and automatically activates it. */
/* */
+ /* <Also> */
+ /* The @FT_CharMapRec details the publicly accessible fields of a */
+ /* given character map. */
+ /* */
typedef struct FT_CharMapRec_* FT_CharMap;
@@ -403,7 +469,7 @@ FT_BEGIN_HEADER
/* should redefine this macro in case of problems to something like */
/* this: */
/* */
- /* #define FT_ENC_TAG( value, a, b, c, d ) (value) */
+ /* #define FT_ENC_TAG( value, a, b, c, d ) value */
/* */
/* to get a simple enumeration without assigning special numbers. */
/* */
@@ -452,30 +518,28 @@ FT_BEGIN_HEADER
/* mathematical symbols in the 32..255 character code range. For */
/* more information, see `http://www.ceviz.net/symbol.htm'. */
/* */
- /* FT_ENCODING_MS_SJIS :: */
- /* Corresponds to Microsoft's Japanese SJIS encoding. More info */
+ /* FT_ENCODING_SJIS :: */
+ /* Corresponds to Japanese SJIS encoding. More info at */
/* at `http://langsupport.japanreference.com/encoding.shtml'. */
/* See note on multi-byte encodings below. */
/* */
- /* FT_ENCODING_MS_GB2312 :: */
- /* Corresponds to the encoding system for Simplified Chinese, as */
- /* used in China. Only found in some TrueType fonts. */
+ /* FT_ENCODING_GB2312 :: */
+ /* Corresponds to an encoding system for Simplified Chinese as used */
+ /* used in mainland China. */
/* */
- /* FT_ENCODING_MS_BIG5 :: */
- /* Corresponds to the encoding system for Traditional Chinese, as */
- /* used in Taiwan and Hong Kong. Only found in some TrueType fonts. */
+ /* FT_ENCODING_BIG5 :: */
+ /* Corresponds to an encoding system for Traditional Chinese as used */
+ /* in Taiwan and Hong Kong. */
/* */
- /* FT_ENCODING_MS_WANSUNG :: */
+ /* FT_ENCODING_WANSUNG :: */
/* Corresponds to the Korean encoding system known as Wansung. */
- /* This is a Microsoft encoding that is only found in some TrueType */
- /* fonts. For more information, see */
+ /* For more information see */
/* `http://www.microsoft.com/typography/unicode/949.txt'. */
/* */
- /* FT_ENCODING_MS_JOHAB :: */
+ /* FT_ENCODING_JOHAB :: */
/* The Korean standard character set (KS C-5601-1992), which */
- /* corresponds to Windows code page 1361. This character set */
+ /* corresponds to MS Windows code page 1361. This character set */
/* includes all possible Hangeul character combinations. */
- /* Only found on some rare TrueType fonts. */
/* */
/* FT_ENCODING_ADOBE_LATIN_1 :: */
/* Corresponds to a Latin-1 encoding as defined in a Type 1 */
@@ -483,7 +547,7 @@ FT_BEGIN_HEADER
/* */
/* FT_ENCODING_ADOBE_STANDARD :: */
/* Corresponds to the Adobe Standard encoding, as found in Type 1, */
- /* CFF, and OpenType/CFF fonts. It is limited to 256character */
+ /* CFF, and OpenType/CFF fonts. It is limited to 256 character */
/* codes. */
/* */
/* FT_ENCODING_ADOBE_EXPERT :: */
@@ -504,6 +568,21 @@ FT_BEGIN_HEADER
/* This value is deprecated and was never used nor reported by */
/* FreeType. Don't use or test for it. */
/* */
+ /* FT_ENCODING_MS_SJIS :: */
+ /* Same as FT_ENCODING_SJIS. Deprecated. */
+ /* */
+ /* FT_ENCODING_MS_GB2312 :: */
+ /* Same as FT_ENCODING_GB2312. Deprecated. */
+ /* */
+ /* FT_ENCODING_MS_BIG5 :: */
+ /* Same as FT_ENCODING_BIG5. Deprecated. */
+ /* */
+ /* FT_ENCODING_MS_WANSUNG :: */
+ /* Same as FT_ENCODING_WANSUNG. Deprecated. */
+ /* */
+ /* FT_ENCODING_MS_JOHAB :: */
+ /* Same as FT_ENCODING_JOHAB. Deprecated. */
+ /* */
/* <Note> */
/* By default, FreeType automatically synthetizes a Unicode charmap */
/* for Postscript fonts, using their glyph names dictionaries. */
@@ -511,6 +590,37 @@ FT_BEGIN_HEADER
/* the font file, for the cases when they are needed, with the Adobe */
/* values as well. */
/* */
+ /* FT_ENCODING_NONE is set by the BDF and PCF drivers if the charmap */
+ /* is neither Unicode nor ISO-8859-1 (otherwise it is set to */
+ /* FT_ENCODING_UNICODE). Use `FT_Get_BDF_Charset_ID' to find out */
+ /* which encoding is really present. If, for example, the */
+ /* `cs_registry' field is `KOI8' and the `cs_encoding' field is `R', */
+ /* the font is encoded in KOI8-R. */
+ /* */
+ /* FT_ENCODING_NONE is always set (with a single exception) by the */
+ /* winfonts driver. Use `FT_Get_WinFNT_Header' and examine the */
+ /* `charset' field of the `FT_WinFNT_HeaderRec' structure to find out */
+ /* which encoding is really present. For example, FT_WinFNT_ID_CP1251 */
+ /* (204) means Windows code page 1251 (for Russian). */
+ /* */
+ /* FT_ENCODING_NONE is set if `platform_id' is `TT_PLATFORM_MACINTOSH' */
+ /* and `encoding_id' is not `TT_MAC_ID_ROMAN' (otherwise it is set to */
+ /* FT_ENCODING_APPLE_ROMAN). */
+ /* */
+ /* If `platform_id' is `TT_PLATFORM_MACINTOSH', use the function */
+ /* `FT_Get_CMap_Language_ID' to query the Mac language ID which may be */
+ /* needed to be able to distinguish Apple encoding variants. See */
+ /* */
+ /* http://www.unicode.org/Public/MAPPINGS/VENDORS/APPLE/README.TXT */
+ /* */
+ /* to get an idea how to do that. Basically, if the language ID is 0, */
+ /* dont use it, otherwise subtract 1 from the language ID. Then */
+ /* examine `encoding_id'. If, for example, `encoding_id' is */
+ /* `TT_MAC_ID_ROMAN' and the language ID (minus 1) is */
+ /* `TT_MAC_LANGID_GREEK', it is the Greek encoding, not Roman. */
+ /* `TT_MAC_ID_ARABIC' with `TT_MAC_LANGID_FARSI' means the Farsi */
+ /* variant the Arabic encoding. */
+ /* */
typedef enum FT_Encoding_
{
FT_ENC_TAG( FT_ENCODING_NONE, 0, 0, 0, 0 ),
@@ -518,11 +628,18 @@ FT_BEGIN_HEADER
FT_ENC_TAG( FT_ENCODING_MS_SYMBOL, 's', 'y', 'm', 'b' ),
FT_ENC_TAG( FT_ENCODING_UNICODE, 'u', 'n', 'i', 'c' ),
- FT_ENC_TAG( FT_ENCODING_MS_SJIS, 's', 'j', 'i', 's' ),
- FT_ENC_TAG( FT_ENCODING_MS_GB2312, 'g', 'b', ' ', ' ' ),
- FT_ENC_TAG( FT_ENCODING_MS_BIG5, 'b', 'i', 'g', '5' ),
- FT_ENC_TAG( FT_ENCODING_MS_WANSUNG, 'w', 'a', 'n', 's' ),
- FT_ENC_TAG( FT_ENCODING_MS_JOHAB, 'j', 'o', 'h', 'a' ),
+ FT_ENC_TAG( FT_ENCODING_SJIS, 's', 'j', 'i', 's' ),
+ FT_ENC_TAG( FT_ENCODING_GB2312, 'g', 'b', ' ', ' ' ),
+ FT_ENC_TAG( FT_ENCODING_BIG5, 'b', 'i', 'g', '5' ),
+ FT_ENC_TAG( FT_ENCODING_WANSUNG, 'w', 'a', 'n', 's' ),
+ FT_ENC_TAG( FT_ENCODING_JOHAB, 'j', 'o', 'h', 'a' ),
+
+ /* for backwards compatibility */
+ FT_ENCODING_MS_SJIS = FT_ENCODING_SJIS,
+ FT_ENCODING_MS_GB2312 = FT_ENCODING_GB2312,
+ FT_ENCODING_MS_BIG5 = FT_ENCODING_BIG5,
+ FT_ENCODING_MS_WANSUNG = FT_ENCODING_WANSUNG,
+ FT_ENCODING_MS_JOHAB = FT_ENCODING_JOHAB,
FT_ENC_TAG( FT_ENCODING_ADOBE_STANDARD, 'A', 'D', 'O', 'B' ),
FT_ENC_TAG( FT_ENCODING_ADOBE_EXPERT, 'A', 'D', 'B', 'E' ),
@@ -550,11 +667,11 @@ FT_BEGIN_HEADER
/* ft_encoding_unicode :: see @FT_ENCODING_UNICODE */
/* ft_encoding_latin_2 :: see @FT_ENCODING_OLD_LATIN_2 */
/* ft_encoding_symbol :: see @FT_ENCODING_MS_SYMBOL */
- /* ft_encoding_sjis :: see @FT_ENCODING_MS_SJIS */
- /* ft_encoding_gb2312 :: see @FT_ENCODING_MS_GB2312 */
- /* ft_encoding_big5 :: see @FT_ENCODING_MS_BIG5 */
- /* ft_encoding_wansung :: see @FT_ENCODING_MS_WANSUNG */
- /* ft_encoding_johab :: see @FT_ENCODING_MS_JOHAB */
+ /* ft_encoding_sjis :: see @FT_ENCODING_SJIS */
+ /* ft_encoding_gb2312 :: see @FT_ENCODING_GB2312 */
+ /* ft_encoding_big5 :: see @FT_ENCODING_BIG5 */
+ /* ft_encoding_wansung :: see @FT_ENCODING_WANSUNG */
+ /* ft_encoding_johab :: see @FT_ENCODING_JOHAB */
/* */
/* ft_encoding_adobe_standard :: see @FT_ENCODING_ADOBE_STANDARD */
/* ft_encoding_adobe_expert :: see @FT_ENCODING_ADOBE_EXPERT */
@@ -563,21 +680,21 @@ FT_BEGIN_HEADER
/* */
/* ft_encoding_apple_roman :: see @FT_ENCODING_APPLE_ROMAN */
/* */
-#define ft_encoding_none FT_ENCODING_NONE
-#define ft_encoding_unicode FT_ENCODING_UNICODE
-#define ft_encoding_symbol FT_ENCODING_MS_SYMBOL
-#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1
-#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2
-#define ft_encoding_sjis FT_ENCODING_MS_SJIS
-#define ft_encoding_gb2312 FT_ENCODING_MS_GB2312
-#define ft_encoding_big5 FT_ENCODING_MS_BIG5
-#define ft_encoding_wansung FT_ENCODING_MS_WANSUNG
-#define ft_encoding_johab FT_ENCODING_MS_JOHAB
+#define ft_encoding_none FT_ENCODING_NONE
+#define ft_encoding_unicode FT_ENCODING_UNICODE
+#define ft_encoding_symbol FT_ENCODING_MS_SYMBOL
+#define ft_encoding_latin_1 FT_ENCODING_ADOBE_LATIN_1
+#define ft_encoding_latin_2 FT_ENCODING_OLD_LATIN_2
+#define ft_encoding_sjis FT_ENCODING_SJIS
+#define ft_encoding_gb2312 FT_ENCODING_GB2312
+#define ft_encoding_big5 FT_ENCODING_BIG5
+#define ft_encoding_wansung FT_ENCODING_WANSUNG
+#define ft_encoding_johab FT_ENCODING_JOHAB
-#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD
-#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT
-#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM
-#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN
+#define ft_encoding_adobe_standard FT_ENCODING_ADOBE_STANDARD
+#define ft_encoding_adobe_expert FT_ENCODING_ADOBE_EXPERT
+#define ft_encoding_adobe_custom FT_ENCODING_ADOBE_CUSTOM
+#define ft_encoding_apple_roman FT_ENCODING_APPLE_ROMAN
/*************************************************************************/
@@ -651,10 +768,12 @@ FT_BEGIN_HEADER
/* collection (i.e., a file which embeds */
/* several faces), this is the total number of */
/* faces found in the resource. 1 by default. */
+ /* Accessing non-existent face indices causes */
+ /* an error. */
/* */
/* face_index :: The index of the face in its font file. */
/* Usually, this is 0 for all normal font */
- /* formats. It can be more in the case of */
+ /* formats. It can be > 0 in the case of */
/* collections (which embed several fonts in a */
/* single resource/file). */
/* */
@@ -692,8 +811,8 @@ FT_BEGIN_HEADER
/* */
/* num_fixed_sizes :: The number of fixed sizes available in this */
/* face. This should be set to 0 for scalable */
- /* fonts, unless its face includes a complete */
- /* set of glyphs (called a `strike') for the */
+ /* fonts, unless its face includes a set of */
+ /* glyphs (called a `strike') for the */
/* specified sizes. */
/* */
/* available_sizes :: An array of sizes specifying the available */
@@ -743,10 +862,11 @@ FT_BEGIN_HEADER
/* descender :: The face's descender is the vertical */
/* distance from the baseline to the */
/* bottommost point of any glyph in the face. */
- /* This field's value is *negative*, expressed */
- /* in font units. Some font designs use a */
- /* value different from `bbox.yMin'. Only */
- /* relevant for scalable formats. */
+ /* This field's value is *negative* for values */
+ /* below the baseline. It is expressed in */
+ /* font units. Some font designs use a value */
+ /* different from `bbox.yMin'. Only relevant */
+ /* for scalable formats. */
/* */
/* height :: The face's height is the vertical distance */
/* from one baseline to the next when writing */
@@ -854,7 +974,7 @@ FT_BEGIN_HEADER
/* FT_FACE_FLAG_XXX */
/* */
/* <Description> */
- /* A list of bit flags used in the 'face_flags' field of the */
+ /* A list of bit flags used in the `face_flags' field of the */
/* @FT_FaceRec structure. They inform client applications of */
/* properties of the corresponding face. */
/* */
@@ -862,7 +982,7 @@ FT_BEGIN_HEADER
/* FT_FACE_FLAG_SCALABLE :: */
/* Indicates that the face provides vectorial outlines. This */
/* doesn't prevent embedded bitmaps, i.e., a face can have both */
- /* this bit and @FT_FACE_FLAG_FIXED_SIZES set */
+ /* this bit and @FT_FACE_FLAG_FIXED_SIZES set. */
/* */
/* FT_FACE_FLAG_FIXED_SIZES :: */
/* Indicates that the face contains `fixed sizes', i.e., bitmap */
@@ -901,9 +1021,9 @@ FT_BEGIN_HEADER
/* */
/* FT_FACE_FLAG_GLYPH_NAMES :: */
/* Indicates that the font contains glyph names that can be */
- /* retrieved through @FT_Get_Glyph_Names. Note that some TrueType */
+ /* retrieved through @FT_Get_Glyph_Name. Note that some TrueType */
/* fonts contain broken glyph name tables. Use the function */
- /* @FT_Has_PS_Glyph_Name when needed. */
+ /* @FT_Has_PS_Glyph_Names when needed. */
/* */
/* FT_FACE_FLAG_EXTERNAL_STREAM :: */
/* Used internally by FreeType to indicate that a face's stream was */
@@ -1016,12 +1136,12 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* @macro: */
- /* FT_IS_FIXED_SIZES( face ) */
+ /* FT_HAS_FIXED_SIZES( face ) */
/* */
/* @description: */
/* A macro that returns true whenever a face object contains some */
- /* embedded bitmaps. See the `fixed_sizes' field of the @FT_FaceRec */
- /* structure. */
+ /* embedded bitmaps. See the `available_sizes' field of the */
+ /* @FT_FaceRec structure. */
/* */
#define FT_HAS_FIXED_SIZES( face ) \
( face->face_flags & FT_FACE_FLAG_FIXED_SIZES )
@@ -1050,7 +1170,7 @@ FT_BEGIN_HEADER
/* */
/* @description: */
/* A macro that returns true whenever a face object contains some */
- /* glyph names that can be accessed through @FT_Get_Glyph_Names. */
+ /* glyph names that can be accessed through @FT_Get_Glyph_Name. */
/* */
#define FT_HAS_GLYPH_NAMES( face ) \
( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES )
@@ -1130,10 +1250,12 @@ FT_BEGIN_HEADER
/* units to fractional (26.6) pixel coordinates. */
/* */
/* ascender :: The ascender, expressed in 26.6 fixed point */
- /* pixels. Always positive. */
+ /* pixels. Positive for ascenders above the */
+ /* baseline. */
/* */
/* descender :: The descender, expressed in 26.6 fixed point */
- /* pixels. Always negative. */
+ /* pixels. Negative for descenders below the */
+ /* baseline. */
/* */
/* height :: The text height, expressed in 26.6 fixed point */
/* pixels. Always positive. */
@@ -1142,12 +1264,12 @@ FT_BEGIN_HEADER
/* fixed point pixels. Always positive. */
/* */
/* <Note> */
- /* The values of `ascender', `descender', and `height' are only the */
- /* scaled versions of `face->ascender', `face->descender', and */
- /* `face->height'. */
+ /* For scalable fonts, the values of `ascender', `descender', and */
+ /* `height' are scaled versions of `face->ascender', */
+ /* `face->descender', and `face->height', respectively. */
/* */
/* Unfortunately, due to glyph hinting, these values might not be */
- /* exact for certain fonts, they thus must be treated as unreliable */
+ /* exact for certain fonts. They thus must be treated as unreliable */
/* with an error margin of at least one pixel! */
/* */
/* Indeed, the only way to get the exact pixel ascender and descender */
@@ -1161,7 +1283,7 @@ FT_BEGIN_HEADER
FT_UShort y_ppem; /* vertical pixels per EM */
FT_Fixed x_scale; /* two scales used to convert font units */
- FT_Fixed y_scale; /* to 26.6 frac. pixel coordinates.. */
+ FT_Fixed y_scale; /* to 26.6 frac. pixel coordinates */
FT_Pos ascender; /* ascender in 26.6 frac. pixels */
FT_Pos descender; /* descender in 26.6 frac. pixels */
@@ -1311,16 +1433,18 @@ FT_BEGIN_HEADER
/* */
/* outline :: The outline descriptor for the current glyph */
/* image if its format is */
- /* ft_glyph_bitmap_outline. */
+ /* FT_GLYPH_FORMAT_OUTLINE. */
/* */
/* num_subglyphs :: The number of subglyphs in a composite glyph. */
- /* This format is only valid for the composite */
- /* glyph format, that should normally only be */
- /* loaded with the FT_LOAD_NO_RECURSE flag. */
+ /* This field is only valid for the composite */
+ /* glyph format that should normally only be */
+ /* loaded with the @FT_LOAD_NO_RECURSE flag. */
+ /* For now this is internal to FreeType. */
/* */
/* subglyphs :: An array of subglyph descriptors for */
/* composite glyphs. There are `num_subglyphs' */
- /* elements in there. */
+ /* elements in there. Currently internal to */
+ /* FreeType. */
/* */
/* control_data :: Certain font drivers can also return the */
/* control data for a given glyph image (e.g. */
@@ -1359,7 +1483,7 @@ FT_BEGIN_HEADER
FT_Library library;
FT_Face face;
FT_GlyphSlot next;
- FT_UInt flags;
+ FT_UInt reserved; /* retained for binary compatibility */
FT_Generic generic;
FT_Glyph_Metrics metrics;
@@ -1474,13 +1598,13 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Enum> */
- /* FT_Open_Flags */
+ /* FT_OPEN_XXX */
/* */
/* <Description> */
- /* An enumeration used to list the bit flags used within the */
- /* `flags' field of the @FT_Open_Args structure. */
+ /* A list of bit-field constants used within the `flags' field of the */
+ /* @FT_Open_Args structure. */
/* */
- /* <Fields> */
+ /* <Values> */
/* FT_OPEN_MEMORY :: This is a memory-based stream. */
/* */
/* FT_OPEN_STREAM :: Copy the stream from the `stream' field. */
@@ -1492,35 +1616,31 @@ FT_BEGIN_HEADER
/* */
/* FT_OPEN_PARAMS :: Use the `num_params' & `params' field. */
/* */
- /* ft_open_memory :: deprecated. use @FT_OPEN_MEMORY instead */
+ /* ft_open_memory :: Deprecated; use @FT_OPEN_MEMORY instead. */
/* */
- /* ft_open_stream :: deprecated. use @FT_OPEN_STREAM instead */
+ /* ft_open_stream :: Deprecated; use @FT_OPEN_STREAM instead. */
/* */
- /* ft_open_pathname :: deprecated. use @FT_OPEN_PATHNAME instead */
+ /* ft_open_pathname :: Deprecated; use @FT_OPEN_PATHNAME instead. */
/* */
- /* ft_open_driver :: deprecated, use @FT_OPEN_DRIVER instead */
+ /* ft_open_driver :: Deprecated; use @FT_OPEN_DRIVER instead. */
/* */
- /* ft_open_params :: deprecated, use @FT_OPEN_PARAMS instead */
+ /* ft_open_params :: Deprecated; use @FT_OPEN_PARAMS instead. */
/* */
/* <Note> */
/* The `FT_OPEN_MEMORY', `FT_OPEN_STREAM', and `FT_OPEN_PATHNAME' */
/* flags are mutually exclusive. */
/* */
- typedef enum
- {
- FT_OPEN_MEMORY = 1,
- FT_OPEN_STREAM = 2,
- FT_OPEN_PATHNAME = 4,
- FT_OPEN_DRIVER = 8,
- FT_OPEN_PARAMS = 16
-
- } FT_Open_Flags;
+#define FT_OPEN_MEMORY 0x1
+#define FT_OPEN_STREAM 0x2
+#define FT_OPEN_PATHNAME 0x4
+#define FT_OPEN_DRIVER 0x8
+#define FT_OPEN_PARAMS 0x10
-#define ft_open_memory FT_OPEN_MEMORY /* deprecated */
-#define ft_open_stream FT_OPEN_STREAM /* deprecated */
-#define ft_open_pathname FT_OPEN_PATHNAME /* deprecated */
-#define ft_open_driver FT_OPEN_DRIVER /* deprecated */
-#define ft_open_params FT_OPEN_PARAMS /* deprecated */
+#define ft_open_memory FT_OPEN_MEMORY /* deprecated */
+#define ft_open_stream FT_OPEN_STREAM /* deprecated */
+#define ft_open_pathname FT_OPEN_PATHNAME /* deprecated */
+#define ft_open_driver FT_OPEN_DRIVER /* deprecated */
+#define ft_open_params FT_OPEN_PARAMS /* deprecated */
/*************************************************************************/
@@ -1602,14 +1722,14 @@ FT_BEGIN_HEADER
/* */
typedef struct FT_Open_Args_
{
- FT_Open_Flags flags;
- const FT_Byte* memory_base;
- FT_Long memory_size;
- FT_String* pathname;
- FT_Stream stream;
- FT_Module driver;
- FT_Int num_params;
- FT_Parameter* params;
+ FT_UInt flags;
+ const FT_Byte* memory_base;
+ FT_Long memory_size;
+ FT_String* pathname;
+ FT_Stream stream;
+ FT_Module driver;
+ FT_Int num_params;
+ FT_Parameter* params;
} FT_Open_Args;
@@ -1631,6 +1751,7 @@ FT_BEGIN_HEADER
/* */
/* face_index :: The index of the face within the resource. The */
/* first face has index 0. */
+ /* */
/* <Output> */
/* aface :: A handle to a new face object. */
/* */
@@ -1644,9 +1765,9 @@ FT_BEGIN_HEADER
/* */
/* @FT_New_Face can be used to determine and/or check the font format */
/* of a given font resource. If the `face_index' field is negative, */
- /* the function will _not_ return any face handle in `aface'. Its */
- /* return value should be 0 if the font format is recognized, or */
- /* non-zero otherwise. */
+ /* the function will _not_ return any face handle in `aface'; the */
+ /* return value is 0 if the font format is recognized, or non-zero */
+ /* otherwise. */
/* */
/* Each new face object created with this function also owns a */
/* default @FT_Size object, accessible as `face->size'. */
@@ -1677,6 +1798,7 @@ FT_BEGIN_HEADER
/* */
/* face_index :: The index of the face within the resource. The */
/* first face has index 0. */
+ /* */
/* <Output> */
/* aface :: A handle to a new face object. */
/* */
@@ -1696,8 +1818,8 @@ FT_BEGIN_HEADER
/* @FT_New_Memory_Face can be used to determine and/or check the font */
/* format of a given font resource. If the `face_index' field is */
/* negative, the function will _not_ return any face handle in */
- /* `aface'. Its return value should be 0 if the font format is */
- /* recognized, or non-zero otherwise. */
+ /* `aface'; the return value is 0 if the font format is recognized, */
+ /* or non-zero otherwise. */
/* */
FT_EXPORT( FT_Error )
FT_New_Memory_Face( FT_Library library,
@@ -1726,6 +1848,7 @@ FT_BEGIN_HEADER
/* */
/* face_index :: The index of the face within the resource. The */
/* first face has index 0. */
+ /* */
/* <Output> */
/* aface :: A handle to a new face object. */
/* */
@@ -1737,11 +1860,11 @@ FT_BEGIN_HEADER
/* slot for the face object which can be accessed directly through */
/* `face->glyph'. */
/* */
- /* @FT_Open_Face can be used to determine and/or check the font */
+ /* @FT_Open_Face can be used to determine and/or check the font */
/* format of a given font resource. If the `face_index' field is */
/* negative, the function will _not_ return any face handle in */
- /* `*face'. Its return value should be 0 if the font format is */
- /* recognized, or non-zero otherwise. */
+ /* `*face'; the return value is 0 if the font format is recognized, */
+ /* or non-zero otherwise. */
/* */
FT_EXPORT( FT_Error )
FT_Open_Face( FT_Library library,
@@ -1853,7 +1976,7 @@ FT_BEGIN_HEADER
/* character dimensions is zero, its value is set equal to the other. */
/* */
/* <InOut> */
- /* size :: A handle to a target size object. */
+ /* face :: A handle to a target face object. */
/* */
/* <Input> */
/* char_width :: The character width, in 26.6 fractional points. */
@@ -1870,7 +1993,7 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* When dealing with fixed-size faces (i.e., non-scalable formats), */
- /* use the function @FT_Set_Pixel_Sizes. */
+ /* @FT_Set_Pixel_Sizes provides a more convenient interface. */
/* */
FT_EXPORT( FT_Error )
FT_Set_Char_Size( FT_Face face,
@@ -1903,7 +2026,6 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
- /* */
/* <Note> */
/* The values of `pixel_width' and `pixel_height' correspond to the */
/* pixel values of the _typographic_ character size, which are NOT */
@@ -1919,6 +2041,11 @@ FT_BEGIN_HEADER
/* guarantee in any way that you will get glyph bitmaps that all fit */
/* within an 8x8 cell (sometimes even far from it). */
/* */
+ /* For bitmap fonts, `pixel_height' usually is a reliable value for */
+ /* the height of the bitmap cell. Drivers for bitmap font formats */
+ /* which contain a single bitmap strike only (BDF, PCF, FNT) ignore */
+ /* `pixel_width'. */
+ /* */
FT_EXPORT( FT_Error )
FT_Set_Pixel_Sizes( FT_Face face,
FT_UInt pixel_width,
@@ -1939,7 +2066,9 @@ FT_BEGIN_HEADER
/* will be loaded. */
/* */
/* <Input> */
- /* glyph_index :: The index of the glyph in the font file. */
+ /* glyph_index :: The index of the glyph in the font file. For */
+ /* CID-keyed fonts (either in PS or in CFF format) */
+ /* this argument specifies the CID value. */
/* */
/* load_flags :: A flag indicating what to load for this glyph. The */
/* @FT_LOAD_XXX constants can be used to control the */
@@ -2010,7 +2139,7 @@ FT_BEGIN_HEADER
FT_Int32 load_flags );
- /****************************************************************************
+ /***************************************************************************
*
* @enum:
* FT_LOAD_XXX
@@ -2130,7 +2259,23 @@ FT_BEGIN_HEADER
* outlines. This doesn't prevent native format-specific hinters from
* being used. This can be important for certain fonts where unhinted
* output is better than auto-hinted one.
+ *
+ * FT_LOAD_TARGET_NORMAL ::
+ * Use hinting for @FT_RENDER_MODE_NORMAL.
+ *
+ * FT_LOAD_TARGET_LIGHT ::
+ * Use hinting for @FT_RENDER_MODE_LIGHT.
+ *
+ * FT_LOAD_TARGET_MONO ::
+ * Use hinting for @FT_RENDER_MODE_MONO.
+ *
+ * FT_LOAD_TARGET_LCD ::
+ * Use hinting for @FT_RENDER_MODE_LCD.
+ *
+ * FT_LOAD_TARGET_LCD_V ::
+ * Use hinting for @FT_RENDER_MODE_LCD_V.
*/
+#define FT_LOAD_DEFAULT 0x0
#define FT_LOAD_NO_SCALE 0x1
#define FT_LOAD_NO_HINTING 0x2
#define FT_LOAD_RENDER 0x4
@@ -2160,7 +2305,7 @@ FT_BEGIN_HEADER
#define FT_LOAD_TARGET_LCD FT_LOAD_TARGET_( FT_RENDER_MODE_LCD )
#define FT_LOAD_TARGET_LCD_V FT_LOAD_TARGET_( FT_RENDER_MODE_LCD_V )
-#define FT_LOAD_DEFAULT 0x0
+ /* */
/*************************************************************************/
@@ -2186,7 +2331,7 @@ FT_BEGIN_HEADER
/* The transformation is only applied to scalable image formats after */
/* the glyph has been loaded. It means that hinting is unaltered by */
/* the transformation and is performed on the character size given in */
- /* the last call to @FT_Set_Char_Sizes or @FT_Set_Pixel_Sizes. */
+ /* the last call to @FT_Set_Char_Size or @FT_Set_Pixel_Sizes. */
/* */
FT_EXPORT( void )
FT_Set_Transform( FT_Face face,
@@ -2205,18 +2350,24 @@ FT_BEGIN_HEADER
/* conversion performed on the outline, as well as specific */
/* hinting optimizations. */
/* */
+ /* For bitmap fonts the `bitmap->pixel_mode' field in the */
+ /* @FT_GlyphSlotRec structure gives the format of the returned */
+ /* bitmap. */
+ /* */
/* <Values> */
/* FT_RENDER_MODE_NORMAL :: */
/* This is the default render mode; it corresponds to 8-bit */
/* anti-aliased bitmaps, using 256 levels of opacity. */
/* */
/* FT_RENDER_MODE_LIGHT :: */
- /* This is similar to @FT_RENDER_MODE_NORMAL, except that this */
- /* changes the hinting to prevent stem width quantization. This */
- /* results in glyph shapes that are more similar to the original, */
- /* while being a bit more fuzzy ("better shapes", instead of */
- /* "better contrast" if you want :-) THIS IS STILL EXPERIMENTAL, */
- /* FOR NOW, THIS WILL PRODUCE RESULTS SIMILAR TO NORMAL MODE !! */
+ /* This is similar to @FT_RENDER_MODE_NORMAL -- you have to use */
+ /* @FT_LOAD_TARGET_LIGHT in calls to @FT_Load_Glyph to get any */
+ /* effect since the rendering process no longer influences the */
+ /* positioning of glyph outlines. */
+ /* */
+ /* The resulting glyph shapes are more similar to the original, */
+ /* while being a bit more fuzzy (`better shapes' instead of `better */
+ /* contrast', so to say. */
/* */
/* FT_RENDER_MODE_MONO :: */
/* This mode corresponds to 1-bit bitmaps. */
@@ -2225,8 +2376,7 @@ FT_BEGIN_HEADER
/* This mode corresponds to horizontal RGB/BGR sub-pixel displays, */
/* like LCD-screens. It produces 8-bit bitmaps that are 3 times */
/* the width of the original glyph outline in pixels, and which use */
- /* the @FT_PIXEL_MODE_LCD mode. THIS IS STILL EXPERIMENTAL, DO NOT */
- /* USE FOR NOW !! */
+ /* the @FT_PIXEL_MODE_LCD mode. */
/* */
/* FT_RENDER_MODE_LCD_V :: */
/* This mode corresponds to vertical RGB/BGR sub-pixel displays */
@@ -2237,8 +2387,7 @@ FT_BEGIN_HEADER
/* <Note> */
/* The LCD-optimized glyph bitmaps produced by FT_Render_Glyph are */
/* _not filtered_ to reduce color-fringes. It is up to the caller to */
- /* perform this pass. THIS IS STILL EXPERIMENTAL, DO NOT USE FOR NOW */
- /* !! */
+ /* perform this pass. */
/* */
typedef enum FT_Render_Mode_
{
@@ -2770,7 +2919,7 @@ FT_BEGIN_HEADER
/* <Note> */
/* The optimization for FT_DivFix() is simple: If (a << 16) fits in */
/* 32 bits, then the division is computed directly. Otherwise, we */
- /* use a specialized version of the old @FT_MulDiv64. */
+ /* use a specialized version of @FT_MulDiv. */
/* */
FT_EXPORT( FT_Long )
FT_DivFix( FT_Long a,
diff --git a/extras/freetype2/include/freetype/ftbbox.h b/extras/freetype2/include/freetype/ftbbox.h
index e6616135a..f98c89eb2 100644
--- a/extras/freetype2/include/freetype/ftbbox.h
+++ b/extras/freetype2/include/freetype/ftbbox.h
@@ -4,7 +4,7 @@
/* */
/* FreeType exact bbox computation (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -34,6 +34,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/extras/freetype2/include/freetype/ftbdf.h b/extras/freetype2/include/freetype/ftbdf.h
index 71735e3c6..aa411440d 100644
--- a/extras/freetype2/include/freetype/ftbdf.h
+++ b/extras/freetype2/include/freetype/ftbdf.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing BDF-specific strings (specification). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,6 +22,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
@@ -49,22 +55,22 @@ FT_BEGIN_HEADER
* FT_PropertyType
*
* @description:
- * list of BDF property types
+ * A list of BDF property types.
*
* @values:
* BDF_PROPERTY_TYPE_NONE ::
- * value 0 is used to indicate a missing property
+ * Value 0 is used to indicate a missing property.
*
* BDF_PROPERTY_TYPE_ATOM ::
- * property is a string atom
+ * Property is a string atom.
*
* BDF_PROPERTY_TYPE_INTEGER ::
- * property is a 32-bit signed integer
+ * Property is a 32-bit signed integer.
*
* BDF_PROPERTY_TYPE_CARDINAL ::
- * property is a 32-bit unsigned integer
+ * Property is a 32-bit unsigned integer.
*/
- typedef enum
+ typedef enum BDF_PropertyType_
{
BDF_PROPERTY_TYPE_NONE = 0,
BDF_PROPERTY_TYPE_ATOM = 1,
@@ -76,34 +82,44 @@ FT_BEGIN_HEADER
/**********************************************************************
*
- * @type: BDF_Property
+ * @type:
+ * BDF_Property
*
* @description:
- * handle to a @BDF_PropertyRec structure used to model a given
- * BDF/PCF property
+ * A handle to a @BDF_PropertyRec structure to model a given
+ * BDF/PCF property.
*/
- typedef struct BDF_PropertyRec_* BDF_Property;
+ typedef struct BDF_PropertyRec_* BDF_Property;
+
/**********************************************************************
*
- * @struct: BDF_PropertyRec
+ * @struct:
+ * BDF_PropertyRec
*
* @description:
- * models a given BDF/PCF property
+ * This structure models a given BDF/PCF property.
*
- * @note:
- * type :: property type
- * u.atom :: atom string, when type is @BDF_PROPERTY_TYPE_ATOM
- * u.integer :: signed integer, when type is @BDF_PROPERTY_TYPE_INTEGER
- * u.cardinal :: unsigned integer, when type is @BDF_PROPERTY_TYPE_CARDINAL
+ * @fields:
+ * type ::
+ * The property type.
+ *
+ * u.atom ::
+ * The atom string, if type is @BDF_PROPERTY_TYPE_ATOM.
+ *
+ * u.integer ::
+ * A signed integer, if type is @BDF_PROPERTY_TYPE_INTEGER.
+ *
+ * u.cardinal ::
+ * An unsigned integer, if type is @BDF_PROPERTY_TYPE_CARDINAL.
*/
- typedef struct BDF_PropertyRec_
+ typedef struct BDF_PropertyRec_
{
- BDF_PropertyType type;
+ BDF_PropertyType type;
union {
- const char* atom;
- FT_Int32 integer;
- FT_UInt32 cardinal;
+ const char* atom;
+ FT_Int32 integer;
+ FT_UInt32 cardinal;
} u;
@@ -121,7 +137,7 @@ FT_BEGIN_HEADER
*
* @input:
* face ::
- * handle to input face
+ * A handle to the input face.
*
* @output:
* acharset_encoding ::
@@ -131,7 +147,7 @@ FT_BEGIN_HEADER
* Charset registry, as a C string, owned by the face.
*
* @return:
- * FreeType rror code. 0 means success.
+ * FreeType error code. 0 means success.
*
* @note:
* This function only works with BDF faces, returning an error otherwise.
@@ -141,31 +157,33 @@ FT_BEGIN_HEADER
const char* *acharset_encoding,
const char* *acharset_registry );
+
/**********************************************************************
*
* @function:
* FT_Get_BDF_Property
*
* @description:
- * Retrieves a BDF property from a BDF or PCF font file
+ * Retrieves a BDF property from a BDF or PCF font file.
*
* @input:
- * face :: handle to input face
- * name :: property name
+ * face :: A handle to the input face.
+ *
+ * name :: The property name.
*
* @output:
- * aproperty :: the property
+ * aproperty :: The property.
*
* @return:
* FreeType error code. 0 means success.
*
* @note:
- * This function works with BDF _and_ PCF fonts. It returns an error
- * otherwise. it also returns an error when the property is not in the
+ * This function works with BDF _and_ PCF fonts. It returns an error
+ * otherwise. It also returns an error if the property is not in the
* font.
*
- * in case of error, "aproperty->type" is always set to
- * @BDF_PROPERTY_TYPE_NONE
+ * In case of error, "aproperty->type" is always set to
+ * @BDF_PROPERTY_TYPE_NONE.
*/
FT_EXPORT( FT_Error )
FT_Get_BDF_Property( FT_Face face,
diff --git a/extras/freetype2/include/freetype/ftcache.h b/extras/freetype2/include/freetype/ftcache.h
index 82af39142..c6dc14aec 100644
--- a/extras/freetype2/include/freetype/ftcache.h
+++ b/extras/freetype2/include/freetype/ftcache.h
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache subsystem (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -63,15 +63,14 @@ FT_BEGIN_HEADER
/* FTC_Face_Requester */
/* */
/* FTC_Manager_New */
- /* FTC_Manager_Lookup_Face */
- /* FTC_Manager_Lookup_Size */
+ /* FTC_Manager_LookupFace */
+ /* FTC_Manager_LookupSize */
/* */
/* FTC_Node */
/* FTC_Node_Ref */
/* FTC_Node_Unref */
/* */
/* FTC_Font */
- /* FTC_ImageDesc */
/* FTC_ImageCache */
/* FTC_ImageCache_New */
/* FTC_ImageCache_Lookup */
@@ -109,10 +108,10 @@ FT_BEGIN_HEADER
/* FTC_FaceID */
/* */
/* <Description> */
- /* A generic pointer type that is used to identity face objects. The */
+ /* An opaque pointer type that is used to identity face objects. The */
/* contents of such objects is application-dependent. */
/* */
- typedef FT_Pointer FTC_FaceID;
+ typedef struct FTC_FaceIDRec_* FTC_FaceID;
/*************************************************************************/
@@ -242,9 +241,9 @@ FT_BEGIN_HEADER
/* If you lookup nodes, you have the ability to "acquire" them, i.e., */
/* to increment their reference count. This will prevent the node */
/* from being flushed out of the cache until you explicitly "release" */
- /* it (see @FTC_Node_Release). */
+ /* it (see @FTC_Node_Unref). */
/* */
- /* See also @FTC_BitsetCache_Lookup and @FTC_ImageCache_Lookup. */
+ /* See also @FTC_SBitCache_Lookup and @FTC_ImageCache_Lookup. */
/* */
typedef struct FTC_NodeRec_* FTC_Node;
@@ -258,22 +257,16 @@ FT_BEGIN_HEADER
/* Creates a new cache manager. */
/* */
/* <Input> */
- /* library :: The parent FreeType library handle to use. */
+ /* library :: The parent FreeType library handle to use. */
/* */
- /* max_faces :: Maximum number of faces to keep alive in manager. */
- /* Use 0 for defaults. */
+ /* max_bytes :: Maximum number of bytes to use for cached data. */
+ /* Use 0 for defaults. */
/* */
- /* max_sizes :: Maximum number of sizes to keep alive in manager. */
- /* Use 0 for defaults. */
+ /* requester :: An application-provided callback used to translate */
+ /* face IDs into real @FT_Face objects. */
/* */
- /* max_bytes :: Maximum number of bytes to use for cached data. */
- /* Use 0 for defaults. */
- /* */
- /* requester :: An application-provided callback used to translate */
- /* face IDs into real @FT_Face objects. */
- /* */
- /* req_data :: A generic pointer that is passed to the requester */
- /* each time it is called (see @FTC_Face_Requester). */
+ /* req_data :: A generic pointer that is passed to the requester */
+ /* each time it is called (see @FTC_Face_Requester). */
/* */
/* <Output> */
/* amanager :: A handle to a new manager object. 0 in case of */
@@ -326,7 +319,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Function> */
- /* FTC_Manager_Lookup_Face */
+ /* FTC_Manager_LookupFace */
/* */
/* <Description> */
/* Retrieves the @FT_Face object that corresponds to a given face ID */
@@ -349,63 +342,479 @@ FT_BEGIN_HEADER
/* */
/* The @FT_Face object doesn't necessarily have a current size object */
/* (i.e., face->size can be 0). If you need a specific `font size', */
- /* use @FTC_Manager_Lookup_Size instead. */
+ /* use @FTC_Manager_LookupSize instead. */
/* */
/* Never change the face's transformation matrix (i.e., never call */
/* the @FT_Set_Transform function) on a returned face! If you need */
/* to transform glyphs, do it yourself after glyph loading. */
/* */
FT_EXPORT( FT_Error )
- FTC_Manager_Lookup_Face( FTC_Manager manager,
- FTC_FaceID face_id,
- FT_Face *aface );
+ FTC_Manager_LookupFace( FTC_Manager manager,
+ FTC_FaceID face_id,
+ FT_Face *aface );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* FTC_ScalerRec */
+ /* */
+ /* <Description> */
+ /* A structure used to describe a given character size in either */
+ /* pixels or points to the cache manager. See */
+ /* @FTC_Manager_LookupSize. */
+ /* */
+ /* <Fields> */
+ /* face_id :: The source face ID. */
+ /* */
+ /* width :: The character width. */
+ /* */
+ /* height :: The character height. */
+ /* */
+ /* pixel :: A Boolean. If TRUE, the `width' and `height' fields */
+ /* are interpreted as integer pixel character sizes. */
+ /* Otherwise, they are expressed as 1/64th of points. */
+ /* */
+ /* x_res :: Only used when `pixel' is FALSE to indicate the */
+ /* horizontal resolution in dpi. */
+ /* */
+ /* y_res :: Only used when `pixel' is FALSE to indicate the */
+ /* vertical resolution in dpi. */
+ /* */
+ /* <Note> */
+ /* This type is mainly used to retrieve @FT_Size objects through the */
+ /* cache manager. */
+ /* */
+ typedef struct FTC_ScalerRec_
+ {
+ FTC_FaceID face_id;
+ FT_UInt width;
+ FT_UInt height;
+ FT_Int pixel;
+ FT_UInt x_res;
+ FT_UInt y_res;
+
+ } FTC_ScalerRec, *FTC_Scaler;
/*************************************************************************/
/* */
/* <Function> */
- /* FTC_Manager_Lookup_Size */
+ /* FTC_Manager_LookupSize */
/* */
/* <Description> */
- /* Retrieves the @FT_Face and @FT_Size objects that correspond to a */
- /* given @FTC_SizeID. */
+ /* Retrieve the @FT_Size object that corresponds to a given */
+ /* @FTC_Scaler through a cache manager. */
/* */
/* <Input> */
/* manager :: A handle to the cache manager. */
/* */
- /* size_id :: The ID of the `font size' to use. */
+ /* scaler :: A scaler handle. */
+ /* */
+ /* <Output> */
+ /* asize :: A handle to the size object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ /* <Note> */
+ /* The returned @FT_Size object is always owned by the manager. You */
+ /* should never try to discard it by yourself. */
+ /* */
+ /* You can access the parent @FT_Face object simply as `size->face' */
+ /* if you need it. Note that this object is also owned by the */
+ /* manager. */
+ /* */
+ FT_EXPORT( FT_Error )
+ FTC_Manager_LookupSize( FTC_Manager manager,
+ FTC_Scaler scaler,
+ FT_Size *asize );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FTC_Node_Unref */
+ /* */
+ /* <Description> */
+ /* Decrement a cache node's internal reference count. When the count */
+ /* reaches 0, it is not destroyed but becomes eligible for subsequent */
+ /* cache flushes. */
+ /* */
+ /* <Input> */
+ /* node :: The cache node handle. */
+ /* */
+ /* manager :: The cache manager handle. */
+ /* */
+ FT_EXPORT( void )
+ FTC_Node_Unref( FTC_Node node,
+ FTC_Manager manager );
+
+
+ /* remove all nodes belonging to a given face_id */
+ FT_EXPORT( void )
+ FTC_Manager_RemoveFaceID( FTC_Manager manager,
+ FTC_FaceID face_id );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Section> */
+ /* cache_subsystem */
+ /* */
+ /*************************************************************************/
+
+ /************************************************************************
+ *
+ * @type:
+ * FTC_CMapCache
+ *
+ * @description:
+ * An opaque handle used to manager a charmap cache. This cache is
+ * to hold character codes -> glyph indices mappings.
+ */
+ typedef struct FTC_CMapCacheRec_* FTC_CMapCache;
+
+
+ /*************************************************************************/
+ /* */
+ /* @function: */
+ /* FTC_CMapCache_New */
+ /* */
+ /* @description: */
+ /* Create a new charmap cache. */
+ /* */
+ /* @input: */
+ /* manager :: A handle to the cache manager. */
+ /* */
+ /* @output: */
+ /* acache :: A new cache handle. NULL in case of error. */
+ /* */
+ /* @return: */
+ /* FreeType error code. 0 means success. */
+ /* */
+ /* @note: */
+ /* Like all other caches, this one will be destroyed with the cache */
+ /* manager. */
+ /* */
+ FT_EXPORT( FT_Error )
+ FTC_CMapCache_New( FTC_Manager manager,
+ FTC_CMapCache *acache );
+
+
+ /* retrieve the index of a given charmap */
+ FT_EXPORT( FT_Int )
+ FT_Get_CharMap_Index( FT_CharMap charmap );
+
+
+ /*************************************************************************/
+ /* */
+ /* @function: */
+ /* FTC_CMapCache_Lookup */
+ /* */
+ /* @description: */
+ /* Translate a character code into a glyph index, using the charmap */
+ /* cache. */
+ /* */
+ /* @input: */
+ /* cache :: A charmap cache handle. */
+ /* */
+ /* face_id :: source face id */
+ /* */
+ /* cmap_index :: index of charmap in source face */
+ /* */
+ /* char_code :: The character code (in the corresponding charmap). */
+ /* */
+ /* @return: */
+ /* Glyph index. 0 means `no glyph'. */
+ /* */
+ FT_EXPORT( FT_UInt )
+ FTC_CMapCache_Lookup( FTC_CMapCache cache,
+ FTC_FaceID face_id,
+ FT_Int cmap_index,
+ FT_UInt32 char_code );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Section> */
+ /* cache_subsystem */
+ /* */
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** IMAGE CACHE OBJECT *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ typedef struct FTC_ImageTypeRec_
+ {
+ FTC_FaceID face_id;
+ FT_Int width;
+ FT_Int height;
+ FT_Int32 flags;
+
+ } FTC_ImageTypeRec;
+
+ typedef struct FTC_ImageTypeRec_* FTC_ImageType;
+
+ /* */
+
+#define FTC_IMAGE_TYPE_COMPARE( d1, d2 ) \
+ ( FTC_FONT_COMPARE( &(d1)->font, &(d2)->font ) && \
+ (d1)->flags == (d2)->flags )
+
+#define FTC_IMAGE_TYPE_HASH( d ) \
+ (FT_UFast)( FTC_FONT_HASH( &(d)->font ) ^ \
+ ( (d)->flags << 4 ) )
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FTC_ImageCache */
+ /* */
+ /* <Description> */
+ /* A handle to an glyph image cache object. They are designed to */
+ /* hold many distinct glyph images while not exceeding a certain */
+ /* memory threshold. */
+ /* */
+ typedef struct FTC_ImageCacheRec_* FTC_ImageCache;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FTC_ImageCache_New */
+ /* */
+ /* <Description> */
+ /* Creates a new glyph image cache. */
+ /* */
+ /* <Input> */
+ /* manager :: The parent manager for the image cache. */
+ /* */
+ /* <Output> */
+ /* acache :: A handle to the new glyph image cache object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ FT_EXPORT( FT_Error )
+ FTC_ImageCache_New( FTC_Manager manager,
+ FTC_ImageCache *acache );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FTC_ImageCache_Lookup */
+ /* */
+ /* <Description> */
+ /* Retrieves a given glyph image from a glyph image cache. */
+ /* */
+ /* <Input> */
+ /* cache :: A handle to the source glyph image cache. */
+ /* */
+ /* type :: A pointer to a glyph image type descriptor. */
+ /* */
+ /* gindex :: The glyph index to retrieve. */
/* */
/* <Output> */
- /* aface :: A pointer to the handle of the face object. Set it to */
- /* zero if you don't need it. */
+ /* aglyph :: The corresponding @FT_Glyph object. 0 in case of */
+ /* failure. */
/* */
- /* asize :: A pointer to the handle of the size object. Set it to */
- /* zero if you don't need it. */
+ /* anode :: Used to return the address of of the corresponding cache */
+ /* node after incrementing its reference count (see note */
+ /* below). */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
- /* The returned @FT_Face object is always owned by the manager. You */
- /* should never try to discard it yourself. */
+ /* The returned glyph is owned and managed by the glyph image cache. */
+ /* Never try to transform or discard it manually! You can however */
+ /* create a copy with @FT_Glyph_Copy and modify the new one. */
/* */
- /* Never change the face's transformation matrix (i.e., never call */
- /* the @FT_Set_Transform function) on a returned face! If you need */
- /* to transform glyphs, do it yourself after glyph loading. */
+ /* If `anode' is _not_ NULL, it receives the address of the cache */
+ /* node containing the glyph image, after increasing its reference */
+ /* count. This ensures that the node (as well as the FT_Glyph) will */
+ /* always be kept in the cache until you call @FTC_Node_Unref to */
+ /* `release' it. */
+ /* */
+ /* If `anode' is NULL, the cache node is left unchanged, which means */
+ /* that the FT_Glyph could be flushed out of the cache on the next */
+ /* call to one of the caching sub-system APIs. Don't assume that it */
+ /* is persistent! */
+ /* */
+ FT_EXPORT( FT_Error )
+ FTC_ImageCache_Lookup( FTC_ImageCache cache,
+ FTC_ImageType type,
+ FT_UInt gindex,
+ FT_Glyph *aglyph,
+ FTC_Node *anode );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FTC_SBit */
+ /* */
+ /* <Description> */
+ /* A handle to a small bitmap descriptor. See the @FTC_SBitRec */
+ /* structure for details. */
+ /* */
+ typedef struct FTC_SBitRec_* FTC_SBit;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* FTC_SBitRec */
+ /* */
+ /* <Description> */
+ /* A very compact structure used to describe a small glyph bitmap. */
+ /* */
+ /* <Fields> */
+ /* width :: The bitmap width in pixels. */
+ /* */
+ /* height :: The bitmap height in pixels. */
+ /* */
+ /* left :: The horizontal distance from the pen position to the */
+ /* left bitmap border (a.k.a. `left side bearing', or */
+ /* `lsb'). */
+ /* */
+ /* top :: The vertical distance from the pen position (on the */
+ /* baseline) to the upper bitmap border (a.k.a. `top */
+ /* side bearing'). The distance is positive for upwards */
+ /* Y coordinates. */
/* */
- /* Similarly, the returned @FT_Size object is always owned by the */
- /* manager. You should never try to discard it, and never change its */
- /* settings with @FT_Set_Pixel_Sizes or @FT_Set_Char_Size! */
+ /* format :: The format of the glyph bitmap (monochrome or gray). */
/* */
- /* The returned size object is the face's current size, which means */
- /* that you can call @FT_Load_Glyph with the face if you need to. */
+ /* max_grays :: Maximum gray level value (in the range 1 to 255). */
+ /* */
+ /* pitch :: The number of bytes per bitmap line. May be positive */
+ /* or negative. */
+ /* */
+ /* xadvance :: The horizontal advance width in pixels. */
+ /* */
+ /* yadvance :: The vertical advance height in pixels. */
+ /* */
+ /* buffer :: A pointer to the bitmap pixels. */
+ /* */
+ typedef struct FTC_SBitRec_
+ {
+ FT_Byte width;
+ FT_Byte height;
+ FT_Char left;
+ FT_Char top;
+
+ FT_Byte format;
+ FT_Byte max_grays;
+ FT_Short pitch;
+ FT_Char xadvance;
+ FT_Char yadvance;
+
+ FT_Byte* buffer;
+
+ } FTC_SBitRec;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Type> */
+ /* FTC_SBitCache */
+ /* */
+ /* <Description> */
+ /* A handle to a small bitmap cache. These are special cache objects */
+ /* used to store small glyph bitmaps (and anti-aliased pixmaps) in a */
+ /* much more efficient way than the traditional glyph image cache */
+ /* implemented by @FTC_ImageCache. */
+ /* */
+ typedef struct FTC_SBitCacheRec_* FTC_SBitCache;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FTC_SBitCache_New */
+ /* */
+ /* <Description> */
+ /* Creates a new cache to store small glyph bitmaps. */
+ /* */
+ /* <Input> */
+ /* manager :: A handle to the source cache manager. */
+ /* */
+ /* <Output> */
+ /* acache :: A handle to the new sbit cache. NULL in case of error. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ FT_EXPORT( FT_Error )
+ FTC_SBitCache_New( FTC_Manager manager,
+ FTC_SBitCache *acache );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FTC_SBitCache_Lookup */
+ /* */
+ /* <Description> */
+ /* Looks up a given small glyph bitmap in a given sbit cache and */
+ /* `lock' it to prevent its flushing from the cache until needed. */
+ /* */
+ /* <Input> */
+ /* cache :: A handle to the source sbit cache. */
+ /* */
+ /* type :: A pointer to the glyph image type descriptor. */
+ /* */
+ /* gindex :: The glyph index. */
+ /* */
+ /* <Output> */
+ /* sbit :: A handle to a small bitmap descriptor. */
+ /* */
+ /* anode :: Used to return the address of of the corresponding cache */
+ /* node after incrementing its reference count (see note */
+ /* below). */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ /* <Note> */
+ /* The small bitmap descriptor and its bit buffer are owned by the */
+ /* cache and should never be freed by the application. They might */
+ /* as well disappear from memory on the next cache lookup, so don't */
+ /* treat them as persistent data. */
+ /* */
+ /* The descriptor's `buffer' field is set to 0 to indicate a missing */
+ /* glyph bitmap. */
+ /* */
+ /* If `anode' is _not_ NULL, it receives the address of the cache */
+ /* node containing the bitmap, after increasing its reference count. */
+ /* This ensures that the node (as well as the image) will always be */
+ /* kept in the cache until you call @FTC_Node_Unref to `release' it. */
+ /* */
+ /* If `anode' is NULL, the cache node is left unchanged, which means */
+ /* that the bitmap could be flushed out of the cache on the next */
+ /* call to one of the caching sub-system APIs. Don't assume that it */
+ /* is persistent! */
/* */
FT_EXPORT( FT_Error )
- FTC_Manager_Lookup_Size( FTC_Manager manager,
- FTC_Font font,
- FT_Face *aface,
- FT_Size *asize );
+ FTC_SBitCache_Lookup( FTC_SBitCache cache,
+ FTC_ImageType type,
+ FT_UInt gindex,
+ FTC_SBit *sbit,
+ FTC_Node *anode );
+
+ /* */
FT_END_HEADER
diff --git a/extras/freetype2/include/freetype/fterrdef.h b/extras/freetype2/include/freetype/fterrdef.h
index 4ef606de8..2f73c0858 100644
--- a/extras/freetype2/include/freetype/fterrdef.h
+++ b/extras/freetype2/include/freetype/fterrdef.h
@@ -4,7 +4,7 @@
/* */
/* FreeType error codes (specification). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -207,6 +207,8 @@
"opcode syntax error" )
FT_ERRORDEF_( Stack_Underflow, 0xA1, \
"argument stack underflow" )
+ FT_ERRORDEF_( Ignore, 0xA2, \
+ "ignore" )
/* BDF errors */
diff --git a/extras/freetype2/include/freetype/ftglyph.h b/extras/freetype2/include/freetype/ftglyph.h
index e1acae7b8..14050a21d 100644
--- a/extras/freetype2/include/freetype/ftglyph.h
+++ b/extras/freetype2/include/freetype/ftglyph.h
@@ -4,7 +4,7 @@
/* */
/* FreeType convenience functions to handle glyphs (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -36,6 +36,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
@@ -235,7 +241,8 @@ FT_BEGIN_HEADER
/* FT_Glyph_Copy */
/* */
/* <Description> */
- /* A function used to copy a glyph image. */
+ /* A function used to copy a glyph image. Note that the created */
+ /* @FT_Glyph object must be released with @FT_Done_Glyph. */
/* */
/* <Input> */
/* source :: A handle to the source glyph object. */
@@ -282,7 +289,64 @@ FT_BEGIN_HEADER
FT_Matrix* matrix,
FT_Vector* delta );
- /* */
+
+ /*************************************************************************/
+ /* */
+ /* <Enum> */
+ /* FT_Glyph_BBox_Mode */
+ /* */
+ /* <Description> */
+ /* The mode how the values of @FT_Glyph_Get_CBox are returned. */
+ /* */
+ /* <Values> */
+ /* FT_GLYPH_BBOX_UNSCALED :: */
+ /* Return unscaled font units. */
+ /* */
+ /* FT_GLYPH_BBOX_SUBPIXELS :: */
+ /* Return unfitted 26.6 coordinates. */
+ /* */
+ /* FT_GLYPH_BBOX_GRIDFIT :: */
+ /* Return grid-fitted 26.6 coordinates. */
+ /* */
+ /* FT_GLYPH_BBOX_TRUNCATE :: */
+ /* Return coordinates in integer pixels. */
+ /* */
+ /* FT_GLYPH_BBOX_PIXELS :: */
+ /* Return grid-fitted pixel coordinates. */
+ /* */
+ typedef enum FT_Glyph_BBox_Mode_
+ {
+ FT_GLYPH_BBOX_UNSCALED = 0,
+ FT_GLYPH_BBOX_SUBPIXELS = 0,
+ FT_GLYPH_BBOX_GRIDFIT = 1,
+ FT_GLYPH_BBOX_TRUNCATE = 2,
+ FT_GLYPH_BBOX_PIXELS = 3
+
+ } FT_Glyph_BBox_Mode;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Enum> */
+ /* ft_glyph_bbox_xxx */
+ /* */
+ /* <Description> */
+ /* These constants are deprecated. Use the corresponding */
+ /* @FT_Glyph_BBox_Mode values instead. */
+ /* */
+ /* <Values> */
+ /* ft_glyph_bbox_unscaled :: see @FT_GLYPH_BBOX_UNSCALED */
+ /* ft_glyph_bbox_subpixels :: see @FT_GLYPH_BBOX_SUBPIXELS */
+ /* ft_glyph_bbox_gridfit :: see @FT_GLYPH_BBOX_GRIDFIT */
+ /* ft_glyph_bbox_truncate :: see @FT_GLYPH_BBOX_TRUNCATE */
+ /* ft_glyph_bbox_pixels :: see @FT_GLYPH_BBOX_PIXELS */
+ /* */
+#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED
+#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS
+#define ft_glyph_bbox_gridfit FT_GLYPH_BBOX_GRIDFIT
+#define ft_glyph_bbox_truncate FT_GLYPH_BBOX_TRUNCATE
+#define ft_glyph_bbox_pixels FT_GLYPH_BBOX_PIXELS
+
/*************************************************************************/
/* */
@@ -316,11 +380,9 @@ FT_BEGIN_HEADER
/* convention. */
/* */
/* If the glyph has been loaded with FT_LOAD_NO_SCALE, `bbox_mode' */
- /* must be set to `ft_glyph_bbox_unscaled' to get unscaled font */
- /* units. */
- /* */
- /* If `bbox_mode' is set to `ft_glyph_bbox_subpixels' the bbox */
- /* coordinates are returned in 26.6 pixels (i.e. 1/64th of pixels). */
+ /* must be set to `FT_GLYPH_BBOX_UNSCALED' to get unscaled font */
+ /* units in 26.6 pixel format. The value `FT_GLYPH_BBOX_SUBPIXELS' */
+ /* is another name for this constant. */
/* */
/* Note that the maximum coordinates are exclusive, which means that */
/* one can compute the width and height of the glyph image (be it in */
@@ -330,7 +392,7 @@ FT_BEGIN_HEADER
/* height = bbox.yMax - bbox.yMin; */
/* */
/* Note also that for 26.6 coordinates, if `bbox_mode' is set to */
- /* `ft_glyph_bbox_gridfit', the coordinates will also be grid-fitted, */
+ /* `FT_GLYPH_BBOX_GRIDFIT', the coordinates will also be grid-fitted, */
/* which corresponds to: */
/* */
/* bbox.xMin = FLOOR(bbox.xMin); */
@@ -339,23 +401,11 @@ FT_BEGIN_HEADER
/* bbox.yMax = CEILING(bbox.yMax); */
/* */
/* To get the bbox in pixel coordinates, set `bbox_mode' to */
- /* `ft_glyph_bbox_truncate'. */
+ /* `FT_GLYPH_BBOX_TRUNCATE'. */
/* */
/* To get the bbox in grid-fitted pixel coordinates, set `bbox_mode' */
- /* to `ft_glyph_bbox_pixels'. */
- /* */
- /* The default value for `bbox_mode' is `ft_glyph_bbox_pixels'. */
+ /* to `FT_GLYPH_BBOX_PIXELS'. */
/* */
- enum
- {
- ft_glyph_bbox_unscaled = 0, /* return unscaled font units */
- ft_glyph_bbox_subpixels = 0, /* return unfitted 26.6 coordinates */
- ft_glyph_bbox_gridfit = 1, /* return grid-fitted 26.6 coordinates */
- ft_glyph_bbox_truncate = 2, /* return coordinates in integer pixels */
- ft_glyph_bbox_pixels = 3 /* return grid-fitted pixel coordinates */
- };
-
-
FT_EXPORT( void )
FT_Glyph_Get_CBox( FT_Glyph glyph,
FT_UInt bbox_mode,
@@ -391,8 +441,7 @@ FT_BEGIN_HEADER
/* */
/* <Note> */
/* The glyph image is translated with the `origin' vector before */
- /* rendering. In case of error, it it translated back to its */
- /* original position and the glyph is left untouched. */
+ /* rendering. */
/* */
/* The first parameter is a pointer to a FT_Glyph handle, that will */
/* be replaced by this function. Typically, you would use (omitting */
@@ -413,7 +462,7 @@ FT_BEGIN_HEADER
/* // convert to a bitmap (default render mode + destroy old) */
/* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */
/* { */
- /* error = FT_Glyph_To_Bitmap( &glyph, ft_render_mode_default, */
+ /* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_DEFAULT, */
/* 0, 1 ); */
/* if ( error ) // glyph unchanged */
/* ... */
@@ -430,8 +479,7 @@ FT_BEGIN_HEADER
/* } */
/* */
/* */
- /* This function will always fail if the glyph's format isn't */
- /* scalable. */
+ /* This function does nothing if the glyph format isn't scalable. */
/* */
FT_EXPORT( FT_Error )
FT_Glyph_To_Bitmap( FT_Glyph* the_glyph,
diff --git a/extras/freetype2/include/freetype/ftgzip.h b/extras/freetype2/include/freetype/ftgzip.h
index c254622fd..5d7228bb4 100644
--- a/extras/freetype2/include/freetype/ftgzip.h
+++ b/extras/freetype2/include/freetype/ftgzip.h
@@ -4,7 +4,7 @@
/* */
/* Gzip-compressed stream support. */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,6 +22,13 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
FT_BEGIN_HEADER
/*************************************************************************/
@@ -40,47 +47,54 @@ FT_BEGIN_HEADER
/* */
/*************************************************************************/
+
/************************************************************************
*
- * @type: FT_Stream_OpenGzip
+ * @function:
+ * FT_Stream_OpenGzip
*
* @description:
- * open a new stream to parse gzip-compressed font files. This is
+ * Open a new stream to parse gzip-compressed font files. This is
* mainly used to support the compressed *.pcf.gz fonts that come
- * with XFree86
+ * with XFree86.
*
* @input:
- * stream :: target embedding stream
- * source :: source stream, used to
+ * stream :: The target embedding stream.
+ *
+ * source :: The source stream.
*
* @return:
- * error code. 0 means success
+ * FreeType error code. 0 means success.
*
* @note:
- * the source stream must be opened _before_ calling this function.
+ * The source stream must be opened _before_ calling this function.
*
- * calling @FT_Stream_Close on the new stream will *not* call
- * @FT_Stream_Close on the source stream. None of the stream objects
- * will be released to the heap.
+ * Calling the internal function FT_Stream_Close on the new stream will
+ * *not* call FT_Stream_Close on the source stream. None of the stream
+ * objects will be released to the heap.
*
- * the stream implementation is very basic, and resets the decompression
- * process each time seeking backwards is needed within the stream
+ * The stream implementation is very basic and resets the decompression
+ * process each time seeking backwards is needed within the stream.
*
- * in certain builds of the library, gzip compression recognition is
- * automatic when calling @FT_New_Face or @FT_Open_Face. This means that
- * if no font driver is capable of handling the raw compressed file,
- * the library will try to open a gzip stream from it and re-open
- * the face with it.
+ * In certain builds of the library, gzip compression recognition is
+ * automatically handled when calling @FT_New_Face or @FT_Open_Face.
+ * This means that if no font driver is capable of handling the raw
+ * compressed file, the library will try to open a gzipped stream from
+ * it and re-open the face with it.
*
- * this function may return "FT_Err_Unimplemented" if your build of
+ * This function may return "FT_Err_Unimplemented" if your build of
* FreeType was not compiled with zlib support.
*/
FT_EXPORT( FT_Error )
- FT_Stream_OpenGzip( FT_Stream stream,
- FT_Stream source );
+ FT_Stream_OpenGzip( FT_Stream stream,
+ FT_Stream source );
/* */
+
FT_END_HEADER
#endif /* __FTGZIP_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/ftimage.h b/extras/freetype2/include/freetype/ftimage.h
index fe46bf529..4682a4cad 100644
--- a/extras/freetype2/include/freetype/ftimage.h
+++ b/extras/freetype2/include/freetype/ftimage.h
@@ -5,7 +5,7 @@
/* FreeType glyph image formats and default raster interface */
/* (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -53,8 +53,8 @@ FT_BEGIN_HEADER
/* <Description> */
/* The type FT_Pos is a 32-bit integer used to store vectorial */
/* coordinates. Depending on the context, these can represent */
- /* distances in integer font units, or 26.6 fixed float pixel */
- /* coordinates. */
+ /* distances in integer font units, or 16,16, or 26.6 fixed float */
+ /* pixel coordinates. */
/* */
typedef signed long FT_Pos;
@@ -261,7 +261,8 @@ FT_BEGIN_HEADER
/* `FT_PIXEL_MODE_GRAY'; it gives the number of gray */
/* levels used in the bitmap. */
/* */
- /* pixel_mode :: The pixel_mode, i.e., how pixel bits are stored. */
+ /* pixel_mode :: The pixel mode, i.e., how pixel bits are stored. */
+ /* See @FT_Pixel_Mode for possible values. */
/* */
/* palette_mode :: This field is only used with paletted pixel modes; */
/* it indicates how the palette is stored. */
@@ -357,11 +358,11 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Enum> */
- /* FT_Outline_Flags */
+ /* FT_OUTLINE_FLAGS */
/* */
/* <Description> */
- /* A simple type used to enumerates the flags in an outline's */
- /* `outline_flags' field. */
+ /* A list of bit-field constants use for the flags in an outline's */
+ /* `flags' field. */
/* */
/* <Values> */
/* FT_OUTLINE_NONE :: Value 0 is reserved. */
@@ -414,27 +415,24 @@ FT_BEGIN_HEADER
/* completely ignored by a given */
/* scan-converter. */
/* */
- typedef enum FT_Outline_Flags_
- {
- FT_OUTLINE_NONE = 0,
- FT_OUTLINE_OWNER = 1,
- FT_OUTLINE_EVEN_ODD_FILL = 2,
- FT_OUTLINE_REVERSE_FILL = 4,
- FT_OUTLINE_IGNORE_DROPOUTS = 8,
- FT_OUTLINE_HIGH_PRECISION = 256,
- FT_OUTLINE_SINGLE_PASS = 512
+#define FT_OUTLINE_NONE 0x0
+#define FT_OUTLINE_OWNER 0x1
+#define FT_OUTLINE_EVEN_ODD_FILL 0x2
+#define FT_OUTLINE_REVERSE_FILL 0x4
+#define FT_OUTLINE_IGNORE_DROPOUTS 0x8
- } FT_Outline_Flags;
+#define FT_OUTLINE_HIGH_PRECISION 0x100
+#define FT_OUTLINE_SINGLE_PASS 0x200
/*************************************************************************
*
* @enum:
- * ft_outline_xxx
+ * ft_outline_flags
*
* @description:
* These constants are deprecated. Please use the corresponding
- * @FT_OUTLINE_XXX values.
+ * @FT_OUTLINE_FLAGS values.
*
* @values:
* ft_outline_none :: See @FT_OUTLINE_NONE.
@@ -659,7 +657,7 @@ FT_BEGIN_HEADER
/* should redefine this macro in case of problems to something like */
/* this: */
/* */
- /* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) (value) */
+ /* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value */
/* */
/* to get a simple enumeration without assigning special numbers. */
/* */
@@ -689,8 +687,8 @@ FT_BEGIN_HEADER
/* */
/* FT_GLYPH_FORMAT_COMPOSITE :: */
/* The glyph image is a composite of several other images. This */
- /* format is _only_ used with @FT_LOAD_FLAG_NO_RECURSE, and is */
- /* used to report compound glyphs (like accented characters). */
+ /* format is _only_ used with @FT_LOAD_NO_RECURSE, and is used to */
+ /* report compound glyphs (like accented characters). */
/* */
/* FT_GLYPH_FORMAT_BITMAP :: */
/* The glyph image is a bitmap, and can be described as an */
@@ -937,11 +935,11 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Enum> */
- /* FT_Raster_Flag */
+ /* FT_RASTER_FLAG_XXX */
/* */
/* <Description> */
- /* An enumeration to list the bit flags as used in the `flags' field */
- /* of a FT_Raster_Params structure. */
+ /* A list of bit flag constants as used in the `flags' field of a */
+ /* @FT_Raster_Params structure. */
/* */
/* <Values> */
/* FT_RASTER_FLAG_DEFAULT :: This value is 0. */
@@ -949,7 +947,7 @@ FT_BEGIN_HEADER
/* FT_RASTER_FLAG_AA :: This flag is set to indicate that an */
/* anti-aliased glyph image should be */
/* generated. Otherwise, it will be */
- /* monochrome (1-bit) */
+ /* monochrome (1-bit). */
/* */
/* FT_RASTER_FLAG_DIRECT :: This flag is set to indicate direct */
/* rendering. In this mode, client */
@@ -974,15 +972,12 @@ FT_BEGIN_HEADER
/* in direct rendering mode where all spans */
/* are generated if no clipping box is set. */
/* */
- typedef enum
- {
- FT_RASTER_FLAG_DEFAULT = 0,
- FT_RASTER_FLAG_AA = 1,
- FT_RASTER_FLAG_DIRECT = 2,
- FT_RASTER_FLAG_CLIP = 4
-
- } FT_Raster_Flag;
+#define FT_RASTER_FLAG_DEFAULT 0x0
+#define FT_RASTER_FLAG_AA 0x1
+#define FT_RASTER_FLAG_DIRECT 0x2
+#define FT_RASTER_FLAG_CLIP 0x4
+ /* deprecated */
#define ft_raster_flag_default FT_RASTER_FLAG_DEFAULT
#define ft_raster_flag_aa FT_RASTER_FLAG_AA
#define ft_raster_flag_direct FT_RASTER_FLAG_DIRECT
diff --git a/extras/freetype2/include/freetype/ftincrem.h b/extras/freetype2/include/freetype/ftincrem.h
index c9e8b56d6..6a1aa1fc3 100644
--- a/extras/freetype2/include/freetype/ftincrem.h
+++ b/extras/freetype2/include/freetype/ftincrem.h
@@ -4,7 +4,7 @@
/* */
/* FreeType incremental loading (specification). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,6 +22,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
@@ -186,10 +192,10 @@ FT_BEGIN_HEADER
*/
typedef FT_Error
(*FT_Incremental_GetGlyphMetricsFunc)
- ( FT_Incremental incremental,
- FT_UInt glyph_index,
- FT_Bool vertical,
- FT_Incremental_MetricsRec *ametrics );
+ ( FT_Incremental incremental,
+ FT_UInt glyph_index,
+ FT_Bool vertical,
+ FT_Incremental_MetricsRec *ametrics );
/**************************************************************************
@@ -199,7 +205,7 @@ FT_BEGIN_HEADER
*
* @description:
* A table of functions for accessing fonts that load data
- * incrementally. Used in @FT_Incremental_Interface.
+ * incrementally. Used in @FT_Incremental_InterfaceRec.
*
* @fields:
* get_glyph_data ::
@@ -246,8 +252,7 @@ FT_BEGIN_HEADER
* parameter.data = &inc_int;
*
* // set up FT_Open_Args structure
- * open_args.flags = (FT_Open_Flags)( FT_OPEN_PATHNAME |
- * FT_OPEN_PARAMS );
+ * open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS;
* open_args.pathname = my_font_pathname;
* open_args.num_params = 1;
* open_args.params = &parameter; // we use one optional argument
diff --git a/extras/freetype2/include/freetype/ftlist.h b/extras/freetype2/include/freetype/ftlist.h
index 1c5101700..ae9801b9d 100644
--- a/extras/freetype2/include/freetype/ftlist.h
+++ b/extras/freetype2/include/freetype/ftlist.h
@@ -4,7 +4,7 @@
/* */
/* Generic list support for FreeType (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -31,6 +31,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/extras/freetype2/include/freetype/ftlzw.h b/extras/freetype2/include/freetype/ftlzw.h
new file mode 100644
index 000000000..a0a042ea0
--- /dev/null
+++ b/extras/freetype2/include/freetype/ftlzw.h
@@ -0,0 +1,99 @@
+/***************************************************************************/
+/* */
+/* ftlzw.h */
+/* */
+/* LZW-compressed stream support. */
+/* */
+/* Copyright 2004 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __FTLZW_H__
+#define __FTLZW_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+ /*************************************************************************/
+ /* */
+ /* <Section> */
+ /* lzw */
+ /* */
+ /* <Title> */
+ /* LZW Streams */
+ /* */
+ /* <Abstract> */
+ /* Using LZW-compressed font files */
+ /* */
+ /* <Description> */
+ /* This section contains the declaration of LZW-specific functions. */
+ /* */
+ /*************************************************************************/
+
+ /************************************************************************
+ *
+ * @function:
+ * FT_Stream_OpenLZW
+ *
+ * @description:
+ * Open a new stream to parse LZW-compressed font files. This is
+ * mainly used to support the compressed *.pcf.Z fonts that come
+ * with XFree86.
+ *
+ * @input:
+ * stream :: The target embedding stream.
+ *
+ * source :: The source stream.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * The source stream must be opened _before_ calling this function.
+ *
+ * Calling the internal function FT_Stream_Close on the new stream will
+ * *not* call FT_Stream_Close on the source stream. None of the stream
+ * objects will be released to the heap.
+ *
+ * The stream implementation is very basic and resets the decompression
+ * process each time seeking backwards is needed within the stream
+ *
+ * In certain builds of the library, LZW compression recognition is
+ * automatically handled when calling @FT_New_Face or @FT_Open_Face.
+ * This means that if no font driver is capable of handling the raw
+ * compressed file, the library will try to open a LZW stream from it
+ * and re-open the face with it.
+ *
+ * This function may return "FT_Err_Unimplemented" if your build of
+ * FreeType was not compiled with LZW support.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Stream_OpenLZW( FT_Stream stream,
+ FT_Stream source );
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTLZW_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/ftmac.h b/extras/freetype2/include/freetype/ftmac.h
index b9f89bab4..78ed77947 100644
--- a/extras/freetype2/include/freetype/ftmac.h
+++ b/extras/freetype2/include/freetype/ftmac.h
@@ -4,7 +4,7 @@
/* */
/* Additional Mac-specific API. */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2004 by */
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -111,10 +111,44 @@ FT_BEGIN_HEADER
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
- FT_EXPORT_DEF( FT_Error )
- FT_GetFile_From_Mac_Name( char* fontName,
- FSSpec* pathSpec,
- FT_Long* face_index );
+ FT_EXPORT( FT_Error )
+ FT_GetFile_From_Mac_Name( const char* fontName,
+ FSSpec* pathSpec,
+ FT_Long* face_index );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_New_Face_From_FSSpec */
+ /* */
+ /* <Description> */
+ /* Creates a new face object from a given resource and typeface index */
+ /* using an FSSpec to the font file. */
+ /* */
+ /* <InOut> */
+ /* library :: A handle to the library resource. */
+ /* */
+ /* <Input> */
+ /* spec :: FSSpec to the font file. */
+ /* */
+ /* face_index :: The index of the face within the resource. The */
+ /* first face has index 0. */
+ /* <Output> */
+ /* aface :: A handle to a new face object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ /* <Note> */
+ /* @FT_New_Face_From_FSSpec is identical to @FT_New_Face except */
+ /* it accepts an FSSpec instead of a path. */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_New_Face_From_FSSpec( FT_Library library,
+ const FSSpec *spec,
+ FT_Long face_index,
+ FT_Face *aface );
/* */
diff --git a/extras/freetype2/include/freetype/ftmm.h b/extras/freetype2/include/freetype/ftmm.h
index 5e681b2c4..7f565bef9 100644
--- a/extras/freetype2/include/freetype/ftmm.h
+++ b/extras/freetype2/include/freetype/ftmm.h
@@ -100,21 +100,6 @@ FT_BEGIN_HEADER
/* */
- typedef FT_Error
- (*FT_Get_MM_Func)( FT_Face face,
- FT_Multi_Master* master );
-
- typedef FT_Error
- (*FT_Set_MM_Design_Func)( FT_Face face,
- FT_UInt num_coords,
- FT_Long* coords );
-
- typedef FT_Error
- (*FT_Set_MM_Blend_Func)( FT_Face face,
- FT_UInt num_coords,
- FT_Long* coords );
-
-
/*************************************************************************/
/* */
/* <Function> */
diff --git a/extras/freetype2/include/freetype/ftmodapi.h b/extras/freetype2/include/freetype/ftmodapi.h
new file mode 100644
index 000000000..1929ca025
--- /dev/null
+++ b/extras/freetype2/include/freetype/ftmodapi.h
@@ -0,0 +1,319 @@
+/***************************************************************************/
+/* */
+/* ftmodapi.h */
+/* */
+/* FreeType modules public interface (specification). */
+/* */
+/* Copyright 1996-2001, 2002, 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __FTMODAPI_H__
+#define __FTMODAPI_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+ /*************************************************************************/
+ /* */
+ /* <Section> */
+ /* module_management */
+ /* */
+ /* <Title> */
+ /* Module Management */
+ /* */
+ /* <Abstract> */
+ /* How to add, upgrade, and remove modules from FreeType. */
+ /* */
+ /* <Description> */
+ /* The definitions below are used to manage modules within FreeType. */
+ /* Modules can be added, upgraded, and removed at runtime. */
+ /* */
+ /*************************************************************************/
+
+
+ /* module bit flags */
+#define FT_MODULE_FONT_DRIVER 1 /* this module is a font driver */
+#define FT_MODULE_RENDERER 2 /* this module is a renderer */
+#define FT_MODULE_HINTER 4 /* this module is a glyph hinter */
+#define FT_MODULE_STYLER 8 /* this module is a styler */
+
+#define FT_MODULE_DRIVER_SCALABLE 0x100 /* the driver supports */
+ /* scalable fonts */
+#define FT_MODULE_DRIVER_NO_OUTLINES 0x200 /* the driver does not */
+ /* support vector outlines */
+#define FT_MODULE_DRIVER_HAS_HINTER 0x400 /* the driver provides its */
+ /* own hinter */
+
+
+ /* deprecated values */
+#define ft_module_font_driver FT_MODULE_FONT_DRIVER
+#define ft_module_renderer FT_MODULE_RENDERER
+#define ft_module_hinter FT_MODULE_HINTER
+#define ft_module_styler FT_MODULE_STYLER
+
+#define ft_module_driver_scalable FT_MODULE_DRIVER_SCALABLE
+#define ft_module_driver_no_outlines FT_MODULE_DRIVER_NO_OUTLINES
+#define ft_module_driver_has_hinter FT_MODULE_DRIVER_HAS_HINTER
+
+
+ typedef FT_Pointer FT_Module_Interface;
+
+ typedef FT_Error
+ (*FT_Module_Constructor)( FT_Module module );
+
+ typedef void
+ (*FT_Module_Destructor)( FT_Module module );
+
+ typedef FT_Module_Interface
+ (*FT_Module_Requester)( FT_Module module,
+ const char* name );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* FT_Module_Class */
+ /* */
+ /* <Description> */
+ /* The module class descriptor. */
+ /* */
+ /* <Fields> */
+ /* module_flags :: Bit flags describing the module. */
+ /* */
+ /* module_size :: The size of one module object/instance in */
+ /* bytes. */
+ /* */
+ /* module_name :: The name of the module. */
+ /* */
+ /* module_version :: The version, as a 16.16 fixed number */
+ /* (major.minor). */
+ /* */
+ /* module_requires :: The version of FreeType this module requires */
+ /* (starts at version 2.0, i.e 0x20000) */
+ /* */
+ /* module_init :: A function used to initialize (not create) a */
+ /* new module object. */
+ /* */
+ /* module_done :: A function used to finalize (not destroy) a */
+ /* given module object */
+ /* */
+ /* get_interface :: Queries a given module for a specific */
+ /* interface by name. */
+ /* */
+ typedef struct FT_Module_Class_
+ {
+ FT_ULong module_flags;
+ FT_Long module_size;
+ const FT_String* module_name;
+ FT_Fixed module_version;
+ FT_Fixed module_requires;
+
+ const void* module_interface;
+
+ FT_Module_Constructor module_init;
+ FT_Module_Destructor module_done;
+ FT_Module_Requester get_interface;
+
+ } FT_Module_Class;
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Add_Module */
+ /* */
+ /* <Description> */
+ /* Adds a new module to a given library instance. */
+ /* */
+ /* <InOut> */
+ /* library :: A handle to the library object. */
+ /* */
+ /* <Input> */
+ /* clazz :: A pointer to class descriptor for the module. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ /* <Note> */
+ /* An error will be returned if a module already exists by that name, */
+ /* or if the module requires a version of FreeType that is too great. */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Add_Module( FT_Library library,
+ const FT_Module_Class* clazz );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Get_Module */
+ /* */
+ /* <Description> */
+ /* Finds a module by its name. */
+ /* */
+ /* <Input> */
+ /* library :: A handle to the library object. */
+ /* */
+ /* module_name :: The module's name (as an ASCII string). */
+ /* */
+ /* <Return> */
+ /* A module handle. 0 if none was found. */
+ /* */
+ /* <Note> */
+ /* You should better be familiar with FreeType internals to know */
+ /* which module to look for :-) */
+ /* */
+ FT_EXPORT( FT_Module )
+ FT_Get_Module( FT_Library library,
+ const char* module_name );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Remove_Module */
+ /* */
+ /* <Description> */
+ /* Removes a given module from a library instance. */
+ /* */
+ /* <InOut> */
+ /* library :: A handle to a library object. */
+ /* */
+ /* <Input> */
+ /* module :: A handle to a module object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ /* <Note> */
+ /* The module object is destroyed by the function in case of success. */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Remove_Module( FT_Library library,
+ FT_Module module );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_New_Library */
+ /* */
+ /* <Description> */
+ /* This function is used to create a new FreeType library instance */
+ /* from a given memory object. It is thus possible to use libraries */
+ /* with distinct memory allocators within the same program. */
+ /* */
+ /* <Input> */
+ /* memory :: A handle to the original memory object. */
+ /* */
+ /* <Output> */
+ /* alibrary :: A pointer to handle of a new library object. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_New_Library( FT_Memory memory,
+ FT_Library *alibrary );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Done_Library */
+ /* */
+ /* <Description> */
+ /* Discards a given library object. This closes all drivers and */
+ /* discards all resource objects. */
+ /* */
+ /* <Input> */
+ /* library :: A handle to the target library. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ FT_EXPORT( FT_Error )
+ FT_Done_Library( FT_Library library );
+
+
+
+ typedef void
+ (*FT_DebugHook_Func)( void* arg );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Set_Debug_Hook */
+ /* */
+ /* <Description> */
+ /* Sets a debug hook function for debugging the interpreter of a font */
+ /* format. */
+ /* */
+ /* <InOut> */
+ /* library :: A handle to the library object. */
+ /* */
+ /* <Input> */
+ /* hook_index :: The index of the debug hook. You should use the */
+ /* values defined in ftobjs.h, e.g. */
+ /* FT_DEBUG_HOOK_TRUETYPE. */
+ /* */
+ /* debug_hook :: The function used to debug the interpreter. */
+ /* */
+ /* <Note> */
+ /* Currently, four debug hook slots are available, but only two (for */
+ /* the TrueType and the Type 1 interpreter) are defined. */
+ /* */
+ FT_EXPORT( void )
+ FT_Set_Debug_Hook( FT_Library library,
+ FT_UInt hook_index,
+ FT_DebugHook_Func debug_hook );
+
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Add_Default_Modules */
+ /* */
+ /* <Description> */
+ /* Adds the set of default drivers to a given library object. */
+ /* This is only useful when you create a library object with */
+ /* FT_New_Library() (usually to plug a custom memory manager). */
+ /* */
+ /* <InOut> */
+ /* library :: A handle to a new library object. */
+ /* */
+ FT_EXPORT( void )
+ FT_Add_Default_Modules( FT_Library library );
+
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTMODAPI_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/ftmoderr.h b/extras/freetype2/include/freetype/ftmoderr.h
index 59e15c10c..d190167fa 100644
--- a/extras/freetype2/include/freetype/ftmoderr.h
+++ b/extras/freetype2/include/freetype/ftmoderr.h
@@ -4,7 +4,7 @@
/* */
/* FreeType module error offsets (specification). */
/* */
-/* Copyright 2001, 2002 by */
+/* Copyright 2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,8 +23,8 @@
/* The lower byte gives the error code, the higher byte gives the */
/* module. The base module has error offset 0. For example, the error */
/* `FT_Err_Invalid_File_Format' has value 0x003, the error */
- /* `TT_Err_Invalid_File_Format' has value 0xB03, the error */
- /* `T1_Err_Invalid_File_Format' has value 0xC03, etc. */
+ /* `TT_Err_Invalid_File_Format' has value 0x1003, the error */
+ /* `T1_Err_Invalid_File_Format' has value 0x1103, etc. */
/* */
/* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h */
/* to make the higher byte always zero (disabling the module error */
@@ -102,21 +102,26 @@
#endif
- FT_MODERRDEF( Base, 0x000, "base module" )
- FT_MODERRDEF( Autohint, 0x100, "autohinter module" )
- FT_MODERRDEF( Cache, 0x200, "cache module" )
- FT_MODERRDEF( CFF, 0x300, "CFF module" )
- FT_MODERRDEF( CID, 0x400, "CID module" )
- FT_MODERRDEF( PCF, 0x500, "PCF module" )
- FT_MODERRDEF( PSaux, 0x600, "PS auxiliary module" )
- FT_MODERRDEF( PSnames, 0x700, "PS names module" )
- FT_MODERRDEF( Raster, 0x800, "raster module" )
- FT_MODERRDEF( SFNT, 0x900, "SFNT module" )
- FT_MODERRDEF( Smooth, 0xA00, "smooth raster module" )
- FT_MODERRDEF( TrueType, 0xB00, "TrueType module" )
- FT_MODERRDEF( Type1, 0xC00, "Type 1 module" )
- FT_MODERRDEF( Winfonts, 0xD00, "Windows FON/FNT module" )
- FT_MODERRDEF( PFR, 0xE00, "PFR module" )
+ FT_MODERRDEF( Base, 0x000, "base module" )
+ FT_MODERRDEF( Autohint, 0x100, "autohinter module" )
+ FT_MODERRDEF( BDF, 0x200, "BDF module" )
+ FT_MODERRDEF( Cache, 0x300, "cache module" )
+ FT_MODERRDEF( CFF, 0x400, "CFF module" )
+ FT_MODERRDEF( CID, 0x500, "CID module" )
+ FT_MODERRDEF( Gzip, 0x600, "Gzip module" )
+ FT_MODERRDEF( LZW, 0x700, "LZW module" )
+ FT_MODERRDEF( PCF, 0x800, "PCF module" )
+ FT_MODERRDEF( PFR, 0x900, "PFR module" )
+ FT_MODERRDEF( PSaux, 0xA00, "PS auxiliary module" )
+ FT_MODERRDEF( PShinter, 0xB00, "PS hinter module" )
+ FT_MODERRDEF( PSnames, 0xC00, "PS names module" )
+ FT_MODERRDEF( Raster, 0xD00, "raster module" )
+ FT_MODERRDEF( SFNT, 0xE00, "SFNT module" )
+ FT_MODERRDEF( Smooth, 0xF00, "smooth raster module" )
+ FT_MODERRDEF( TrueType, 0x1000, "TrueType module" )
+ FT_MODERRDEF( Type1, 0x1100, "Type 1 module" )
+ FT_MODERRDEF( Type42, 0x1200, "Type 42 module" )
+ FT_MODERRDEF( Winfonts, 0x1300, "Windows FON/FNT module" )
#ifdef FT_MODERR_END_LIST
diff --git a/extras/freetype2/include/freetype/ftoutln.h b/extras/freetype2/include/freetype/ftoutln.h
index fdf7ed298..79ed35b59 100644
--- a/extras/freetype2/include/freetype/ftoutln.h
+++ b/extras/freetype2/include/freetype/ftoutln.h
@@ -5,7 +5,7 @@
/* Support for the FT_Outline type used to store glyph shapes of */
/* most scalable font formats (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,6 +24,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
@@ -46,7 +52,7 @@ FT_BEGIN_HEADER
/* */
/* <Order> */
/* FT_Outline */
- /* FT_Outline_Flags */
+ /* FT_OUTLINE_FLAGS */
/* FT_Outline_New */
/* FT_Outline_Done */
/* FT_Outline_Copy */
@@ -389,6 +395,72 @@ FT_BEGIN_HEADER
FT_Raster_Params* params );
+ /**************************************************************************
+ *
+ * @enum:
+ * FT_Orientation
+ *
+ * @description:
+ * A list of values used to describe an outline's contour orientation.
+ *
+ * The TrueType and Postscript specifications use different conventions
+ * to determine whether outline contours should be filled or unfilled.
+ *
+ * @values:
+ * FT_ORIENTATION_TRUETYPE ::
+ * According to the TrueType specification, clockwise contours must
+ * be filled, and counter-clockwise ones must be unfilled.
+ *
+ * FT_ORIENTATION_POSTSCRIPT ::
+ * According to the Postscript specification, counter-clockwise contours
+ * must be filled, and clockwise ones must be unfilled.
+ *
+ * FT_ORIENTATION_FILL_RIGHT ::
+ * This is identical to @FT_ORIENTATION_TRUETYPE, but is used to
+ * remember that in TrueType, everything that is to the right of
+ * the drawing direction of a contour must be filled.
+ *
+ * FT_ORIENTATION_FILL_LEFT ::
+ * This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to
+ * remember that in Postscript, everything that is to the left of
+ * the drawing direction of a contour must be filled.
+ */
+ typedef enum
+ {
+ FT_ORIENTATION_TRUETYPE = 0,
+ FT_ORIENTATION_POSTSCRIPT = 1,
+ FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE,
+ FT_ORIENTATION_FILL_LEFT = FT_ORIENTATION_POSTSCRIPT
+
+ } FT_Orientation;
+
+
+ /**************************************************************************
+ *
+ * @function:
+ * FT_Outline_Get_Orientation
+ *
+ * @description:
+ * This function analyzes a glyph outline and tries to compute its
+ * fill orientation (see @FT_Orientation). This is done by computing
+ * the direction of each global horizontal and/or vertical extrema
+ * within the outline.
+ *
+ * Note that this will return @FT_ORIENTATION_TRUETYPE for empty
+ * outlines.
+ *
+ * @input:
+ * outline ::
+ * A handle to the source outline.
+ *
+ * @return:
+ * The orientation.
+ *
+ */
+ FT_EXPORT( FT_Orientation )
+ FT_Outline_Get_Orientation( FT_Outline* outline );
+
+
/* */
diff --git a/extras/freetype2/include/freetype/ftpfr.h b/extras/freetype2/include/freetype/ftpfr.h
index 212539101..c9a567544 100644
--- a/extras/freetype2/include/freetype/ftpfr.h
+++ b/extras/freetype2/include/freetype/ftpfr.h
@@ -2,9 +2,9 @@
/* */
/* ftpfr.h */
/* */
-/* FreeType API for accessing PFR-specific data */
+/* FreeType API for accessing PFR-specific data (specification only). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,6 +22,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
@@ -49,42 +55,44 @@ FT_BEGIN_HEADER
* FT_Get_PFR_Metrics
*
* @description:
- * returns the outline and metrics resolutions of a given PFR
- * face.
+ * Return the outline and metrics resolutions of a given PFR face.
*
* @input:
- * face :: handle to input face. It can be a non-PFR face.
+ * face :: Handle to the input face. It can be a non-PFR face.
*
* @output:
* aoutline_resolution ::
- * outline resolution. This is equivalent to "face->units_per_EM".
- * optional (parameter can be NULL)
+ * Outline resolution. This is equivalent to `face->units_per_EM'.
+ * Optional (parameter can be NULL).
*
* ametrics_resolution ::
- * metrics_resolution. This is equivalent to "outline_resolution"
- * for non-PFR fonts. can be NULL
- * optional (parameter can be NULL)
+ * Metrics resolution. This is equivalent to `outline_resolution'
+ * for non-PFR fonts. Optional (parameter can be NULL).
*
* ametrics_x_scale ::
- * a 16.16 fixed-point number used to scale distance expressed
- * in metrics units to device sub-pixels. This is equivalent to
- * 'face->size->x_scale', but for metrics only.
- * optional (parameter can be NULL)
+ * A 16.16 fixed-point number used to scale distance expressed
+ * in metrics units to device sub-pixels. This is equivalent to
+ * `face->size->x_scale', but for metrics only. Optional (parameter
+ * can be NULL)
*
* ametrics_y_scale ::
- * same as 'ametrics_x_scale', but for the vertical direction.
+ * Same as `ametrics_x_scale' but for the vertical direction.
* optional (parameter can be NULL)
*
+ * @return:
+ * FreeType error code. 0 means success.
+ *
* @note:
- * if the input face is not a PFR, this function will return an error.
+ * If the input face is not a PFR, this function will return an error.
* However, in all cases, it will return valid values.
*/
FT_EXPORT( FT_Error )
- FT_Get_PFR_Metrics( FT_Face face,
- FT_UInt *aoutline_resolution,
- FT_UInt *ametrics_resolution,
- FT_Fixed *ametrics_x_scale,
- FT_Fixed *ametrics_y_scale );
+ FT_Get_PFR_Metrics( FT_Face face,
+ FT_UInt *aoutline_resolution,
+ FT_UInt *ametrics_resolution,
+ FT_Fixed *ametrics_x_scale,
+ FT_Fixed *ametrics_y_scale );
+
/**********************************************************************
*
@@ -92,25 +100,30 @@ FT_BEGIN_HEADER
* FT_Get_PFR_Kerning
*
* @description:
- * returns the kerning pair corresponding to two glyphs in
- * a PFR face. The distance is expressed in metrics units, unlike
- * the result of @FT_Get_Kerning.
+ * Return the kerning pair corresponding to two glyphs in a PFR face.
+ * The distance is expressed in metrics units, unlike the result of
+ * @FT_Get_Kerning.
*
* @input:
- * face :: handle to input face.
- * left :: left glyph index
- * right :: right glyph index
+ * face :: A handle to the input face.
+ *
+ * left :: Index of the left glyph.
+ *
+ * right :: Index of the right glyph.
*
* @output:
- * avector :: kerning vector
+ * avector :: A kerning vector.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
*
* @note:
- * this function always return distances in original PFR metrics
- * units. This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED
- * mode, which always return distances converted to outline units.
+ * This function always return distances in original PFR metrics
+ * units. This is unlike @FT_Get_Kerning with the @FT_KERNING_UNSCALED
+ * mode, which always returns distances converted to outline units.
*
- * you can use the value of the 'x_scale' and 'y_scale' parameters
- * returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels
+ * You can use the value of the `x_scale' and `y_scale' parameters
+ * returned by @FT_Get_PFR_Metrics to scale these to device sub-pixels.
*/
FT_EXPORT( FT_Error )
FT_Get_PFR_Kerning( FT_Face face,
@@ -118,36 +131,39 @@ FT_BEGIN_HEADER
FT_UInt right,
FT_Vector *avector );
+
/**********************************************************************
*
* @function:
* FT_Get_PFR_Advance
*
* @description:
- * returns a given glyph advance, expressed in original metrics units,
+ * Return a given glyph advance, expressed in original metrics units,
* from a PFR font.
*
* @input:
- * face :: handle to input face.
- * gindex :: glyph index
+ * face :: A handle to the input face.
+ *
+ * gindex :: The glyph index.
*
* @output:
- * aadvance :: glyph advance in metrics units
+ * aadvance :: The glyph advance in metrics units.
*
* @return:
- * error code. 0 means success
+ * FreeType error code. 0 means success.
*
* @note:
- * you can use the 'x_scale' or 'y_scale' results of @FT_Get_PFR_Metrics
- * to convert the advance to device sub-pixels (i.e. 1/64th of pixels)
+ * You can use the `x_scale' or `y_scale' results of @FT_Get_PFR_Metrics
+ * to convert the advance to device sub-pixels (i.e. 1/64th of pixels).
*/
FT_EXPORT( FT_Error )
- FT_Get_PFR_Advance( FT_Face face,
- FT_UInt gindex,
- FT_Pos *aadvance );
+ FT_Get_PFR_Advance( FT_Face face,
+ FT_UInt gindex,
+ FT_Pos *aadvance );
/* */
+
FT_END_HEADER
#endif /* __FTBDF_H__ */
diff --git a/extras/freetype2/include/freetype/ftsizes.h b/extras/freetype2/include/freetype/ftsizes.h
index 0fd6f0ffb..f0ec91599 100644
--- a/extras/freetype2/include/freetype/ftsizes.h
+++ b/extras/freetype2/include/freetype/ftsizes.h
@@ -4,7 +4,7 @@
/* */
/* FreeType size objects management (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -32,6 +32,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
@@ -101,7 +107,9 @@ FT_BEGIN_HEADER
/* FT_Done_Size */
/* */
/* <Description> */
- /* Discards a given size object. */
+ /* Discards a given size object. Note that @FT_Done_Face */
+ /* automatically discards all size objects allocated with */
+ /* @FT_New_Size. */
/* */
/* <Input> */
/* size :: A handle to a target size object. */
diff --git a/extras/freetype2/include/freetype/ftsnames.h b/extras/freetype2/include/freetype/ftsnames.h
index 356f98349..0e2d9a4ad 100644
--- a/extras/freetype2/include/freetype/ftsnames.h
+++ b/extras/freetype2/include/freetype/ftsnames.h
@@ -7,7 +7,7 @@
/* */
/* This is _not_ used to retrieve glyph names! */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -26,6 +26,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/extras/freetype2/include/freetype/ftstroke.h b/extras/freetype2/include/freetype/ftstroke.h
new file mode 100644
index 000000000..a3052e858
--- /dev/null
+++ b/extras/freetype2/include/freetype/ftstroke.h
@@ -0,0 +1,686 @@
+/***************************************************************************/
+/* */
+/* ftstroke.h */
+/* */
+/* FreeType path stroker (specification). */
+/* */
+/* Copyright 2002, 2003, 2004 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __FT_STROKE_H__
+#define __FT_STROKE_H__
+
+#include <ft2build.h>
+#include FT_OUTLINE_H
+#include FT_GLYPH_H
+
+FT_BEGIN_HEADER
+
+ /*@*************************************************************
+ *
+ * @type:
+ * FT_Stroker
+ *
+ * @description:
+ * Opaque handler to a path stroker object.
+ */
+ typedef struct FT_StrokerRec_* FT_Stroker;
+
+
+ /*@*************************************************************
+ *
+ * @enum:
+ * FT_Stroker_LineJoin
+ *
+ * @description:
+ * These values determine how two joining lines are rendered
+ * in a stroker.
+ *
+ * @values:
+ * FT_STROKER_LINEJOIN_ROUND ::
+ * Used to render rounded line joins. Circular arcs are used
+ * to join two lines smoothly.
+ *
+ * FT_STROKER_LINEJOIN_BEVEL ::
+ * Used to render beveled line joins; i.e., the two joining lines
+ * are extended until they intersect.
+ *
+ * FT_STROKER_LINEJOIN_MITER ::
+ * Same as beveled rendering, except that an additional line
+ * break is added if the angle between the two joining lines
+ * is too closed (this is useful to avoid unpleasant spikes
+ * in beveled rendering).
+ */
+ typedef enum
+ {
+ FT_STROKER_LINEJOIN_ROUND = 0,
+ FT_STROKER_LINEJOIN_BEVEL,
+ FT_STROKER_LINEJOIN_MITER
+
+ } FT_Stroker_LineJoin;
+
+
+ /*@*************************************************************
+ *
+ * @enum:
+ * FT_Stroker_LineCap
+ *
+ * @description:
+ * These values determine how the end of opened sub-paths are
+ * rendered in a stroke.
+ *
+ * @values:
+ * FT_STROKER_LINECAP_BUTT ::
+ * The end of lines is rendered as a full stop on the last
+ * point itself.
+ *
+ * FT_STROKER_LINECAP_ROUND ::
+ * The end of lines is rendered as a half-circle around the
+ * last point.
+ *
+ * FT_STROKER_LINECAP_SQUARE ::
+ * The end of lines is rendered as a square around the
+ * last point.
+ */
+ typedef enum
+ {
+ FT_STROKER_LINECAP_BUTT = 0,
+ FT_STROKER_LINECAP_ROUND,
+ FT_STROKER_LINECAP_SQUARE
+
+ } FT_Stroker_LineCap;
+
+
+ /**************************************************************
+ *
+ * @enum:
+ * FT_StrokerBorder
+ *
+ * @description:
+ * These values are used to select a given stroke border
+ * in @FT_Stroker_GetBorderCounts and @FT_Stroker_ExportBorder.
+ *
+ * @values:
+ * FT_STROKER_BORDER_LEFT ::
+ * Select the left border, relative to the drawing direction.
+ *
+ * FT_STROKER_BORDER_RIGHT ::
+ * Select the right border, relative to the drawing direction.
+ *
+ * @note:
+ * Applications are generally interested in the `inside' and `outside'
+ * borders. However, there is no direct mapping between these and
+ * the `left' / `right' ones, since this really depends on the glyph's
+ * drawing orientation, which varies between font formats.
+ *
+ * You can however use @FT_Outline_GetInsideBorder and
+ * @FT_Outline_GetOutsideBorder to get these.
+ */
+ typedef enum
+ {
+ FT_STROKER_BORDER_LEFT = 0,
+ FT_STROKER_BORDER_RIGHT
+
+ } FT_StrokerBorder;
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Outline_GetInsideBorder
+ *
+ * @description:
+ * Retrieve the @FT_StrokerBorder value corresponding to the
+ * `inside' borders of a given outline.
+ *
+ * @input:
+ * outline ::
+ * The source outline handle.
+ *
+ * @return:
+ * The border index. @FT_STROKER_BORDER_LEFT for empty or invalid
+ * outlines.
+ */
+ FT_EXPORT( FT_StrokerBorder )
+ FT_Outline_GetInsideBorder( FT_Outline* outline );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Outline_GetOutsideBorder
+ *
+ * @description:
+ * Retrieve the @FT_StrokerBorder value corresponding to the
+ * `outside' borders of a given outline.
+ *
+ * @input:
+ * outline ::
+ * The source outline handle.
+ *
+ * @return:
+ * The border index. @FT_STROKER_BORDER_LEFT for empty or invalid
+ * outlines.
+ */
+ FT_EXPORT( FT_StrokerBorder )
+ FT_Outline_GetOutsideBorder( FT_Outline* outline );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_New
+ *
+ * @description:
+ * Create a new stroker object.
+ *
+ * @input:
+ * memory ::
+ * The memory manager handle.
+ *
+ * @output:
+ * A new stroker object handle. NULL in case of error.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Stroker_New( FT_Memory memory,
+ FT_Stroker *astroker );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_Set
+ *
+ * @description:
+ * Reset a stroker object's attributes.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * radius ::
+ * The border radius.
+ *
+ * line_cap ::
+ * The line cap style.
+ *
+ * line_join ::
+ * The line join style.
+ *
+ * miter_limit ::
+ * The miter limit for the FT_STROKER_LINEJOIN_MITER style,
+ * expressed as 16.16 fixed point value.
+ *
+ * @note:
+ * The radius is expressed in the same units that the outline
+ * coordinates.
+ */
+ FT_EXPORT( void )
+ FT_Stroker_Set( FT_Stroker stroker,
+ FT_Fixed radius,
+ FT_Stroker_LineCap line_cap,
+ FT_Stroker_LineJoin line_join,
+ FT_Fixed miter_limit );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_Rewind
+ *
+ * @description:
+ * Reset a stroker object without changing its attributes.
+ * You should call this function before beginning a new
+ * series of calls to @FT_Stroker_BeginSubPath or
+ * @FT_Stroker_EndSubPath.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ */
+ FT_EXPORT( void )
+ FT_Stroker_Rewind( FT_Stroker stroker );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_ParseOutline
+ *
+ * @description:
+ * A convenience function used to parse a whole outline with
+ * the stroker. The resulting outline(s) can be retrieved
+ * later by functions like @FT_Stroker_GetCounts and @FT_Stroker_Export.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * outline ::
+ * The source outline.
+ *
+ * opened ::
+ * A boolean. If TRUE, the outline is treated as an open path
+ * instead of a closed one.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * If `opened' is 0 (the default), the outline is treated as a closed
+ * path, and the stroker will generate two distinct `border' outlines.
+ *
+ * If `opened' is 1, the outline is processed as an open path, and the
+ * stroker will generate a single `stroke' outline.
+ *
+ * This function calls @FT_Stroker_Rewind automatically.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Stroker_ParseOutline( FT_Stroker stroker,
+ FT_Outline* outline,
+ FT_Bool opened );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_BeginSubPath
+ *
+ * @description:
+ * Start a new sub-path in the stroker.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * to ::
+ * A pointer to the start vector.
+ *
+ * open ::
+ * A boolean. If TRUE, the sub-path is treated as an open one.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * This function is useful when you need to stroke a path that is
+ * not stored as a @FT_Outline object.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Stroker_BeginSubPath( FT_Stroker stroker,
+ FT_Vector* to,
+ FT_Bool open );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_EndSubPath
+ *
+ * @description:
+ * Close the current sub-path in the stroker.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * You should call this function after @FT_Stroker_BeginSubPath.
+ * If the subpath was not `opened', this function will `draw' a
+ * single line segment to the start position when needed.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Stroker_EndSubPath( FT_Stroker stroker );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_LineTo
+ *
+ * @description:
+ * `Draw' a single line segment in the stroker's current sub-path,
+ * from the last position.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * to ::
+ * A pointer to the destination point.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * You should call this function between @FT_Stroker_BeginSubPath and
+ * @FT_Stroker_EndSubPath.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Stroker_LineTo( FT_Stroker stroker,
+ FT_Vector* to );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_ConicTo
+ *
+ * @description:
+ * `Draw; a single quadratic bezier in the stroker's current sub-path,
+ * from the last position.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * control ::
+ * A pointer to a Bzier control point.
+ *
+ * to ::
+ * A pointer to the destination point.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * You should call this function between @FT_Stroker_BeginSubPath and
+ * @FT_Stroker_EndSubPath.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Stroker_ConicTo( FT_Stroker stroker,
+ FT_Vector* control,
+ FT_Vector* to );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_CubicTo
+ *
+ * @description:
+ * `Draw' a single cubic Bzier in the stroker's current sub-path,
+ * from the last position.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * control1 ::
+ * A pointer to the first Bzier control point.
+ *
+ * control2 ::
+ * A pointer to second Bzier control point.
+ *
+ * to ::
+ * A pointer to the destination point.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * You should call this function between @FT_Stroker_BeginSubPath and
+ * @FT_Stroker_EndSubPath.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Stroker_CubicTo( FT_Stroker stroker,
+ FT_Vector* control1,
+ FT_Vector* control2,
+ FT_Vector* to );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_GetBorderCounts
+ *
+ * @description:
+ * Vall this function once you have finished parsing your paths
+ * with the stroker. It will return the number of points and
+ * contours necessary to export one of the `border' or `stroke'
+ * outlines generated by the stroker.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * border ::
+ * The border index.
+ *
+ * @output:
+ * anum_points ::
+ * The number of points.
+ *
+ * anum_contours ::
+ * The number of contours.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * When an outline, or a sub-path, is `closed', the stroker generates
+ * two independent `border' outlines, named `left' and `right'.
+ *
+ * When the outline, or a sub-path, is `opened', the stroker merges
+ * the `border' outlines with caps. The `left' border receives all
+ * points, while the `right' border becomes empty.
+ *
+ * Use the function @FT_Stroker_GetCounts instead if you want to
+ * retrieve the counts associated to both borders.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Stroker_GetBorderCounts( FT_Stroker stroker,
+ FT_StrokerBorder border,
+ FT_UInt *anum_points,
+ FT_UInt *anum_contours );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_ExportBorder
+ *
+ * @description:
+ * Call this function after @FT_Stroker_GetBorderCounts to
+ * export the corresponding border to your own @FT_Outline
+ * structure.
+ *
+ * Note that this function will append the border points and
+ * contours to your outline, but will not try to resize its
+ * arrays.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * border ::
+ * The border index.
+ *
+ * outline ::
+ * The target outline handle.
+ *
+ * @note:
+ * Always call this function after @FT_Stroker_GetBorderCounts to
+ * get sure that there is enough room in your @FT_Outline object to
+ * receive all new data.
+ *
+ * When an outline, or a sub-path, is `closed', the stroker generates
+ * two independent `border' outlines, named `left' and `right'
+ *
+ * When the outline, or a sub-path, is `opened', the stroker merges
+ * the `border' outlines with caps. The `left' border receives all
+ * points, while the `right' border becomes empty.
+ *
+ * Use the function @FT_Stroker_Export instead if you want to
+ * retrieve all borders at once.
+ */
+ FT_EXPORT( void )
+ FT_Stroker_ExportBorder( FT_Stroker stroker,
+ FT_StrokerBorder border,
+ FT_Outline* outline );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_GetCounts
+ *
+ * @description:
+ * Call this function once you have finished parsing your paths
+ * with the stroker. It returns the number of points and
+ * contours necessary to export all points/borders from the stroked
+ * outline/path.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * @output:
+ * anum_points ::
+ * The number of points.
+ *
+ * anum_contours ::
+ * The number of contours.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Stroker_GetCounts( FT_Stroker stroker,
+ FT_UInt *anum_points,
+ FT_UInt *anum_contours );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_Export
+ *
+ * @description:
+ * Call this function after @FT_Stroker_GetBorderCounts to
+ * export the all borders to your own @FT_Outline structure.
+ *
+ * Note that this function will append the border points and
+ * contours to your outline, but will not try to resize its
+ * arrays.
+ *
+ * @input:
+ * stroker ::
+ * The target stroker handle.
+ *
+ * outline ::
+ * The target outline handle.
+ */
+ FT_EXPORT( void )
+ FT_Stroker_Export( FT_Stroker stroker,
+ FT_Outline* outline );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Stroker_Done
+ *
+ * @description:
+ * Destroy a stroker object.
+ *
+ * @input:
+ * stroker ::
+ * A stroker handle. Can be NULL.
+ */
+ FT_EXPORT( void )
+ FT_Stroker_Done( FT_Stroker stroker );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Glyph_Stroke
+ *
+ * @description:
+ * Stroke a given outline glyph object with a given stroker.
+ *
+ * @inout:
+ * pglyph :: Source glyph handle on input, new glyph handle
+ * on output.
+ *
+ * @input:
+ * stroker ::
+ * A stroker handle.
+ *
+ * destroy ::
+ * A Boolean. If TRUE, the source glyph object is destroyed
+ * on success.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * The source glyph is untouched in case of error.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Glyph_Stroke( FT_Glyph *pglyph,
+ FT_Stroker stroker,
+ FT_Bool destroy );
+
+
+ /**************************************************************
+ *
+ * @function:
+ * FT_Glyph_StrokeBorder
+ *
+ * @description:
+ * Stroke a given outline glyph object with a given stroker, but
+ * only return either its inside or outside border.
+ *
+ * @inout:
+ * pglyph ::
+ * Source glyph handle on input, new glyph handle on output.
+ *
+ * @input:
+ * stroker ::
+ * A stroker handle.
+ *
+ * inside ::
+ * A Boolean. If TRUE, return the inside border, otherwise
+ * the outside border.
+ *
+ * destroy ::
+ * A Boolean. If TRUE, the source glyph object is destroyed
+ * on success.
+ *
+ * @return:
+ * FreeType error code. 0 means success.
+ *
+ * @note:
+ * The source glyph is untouched in case of error.
+ */
+ FT_EXPORT( FT_Error )
+ FT_Glyph_StrokeBorder( FT_Glyph *pglyph,
+ FT_Stroker stroker,
+ FT_Bool inside,
+ FT_Bool destroy );
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __FT_STROKE_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/ftsynth.h b/extras/freetype2/include/freetype/ftsynth.h
index 2424ff627..f0c738532 100644
--- a/extras/freetype2/include/freetype/ftsynth.h
+++ b/extras/freetype2/include/freetype/ftsynth.h
@@ -5,7 +5,7 @@
/* FreeType synthesizing code for emboldening and slanting */
/* (specification). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -41,6 +41,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/extras/freetype2/include/freetype/fttrigon.h b/extras/freetype2/include/freetype/fttrigon.h
index 3b8257b6d..0462265e3 100644
--- a/extras/freetype2/include/freetype/fttrigon.h
+++ b/extras/freetype2/include/freetype/fttrigon.h
@@ -4,7 +4,7 @@
/* */
/* FreeType trigonometric functions (specification). */
/* */
-/* Copyright 2001 by */
+/* Copyright 2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,6 +21,12 @@
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
@@ -260,22 +266,6 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* @function: */
- /* FT_Vector_Normalize */
- /* */
- /* @description: */
- /* Normalize a given vector (i.e. compute the equivalent unit */
- /* vector). */
- /* */
- /* @inout: */
- /* vec :: The address of target vector. */
- /* */
- FT_EXPORT( void )
- FT_Vector_Normalize( FT_Vector* vec );
-
-
- /*************************************************************************/
- /* */
- /* @function: */
/* FT_Vector_Polarize */
/* */
/* @description: */
diff --git a/extras/freetype2/include/freetype/ftwinfnt.h b/extras/freetype2/include/freetype/ftwinfnt.h
index 6d29fe16a..a19a12d97 100644
--- a/extras/freetype2/include/freetype/ftwinfnt.h
+++ b/extras/freetype2/include/freetype/ftwinfnt.h
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing Windows fnt-specific data. */
/* */
-/* Copyright 2002 by */
+/* Copyright 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,6 +22,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
@@ -43,10 +49,132 @@ FT_BEGIN_HEADER
/* */
/*************************************************************************/
+
+ /*************************************************************************
+ *
+ * @enum:
+ * FT_WinFNT_ID_XXX
+ *
+ * @description:
+ * A list of valid values for the `charset' byte in
+ * @FT_WinFNT_HeaderRec. Exact mapping tables for the various cpXXXX
+ * encodings (except for cp1361) can be found at ftp://ftp.unicode.org
+ * in the MAPPINGS/VENDORS/MICSFT/WINDOWS subdirectory. cp1361 is
+ * roughly a superset of MAPPINGS/OBSOLETE/EASTASIA/KSC/JOHAB.TXT.
+ *
+ * @values:
+ * FT_WinFNT_ID_DEFAULT ::
+ * This is used for font enumeration and font creation as a
+ * `don't care' value. Valid font files don't contain this value.
+ * When querying for information about the character set of the font
+ * that is currently selected into a specified device context, this
+ * return value (of the related Windows API) simply denotes failure.
+ *
+ * FT_WinFNT_ID_SYMBOL ::
+ * There is no known mapping table available.
+ *
+ * FT_WinFNT_ID_MAC ::
+ * Mac Roman encoding.
+ *
+ * FT_WinFNT_ID_OEM ::
+ * From Michael Pttgen <michael@poettgen.de>:
+ * The `Windows Font Mapping' article says that FT_WinFNT_ID_OEM
+ * is used for the charset of vector fonts, like `modern.fon',
+ * `roman.fon', and `script.fon' on Windows.
+ *
+ * The `CreateFont' documentation says: The FT_WinFNT_ID_OEM value
+ * specifies a character set that is operating-system dependent.
+ *
+ * The `IFIMETRICS' documentation from the `Windows Driver
+ * Development Kit' says: This font supports an OEM-specific
+ * character set. The OEM character set is system dependent.
+ *
+ * In general OEM, as opposed to ANSI (i.e., cp1252), denotes the
+ * second default codepage that most international versions of
+ * Windows have. It is one of the OEM codepages from
+ *
+ * http://www.microsoft.com/globaldev/reference/cphome.mspx,
+ *
+ * and is used for the `DOS boxes', to support legacy applications.
+ * A German Windows version for example usually uses ANSI codepage
+ * 1252 and OEM codepage 850.
+ *
+ * FT_WinFNT_ID_CP874 ::
+ * A superset of Thai TIS 620 and ISO 8859-11.
+ *
+ * FT_WinFNT_ID_CP932 ::
+ * A superset of Japanese Shift-JIS (with minor deviations).
+ *
+ * FT_WinFNT_ID_CP936 ::
+ * A superset of simplified Chinese GB 2312-1980 (with different
+ * ordering and minor deviations).
+ *
+ * FT_WinFNT_ID_CP949 ::
+ * A superset of Korean Hangul KS C 5601-1987 (with different
+ * ordering and minor deviations).
+ *
+ * FT_WinFNT_ID_CP950 ::
+ * A superset of traditional Chinese Big 5 ETen (with different
+ * ordering and minor deviations).
+ *
+ * FT_WinFNT_ID_CP1250 ::
+ * A superset of East European ISO 8859-2 (with slightly different
+ * ordering).
+ *
+ * FT_WinFNT_ID_CP1251 ::
+ * A superset of Russian ISO 8859-5 (with different ordering).
+ *
+ * FT_WinFNT_ID_CP1252 ::
+ * ANSI encoding. A superset of ISO 8859-1.
+ *
+ * FT_WinFNT_ID_CP1253 ::
+ * A superset of Greek ISO 8859-7 (with minor modifications).
+ *
+ * FT_WinFNT_ID_CP1254 ::
+ * A superset of Turkish ISO 8859-9.
+ *
+ * FT_WinFNT_ID_CP1255 ::
+ * A superset of Hebrew ISO 8859-8 (with some modifications).
+ *
+ * FT_WinFNT_ID_CP1256 ::
+ * A superset of Arabic ISO 8859-6 (with different ordering).
+ *
+ * FT_WinFNT_ID_CP1257 ::
+ * A superset of Baltic ISO 8859-13 (with some deviations).
+ *
+ * FT_WinFNT_ID_CP1258 ::
+ * For Vietnamese. This encoding doesn't cover all necessary
+ * characters.
+ *
+ * FT_WinFNT_ID_CP1361 ::
+ * Korean (Johab).
+ */
+
+#define FT_WinFNT_ID_CP1252 0
+#define FT_WinFNT_ID_DEFAULT 1
+#define FT_WinFNT_ID_SYMBOL 2
+#define FT_WinFNT_ID_MAC 77
+#define FT_WinFNT_ID_CP932 128
+#define FT_WinFNT_ID_CP949 129
+#define FT_WinFNT_ID_CP1361 130
+#define FT_WinFNT_ID_CP936 134
+#define FT_WinFNT_ID_CP950 136
+#define FT_WinFNT_ID_CP1253 161
+#define FT_WinFNT_ID_CP1254 162
+#define FT_WinFNT_ID_CP1258 163
+#define FT_WinFNT_ID_CP1255 177
+#define FT_WinFNT_ID_CP1256 178
+#define FT_WinFNT_ID_CP1257 186
+#define FT_WinFNT_ID_CP1251 204
+#define FT_WinFNT_ID_CP874 222
+#define FT_WinFNT_ID_CP1250 238
+#define FT_WinFNT_ID_OEM 255
+
+
/*************************************************************************/
/* */
/* <Struct> */
- /* FT_WinFNT_HeaderRec_ */
+ /* FT_WinFNT_HeaderRec */
/* */
/* <Description> */
/* Windows FNT Header info. */
@@ -93,31 +221,31 @@ FT_BEGIN_HEADER
} FT_WinFNT_HeaderRec, *FT_WinFNT_Header;
-
/**********************************************************************
*
* @function:
* FT_Get_WinFNT_Header
*
* @description:
- * Retrieves a Windows FNT font info header.
+ * Retrieve a Windows FNT font info header.
*
* @input:
- * face :: handle to input face
+ * face :: A handle to the input face.
*
* @output:
- * header :: WinFNT header.
+ * aheader :: The WinFNT header.
*
* @return:
* FreeType error code. 0 means success.
*
* @note:
- * This function only works with Windows FNT faces, returning an erro
+ * This function only works with Windows FNT faces, returning an error
* otherwise.
*/
FT_EXPORT( FT_Error )
- FT_Get_WinFNT_Header( FT_Face face,
- FT_WinFNT_HeaderRec *header );
+ FT_Get_WinFNT_Header( FT_Face face,
+ FT_WinFNT_HeaderRec *aheader );
+
/* */
diff --git a/extras/freetype2/include/freetype/ftxf86.h b/extras/freetype2/include/freetype/ftxf86.h
index 5a7582f91..3362883cb 100644
--- a/extras/freetype2/include/freetype/ftxf86.h
+++ b/extras/freetype2/include/freetype/ftxf86.h
@@ -4,7 +4,7 @@
/* */
/* Support functions for X11. */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,6 +22,13 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
FT_BEGIN_HEADER
/* this comment is intentionally disabled for now, to prevent this */
@@ -43,7 +50,7 @@ FT_BEGIN_HEADER
/* <Return> */
/* Font format string. NULL in case of error. */
/* */
- FT_EXPORT_DEF( const char* )
+ FT_EXPORT( const char* )
FT_Get_X11_Font_Format( FT_Face face );
/* */
diff --git a/extras/freetype2/include/freetype/internal/ftcalc.h b/extras/freetype2/include/freetype/internal/ftcalc.h
index af1f64072..7866c4627 100644
--- a/extras/freetype2/include/freetype/internal/ftcalc.h
+++ b/extras/freetype2/include/freetype/internal/ftcalc.h
@@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,7 +27,8 @@
FT_BEGIN_HEADER
- FT_EXPORT( FT_Int32 ) FT_SqrtFixed( FT_Int32 x );
+ FT_EXPORT( FT_Int32 )
+ FT_SqrtFixed( FT_Int32 x );
#define SQRT_32( x ) FT_Sqrt32( x )
@@ -59,6 +60,39 @@ FT_BEGIN_HEADER
/*************************************************************************/
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_MulDiv_No_Round */
+ /* */
+ /* <Description> */
+ /* A very simple function used to perform the computation `(a*b)/c' */
+ /* (without rounding) with maximal accuracy (it uses a 64-bit */
+ /* intermediate integer whenever necessary). */
+ /* */
+ /* This function isn't necessarily as fast as some processor specific */
+ /* operations, but is at least completely portable. */
+ /* */
+ /* <Input> */
+ /* a :: The first multiplier. */
+ /* b :: The second multiplier. */
+ /* c :: The divisor. */
+ /* */
+ /* <Return> */
+ /* The result of `(a*b)/c'. This function never traps when trying to */
+ /* divide by zero; it simply returns `MaxInt' or `MinInt' depending */
+ /* on the signs of `a' and `b'. */
+ /* */
+ FT_BASE( FT_Long )
+ FT_MulDiv_No_Round( FT_Long a,
+ FT_Long b,
+ FT_Long c );
+
+#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+
+
#define INT_TO_F26DOT6( x ) ( (FT_Long)(x) << 6 )
#define INT_TO_F2DOT14( x ) ( (FT_Long)(x) << 14 )
#define INT_TO_FIXED( x ) ( (FT_Long)(x) << 16 )
diff --git a/extras/freetype2/include/freetype/internal/ftdebug.h b/extras/freetype2/include/freetype/internal/ftdebug.h
index 129c91f6a..ce142c54c 100644
--- a/extras/freetype2/include/freetype/internal/ftdebug.h
+++ b/extras/freetype2/include/freetype/internal/ftdebug.h
@@ -4,7 +4,7 @@
/* */
/* Debugging and logging component (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,6 +27,7 @@
#include <ft2build.h>
#include FT_CONFIG_CONFIG_H
+#include FT_FREETYPE_H
FT_BEGIN_HEADER
@@ -98,6 +99,53 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* <Function> */
+ /* FT_Trace_Get_Count */
+ /* */
+ /* <Description> */
+ /* Return the number of available trace components. */
+ /* */
+ /* <Return> */
+ /* The number of trace components. 0 if FreeType 2 is not built with */
+ /* FT_DEBUG_LEVEL_TRACE definition. */
+ /* */
+ /* <Note> */
+ /* This function may be useful if you want to access elements of */
+ /* the internal `ft_trace_levels' array by an index. */
+ /* */
+ FT_EXPORT( FT_Int )
+ FT_Trace_Get_Count( void );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Trace_Get_Name */
+ /* */
+ /* <Description> */
+ /* Return the name of a trace component. */
+ /* */
+ /* <Input> */
+ /* The index of the trace component. */
+ /* */
+ /* <Return> */
+ /* The name of the trace component. This is a statically allocated */
+ /* C string, so do not free it after use. NULL if FreeType 2 is not */
+ /* built with FT_DEBUG_LEVEL_TRACE definition. */
+ /* */
+ /* <Note> */
+ /* Use @FT_Trace_Get_Count to get the number of available trace */
+ /* components. */
+ /* */
+ /* This function may be useful if you want to control FreeType 2's */
+ /* debug level in your appliaciton. */
+ /* */
+ FT_EXPORT( const char * )
+ FT_Trace_Get_Name( FT_Int idx );
+
+
+ /*************************************************************************/
+ /* */
/* You need two opening resp. closing parentheses! */
/* */
/* Example: FT_TRACE0(( "Value is %i", foo )) */
diff --git a/extras/freetype2/include/freetype/internal/ftdriver.h b/extras/freetype2/include/freetype/internal/ftdriver.h
index 9323910b2..02f585d6b 100644
--- a/extras/freetype2/include/freetype/internal/ftdriver.h
+++ b/extras/freetype2/include/freetype/internal/ftdriver.h
@@ -4,7 +4,7 @@
/* */
/* FreeType font driver interface (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -155,11 +155,15 @@ FT_BEGIN_HEADER
/* add data from AFM or PFM files on a Type 1 */
/* face, or a CIDMap on a CID-keyed face. */
/* */
- /* get_advances :: A function handle used to return the advances */
- /* of 'count' glyphs, starting at `index'. the */
- /* `vertical' flags must be set when vertical */
- /* advances are queried. The advances buffer is */
- /* caller-allocated. */
+ /* get_advances :: A function handle used to return advance */
+ /* widths of 'count' glyphs (in font units), */
+ /* starting at `first'. The `vertical' flag must */
+ /* be set to get vertical advance heights. The */
+ /* `advances' buffer is caller-allocated. */
+ /* Currently not implemented. The idea of this */
+ /* function is to be able to perform */
+ /* device-independent text layout without loading */
+ /* a single glyph image. */
/* */
/* <Note> */
/* Most function pointers, with the exception of `load_glyph' and */
@@ -169,9 +173,9 @@ FT_BEGIN_HEADER
{
FT_Module_Class root;
- FT_Int face_object_size;
- FT_Int size_object_size;
- FT_Int slot_object_size;
+ FT_Long face_object_size;
+ FT_Long size_object_size;
+ FT_Long slot_object_size;
FT_Face_InitFunc init_face;
FT_Face_DoneFunc done_face;
diff --git a/extras/freetype2/include/freetype/internal/ftgloadr.h b/extras/freetype2/include/freetype/internal/ftgloadr.h
index d66d10b19..abc56e256 100644
--- a/extras/freetype2/include/freetype/internal/ftgloadr.h
+++ b/extras/freetype2/include/freetype/internal/ftgloadr.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph loader (specification). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -52,12 +52,6 @@ FT_BEGIN_HEADER
#define FT_SUBGLYPH_FLAG_USE_MY_METRICS 0x200
- enum
- {
- FT_GLYPH_OWN_BITMAP = 1
- };
-
-
typedef struct FT_SubGlyphRec_
{
FT_Int index;
@@ -116,15 +110,15 @@ FT_BEGIN_HEADER
FT_BASE( void )
FT_GlyphLoader_Rewind( FT_GlyphLoader loader );
- /* check that there is enough room to add 'n_points' and 'n_contours' */
- /* to the glyph loader */
+ /* check that there is enough space to add `n_points' and `n_contours' */
+ /* to the glyph loader */
FT_BASE( FT_Error )
FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader,
FT_UInt n_points,
FT_UInt n_contours );
- /* check that there is enough room to add 'n_subs' sub-glyphs to */
- /* a glyph loader */
+ /* check that there is enough space to add `n_subs' sub-glyphs to */
+ /* a glyph loader */
FT_BASE( FT_Error )
FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader,
FT_UInt n_subs );
diff --git a/extras/freetype2/include/freetype/internal/ftmemory.h b/extras/freetype2/include/freetype/internal/ftmemory.h
index cbe66d7f8..63f37aff7 100644
--- a/extras/freetype2/include/freetype/internal/ftmemory.h
+++ b/extras/freetype2/include/freetype/internal/ftmemory.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType memory management macros (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -141,7 +141,7 @@ FT_BEGIN_HEADER
FT_Realloc( FT_Memory memory,
FT_Long current,
FT_Long size,
- void** P );
+ void* *P );
/*************************************************************************/
@@ -159,17 +159,14 @@ FT_BEGIN_HEADER
/* P :: This is the _address_ of a _pointer_ which points to the */
/* allocated block. It is always set to NULL on exit. */
/* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
/* <Note> */
- /* If P or *P are NULL, this function should return successfully. */
+ /* If P or *P is NULL, this function should return successfully. */
/* This is a strong convention within all of FreeType and its */
/* drivers. */
/* */
FT_BASE( void )
FT_Free( FT_Memory memory,
- void** P );
+ void* *P );
#define FT_MEM_SET( dest, byte, count ) ft_memset( dest, byte, count )
@@ -183,6 +180,12 @@ FT_BEGIN_HEADER
#define FT_ZERO( p ) FT_MEM_ZERO( p, sizeof ( *(p) ) )
+#define FT_ARRAY_COPY( dest, source, count ) \
+ FT_MEM_COPY( dest, source, (count) * sizeof( *(dest) ) )
+
+#define FT_ARRAY_MOVE( dest, source, count ) \
+ FT_MEM_MOVE( dest, source, (count) * sizeof( *(dest) ) )
+
/*************************************************************************/
/* */
diff --git a/extras/freetype2/include/freetype/internal/ftobjs.h b/extras/freetype2/include/freetype/internal/ftobjs.h
index 927615086..3a28119af 100644
--- a/extras/freetype2/include/freetype/internal/ftobjs.h
+++ b/extras/freetype2/include/freetype/internal/ftobjs.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -34,7 +34,7 @@
#include FT_INTERNAL_GLYPH_LOADER_H
#include FT_INTERNAL_DRIVER_H
#include FT_INTERNAL_AUTOHINT_H
-#include FT_INTERNAL_OBJECT_H
+#include FT_INTERNAL_SERVICE_H
#ifdef FT_CONFIG_OPTION_INCREMENTAL
#include FT_INCREMENTAL_H
@@ -64,19 +64,21 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* The min and max functions missing in C. As usual, be careful not to */
- /* write things like MIN( a++, b++ ) to avoid side effects. */
+ /* write things like FT_MIN( a++, b++ ) to avoid side effects. */
/* */
-#ifndef MIN
-#define MIN( a, b ) ( (a) < (b) ? (a) : (b) )
-#endif
+#define FT_MIN( a, b ) ( (a) < (b) ? (a) : (b) )
+#define FT_MAX( a, b ) ( (a) > (b) ? (a) : (b) )
-#ifndef MAX
-#define MAX( a, b ) ( (a) > (b) ? (a) : (b) )
-#endif
+#define FT_ABS( a ) ( (a) < 0 ? -(a) : (a) )
-#ifndef ABS
-#define ABS( a ) ( (a) < 0 ? -(a) : (a) )
-#endif
+
+#define FT_PAD_FLOOR( x, n ) ( (x) & ~((n)-1) )
+#define FT_PAD_ROUND( x, n ) FT_PAD_FLOOR( (x) + ((n)/2), n )
+#define FT_PAD_CEIL( x, n ) FT_PAD_FLOOR( (x) + ((n)-1), n )
+
+#define FT_PIX_FLOOR( x ) ( (x) & ~63 )
+#define FT_PIX_ROUND( x ) FT_PIX_FLOOR( (x) + 32 )
+#define FT_PIX_CEIL( x ) FT_PIX_FLOOR( (x) + 63 )
/*************************************************************************/
@@ -112,7 +114,7 @@ FT_BEGIN_HEADER
/* return an error later when trying to load the glyph). */
/* */
/* It also check that fields that must be a multiple of 2, 4, or 8 */
- /* dont' have incorrect values, etc. */
+ /* don't have incorrect values, etc. */
/* */
/* FT_VALIDATE_PARANOID :: */
/* Only for font debugging. Checks that a table follows the */
@@ -239,7 +241,7 @@ FT_BEGIN_HEADER
typedef struct FT_CMap_ClassRec_
{
- FT_UInt size;
+ FT_ULong size;
FT_CMap_InitFunc init;
FT_CMap_DoneFunc done;
FT_CMap_CharIndexFunc char_index;
@@ -271,56 +273,52 @@ FT_BEGIN_HEADER
/* FreeType. */
/* */
/* <Fields> */
- /* max_points :: The maximal number of points used to store the */
- /* vectorial outline of any glyph in this face. */
- /* If this value cannot be known in advance, or */
- /* if the face isn't scalable, this should be set */
- /* to 0. Only relevant for scalable formats. */
- /* */
- /* max_contours :: The maximal number of contours used to store */
- /* the vectorial outline of any glyph in this */
- /* face. If this value cannot be known in */
- /* advance, or if the face isn't scalable, this */
- /* should be set to 0. Only relevant for */
- /* scalable formats. */
- /* */
- /* transform_matrix :: A 2x2 matrix of 16.16 coefficients used to */
- /* transform glyph outlines after they are loaded */
- /* from the font. Only used by the convenience */
- /* functions. */
- /* */
- /* transform_delta :: A translation vector used to transform glyph */
- /* outlines after they are loaded from the font. */
- /* Only used by the convenience functions. */
- /* */
- /* transform_flags :: Some flags used to classify the transform. */
- /* Only used by the convenience functions. */
- /* */
- /* hint_flags :: Some flags used to change the hinters' */
- /* behaviour. Only used for debugging for now. */
- /* */
- /* postscript_name :: Postscript font name for this face. */
+ /* max_points :: */
+ /* The maximal number of points used to store the vectorial outline */
+ /* of any glyph in this face. If this value cannot be known in */
+ /* advance, or if the face isn't scalable, this should be set to 0. */
+ /* Only relevant for scalable formats. */
+ /* */
+ /* max_contours :: */
+ /* The maximal number of contours used to store the vectorial */
+ /* outline of any glyph in this face. If this value cannot be */
+ /* known in advance, or if the face isn't scalable, this should be */
+ /* set to 0. Only relevant for scalable formats. */
+ /* */
+ /* transform_matrix :: */
+ /* A 2x2 matrix of 16.16 coefficients used to transform glyph */
+ /* outlines after they are loaded from the font. Only used by the */
+ /* convenience functions. */
+ /* */
+ /* transform_delta :: */
+ /* A translation vector used to transform glyph outlines after they */
+ /* are loaded from the font. Only used by the convenience */
+ /* functions. */
+ /* */
+ /* transform_flags :: */
+ /* Some flags used to classify the transform. Only used by the */
+ /* convenience functions. */
+ /* */
+ /* services :: */
+ /* A cache for frequently used services. It should be only */
+ /* accessed with the macro `FT_FACE_LOOKUP_SERVICE'. */
/* */
/* incremental_interface :: */
- /* If non-null, the interface through */
- /* which glyph data and metrics are loaded */
- /* incrementally for faces that do not provide */
- /* all of this data when first opened. */
- /* This field exists only if */
- /* @FT_CONFIG_OPTION_INCREMENTAL is defined. */
+ /* If non-null, the interface through which glyph data and metrics */
+ /* are loaded incrementally for faces that do not provide all of */
+ /* this data when first opened. This field exists only if */
+ /* @FT_CONFIG_OPTION_INCREMENTAL is defined. */
/* */
typedef struct FT_Face_InternalRec_
{
- FT_UShort max_points;
- FT_Short max_contours;
-
- FT_Matrix transform_matrix;
- FT_Vector transform_delta;
- FT_Int transform_flags;
+ FT_UShort max_points;
+ FT_Short max_contours;
- FT_UInt32 hint_flags;
+ FT_Matrix transform_matrix;
+ FT_Vector transform_delta;
+ FT_Int transform_flags;
- const char* postscript_name;
+ FT_ServiceCacheRec services;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
FT_Incremental_InterfaceRec* incremental_interface;
@@ -343,6 +341,11 @@ FT_BEGIN_HEADER
/* loader :: The glyph loader object used to load outlines */
/* into the glyph slot. */
/* */
+ /* flags :: Possible values are zero or */
+ /* FT_GLYPH_OWN_BITMAP. The latter indicates */
+ /* that the FT_GlyphSlot structure owns the */
+ /* bitmap buffer. */
+ /* */
/* glyph_transformed :: Boolean. Set to TRUE when the loaded glyph */
/* must be transformed through a specific */
/* font transformation. This is _not_ the same */
@@ -357,9 +360,13 @@ FT_BEGIN_HEADER
/* */
/* glyph_hints :: Format-specific glyph hints management. */
/* */
+
+#define FT_GLYPH_OWN_BITMAP 0x1
+
typedef struct FT_Slot_InternalRec_
{
FT_GlyphLoader loader;
+ FT_UInt flags;
FT_Bool glyph_transformed;
FT_Matrix glyph_matrix;
FT_Vector glyph_delta;
@@ -416,25 +423,25 @@ FT_BEGIN_HEADER
#define FT_MODULE_IS_DRIVER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
- ft_module_font_driver )
+ FT_MODULE_FONT_DRIVER )
#define FT_MODULE_IS_RENDERER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
- ft_module_renderer )
+ FT_MODULE_RENDERER )
#define FT_MODULE_IS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
- ft_module_hinter )
+ FT_MODULE_HINTER )
#define FT_MODULE_IS_STYLER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
- ft_module_styler )
+ FT_MODULE_STYLER )
#define FT_DRIVER_IS_SCALABLE( x ) ( FT_MODULE_CLASS( x )->module_flags & \
- ft_module_driver_scalable )
+ FT_MODULE_DRIVER_SCALABLE )
#define FT_DRIVER_USES_OUTLINES( x ) !( FT_MODULE_CLASS( x )->module_flags & \
- ft_module_driver_no_outlines )
+ FT_MODULE_DRIVER_NO_OUTLINES )
#define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
- ft_module_driver_has_hinter )
+ FT_MODULE_DRIVER_HAS_HINTER )
/*************************************************************************/
@@ -462,6 +469,10 @@ FT_BEGIN_HEADER
FT_Get_Module_Interface( FT_Library library,
const char* mod_name );
+ FT_BASE( FT_Pointer )
+ ft_module_get_service( FT_Module module,
+ const char* service_id );
+
/* */
@@ -537,28 +548,30 @@ FT_BEGIN_HEADER
FT_Done_GlyphSlot( FT_GlyphSlot slot );
/* */
-
+
/*
- * free the bitmap of a given glyphslot when needed
- * (i.e. only when it was allocated with ft_glyphslot_alloc_bitmap)
+ * Free the bitmap of a given glyphslot when needed
+ * (i.e., only when it was allocated with ft_glyphslot_alloc_bitmap).
*/
FT_BASE( void )
ft_glyphslot_free_bitmap( FT_GlyphSlot slot );
-
+
+
/*
- * allocate a new bitmap buffer in a glyph slot
+ * Allocate a new bitmap buffer in a glyph slot.
*/
FT_BASE( FT_Error )
ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot,
FT_ULong size );
+
/*
- * set the bitmap buffer in a glyph slot to a given pointer.
- * the buffer will not be freed by a later call to ft_glyphslot_free_bitmap
+ * Set the bitmap buffer in a glyph slot to a given pointer.
+ * The buffer will not be freed by a later call to ft_glyphslot_free_bitmap.
*/
FT_BASE( void )
- ft_glyphslot_set_bitmap( FT_GlyphSlot slot,
- FT_Pointer buffer );
+ ft_glyphslot_set_bitmap( FT_GlyphSlot slot,
+ FT_Byte* buffer );
/*************************************************************************/
@@ -667,8 +680,18 @@ FT_BEGIN_HEADER
/*************************************************************************/
-#define FT_DEBUG_HOOK_TRUETYPE 0
-#define FT_DEBUG_HOOK_TYPE1 1
+/* this hook is used by the TrueType debugger. It must be set to an alternate
+ * truetype bytecode interpreter function
+ */
+#define FT_DEBUG_HOOK_TRUETYPE 0
+
+
+/* set this debug hook to a non-null pointer to force unpatented hinting
+ * for all faces when both TT_CONFIG_OPTION_BYTECODE_INTERPRETER and
+ * TT_CONFIG_OPTION_UNPATENTED_HINTING are defined. this is only used
+ * during debugging
+ */
+#define FT_DEBUG_HOOK_UNPATENTED_HINTING 1
/*************************************************************************/
@@ -688,6 +711,12 @@ FT_BEGIN_HEADER
/* generic :: Client data variable. Used to extend the */
/* Library class by higher levels and clients. */
/* */
+ /* version_major :: The major version number of the library. */
+ /* */
+ /* version_minor :: The minor version number of the library. */
+ /* */
+ /* version_patch :: The current patch level of the library. */
+ /* */
/* num_modules :: The number of modules currently registered */
/* within this library. This is set to 0 for new */
/* libraries. New modules are added through the */
@@ -738,8 +767,6 @@ FT_BEGIN_HEADER
FT_DebugHook_Func debug_hooks[4];
- FT_MetaClassRec meta_class;
-
} FT_LibraryRec;
diff --git a/extras/freetype2/include/freetype/internal/ftrfork.h b/extras/freetype2/include/freetype/internal/ftrfork.h
new file mode 100644
index 000000000..e7b10024a
--- /dev/null
+++ b/extras/freetype2/include/freetype/internal/ftrfork.h
@@ -0,0 +1,184 @@
+/***************************************************************************/
+/* */
+/* ftrfork.h */
+/* */
+/* Embedded resource forks accessor (specification). */
+/* */
+/* Copyright 2004 by */
+/* Masatake YAMATO and Redhat K.K. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+/***************************************************************************/
+/* Development of the code in this file is support of */
+/* Information-technology Promotion Agency, Japan. */
+/***************************************************************************/
+
+
+#ifndef __FTRFORK_H__
+#define __FTRFORK_H__
+
+
+#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
+
+
+FT_BEGIN_HEADER
+
+
+ /* Number of guessing rules supported in `FT_Raccess_Guess'. */
+ /* Don't forget to increment the number if you add a new guessing rule. */
+#define FT_RACCESS_N_RULES 8
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Raccess_Guess */
+ /* */
+ /* <Description> */
+ /* Guess a file name and offset where the actual resource fork is */
+ /* stored. The macro FT_RACCESS_N_RULES holds the number of */
+ /* guessing rules; the guessed result for the Nth rule is */
+ /* represented as a triplet: a new file name (new_names[N]), a file */
+ /* offset (offsets[N]), and an error code (errors[N]). */
+ /* */
+ /* <Input> */
+ /* library :: */
+ /* A FreeType library instance. */
+ /* */
+ /* stream :: */
+ /* A file stream containing the resource fork. */
+ /* */
+ /* base_name :: */
+ /* The (base) file name of the resource fork used for some */
+ /* guessing rules. */
+ /* */
+ /* <Output> */
+ /* new_names :: */
+ /* An array of guessed file names in which the resource forks may */
+ /* exist. If `new_names[N]' is NULL, the guessed file name is */
+ /* equal to `base_name'. */
+ /* */
+ /* offsets :: */
+ /* An array of guessed file offsets. `offsets[N]' holds the file */
+ /* offset of the possible start of the resource fork in file */
+ /* `new_names[N]'. */
+ /* */
+ /* errors :: */
+ /* An array of FreeType error codes. `errors[N]' is the error */
+ /* code of Nth guessing rule function. If `errors[N]' is not */
+ /* FT_Err_Ok, `new_names[N]' and `offsets[N]' are meaningless. */
+ /* */
+ FT_BASE( void )
+ FT_Raccess_Guess( FT_Library library,
+ FT_Stream stream,
+ char* base_name,
+ char** new_names,
+ FT_Long* offsets,
+ FT_Error* errors );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Raccess_Get_HeaderInfo */
+ /* */
+ /* <Description> */
+ /* Get the information from the header of resource fork. The */
+ /* information includes the file offset where the resource map */
+ /* starts, and the file offset where the resource data starts. */
+ /* `FT_Raccess_Get_DataOffsets' requires these two data. */
+ /* */
+ /* <Input> */
+ /* library :: */
+ /* A FreeType library instance. */
+ /* */
+ /* stream :: */
+ /* A file stream containing the resource fork. */
+ /* */
+ /* rfork_offset :: */
+ /* The file offset where the resource fork starts. */
+ /* */
+ /* <Output> */
+ /* map_offset :: */
+ /* The file offset where the resource map starts. */
+ /* */
+ /* rdata_pos :: */
+ /* The file offset where the resource data starts. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. FT_Err_Ok means success. */
+ /* */
+ FT_BASE( FT_Error )
+ FT_Raccess_Get_HeaderInfo( FT_Library library,
+ FT_Stream stream,
+ FT_Long rfork_offset,
+ FT_Long *map_offset,
+ FT_Long *rdata_pos );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Raccess_Get_DataOffsets */
+ /* */
+ /* <Description> */
+ /* Get the data offsets for a tag in a resource fork. Offsets are */
+ /* stored in an array because, in some cases, resources in a resource */
+ /* fork have the same tag. */
+ /* */
+ /* <Input> */
+ /* library :: */
+ /* A FreeType library instance. */
+ /* */
+ /* stream :: */
+ /* A file stream containing the resource fork. */
+ /* */
+ /* map_offset :: */
+ /* The file offset where the resource map starts. */
+ /* */
+ /* rdata_pos :: */
+ /* The file offset where the resource data starts. */
+ /* */
+ /* tag :: */
+ /* The resource tag. */
+ /* */
+ /* <Output> */
+ /* offsets :: */
+ /* The stream offsets for the resource data specified by `tag'. */
+ /* This array is allocated by the function, so you have to call */
+ /* @FT_Free after use. */
+ /* */
+ /* count :: */
+ /* The length of offsets array. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. FT_Err_Ok means success. */
+ /* */
+ /* <Note> */
+ /* Normally you should use `FT_Raccess_Get_HeaderInfo' to get the */
+ /* value for `map_offset' and `rdata_pos'. */
+ /* */
+ FT_BASE( FT_Error )
+ FT_Raccess_Get_DataOffsets( FT_Library library,
+ FT_Stream stream,
+ FT_Long map_offset,
+ FT_Long rdata_pos,
+ FT_Long tag,
+ FT_Long **offsets,
+ FT_Long *count );
+
+
+FT_END_HEADER
+
+#endif /* __FTRFORK_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/internal/ftserv.h b/extras/freetype2/include/freetype/internal/ftserv.h
new file mode 100644
index 000000000..e5ed8895b
--- /dev/null
+++ b/extras/freetype2/include/freetype/internal/ftserv.h
@@ -0,0 +1,260 @@
+/***************************************************************************/
+/* */
+/* ftserv.h */
+/* */
+/* The FreeType services (specification only). */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+ /*************************************************************************/
+ /* */
+ /* Each module can export one or more `services'. Each service is */
+ /* identified by a constant string and modeled by a pointer; the latter */
+ /* generally corresponds to a structure containing function pointers. */
+ /* */
+ /* Note that a service's data cannot be a mere function pointer because */
+ /* in C it is possible that function pointers might be implemented */
+ /* differently than data pointers (e.g. 48 bits instead of 32). */
+ /* */
+ /*************************************************************************/
+
+
+#ifndef __FTSERV_H__
+#define __FTSERV_H__
+
+
+FT_BEGIN_HEADER
+
+
+ /*
+ * @macro:
+ * FT_FACE_FIND_SERVICE
+ *
+ * @description:
+ * This macro is used to look up a service from a face's driver module.
+ *
+ * @input:
+ * face ::
+ * The source face handle.
+ *
+ * id ::
+ * A string describing the service as defined in the service's
+ * header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
+ * `multi-masters'). It is automatically prefixed with
+ * `FT_SERVICE_ID_'.
+ *
+ * @output:
+ * ptr ::
+ * A variable that receives the service pointer. Will be NULL
+ * if not found.
+ */
+#define FT_FACE_FIND_SERVICE( face, ptr, id ) \
+ FT_BEGIN_STMNT \
+ FT_Module module = FT_MODULE( FT_FACE(face)->driver ); \
+ /* the strange cast is to allow C++ compilation */ \
+ FT_Pointer* Pptr = (FT_Pointer*) &(ptr); \
+ \
+ \
+ *Pptr = NULL; \
+ if ( module->clazz->get_interface ) \
+ *Pptr = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \
+ FT_END_STMNT
+
+
+ /*
+ * @macro:
+ * FT_FACE_FIND_GLOBAL_SERVICE
+ *
+ * @description:
+ * This macro is used to look up a service from all modules.
+ *
+ * @input:
+ * face ::
+ * The source face handle.
+ *
+ * id ::
+ * A string describing the service as defined in the service's
+ * header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
+ * `multi-masters'). It is automatically prefixed with
+ * `FT_SERVICE_ID_'.
+ *
+ * @output:
+ * ptr ::
+ * A variable that receives the service pointer. Will be NULL
+ * if not found.
+ */
+#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id ) \
+ FT_BEGIN_STMNT \
+ FT_Module module = FT_MODULE( FT_FACE(face)->driver ); \
+ /* the strange cast is to allow C++ compilation */ \
+ FT_Pointer* Pptr = (FT_Pointer*) &(ptr); \
+ \
+ \
+ *Pptr = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \
+ FT_END_STMNT
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** S E R V I C E D E S C R I P T O R S *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /*
+ * The following structure is used to _describe_ a given service
+ * to the library. This is useful to build simple static service lists.
+ */
+ typedef struct FT_ServiceDescRec_
+ {
+ const char* serv_id; /* service name */
+ const void* serv_data; /* service pointer/data */
+
+ } FT_ServiceDescRec;
+
+ typedef const FT_ServiceDescRec* FT_ServiceDesc;
+
+
+ /*
+ * Parse a list of FT_ServiceDescRec descriptors and look for
+ * a specific service by ID. Note that the last element in the
+ * array must be { NULL, NULL }, and that the function should
+ * return NULL if the service isn't available.
+ *
+ * This function can be used by modules to implement their
+ * `get_service' method.
+ */
+ FT_BASE( FT_Pointer )
+ ft_service_list_lookup( FT_ServiceDesc service_descriptors,
+ const char* service_id );
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** S E R V I C E S C A C H E *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /*
+ * This structure is used to store a cache for several frequently used
+ * services. It is the type of `face->internal->services'. You
+ * should only use FT_FACE_LOOKUP_SERVICE to access it.
+ *
+ * All fields should have the type FT_Pointer to relax compilation
+ * dependencies. We assume the developer isn't completely stupid.
+ *
+ * Each field must be named `service_XXXX' where `XXX' corresponds to
+ * the correct FT_SERVICE_ID_XXXX macro. See the definition of
+ * FT_FACE_LOOKUP_SERVICE below how this is implemented.
+ *
+ */
+ typedef struct FT_ServiceCacheRec_
+ {
+ FT_Pointer service_POSTSCRIPT_FONT_NAME;
+ FT_Pointer service_MULTI_MASTERS;
+ FT_Pointer service_GLYPH_DICT;
+ FT_Pointer service_PFR_METRICS;
+ FT_Pointer service_WINFNT;
+
+ } FT_ServiceCacheRec, *FT_ServiceCache;
+
+
+ /*
+ * A magic number used within the services cache.
+ */
+#define FT_SERVICE_UNAVAILABLE ((FT_Pointer)-2) /* magic number */
+
+
+ /*
+ * @macro:
+ * FT_FACE_LOOKUP_SERVICE
+ *
+ * @description:
+ * This macro is used to lookup a service from a face's driver module
+ * using its cache.
+ *
+ * @input:
+ * face::
+ * The source face handle containing the cache.
+ *
+ * field ::
+ * The field name in the cache.
+ *
+ * id ::
+ * The service ID.
+ *
+ * @output:
+ * ptr ::
+ * A variable receiving the service data. NULL if not available.
+ */
+#define FT_FACE_LOOKUP_SERVICE( face, ptr, id ) \
+ FT_BEGIN_STMNT \
+ /* the strange cast is to allow C++ compilation */ \
+ FT_Pointer* pptr = (FT_Pointer*)&(ptr); \
+ FT_Pointer svc; \
+ \
+ \
+ svc = FT_FACE(face)->internal->services. service_ ## id ; \
+ if ( svc == FT_SERVICE_UNAVAILABLE ) \
+ svc = NULL; \
+ else if ( svc == NULL ) \
+ { \
+ FT_FACE_FIND_SERVICE( face, svc, id ); \
+ \
+ FT_FACE(face)->internal->services. service_ ## id = \
+ (FT_Pointer)( svc != NULL ? svc \
+ : FT_SERVICE_UNAVAILABLE ); \
+ } \
+ *pptr = svc; \
+ FT_END_STMNT
+
+
+ /*
+ * A macro used to define new service structure types.
+ */
+
+#define FT_DEFINE_SERVICE( name ) \
+ typedef struct FT_Service_ ## name ## Rec_ \
+ FT_Service_ ## name ## Rec ; \
+ typedef struct FT_Service_ ## name ## Rec_ \
+ const * FT_Service_ ## name ; \
+ struct FT_Service_ ## name ## Rec_
+
+ /* */
+
+ /*
+ * The header files containing the services.
+ */
+
+#define FT_SERVICE_MULTIPLE_MASTERS_H <freetype/internal/services/svmm.h>
+#define FT_SERVICE_POSTSCRIPT_NAME_H <freetype/internal/services/svpostnm.h>
+#define FT_SERVICE_POSTSCRIPT_CMAPS_H <freetype/internal/services/svpscmap.h>
+#define FT_SERVICE_POSTSCRIPT_INFO_H <freetype/internal/services/svpsinfo.h>
+#define FT_SERVICE_GLYPH_DICT_H <freetype/internal/services/svgldict.h>
+#define FT_SERVICE_BDF_H <freetype/internal/services/svbdf.h>
+#define FT_SERVICE_XFREE86_NAME_H <freetype/internal/services/svxf86nm.h>
+#define FT_SERVICE_SFNT_H <freetype/internal/services/svsfnt.h>
+#define FT_SERVICE_PFR_H <freetype/internal/services/svpfr.h>
+#define FT_SERVICE_WINFNT_H <freetype/internal/services/svwinfnt.h>
+#define FT_SERVICE_TT_CMAP_H <freetype/internal/services/svttcmap.h>
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __FTSERV_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/internal/ftstream.h b/extras/freetype2/include/freetype/internal/ftstream.h
index 618f64aac..87576fd0e 100644
--- a/extras/freetype2/include/freetype/internal/ftstream.h
+++ b/extras/freetype2/include/freetype/internal/ftstream.h
@@ -4,7 +4,7 @@
/* */
/* Stream handling (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -315,6 +315,17 @@ FT_BEGIN_HEADER
#endif /* FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */
+ /* create a new (input) stream from an FT_Open_Args structure */
+ FT_BASE( FT_Error )
+ FT_Stream_New( FT_Library library,
+ const FT_Open_Args* args,
+ FT_Stream *astream );
+
+ /* free a stream */
+ FT_BASE( void )
+ FT_Stream_Free( FT_Stream stream,
+ FT_Int external );
+
/* initialize a stream for reading in-memory data */
FT_BASE( void )
FT_Stream_OpenMemory( FT_Stream stream,
diff --git a/extras/freetype2/include/freetype/internal/fttrace.h b/extras/freetype2/include/freetype/internal/fttrace.h
index ffc0b1417..dffe9cfee 100644
--- a/extras/freetype2/include/freetype/internal/fttrace.h
+++ b/extras/freetype2/include/freetype/internal/fttrace.h
@@ -4,7 +4,7 @@
/* */
/* Tracing handling (specification only). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,12 +16,12 @@
/***************************************************************************/
-/* definitions of trace levels for FreeType 2 */
+ /* definitions of trace levels for FreeType 2 */
-/* the first level must always be `trace_any' */
+ /* the first level must always be `trace_any' */
FT_TRACE_DEF( any )
-/* base components */
+ /* base components */
FT_TRACE_DEF( calc ) /* calculations (ftcalc.c) */
FT_TRACE_DEF( memory ) /* memory manager (ftobjs.c) */
FT_TRACE_DEF( stream ) /* stream manager (ftstream.c) */
@@ -35,14 +35,15 @@ FT_TRACE_DEF( glyph ) /* glyph management (ftglyph.c) */
FT_TRACE_DEF( raster ) /* monochrome rasterizer (ftraster.c) */
FT_TRACE_DEF( smooth ) /* anti-aliasing raster (ftgrays.c) */
FT_TRACE_DEF( mm ) /* MM interface (ftmm.c) */
+FT_TRACE_DEF( raccess ) /* resource fork accessor (ftrfork.c) */
/* Cache sub-system */
-FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc..) */
+FT_TRACE_DEF( cache ) /* cache sub-system (ftcache.c, etc.) */
/* SFNT driver components */
-FT_TRACE_DEF( sfobjs ) /* SFNT object handler (sfobjs.c) */
-FT_TRACE_DEF( ttcmap ) /* charmap handler (ttcmap.c) */
-FT_TRACE_DEF( ttload ) /* basic TrueType tables (ttload.c) */
+FT_TRACE_DEF( sfobjs ) /* SFNT object handler (sfobjs.c) */
+FT_TRACE_DEF( ttcmap ) /* charmap handler (ttcmap.c) */
+FT_TRACE_DEF( ttload ) /* basic TrueType tables (ttload.c) */
FT_TRACE_DEF( ttpost ) /* PS table processing (ttpost.c) */
FT_TRACE_DEF( ttsbit ) /* TrueType sbit handling (ttsbit.c) */
diff --git a/extras/freetype2/include/freetype/internal/internal.h b/extras/freetype2/include/freetype/internal/internal.h
index 872f6ac79..1e5ac44d5 100644
--- a/extras/freetype2/include/freetype/internal/internal.h
+++ b/extras/freetype2/include/freetype/internal/internal.h
@@ -4,7 +4,7 @@
/* */
/* Internal header files (specification only). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,26 +27,18 @@
#define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h>
#define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h>
#define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h>
-#define FT_INTERNAL_EXTENSION_H <freetype/internal/ftextend.h>
#define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h>
#define FT_INTERNAL_CALC_H <freetype/internal/ftcalc.h>
#define FT_INTERNAL_DRIVER_H <freetype/internal/ftdriver.h>
-#define FT_INTERNAL_EXTEND_H <freetype/internal/ftextend.h>
#define FT_INTERNAL_TRACE_H <freetype/internal/fttrace.h>
#define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h>
#define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h>
-#define FT_INTERNAL_HASH_H <freetype/internal/fthash.h>
-#define FT_INTERNAL_OBJECT_H <freetype/internal/ftobject.h>
+#define FT_INTERNAL_SERVICE_H <freetype/internal/ftserv.h>
+#define FT_INTERNAL_RFORK_H <freetype/internal/ftrfork.h>
#define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h>
#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h>
-#define FT_INTERNAL_TYPE42_TYPES_H <freetype/internal/t42types.h>
-#define FT_INTERNAL_CFF_TYPES_H <freetype/internal/cfftypes.h>
-#define FT_INTERNAL_FNT_TYPES_H <freetype/internal/fnttypes.h>
-#define FT_INTERNAL_BDF_TYPES_H <freetype/internal/bdftypes.h>
-#define FT_INTERNAL_PFR_H <freetype/internal/pfr.h>
-#define FT_INTERNAL_POSTSCRIPT_NAMES_H <freetype/internal/psnames.h>
#define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h>
#define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h>
#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H <freetype/internal/psglobal.h>
diff --git a/extras/freetype2/include/freetype/internal/pcftypes.h b/extras/freetype2/include/freetype/internal/pcftypes.h
index 2c924d7d1..382796ffb 100644
--- a/extras/freetype2/include/freetype/internal/pcftypes.h
+++ b/extras/freetype2/include/freetype/internal/pcftypes.h
@@ -2,7 +2,7 @@
FreeType font driver for pcf fonts
- Copyright (C) 2000-2001 by
+ Copyright (C) 2000, 2001, 2002 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
diff --git a/extras/freetype2/include/freetype/internal/psaux.h b/extras/freetype2/include/freetype/internal/psaux.h
index e79f83aa4..8d419be08 100644
--- a/extras/freetype2/include/freetype/internal/psaux.h
+++ b/extras/freetype2/include/freetype/internal/psaux.h
@@ -5,7 +5,7 @@
/* Auxiliary functions and data structures related to PostScript fonts */
/* (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,6 +24,7 @@
#include <ft2build.h>
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_TYPE1_TYPES_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
FT_BEGIN_HEADER
@@ -70,10 +71,10 @@ FT_BEGIN_HEADER
(*done)( PS_Table table );
FT_Error
- (*add)( PS_Table table,
- FT_Int index,
- void* object,
- FT_Int length );
+ (*add)( PS_Table table,
+ FT_Int idx,
+ void* object,
+ FT_PtrDist length );
void
(*release)( PS_Table table );
@@ -123,7 +124,7 @@ FT_BEGIN_HEADER
FT_Int max_elems;
FT_Int num_elems;
FT_Byte** elements; /* addresses of table elements */
- FT_Int* lengths; /* lengths of table elements */
+ FT_PtrDist* lengths; /* lengths of table elements */
FT_Memory memory;
PS_Table_FuncsRec funcs;
@@ -177,7 +178,9 @@ FT_BEGIN_HEADER
T1_FIELD_TYPE_BOOL,
T1_FIELD_TYPE_INTEGER,
T1_FIELD_TYPE_FIXED,
+ T1_FIELD_TYPE_FIXED_1000,
T1_FIELD_TYPE_STRING,
+ T1_FIELD_TYPE_KEY,
T1_FIELD_TYPE_BBOX,
T1_FIELD_TYPE_INTEGER_ARRAY,
T1_FIELD_TYPE_FIXED_ARRAY,
@@ -261,7 +264,7 @@ FT_BEGIN_HEADER
},
-#define T1_FIELD_TYPE_BOOL( _ident, _fname ) \
+#define T1_FIELD_BOOL( _ident, _fname ) \
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL, _fname )
#define T1_FIELD_NUM( _ident, _fname ) \
@@ -270,9 +273,15 @@ FT_BEGIN_HEADER
#define T1_FIELD_FIXED( _ident, _fname ) \
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED, _fname )
+#define T1_FIELD_FIXED_1000( _ident, _fname ) \
+ T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_1000, _fname )
+
#define T1_FIELD_STRING( _ident, _fname ) \
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_STRING, _fname )
+#define T1_FIELD_KEY( _ident, _fname ) \
+ T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_KEY, _fname )
+
#define T1_FIELD_BBOX( _ident, _fname ) \
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BBOX, _fname )
@@ -321,13 +330,21 @@ FT_BEGIN_HEADER
void
(*skip_spaces)( PS_Parser parser );
void
- (*skip_alpha)( PS_Parser parser );
+ (*skip_PS_token)( PS_Parser parser );
FT_Long
(*to_int)( PS_Parser parser );
FT_Fixed
(*to_fixed)( PS_Parser parser,
FT_Int power_ten );
+
+ FT_Error
+ (*to_bytes)( PS_Parser parser,
+ FT_Byte* bytes,
+ FT_Long max_bytes,
+ FT_Long* pnum_bytes,
+ FT_Bool delimiters );
+
FT_Int
(*to_coord_array)( PS_Parser parser,
FT_Int max_coords,
@@ -634,14 +651,14 @@ FT_BEGIN_HEADER
T1_Decoder_ZoneRec zones[T1_MAX_SUBRS_CALLS + 1];
T1_Decoder_Zone zone;
- PSNames_Service psnames; /* for seac */
+ FT_Service_PsCMaps psnames; /* for seac */
FT_UInt num_glyphs;
FT_Byte** glyph_names;
FT_Int lenIV; /* internal for sub routine calls */
FT_UInt num_subrs;
FT_Byte** subrs;
- FT_Int* subrs_len; /* array of subrs length (optional) */
+ FT_PtrDist* subrs_len; /* array of subrs length (optional) */
FT_Matrix font_matrix;
FT_Vector font_offset;
@@ -652,7 +669,6 @@ FT_BEGIN_HEADER
PS_Blend blend; /* for multiple master support */
- FT_UInt32 hint_flags;
FT_Render_Mode hint_mode;
T1_Decoder_Callback parse_callback;
diff --git a/extras/freetype2/include/freetype/internal/pshints.h b/extras/freetype2/include/freetype/internal/pshints.h
index 15571d9bc..cd48f6cf3 100644
--- a/extras/freetype2/include/freetype/internal/pshints.h
+++ b/extras/freetype2/include/freetype/internal/pshints.h
@@ -6,7 +6,7 @@
/* recorders (specification only). These are used to support native */
/* T1/T2 hints in the "type1", "cid" and "cff" font drivers. */
/* */
-/* Copyright 2001, 2002 by */
+/* Copyright 2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -261,13 +261,13 @@ FT_BEGIN_HEADER
/* been recorded. */
/* */
/* @input: */
- /* hints :: A handle to the Type 1 hints recorder. */
+ /* hints :: A handle to the Type 1 hints recorder. */
/* */
- /* outline :: A pointer to the target outline descriptor. */
+ /* outline :: A pointer to the target outline descriptor. */
/* */
- /* globals :: The hinter globals for this font. */
+ /* globals :: The hinter globals for this font. */
/* */
- /* hint_flags :: Hinter bit flags. */
+ /* hint_mode :: Hinting information. */
/* */
/* @return: */
/* FreeType error code. 0 means success. */
@@ -542,13 +542,13 @@ FT_BEGIN_HEADER
/* method. */
/* */
/* @input: */
- /* hints :: A handle to the Type 2 hints recorder. */
+ /* hints :: A handle to the Type 2 hints recorder. */
/* */
- /* outline :: A pointer to the target outline descriptor. */
+ /* outline :: A pointer to the target outline descriptor. */
/* */
- /* globals :: The hinter globals for this font. */
+ /* globals :: The hinter globals for this font. */
/* */
- /* hint_flags :: Hinter bit flags. */
+ /* hint_mode :: Hinting information. */
/* */
/* @return: */
/* FreeType error code. 0 means success. */
diff --git a/extras/freetype2/include/freetype/internal/services/svbdf.h b/extras/freetype2/include/freetype/internal/services/svbdf.h
new file mode 100644
index 000000000..0f7fc6115
--- /dev/null
+++ b/extras/freetype2/include/freetype/internal/services/svbdf.h
@@ -0,0 +1,57 @@
+/***************************************************************************/
+/* */
+/* svbdf.h */
+/* */
+/* The FreeType BDF services (specification). */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __SVBDF_H__
+#define __SVBDF_H__
+
+#include FT_BDF_H
+#include FT_INTERNAL_SERVICE_H
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_BDF "bdf"
+
+ typedef FT_Error
+ (*FT_BDF_GetCharsetIdFunc)( FT_Face face,
+ const char* *acharset_encoding,
+ const char* *acharset_registry );
+
+ typedef FT_Error
+ (*FT_BDF_GetPropertyFunc)( FT_Face face,
+ const char* prop_name,
+ BDF_PropertyRec *aproperty );
+
+
+ FT_DEFINE_SERVICE( BDF )
+ {
+ FT_BDF_GetCharsetIdFunc get_charset_id;
+ FT_BDF_GetPropertyFunc get_property;
+ };
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVBDF_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/internal/services/svgldict.h b/extras/freetype2/include/freetype/internal/services/svgldict.h
new file mode 100644
index 000000000..e5e56b253
--- /dev/null
+++ b/extras/freetype2/include/freetype/internal/services/svgldict.h
@@ -0,0 +1,60 @@
+/***************************************************************************/
+/* */
+/* svgldict.h */
+/* */
+/* The FreeType glyph dictionary services (specification). */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __SVGLDICT_H__
+#define __SVGLDICT_H__
+
+#include FT_INTERNAL_SERVICE_H
+
+
+FT_BEGIN_HEADER
+
+
+ /*
+ * A service used to retrieve glyph names, as well as to find the
+ * index of a given glyph name in a font.
+ *
+ */
+
+#define FT_SERVICE_ID_GLYPH_DICT "glyph-dict"
+
+
+ typedef FT_Error
+ (*FT_GlyphDict_GetNameFunc)( FT_Face face,
+ FT_UInt glyph_index,
+ FT_Pointer buffer,
+ FT_UInt buffer_max );
+
+ typedef FT_UInt
+ (*FT_GlyphDict_NameIndexFunc)( FT_Face face,
+ FT_String* glyph_name );
+
+
+ FT_DEFINE_SERVICE( GlyphDict )
+ {
+ FT_GlyphDict_GetNameFunc get_name;
+ FT_GlyphDict_NameIndexFunc name_index; /* optional */
+ };
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVGLDICT_H__ */
diff --git a/extras/freetype2/include/freetype/internal/services/svmm.h b/extras/freetype2/include/freetype/internal/services/svmm.h
new file mode 100644
index 000000000..926975ce8
--- /dev/null
+++ b/extras/freetype2/include/freetype/internal/services/svmm.h
@@ -0,0 +1,68 @@
+/***************************************************************************/
+/* */
+/* svmm.h */
+/* */
+/* The FreeType Multiple Masters services (specification). */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __SVMM_H__
+#define __SVMM_H__
+
+#include FT_INTERNAL_SERVICE_H
+
+
+FT_BEGIN_HEADER
+
+
+ /*
+ * A service used to manage multiple-masters data in a given face.
+ *
+ * See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H).
+ *
+ */
+
+#define FT_SERVICE_ID_MULTI_MASTERS "multi-masters"
+
+
+ typedef FT_Error
+ (*FT_Get_MM_Func)( FT_Face face,
+ FT_Multi_Master* master );
+
+ typedef FT_Error
+ (*FT_Set_MM_Design_Func)( FT_Face face,
+ FT_UInt num_coords,
+ FT_Long* coords );
+
+ typedef FT_Error
+ (*FT_Set_MM_Blend_Func)( FT_Face face,
+ FT_UInt num_coords,
+ FT_Long* coords );
+
+
+ FT_DEFINE_SERVICE( MultiMasters )
+ {
+ FT_Get_MM_Func get_mm;
+ FT_Set_MM_Design_Func set_mm_design;
+ FT_Set_MM_Blend_Func set_mm_blend;
+ };
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* __SVMM_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/internal/services/svpfr.h b/extras/freetype2/include/freetype/internal/services/svpfr.h
new file mode 100644
index 000000000..b61050543
--- /dev/null
+++ b/extras/freetype2/include/freetype/internal/services/svpfr.h
@@ -0,0 +1,65 @@
+/***************************************************************************/
+/* */
+/* svpfr.h */
+/* */
+/* Internal PFR service functions (specification). */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __SVPFR_H__
+#define __SVPFR_H__
+
+#include FT_INTERNAL_SERVICE_H
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_PFR_METRICS "pfr-metrics"
+
+
+ typedef FT_Error
+ (*FT_PFR_GetMetricsFunc)( FT_Face face,
+ FT_UInt *aoutline,
+ FT_UInt *ametrics,
+ FT_Fixed *ax_scale,
+ FT_Fixed *ay_scale );
+
+ typedef FT_Error
+ (*FT_PFR_GetKerningFunc)( FT_Face face,
+ FT_UInt left,
+ FT_UInt right,
+ FT_Vector *avector );
+
+ typedef FT_Error
+ (*FT_PFR_GetAdvanceFunc)( FT_Face face,
+ FT_UInt gindex,
+ FT_Pos *aadvance );
+
+
+ FT_DEFINE_SERVICE( PfrMetrics )
+ {
+ FT_PFR_GetMetricsFunc get_metrics;
+ FT_PFR_GetKerningFunc get_kerning;
+ FT_PFR_GetAdvanceFunc get_advance;
+
+ };
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __SVPFR_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/internal/services/svpostnm.h b/extras/freetype2/include/freetype/internal/services/svpostnm.h
new file mode 100644
index 000000000..7f1700adb
--- /dev/null
+++ b/extras/freetype2/include/freetype/internal/services/svpostnm.h
@@ -0,0 +1,58 @@
+/***************************************************************************/
+/* */
+/* svpostnm.h */
+/* */
+/* The FreeType PostScript name services (specification). */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __SVPOSTNM_H__
+#define __SVPOSTNM_H__
+
+#include FT_INTERNAL_SERVICE_H
+
+
+FT_BEGIN_HEADER
+
+ /*
+ * A trivial service used to retrieve the PostScript name of a given
+ * font when available. The `get_name' field should never be NULL.
+ *
+ * The correponding function can return NULL to indicate that the
+ * PostScript name is not available.
+ *
+ * The name is owned by the face and will be destroyed with it.
+ */
+
+#define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME "postscript-font-name"
+
+
+ typedef const char*
+ (*FT_PsName_GetFunc)( FT_Face face );
+
+
+ FT_DEFINE_SERVICE( PsFontName )
+ {
+ FT_PsName_GetFunc get_ps_font_name;
+ };
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVPOSTNM_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/internal/services/svpscmap.h b/extras/freetype2/include/freetype/internal/services/svpscmap.h
new file mode 100644
index 000000000..ade96ef8f
--- /dev/null
+++ b/extras/freetype2/include/freetype/internal/services/svpscmap.h
@@ -0,0 +1,113 @@
+/***************************************************************************/
+/* */
+/* svpscmap.h */
+/* */
+/* The FreeType PostScript charmap service (specification). */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __SVPSCMAP_H__
+#define __SVPSCMAP_H__
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_POSTSCRIPT_CMAPS "postscript-cmaps"
+
+
+ /*
+ * Adobe glyph name to unicode value
+ */
+ typedef FT_UInt32
+ (*PS_Unicode_ValueFunc)( const char* glyph_name );
+
+ /*
+ * Unicode value to Adobe glyph name index. 0xFFFF if not found.
+ */
+ typedef FT_UInt
+ (*PS_Unicode_Index_Func)( FT_UInt num_glyphs,
+ const char** glyph_names,
+ FT_ULong unicode );
+
+ /*
+ * Macintosh name id to glyph name. NULL if invalid index.
+ */
+ typedef const char*
+ (*PS_Macintosh_Name_Func)( FT_UInt name_index );
+
+ /*
+ * Adobe standard string ID to glyph name. NULL if invalid index.
+ */
+ typedef const char*
+ (*PS_Adobe_Std_Strings_Func)( FT_UInt string_index );
+
+ /*
+ * Simple unicode -> glyph index charmap built from font glyph names
+ * table.
+ */
+ typedef struct PS_UniMap_
+ {
+ FT_UInt unicode;
+ FT_UInt glyph_index;
+
+ } PS_UniMap;
+
+
+ typedef struct PS_Unicodes_
+ {
+ FT_UInt num_maps;
+ PS_UniMap* maps;
+
+ } PS_Unicodes;
+
+
+ typedef FT_Error
+ (*PS_Unicodes_InitFunc)( FT_Memory memory,
+ FT_UInt num_glyphs,
+ const char** glyph_names,
+ PS_Unicodes* unicodes );
+
+ typedef FT_UInt
+ (*PS_Unicodes_CharIndexFunc)( PS_Unicodes* unicodes,
+ FT_UInt unicode );
+
+ typedef FT_ULong
+ (*PS_Unicodes_CharNextFunc)( PS_Unicodes* unicodes,
+ FT_ULong unicode );
+
+
+ FT_DEFINE_SERVICE( PsCMaps )
+ {
+ PS_Unicode_ValueFunc unicode_value;
+
+ PS_Unicodes_InitFunc unicodes_init;
+ PS_Unicodes_CharIndexFunc unicodes_char_index;
+ PS_Unicodes_CharNextFunc unicodes_char_next;
+
+ PS_Macintosh_Name_Func macintosh_name;
+ PS_Adobe_Std_Strings_Func adobe_std_strings;
+ const unsigned short* adobe_std_encoding;
+ const unsigned short* adobe_expert_encoding;
+ };
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVPSCMAP_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/internal/services/svpsinfo.h b/extras/freetype2/include/freetype/internal/services/svpsinfo.h
new file mode 100644
index 000000000..73c02cdb7
--- /dev/null
+++ b/extras/freetype2/include/freetype/internal/services/svpsinfo.h
@@ -0,0 +1,55 @@
+/***************************************************************************/
+/* */
+/* svpsinfo.h */
+/* */
+/* The FreeType PostScript info service (specification). */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __SVPSINFO_H__
+#define __SVPSINFO_H__
+
+#include FT_INTERNAL_SERVICE_H
+#include FT_INTERNAL_TYPE1_TYPES_H
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_POSTSCRIPT_INFO "postscript-info"
+
+
+ typedef FT_Error
+ (*PS_GetFontInfoFunc)( FT_Face face,
+ PS_FontInfoRec* afont_info );
+
+ typedef FT_Int
+ (*PS_HasGlyphNamesFunc)( FT_Face face );
+
+
+ FT_DEFINE_SERVICE( PsInfo )
+ {
+ PS_GetFontInfoFunc ps_get_font_info;
+ PS_HasGlyphNamesFunc ps_has_glyph_names;
+ };
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVPSINFO_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/internal/services/svsfnt.h b/extras/freetype2/include/freetype/internal/services/svsfnt.h
new file mode 100644
index 000000000..06a5b1c23
--- /dev/null
+++ b/extras/freetype2/include/freetype/internal/services/svsfnt.h
@@ -0,0 +1,69 @@
+/***************************************************************************/
+/* */
+/* svsfnt.h */
+/* */
+/* The FreeType PostScript name services (specification). */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __SVSFNT_H__
+#define __SVSFNT_H__
+
+#include FT_INTERNAL_SERVICE_H
+#include FT_TRUETYPE_TABLES_H
+
+
+FT_BEGIN_HEADER
+
+
+ /*
+ * SFNT table loading service.
+ */
+
+#define FT_SERVICE_ID_SFNT_TABLE "sfnt-table"
+
+
+ /*
+ * Used to implement FT_Load_Sfnt_Table().
+ */
+ typedef FT_Error
+ (*FT_SFNT_TableLoadFunc)( FT_Face face,
+ FT_ULong tag,
+ FT_Long offset,
+ FT_Byte* buffer,
+ FT_ULong* length );
+
+ /*
+ * Used to implement FT_Get_Sfnt_Table().
+ */
+ typedef void*
+ (*FT_SFNT_TableGetFunc)( FT_Face face,
+ FT_Sfnt_Tag tag );
+
+
+ FT_DEFINE_SERVICE( SFNT_Table )
+ {
+ FT_SFNT_TableLoadFunc load_table;
+ FT_SFNT_TableGetFunc get_table;
+ };
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVSFNT_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/internal/services/svttcmap.h b/extras/freetype2/include/freetype/internal/services/svttcmap.h
new file mode 100644
index 000000000..f92fcd0e2
--- /dev/null
+++ b/extras/freetype2/include/freetype/internal/services/svttcmap.h
@@ -0,0 +1,77 @@
+/***************************************************************************/
+/* */
+/* svsttcmap.h */
+/* */
+/* The FreeType TrueType/sfnt cmap extra information service. */
+/* */
+/* Copyright 2003 by */
+/* Masatake YAMATO, Redhat K.K. */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+/* Development of this service is support of
+ Information-technology Promotion Agency, Japan. */
+
+#ifndef __SVTTCMAP_H__
+#define __SVTTCMAP_H__
+
+#include FT_INTERNAL_SERVICE_H
+#include FT_TRUETYPE_TABLES_H
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_TT_CMAP "tt-cmaps"
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* TT_CMapInfo */
+ /* */
+ /* <Description> */
+ /* A structure used to store TrueType/sfnt specific cmap information */
+ /* which is not covered by the generic @FT_CharMap structure. This */
+ /* structure can be accessed with the @FT_Get_TT_CMap_Info function. */
+ /* */
+ /* <Fields> */
+ /* language :: */
+ /* The language ID used in Mac fonts. Definitions of values are in */
+ /* freetype/ttnameid.h. */
+ /* */
+ typedef struct TT_CMapInfo_
+ {
+ FT_ULong language;
+
+ } TT_CMapInfo;
+
+
+ typedef FT_Error
+ (*TT_CMap_Info_GetFunc)( FT_CharMap charmap,
+ TT_CMapInfo *cmap_info );
+
+
+ FT_DEFINE_SERVICE( TTCMaps )
+ {
+ TT_CMap_Info_GetFunc get_cmap_info;
+ };
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* __SVTTCMAP_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/internal/services/svwinfnt.h b/extras/freetype2/include/freetype/internal/services/svwinfnt.h
new file mode 100644
index 000000000..57f7765d9
--- /dev/null
+++ b/extras/freetype2/include/freetype/internal/services/svwinfnt.h
@@ -0,0 +1,50 @@
+/***************************************************************************/
+/* */
+/* svwinfnt.h */
+/* */
+/* The FreeType Windows FNT/FONT service (specification). */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __SVWINFNT_H__
+#define __SVWINFNT_H__
+
+#include FT_INTERNAL_SERVICE_H
+#include FT_WINFONTS_H
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_WINFNT "winfonts"
+
+ typedef FT_Error
+ (*FT_WinFnt_GetHeaderFunc)( FT_Face face,
+ FT_WinFNT_HeaderRec *aheader );
+
+
+ FT_DEFINE_SERVICE( WinFnt )
+ {
+ FT_WinFnt_GetHeaderFunc get_header;
+ };
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVWINFNT_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/internal/services/svxf86nm.h b/extras/freetype2/include/freetype/internal/services/svxf86nm.h
new file mode 100644
index 000000000..3a33abcd8
--- /dev/null
+++ b/extras/freetype2/include/freetype/internal/services/svxf86nm.h
@@ -0,0 +1,55 @@
+/***************************************************************************/
+/* */
+/* svxf86nm.h */
+/* */
+/* The FreeType XFree86 services (specification only). */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __SVXF86NM_H__
+#define __SVXF86NM_H__
+
+#include FT_INTERNAL_SERVICE_H
+
+
+FT_BEGIN_HEADER
+
+
+ /*
+ * A trivial service used to return the name of a face's font driver,
+ * according to the XFree86 nomenclature. Note that the service data
+ * is a simple constant string pointer.
+ */
+
+#define FT_SERVICE_ID_XF86_NAME "xf86-driver-name"
+
+#define FT_XF86_FORMAT_TRUETYPE "TrueType"
+#define FT_XF86_FORMAT_TYPE_1 "Type 1"
+#define FT_XF86_FORMAT_BDF "BDF"
+#define FT_XF86_FORMAT_PCF "PCF"
+#define FT_XF86_FORMAT_TYPE_42 "Type 42"
+#define FT_XF86_FORMAT_CID "CID Type 1"
+#define FT_XF86_FORMAT_CFF "CFF"
+#define FT_XF86_FORMAT_PFR "PFR"
+#define FT_XF86_FORMAT_WINFNT "Windows FNT"
+
+ /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVXF86NM_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/include/freetype/internal/sfnt.h b/extras/freetype2/include/freetype/internal/sfnt.h
index c5f3bd3c9..9a23b1f82 100644
--- a/extras/freetype2/include/freetype/internal/sfnt.h
+++ b/extras/freetype2/include/freetype/internal/sfnt.h
@@ -4,7 +4,7 @@
/* */
/* High-level `sfnt' driver interface (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -125,11 +125,6 @@ FT_BEGIN_HEADER
(*TT_Done_Face_Func)( TT_Face face );
- typedef FT_Module_Interface
- (*SFNT_Get_Interface_Func)( FT_Module module,
- const char* func_interface );
-
-
/*************************************************************************/
/* */
/* <FuncType> */
@@ -248,6 +243,76 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <FuncType> */
+ /* TT_Find_SBit_Image_Func */
+ /* */
+ /* <Description> */
+ /* Checks whether an embedded bitmap (an `sbit') exists for a given */
+ /* glyph, at a given strike. */
+ /* */
+ /* <Input> */
+ /* face :: The target face object. */
+ /* */
+ /* glyph_index :: The glyph index. */
+ /* */
+ /* strike_index :: The current strike index. */
+ /* */
+ /* <Output> */
+ /* arange :: The SBit range containing the glyph index. */
+ /* */
+ /* astrike :: The SBit strike containing the glyph index. */
+ /* */
+ /* aglyph_offset :: The offset of the glyph data in `EBDT' table. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. Returns */
+ /* SFNT_Err_Invalid_Argument if no sbit exists for the requested */
+ /* glyph. */
+ /* */
+ typedef FT_Error
+ (*TT_Find_SBit_Image_Func)( TT_Face face,
+ FT_UInt glyph_index,
+ FT_ULong strike_index,
+ TT_SBit_Range *arange,
+ TT_SBit_Strike *astrike,
+ FT_ULong *aglyph_offset );
+
+
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* TT_Load_SBit_Metrics_Func */
+ /* */
+ /* <Description> */
+ /* Gets the big metrics for a given embedded bitmap. */
+ /* */
+ /* <Input> */
+ /* stream :: The input stream. */
+ /* */
+ /* range :: The SBit range containing the glyph. */
+ /* */
+ /* <Output> */
+ /* big_metrics :: A big SBit metrics structure for the glyph. */
+ /* */
+ /* <Return> */
+ /* FreeType error code. 0 means success. */
+ /* */
+ /* <Note> */
+ /* The stream cursor must be positioned at the glyph's offset within */
+ /* the `EBDT' table before the call. */
+ /* */
+ /* If the image format uses variable metrics, the stream cursor is */
+ /* positioned just after the metrics header in the `EBDT' table on */
+ /* function exit. */
+ /* */
+ typedef FT_Error
+ (*TT_Load_SBit_Metrics_Func)( FT_Stream stream,
+ TT_SBit_Range range,
+ TT_SBit_Metrics metrics );
+
+
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
/* TT_Load_SBit_Image_Func */
/* */
/* <Description> */
@@ -255,20 +320,27 @@ FT_BEGIN_HEADER
/* returns its metrics. */
/* */
/* <Input> */
- /* face :: The target face object. */
+ /* face :: */
+ /* The target face object. */
/* */
- /* x_ppem :: The horizontal resolution in points per EM. */
+ /* strike_index :: */
+ /* The strike index. */
/* */
- /* y_ppem :: The vertical resolution in points per EM. */
+ /* glyph_index :: */
+ /* The current glyph index. */
/* */
- /* glyph_index :: The current glyph index. */
+ /* load_flags :: */
+ /* The current load flags. */
/* */
- /* stream :: The input stream. */
+ /* stream :: */
+ /* The input stream. */
/* */
/* <Output> */
- /* amap :: The target pixmap. */
+ /* amap :: */
+ /* The target pixmap. */
/* */
- /* ametrics :: A big sbit metrics structure for the glyph image. */
+ /* ametrics :: */
+ /* A big sbit metrics structure for the glyph image. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. Returns an error if no */
@@ -312,8 +384,8 @@ FT_BEGIN_HEADER
/* */
typedef FT_Error
(*TT_Set_SBit_Strike_Func)( TT_Face face,
- FT_Int x_ppem,
- FT_Int y_ppem,
+ FT_UInt x_ppem,
+ FT_UInt y_ppem,
FT_ULong *astrike_index );
@@ -369,57 +441,6 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <FuncType> */
- /* TT_CharMap_Load_Func */
- /* */
- /* <Description> */
- /* Loads a given TrueType character map into memory. */
- /* */
- /* <Input> */
- /* face :: A handle to the parent face object. */
- /* */
- /* stream :: A handle to the current stream object. */
- /* */
- /* <InOut> */
- /* cmap :: A pointer to a cmap object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The function assumes that the stream is already in use (i.e., */
- /* opened). In case of error, all partially allocated tables are */
- /* released. */
- /* */
- typedef FT_Error
- (*TT_CharMap_Load_Func)( TT_Face face,
- TT_CMapTable cmap,
- FT_Stream input );
-
-
- /*************************************************************************/
- /* */
- /* <FuncType> */
- /* TT_CharMap_Free_Func */
- /* */
- /* <Description> */
- /* Destroys a character mapping table. */
- /* */
- /* <Input> */
- /* face :: A handle to the parent face object. */
- /* */
- /* cmap :: A handle to a cmap object. */
- /* */
- /* <Return> */
- /* FreeType error code. 0 means success. */
- /* */
- typedef FT_Error
- (*TT_CharMap_Free_Func)( TT_Face face,
- TT_CMapTable cmap );
-
-
- /*************************************************************************/
- /* */
- /* <FuncType> */
/* TT_Load_Table_Func */
/* */
/* <Description> */
@@ -459,21 +480,6 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* <FuncType> */
- /* SFNT_Load_Table_Func */
- /* */
- /* <Description> */
- /* Loads a given SFNT table in memory */
- /* */
- typedef FT_Error
- (*SFNT_Load_Table_Func)( FT_Face face,
- FT_ULong tag,
- FT_Long offset,
- FT_Byte* buffer,
- FT_ULong* length );
-
- /*************************************************************************/
- /* */
/* <Struct> */
/* SFNT_Interface */
/* */
@@ -491,7 +497,7 @@ FT_BEGIN_HEADER
TT_Init_Face_Func init_face;
TT_Load_Face_Func load_face;
TT_Done_Face_Func done_face;
- SFNT_Get_Interface_Func get_interface;
+ FT_Module_Requester get_interface;
TT_Load_Any_Func load_any;
TT_Load_SFNT_HeaderRec_Func load_sfnt_header;
@@ -523,6 +529,8 @@ FT_BEGIN_HEADER
/* see `ttsbit.h' */
TT_Set_SBit_Strike_Func set_sbit_strike;
TT_Load_Table_Func load_sbits;
+ TT_Find_SBit_Image_Func find_sbit_image;
+ TT_Load_SBit_Metrics_Func load_sbit_metrics;
TT_Load_SBit_Image_Func load_sbit_image;
TT_Free_Table_Func free_sbits;
@@ -530,10 +538,6 @@ FT_BEGIN_HEADER
TT_Get_PS_Name_Func get_psname;
TT_Free_Table_Func free_psnames;
- /* see `ttcmap.h' */
- TT_CharMap_Load_Func load_charmap;
- TT_CharMap_Free_Func free_charmap;
-
} SFNT_Interface;
diff --git a/extras/freetype2/include/freetype/internal/t1types.h b/extras/freetype2/include/freetype/internal/t1types.h
index 262539469..702bb1e4c 100644
--- a/extras/freetype2/include/freetype/internal/t1types.h
+++ b/extras/freetype2/include/freetype/internal/t1types.h
@@ -5,7 +5,7 @@
/* Basic Type1/Type2 type definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,8 +23,9 @@
#include <ft2build.h>
#include FT_TYPE1_TABLES_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+#include FT_INTERNAL_SERVICE_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
FT_BEGIN_HEADER
@@ -101,12 +102,12 @@ FT_BEGIN_HEADER
FT_Int num_subrs;
FT_Byte** subrs;
- FT_Int* subrs_len;
+ FT_PtrDist* subrs_len;
FT_Int num_glyphs;
FT_String** glyph_names; /* array of glyph names */
FT_Byte** charstrings; /* array of glyph charstrings */
- FT_Int* charstrings_len;
+ FT_PtrDist* charstrings_len;
FT_Byte paint_type;
FT_Byte font_type;
@@ -115,7 +116,7 @@ FT_BEGIN_HEADER
FT_BBox font_bbox;
FT_Long font_id;
- FT_Int stroke_width;
+ FT_Fixed stroke_width;
} T1_FontRec, *T1_Font;
@@ -141,17 +142,6 @@ FT_BEGIN_HEADER
/*************************************************************************/
- /*************************************************************************/
- /* */
- /* This structure/class is defined here because it is common to the */
- /* following formats: TTF, OpenType-TT, and OpenType-CFF. */
- /* */
- /* Note, however, that the classes TT_Size, TT_GlyphSlot, and TT_CharMap */
- /* are not shared between font drivers, and are thus defined normally in */
- /* `ttobjs.h'. */
- /* */
- /*************************************************************************/
-
typedef struct T1_FaceRec_* T1_Face;
typedef struct CID_FaceRec_* CID_Face;
@@ -169,7 +159,7 @@ FT_BEGIN_HEADER
/* support for Multiple Masters fonts */
PS_Blend blend;
-
+
/* since FT 2.1 - interface to PostScript hinter */
const void* pshinter;
@@ -183,8 +173,10 @@ FT_BEGIN_HEADER
void* psaux;
CID_FaceInfoRec cid;
void* afm_data;
+ FT_Byte* binary_data; /* used if hex data has been converted */
+ FT_Stream cid_stream;
CID_Subrs subrs;
-
+
/* since FT 2.1 - interface to PostScript hinter */
void* pshinter;
diff --git a/extras/freetype2/include/freetype/internal/tttypes.h b/extras/freetype2/include/freetype/internal/tttypes.h
index 4097ac8f5..02db8b4fc 100644
--- a/extras/freetype2/include/freetype/internal/tttypes.h
+++ b/extras/freetype2/include/freetype/internal/tttypes.h
@@ -108,41 +108,6 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Struct> */
- /* TT_TableDirRec */
- /* */
- /* <Description> */
- /* This structure models a TrueType table directory. It is used to */
- /* access the various tables of the font face. */
- /* */
- /* <Fields> */
- /* version :: The version number; starts with 0x00010000. */
- /* */
- /* numTables :: The number of tables. */
- /* */
- /* searchRange :: Unused. */
- /* */
- /* entrySelector :: Unused. */
- /* */
- /* rangeShift :: Unused. */
- /* */
- /* <Note> */
- /* This structure is only used during font opening. */
- /* */
- typedef struct TT_TableDirRec_
- {
- FT_Fixed version; /* should be 0x10000 */
- FT_UShort numTables; /* number of tables */
-
- FT_UShort searchRange; /* These parameters are only used */
- FT_UShort entrySelector; /* for a dichotomy search in the */
- FT_UShort rangeShift; /* directory. We ignore them. */
-
- } TT_TableDirRec;
-
-
- /*************************************************************************/
- /* */
- /* <Struct> */
/* TT_TableRec */
/* */
/* <Description> */
@@ -171,61 +136,6 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Struct> */
- /* TT_CMapDirRec */
- /* */
- /* <Description> */
- /* This structure describes the directory of the `cmap' table, */
- /* containing the font's character mappings table. */
- /* */
- /* <Fields> */
- /* tableVersionNumber :: The version number. */
- /* */
- /* numCMaps :: The number of charmaps in the font. */
- /* */
- /* <Note> */
- /* This structure is only used during font loading. */
- /* */
- typedef struct TT_CMapDirRec_
- {
- FT_UShort tableVersionNumber;
- FT_UShort numCMaps;
-
- } TT_CMapDirRec, *TT_CMapDir;
-
-
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* TT_CMapDirEntryRec */
- /* */
- /* <Description> */
- /* This structure describes a charmap in a TrueType font. */
- /* */
- /* <Fields> */
- /* platformID :: An ID used to specify for which platform this */
- /* charmap is defined (FreeType manages all platforms). */
- /* */
- /* encodingID :: A platform-specific ID used to indicate which source */
- /* encoding is used in this charmap. */
- /* */
- /* offset :: The offset of the charmap relative to the start of */
- /* the `cmap' table. */
- /* */
- /* <Note> */
- /* This structure is only used during font loading. */
- /* */
- typedef struct TT_CMapDirEntryRec_
- {
- FT_UShort platformID;
- FT_UShort platformEncodingID;
- FT_Long offset;
-
- } TT_CMapDirEntryRec, *TT_CMapDirEntry;
-
-
- /*************************************************************************/
- /* */
- /* <Struct> */
/* TT_LongMetricsRec */
/* */
/* <Description> */
@@ -913,201 +823,6 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*** ***/
/*** ***/
- /*** TRUETYPE CHARMAPS SUPPORT ***/
- /*** ***/
- /*** ***/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
-
-
- /* format 0 */
-
- typedef struct TT_CMap0_
- {
- FT_ULong language; /* for Mac fonts (originally ushort) */
-
- FT_Byte* glyphIdArray;
-
- } TT_CMap0Rec, *TT_CMap0;
-
-
- /* format 2 */
-
- typedef struct TT_CMap2SubHeaderRec_
- {
- FT_UShort firstCode; /* first valid low byte */
- FT_UShort entryCount; /* number of valid low bytes */
- FT_Short idDelta; /* delta value to glyphIndex */
- FT_UShort idRangeOffset; /* offset from here to 1st code */
-
- } TT_CMap2SubHeaderRec, *TT_CMap2SubHeader;
-
-
- typedef struct TT_CMap2Rec_
- {
- FT_ULong language; /* for Mac fonts (originally ushort) */
-
- FT_UShort* subHeaderKeys; /* high byte mapping table */
- /* value = subHeader index * 8 */
- TT_CMap2SubHeader subHeaders;
- FT_UShort* glyphIdArray;
- FT_UShort numGlyphId; /* control value */
-
- } TT_CMap2Rec, *TT_CMap2;
-
-
- /* format 4 */
-
- typedef struct TT_CMap4Segment_
- {
- FT_UShort endCount;
- FT_UShort startCount;
- FT_Short idDelta;
- FT_UShort idRangeOffset;
-
- } TT_CMap4SegmentRec, *TT_CMap4Segment;
-
-
- typedef struct TT_CMap4Rec_
- {
- FT_ULong language; /* for Mac fonts (originally ushort) */
-
- FT_UShort segCountX2; /* number of segments * 2 */
- FT_UShort searchRange; /* these parameters can be used */
- FT_UShort entrySelector; /* for a binary search */
- FT_UShort rangeShift;
-
- TT_CMap4Segment segments;
- FT_UShort* glyphIdArray;
- FT_UShort numGlyphId; /* control value */
-
- TT_CMap4Segment last_segment; /* last used segment; this is a small */
- /* cache to potentially increase speed */
- } TT_CMap4Rec, *TT_CMap4;
-
-
- /* format 6 */
-
- typedef struct TT_CMap6_
- {
- FT_ULong language; /* for Mac fonts (originally ushort) */
-
- FT_UShort firstCode; /* first character code of subrange */
- FT_UShort entryCount; /* number of character codes in subrange */
-
- FT_UShort* glyphIdArray;
-
- } TT_CMap6Rec, *TT_CMap6;
-
-
- /* auxiliary table for format 8 and 12 */
-
- typedef struct TT_CMapGroupRec_
- {
- FT_ULong startCharCode;
- FT_ULong endCharCode;
- FT_ULong startGlyphID;
-
- } TT_CMapGroupRec, *TT_CMapGroup;
-
-
- /* FreeType handles format 8 and 12 identically. It is not necessary to
- cover mixed 16bit and 32bit codes since FreeType always uses FT_ULong
- for input character codes -- converting Unicode surrogates to 32bit
- character codes must be done by the application. */
-
- typedef struct TT_CMap8_12Rec_
- {
- FT_ULong language; /* for Mac fonts */
-
- FT_ULong nGroups;
- TT_CMapGroup groups;
-
- TT_CMapGroup last_group; /* last used group; this is a small */
- /* cache to potentially increase speed */
- } TT_CMap8_12Rec, *TT_CMap8_12;
-
-
- /* format 10 */
-
- typedef struct TT_CMap10Rec_
- {
- FT_ULong language; /* for Mac fonts */
-
- FT_ULong startCharCode; /* first character covered */
- FT_ULong numChars; /* number of characters covered */
-
- FT_UShort* glyphs;
-
- } TT_CMap10Rec, *TT_CMap10;
-
-
- typedef struct TT_CMapTableRec_* TT_CMapTable;
-
-
- typedef FT_UInt
- (*TT_CharMap_Func)( TT_CMapTable charmap,
- FT_ULong char_code );
-
- typedef FT_ULong
- (*TT_CharNext_Func)( TT_CMapTable charmap,
- FT_ULong char_code );
-
-
- /* charmap table */
- typedef struct TT_CMapTableRec_
- {
- FT_UShort platformID;
- FT_UShort platformEncodingID;
- FT_UShort format;
- FT_ULong length; /* must be ulong for formats 8, 10, and 12 */
-
- FT_Bool loaded;
- FT_ULong offset;
-
- union
- {
- TT_CMap0Rec cmap0;
- TT_CMap2Rec cmap2;
- TT_CMap4Rec cmap4;
- TT_CMap6Rec cmap6;
- TT_CMap8_12Rec cmap8_12;
- TT_CMap10Rec cmap10;
- } c;
-
- TT_CharMap_Func get_index;
- TT_CharNext_Func get_next_char;
-
- } TT_CMapTableRec;
-
-
- /*************************************************************************/
- /* */
- /* <Struct> */
- /* TT_CharMapRec */
- /* */
- /* <Description> */
- /* The TrueType character map object type. */
- /* */
- /* <Fields> */
- /* root :: The parent character map structure. */
- /* */
- /* cmap :: The used character map. */
- /* */
- typedef struct TT_CharMapRec_
- {
- FT_CharMapRec root;
- TT_CMapTableRec cmap;
-
- } TT_CharMapRec;
-
-
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /*** ***/
- /*** ***/
/*** ORIGINAL TT_FACE CLASS DEFINITION ***/
/*** ***/
/*** ***/
@@ -1121,9 +836,8 @@ FT_BEGIN_HEADER
/* This structure/class is defined here because it is common to the */
/* following formats: TTF, OpenType-TT, and OpenType-CFF. */
/* */
- /* Note, however, that the classes TT_Size, TT_GlyphSlot, and TT_CharMap */
- /* are not shared between font drivers, and are thus defined in */
- /* `ttobjs.h'. */
+ /* Note, however, that the classes TT_Size and TT_GlyphSlot are not */
+ /* shared between font drivers, and are thus defined in `ttobjs.h'. */
/* */
/*************************************************************************/
@@ -1145,17 +859,6 @@ FT_BEGIN_HEADER
typedef struct TT_FaceRec_* TT_Face;
- /*************************************************************************/
- /* */
- /* <Type> */
- /* TT_CharMap */
- /* */
- /* <Description> */
- /* A handle to a TrueType character mapping object. */
- /* */
- typedef struct TT_CharMapRec_* TT_CharMap;
-
-
/* a function type used for the truetype bytecode interpreter hooks */
typedef FT_Error
(*TT_Interpreter)( void* exec_context );
@@ -1341,15 +1044,6 @@ FT_BEGIN_HEADER
/* cmap_size :: The size in bytes of the `cmap_table' */
/* described above. */
/* */
- /* num_charmaps :: The number of character mappings in the */
- /* font. */
- /* */
- /* charmaps :: The array of charmap objects for this font */
- /* file. Note that this field is a typeless */
- /* pointer. The Reason is that the format of */
- /* charmaps varies with the underlying font */
- /* format and cannot be determined here. */
- /* */
/* goto_table :: A function called by each TrueType table */
/* loader to position a stream's cursor to */
/* the start of a given table according to */
@@ -1375,10 +1069,9 @@ FT_BEGIN_HEADER
/* It must be called after the header was */
/* read, and before the `forget'. */
/* */
- /* sfnt :: A pointer to the SFNT `driver' interface. */
+ /* sfnt :: A pointer to the SFNT service. */
/* */
- /* psnames :: A pointer to the `PSNames' module */
- /* interface. */
+ /* psnames :: A pointer to the PostScript names service. */
/* */
/* hdmx :: The face's horizontal device metrics */
/* (`hdmx' table). This table is optional in */
@@ -1456,6 +1149,9 @@ FT_BEGIN_HEADER
/* interpreters field is also used to hook */
/* the debugger in `ttdebug'. */
/* */
+ /* unpatented_hinting :: If true, use only unpatented methods in */
+ /* the bytecode interpreter. */
+ /* */
/* extra :: Reserved for third-party font drivers. */
/* */
typedef struct TT_FaceRec_
@@ -1494,14 +1190,15 @@ FT_BEGIN_HEADER
TT_Loader_ReadGlyphFunc read_simple_glyph;
TT_Loader_ReadGlyphFunc read_composite_glyph;
- /* a typeless pointer to the SFNT_Interface table used to load */
- /* the basic TrueType tables in the face object */
+ /* a typeless pointer to the SFNT_Interface table used to load */
+ /* the basic TrueType tables in the face object */
void* sfnt;
- /* a typeless pointer to the PSNames_Interface table used to */
- /* handle glyph names <-> unicode & Mac values */
+ /* a typeless pointer to the FT_Service_PsCMapsRec table used to */
+ /* handle glyph names <-> unicode & Mac values */
void* psnames;
+
/***********************************************************************/
/* */
/* Optional TrueType/OpenType tables */
@@ -1559,6 +1256,10 @@ FT_BEGIN_HEADER
/* used to hook the debugger for the `ttdebug' utility. */
TT_Interpreter interpreter;
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ /* Use unpatented hinting only. */
+ FT_Bool unpatented_hinting;
+#endif
/***********************************************************************/
/* */
@@ -1569,6 +1270,8 @@ FT_BEGIN_HEADER
FT_Generic extra;
+ const char* postscript_name;
+
} TT_FaceRec;
@@ -1639,11 +1342,15 @@ FT_BEGIN_HEADER
FT_BBox bbox;
FT_Int left_bearing;
FT_Int advance;
+ FT_Int top_bearing;
+ FT_Int vadvance;
FT_Int linear;
FT_Bool linear_def;
FT_Bool preserve_pps;
FT_Vector pp1;
FT_Vector pp2;
+ FT_Vector pp3;
+ FT_Vector pp4;
FT_ULong glyf_offset;
diff --git a/extras/freetype2/include/freetype/t1tables.h b/extras/freetype2/include/freetype/t1tables.h
index 200ba9be5..1b89c5f51 100644
--- a/extras/freetype2/include/freetype/t1tables.h
+++ b/extras/freetype2/include/freetype/t1tables.h
@@ -5,7 +5,7 @@
/* Basic Type 1/Type 2 tables definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,6 +24,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
@@ -129,6 +135,8 @@ FT_BEGIN_HEADER
FT_Short snap_widths [13]; /* including std width */
FT_Short snap_heights[13]; /* including std height */
+ FT_Fixed expansion_factor;
+
FT_Long language_group;
FT_Long password;
@@ -157,7 +165,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* A set of flags used to indicate which fields are present in a */
- /* given blen dictionary (font info or private). Used to support */
+ /* given blend dictionary (font info or private). Used to support */
/* Multiple Masters fonts. */
/* */
typedef enum
@@ -314,7 +322,7 @@ FT_BEGIN_HEADER
/* CID_Info */
/* */
/* <Description> */
- /* This type is equivalent to @CID_FaceInfoRec. It is deprecated but */
+ /* This type is equivalent to CID_FaceInfoRec. It is deprecated but */
/* kept to maintain source compatibility between various versions of */
/* FreeType. */
/* */
@@ -373,7 +381,7 @@ FT_BEGIN_HEADER
* the face and don't need to be freed by the caller.
*
* If the font's format is not Postscript-based, this function will
- * return the @FT_Err_Invalid_Argument error code.
+ * return the FT_Err_Invalid_Argument error code.
*/
FT_EXPORT( FT_Error )
FT_Get_PS_Font_Info( FT_Face face,
diff --git a/extras/freetype2/include/freetype/ttnameid.h b/extras/freetype2/include/freetype/ttnameid.h
index 9428ac643..848374fe2 100644
--- a/extras/freetype2/include/freetype/ttnameid.h
+++ b/extras/freetype2/include/freetype/ttnameid.h
@@ -4,7 +4,7 @@
/* */
/* TrueType name ID definitions (specification only). */
/* */
-/* Copyright 1996-2002 by */
+/* Copyright 1996-2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -41,7 +41,7 @@ FT_BEGIN_HEADER
*
* @description:
* A list of valid values for the `platform_id' identifier code in
- * @FT_CharmapRec and @FT_SfntName structures.
+ * @FT_CharMapRec and @FT_SfntName structures.
*
* @values:
* TT_PLATFORM_APPLE_UNICODE ::
@@ -231,34 +231,33 @@ FT_BEGIN_HEADER
*
* @values:
* TT_MS_ID_SYMBOL_CS ::
- * Corresponds to symbol encodings. see @FT_ENCODING_MS_SYMBOL.
+ * Corresponds to Microsoft symbol encoding. See
+ * @FT_ENCODING_MS_SYMBOL.
*
* TT_MS_ID_UNICODE_CS ::
* Corresponds to a Microsoft WGL4 charmap, matching Unicode. See
* @FT_ENCODING_UNICODE.
*
* TT_MS_ID_SJIS ::
- * Corresponds to Microsoft SJIS Japanese encoding.
- * See @FT_ENCODING_MS_SJIS.
+ * Corresponds to SJIS Japanese encoding. See @FT_ENCODING_SJIS.
*
* TT_MS_ID_GB2312 ::
- * Corresponds to Microsoft Simplified Chinese as used in Mainland
- * China. See @FT_ENCODING_MS_GB2312.
+ * Corresponds to Simplified Chinese as used in Mainland China. See
+ * @FT_ENCODING_GB2312.
*
* TT_MS_ID_BIG_5 ::
- * Corresponds to Microsoft Traditional Chinese as used in Taiwan and
- * Hong Kong. See @FT_ENCODING_MS_BIG5.
+ * Corresponds to Traditional Chinese as used in Taiwan and Hong Kong.
+ * See @FT_ENCODING_BIG5.
*
* TT_MS_ID_WANSUNG ::
- * Corresponds to Microsoft Korean Wansung encoding. See
- * @FT_ENCODING_MS_WANSUNG.
+ * Corresponds to Korean Wansung encoding. See @FT_ENCODING_WANSUNG.
*
* TT_MS_ID_JOHAB ::
- * Corresponds to Microsoft Johab encoding. See @FT_ENCODING_MS_JOHAB.
+ * Corresponds to Johab encoding. See @FT_ENCODING_JOHAB.
*
* TT_MS_ID_UCS_4 ::
- * Corresponds to UCS-4 or UTF-32 charmaps. This has been added into
- * OpenType specification as of version 1.4 (mid-2001.)
+ * Corresponds to UCS-4 or UTF-32 charmaps. This has been added to
+ * the OpenType specification version 1.4 (mid-2001.)
*/
#define TT_MS_ID_SYMBOL_CS 0
@@ -292,6 +291,7 @@ FT_BEGIN_HEADER
#define TT_ADOBE_ID_STANDARD 0
#define TT_ADOBE_ID_EXPERT 1
#define TT_ADOBE_ID_CUSTOM 2
+#define TT_ADOBE_ID_LATIN_1 3
/*************************************************************************/
@@ -705,8 +705,8 @@ FT_BEGIN_HEADER
#define TT_MS_LANGID_SPANISH_UNITED_STATES 0x540a
/* The following two IDs blatantly violate MS specs by using a */
/* sublanguage > 0x1F. */
-#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40a
-#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40c
+#define TT_MS_LANGID_SPANISH_LATIN_AMERICA 0xE40aU
+#define TT_MS_LANGID_FRENCH_NORTH_AFRICA 0xE40cU
#define TT_MS_LANGID_FRENCH_MOROCCO 0x380c
#define TT_MS_LANGID_FRENCH_HAITI 0x3c0c
diff --git a/extras/freetype2/include/freetype/tttables.h b/extras/freetype2/include/freetype/tttables.h
index 45996322c..22247913e 100644
--- a/extras/freetype2/include/freetype/tttables.h
+++ b/extras/freetype2/include/freetype/tttables.h
@@ -5,7 +5,7 @@
/* Basic SFNT/TrueType tables definitions and interface */
/* (specification only). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,6 +24,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
@@ -541,8 +547,15 @@ FT_BEGIN_HEADER
} TT_MaxProfile;
- /* */
-
+ /*************************************************************************/
+ /* */
+ /* <Enum> */
+ /* FT_Sfnt_Tag */
+ /* */
+ /* <Description> */
+ /* An enumeration used to specify the index of an SFNT table. */
+ /* Used in the @FT_Get_Sfnt_Table API function. */
+ /* */
typedef enum
{
ft_sfnt_head = 0,
@@ -553,15 +566,11 @@ FT_BEGIN_HEADER
ft_sfnt_post = 5,
ft_sfnt_pclt = 6,
- sfnt_max /* don't remove */
+ sfnt_max /* internal end mark */
} FT_Sfnt_Tag;
-
- /* internal use only */
- typedef void*
- (*FT_Get_Sfnt_Table_Func)( FT_Face face,
- FT_Sfnt_Tag tag );
+ /* */
/*************************************************************************/
@@ -586,13 +595,14 @@ FT_BEGIN_HEADER
/* The table is owned by the face object and disappears with it. */
/* */
/* This function is only useful to access SFNT tables that are loaded */
- /* by the sfnt/truetype/opentype drivers. See FT_Sfnt_Tag for a */
+ /* by the sfnt/truetype/opentype drivers. See @FT_Sfnt_Tag for a */
/* list. */
/* */
FT_EXPORT( void* )
FT_Get_Sfnt_Table( FT_Face face,
FT_Sfnt_Tag tag );
+
/**************************************************************************
*
* <Function>
@@ -602,54 +612,77 @@ FT_BEGIN_HEADER
* Loads any font table into client memory.
*
* <Input>
- * face :: handle to source face.
- * tag :: the 4-byte tag of the table to load. Use the value 0 if
- * you want to access the whole font file. Else, you can use
- * one of the definitions found in the @FT_TRUETYPE_TAGS_H
- * file, or forge a new one with @FT_MAKE_TAG
+ * face :: A handle to the source face.
+ *
+ * tag :: The 4-byte tag of the table to load. Use the value 0 if
+ * you want to access the whole font file. Otherwise, you can
+ * use one of the definitions found in the @FT_TRUETYPE_TAGS_H
+ * file, or forge a new one with @FT_MAKE_TAG.
*
- * offset :: the starting offset in the table (or file if tag == 0)
+ * offset :: The starting offset in the table (or file if tag == 0).
*
* <Output>
- * buffer :: target buffer address. client must ensure that there are
- * enough bytes in it.
+ * buffer :: The target buffer address. The client must ensure that
+ * the memory array is big enough to hold the data.
*
* <InOut>
- * length :: if the 'length' parameter is NULL, then try to load the whole
- * table, and return an error code if it fails.
+ * length :: If the `length' parameter is NULL, then try to load the whole
+ * table. Return an error code if it fails.
*
- * else, if '*length' is 0, then exit immediately while returning
+ * Else, if `*length' is 0, exit immediately while returning
* the table's (or file) full size in it.
*
- * else, the number of bytes to read from the table or file,
+ * Else the number of bytes to read from the table or file,
* from the starting offset.
*
* <Return>
- * error code. 0 means success
+ * FreeType error code. 0 means success.
*
* <Note>
- * if you need to determine the table's length you should first call this
- * function with "*length" set to 0, as in the following example:
+ * If you need to determine the table's length you should first call this
+ * function with `*length' set to 0, as in the following example:
*
* {
* FT_ULong length = 0;
*
+ *
* error = FT_Load_Sfnt_Table( face, tag, 0, NULL, &length );
* if ( error ) { ... table does not exist ... }
*
* buffer = malloc( length );
- * if ( buffer == NULL ) { ... not enough memory ... }
+ * if ( buffer == NULL ) { ... not enough memory ... }
*
* error = FT_Load_Sfnt_Table( face,tag, 0, buffer, &length );
* if ( error ) { ... could not load table ... }
* }
*/
FT_EXPORT( FT_Error )
- FT_Load_Sfnt_Table( FT_Face face,
- FT_ULong tag,
- FT_Long offset,
- FT_Byte* buffer,
- FT_ULong* length );
+ FT_Load_Sfnt_Table( FT_Face face,
+ FT_ULong tag,
+ FT_Long offset,
+ FT_Byte* buffer,
+ FT_ULong* length );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_Get_CMap_Language_ID */
+ /* */
+ /* <Description> */
+ /* Return TrueType/sfnt specific cmap language ID. Definitions of */
+ /* language ID values are in freetype/ttnameid.h. */
+ /* */
+ /* <Input> */
+ /* charmap :: */
+ /* The target charmap. */
+ /* */
+ /* <Return> */
+ /* The language ID of `charmap'. If `charmap' doesn't belong to a */
+ /* TrueType/sfnt face, just return 0 as the default value. */
+ /* */
+ FT_EXPORT( FT_ULong )
+ FT_Get_CMap_Language_ID( FT_CharMap charmap );
/* */
diff --git a/extras/freetype2/include/freetype/tttags.h b/extras/freetype2/include/freetype/tttags.h
index df09f2a69..ac64758b1 100644
--- a/extras/freetype2/include/freetype/tttags.h
+++ b/extras/freetype2/include/freetype/tttags.h
@@ -23,6 +23,12 @@
#include <ft2build.h>
#include FT_FREETYPE_H
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
FT_BEGIN_HEADER
diff --git a/extras/freetype2/include/freetype/ttunpat.h b/extras/freetype2/include/freetype/ttunpat.h
new file mode 100644
index 000000000..0bc0a6fe0
--- /dev/null
+++ b/extras/freetype2/include/freetype/ttunpat.h
@@ -0,0 +1,59 @@
+/***************************************************************************/
+/* */
+/* ttunpat.h */
+/* */
+/* Definitions for the unpatented TrueType hinting system */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* Written by Graham Asher <graham.asher@btinternet.com> */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __TTUNPAT_H__
+#define __TTUNPAT_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+#ifdef FREETYPE_H
+#error "freetype.h of FreeType 1 has been loaded!"
+#error "Please fix the directory search order for header files"
+#error "so that freetype.h of FreeType 2 is found first."
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+ /***************************************************************************
+ *
+ * @constant:
+ * FT_PARAM_TAG_UNPATENTED_HINTING
+ *
+ * @description:
+ * A constant used as the tag of an @FT_Parameter structure to indicate
+ * that unpatented methods only should be used by the TrueType bytecode
+ * interpreter for a typeface opened by FT_Open_Face.
+ *
+ */
+#define FT_PARAM_TAG_UNPATENTED_HINTING FT_MAKE_TAG( 'u', 'n', 'p', 'a' )
+
+ /* */
+
+FT_END_HEADER
+
+
+#endif /* __TTUNPAT_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/objs/.cvsignore b/extras/freetype2/objs/.cvsignore
index d17e85ed3..78197f370 100644
--- a/extras/freetype2/objs/.cvsignore
+++ b/extras/freetype2/objs/.cvsignore
@@ -1,3 +1,4 @@
*.lo
libfreetype.la
+freetype.lib
.libs
diff --git a/extras/freetype2/src/autofit/Jamfile b/extras/freetype2/src/autofit/Jamfile
new file mode 100644
index 000000000..3063f2371
--- /dev/null
+++ b/extras/freetype2/src/autofit/Jamfile
@@ -0,0 +1,18 @@
+SubDir FT2_TOP src autofit ;
+
+{
+ local _sources ;
+
+ if $(FT2_MULTI)
+ {
+ _sources = afangles afglobal afhints aflatin afloader afmodule afdummy ;
+ }
+ else
+ {
+ _sources = autofit ;
+ }
+
+ Library $(FT2_LIB) : $(_sources).c ;
+}
+
+# end of src/autofir Jamfile
diff --git a/extras/freetype2/src/autofit/afangles.c b/extras/freetype2/src/autofit/afangles.c
new file mode 100644
index 000000000..10a8cff25
--- /dev/null
+++ b/extras/freetype2/src/autofit/afangles.c
@@ -0,0 +1,214 @@
+#include "aftypes.h"
+
+ /* this table was generated for AF_ANGLE_PI = 256 */
+#define AF_ANGLE_MAX_ITERS 8
+#define AF_TRIG_MAX_ITERS 9
+
+ static const FT_Fixed
+ af_angle_arctan_table[9] =
+ {
+ 90, 64, 38, 20, 10, 5, 3, 1, 1
+ };
+
+
+ static FT_Int
+ af_angle_prenorm( FT_Vector* vec )
+ {
+ FT_Fixed x, y, z;
+ FT_Int shift;
+
+
+ x = vec->x;
+ y = vec->y;
+
+ z = ( ( x >= 0 ) ? x : - x ) | ( (y >= 0) ? y : -y );
+ shift = 0;
+
+ if ( z < ( 1L << 27 ) )
+ {
+ do
+ {
+ shift++;
+ z <<= 1;
+ } while ( z < ( 1L << 27 ) );
+
+ vec->x = x << shift;
+ vec->y = y << shift;
+ }
+ else if ( z > ( 1L << 28 ) )
+ {
+ do
+ {
+ shift++;
+ z >>= 1;
+ } while ( z > ( 1L << 28 ) );
+
+ vec->x = x >> shift;
+ vec->y = y >> shift;
+ shift = -shift;
+ }
+ return shift;
+ }
+
+
+ static void
+ af_angle_pseudo_polarize( FT_Vector* vec )
+ {
+ FT_Fixed theta;
+ FT_Fixed yi, i;
+ FT_Fixed x, y;
+ const FT_Fixed *arctanptr;
+
+
+ x = vec->x;
+ y = vec->y;
+
+ /* Get the vector into the right half plane */
+ theta = 0;
+ if ( x < 0 )
+ {
+ x = -x;
+ y = -y;
+ theta = 2 * AF_ANGLE_PI2;
+ }
+
+ if ( y > 0 )
+ theta = - theta;
+
+ arctanptr = af_angle_arctan_table;
+
+ if ( y < 0 )
+ {
+ /* Rotate positive */
+ yi = y + ( x << 1 );
+ x = x - ( y << 1 );
+ y = yi;
+ theta -= *arctanptr++; /* Subtract angle */
+ }
+ else
+ {
+ /* Rotate negative */
+ yi = y - ( x << 1 );
+ x = x + ( y << 1 );
+ y = yi;
+ theta += *arctanptr++; /* Add angle */
+ }
+
+ i = 0;
+ do
+ {
+ if ( y < 0 )
+ {
+ /* Rotate positive */
+ yi = y + ( x >> i );
+ x = x - ( y >> i );
+ y = yi;
+ theta -= *arctanptr++;
+ }
+ else
+ {
+ /* Rotate negative */
+ yi = y - ( x >> i );
+ x = x + ( y >> i );
+ y = yi;
+ theta += *arctanptr++;
+ }
+ } while ( ++i < AF_TRIG_MAX_ITERS );
+
+ /* round theta */
+ if ( theta >= 0 )
+ theta = FT_PAD_ROUND( theta, 4 );
+ else
+ theta = - FT_PAD_ROUND( theta, 4 );
+
+ vec->x = x;
+ vec->y = theta;
+ }
+
+
+ /* documentation is in fttrigon.h */
+
+ FT_LOCAL_DEF( AF_Angle )
+ af_angle_atan( FT_Fixed dx,
+ FT_Fixed dy )
+ {
+ FT_Vector v;
+
+
+ if ( dx == 0 && dy == 0 )
+ return 0;
+
+ v.x = dx;
+ v.y = dy;
+ af_angle_prenorm( &v );
+ af_angle_pseudo_polarize( &v );
+
+ return v.y;
+ }
+
+
+
+ FT_LOCAL_DEF( AF_Angle )
+ af_angle_diff( AF_Angle angle1,
+ AF_Angle angle2 )
+ {
+ AF_Angle delta = angle2 - angle1;
+
+ delta %= AF_ANGLE_2PI;
+ if ( delta < 0 )
+ delta += AF_ANGLE_2PI;
+
+ if ( delta > AF_ANGLE_PI )
+ delta -= AF_ANGLE_2PI;
+
+ return delta;
+ }
+
+
+ /* well, this needs to be somewhere, right :-)
+ */
+
+ FT_LOCAL_DEF( void )
+ af_sort_pos( FT_UInt count,
+ FT_Pos* table )
+ {
+ FT_UInt i, j;
+ FT_Pos swap;
+
+
+ for ( i = 1; i < count; i++ )
+ {
+ for ( j = i; j > 0; j-- )
+ {
+ if ( table[j] > table[j - 1] )
+ break;
+
+ swap = table[j];
+ table[j] = table[j - 1];
+ table[j - 1] = swap;
+ }
+ }
+ }
+
+
+ FT_LOCAL_DEF( void )
+ af_sort_widths( FT_UInt count,
+ AF_Width table )
+ {
+ FT_UInt i, j;
+ AF_WidthRec swap;
+
+
+ for ( i = 1; i < count; i++ )
+ {
+ for ( j = i; j > 0; j-- )
+ {
+ if ( table[j].org > table[j - 1].org )
+ break;
+
+ swap = table[j];
+ table[j] = table[j - 1];
+ table[j - 1] = swap;
+ }
+ }
+ }
diff --git a/extras/freetype2/src/autofit/afdummy.c b/extras/freetype2/src/autofit/afdummy.c
new file mode 100644
index 000000000..bae5f70a3
--- /dev/null
+++ b/extras/freetype2/src/autofit/afdummy.c
@@ -0,0 +1,35 @@
+#include "afdummy.h"
+
+
+ static FT_Error
+ af_dummy_hints_init( AF_GlyphHints hints,
+ FT_Outline* outline,
+ AF_ScriptMetrics metrics )
+ {
+ return af_glyph_hints_reset( hints,
+ &metrics->scaler,
+ metrics,
+ outline );
+ }
+
+ static FT_Error
+ af_dummy_hints_apply( AF_GlyphHints hints,
+ FT_Outline* outline )
+ {
+ af_glyph_hints_save( hints, outline );
+ }
+
+
+ FT_LOCAL_DEF( const AF_ScriptClassRec ) af_dummy_script_class =
+ {
+ AF_SCRIPT_NONE,
+ NULL,
+
+ sizeof( AF_ScriptMetricsRec ),
+ (AF_Script_InitMetricsFunc) NULL,
+ (AF_Script_ScaleMetricsFunc) NULL,
+ (AF_Script_DoneMetricsFunc) NULL,
+
+ (AF_Script_InitHintsFunc) af_dummy_hints_init,
+ (AF_Script_ApplyHintsFunc) af_dummy_hints_apply
+ };
diff --git a/extras/freetype2/src/autofit/afdummy.h b/extras/freetype2/src/autofit/afdummy.h
new file mode 100644
index 000000000..f4594c0f9
--- /dev/null
+++ b/extras/freetype2/src/autofit/afdummy.h
@@ -0,0 +1,18 @@
+#ifndef __AFDUMMY_H__
+#define __AFDUMMY_H__
+
+#include "aftypes.h"
+
+FT_BEGIN_HEADER
+
+ /* a dummy script metrics class used when no hinting should
+ * be performed. This is the default for non-latin glyphs !
+ */
+
+ FT_LOCAL( const AF_ScriptClassRec ) af_dummy_script_class;
+
+/* */
+
+FT_END_HEADER
+
+#endif /* __AFDUMMY_H__ */
diff --git a/extras/freetype2/src/autofit/afglobal.c b/extras/freetype2/src/autofit/afglobal.c
new file mode 100644
index 000000000..cadc80347
--- /dev/null
+++ b/extras/freetype2/src/autofit/afglobal.c
@@ -0,0 +1,236 @@
+#include "afglobal.h"
+#include "afdummy.h"
+#include "aflatin.h"
+
+ /* populate this list when you add new scripts
+ */
+ static AF_ScriptClass const af_script_classes[] =
+ {
+ & af_dummy_script_class,
+ & af_latin_script_class,
+
+ NULL /* do not remove */
+ };
+
+#define AF_SCRIPT_LIST_DEFAULT 0 /* index of default script in 'af_script_classes' */
+#define AF_SCRIPT_LIST_NONE 255 /* indicates an uncovered glyph */
+
+ /*
+ * note that glyph_scripts[] is used to map each glyph into
+ * an index into the 'af_script_classes' array.
+ *
+ */
+ typedef struct AF_FaceGlobalsRec_
+ {
+ FT_Face face;
+ FT_UInt glyph_count; /* same as face->num_glyphs */
+ FT_Byte* glyph_scripts;
+
+ AF_ScriptMetrics metrics[ AF_SCRIPT_MAX ];
+
+ } AF_FaceGlobalsRec;
+
+
+
+
+ /* this function is used to compute the script index of each glyph
+ * within a given face
+ */
+ static FT_Error
+ af_face_globals_compute_script_coverage( AF_FaceGlobals globals )
+ {
+ FT_Error error = 0;
+ FT_Face face = globals->face;
+ FT_CharMap old_charmap = face->charmap;
+ FT_Byte* gscripts = globals->glyph_scripts;
+ FT_UInt ss;
+
+ /* the value 255 means "uncovered glyph"
+ */
+ FT_MEM_SET( globals->glyph_scripts,
+ AF_SCRIPT_LIST_NONE,
+ globals->glyph_count );
+
+ error = FT_Select_Charmap( face, FT_ENCODING_UNICODE );
+ if ( error )
+ {
+ /* ignore this error, we'll simply use Latin as the standard
+ * script. XXX: Shouldn't we rather disable hinting ??
+ */
+ error = 0;
+ goto Exit;
+ }
+
+ /* scan each script in a Unicode charmap
+ */
+ for ( ss = 0; af_script_classes[ss]; ss++ )
+ {
+ AF_ScriptClass clazz = af_script_classes[ss];
+ AF_Script_UniRange range;
+
+ if ( clazz->script_uni_ranges == NULL )
+ continue;
+
+ /* scan all unicode points in the range, and set the corresponding
+ * glyph script index
+ */
+ for ( range = clazz->script_uni_ranges; range->first != 0; range++ )
+ {
+ FT_ULong charcode = range->first;
+ FT_UInt gindex;
+
+ gindex = FT_Get_Char_Index( face, charcode );
+
+ if ( gindex != 0 &&
+ gindex < globals->glyph_count &&
+ gscripts[ gindex ] == AF_SCRIPT_LIST_NONE )
+ {
+ gscripts[ gindex ] = (FT_Byte) ss;
+ }
+ for (;;)
+ {
+ charcode = FT_Get_Next_Char( face, charcode, &gindex );
+
+ if ( gindex == 0 || charcode > range->last )
+ break;
+
+ if ( gindex < globals->glyph_count &&
+ gscripts[ gindex ] == AF_SCRIPT_LIST_NONE )
+ {
+ gscripts[ gindex ] = (FT_Byte) ss;
+ }
+ }
+ }
+ }
+
+ Exit:
+ /* by default, all uncovered glyphs are set to the latin script
+ * XXX: shouldnt' we disable hinting or do something similar ?
+ */
+ {
+ FT_UInt nn;
+
+ for ( nn = 0; nn < globals->glyph_count; nn++ )
+ {
+ if ( gscripts[ nn ] == AF_SCRIPT_LIST_NONE )
+ gscripts[ nn ] = AF_SCRIPT_LIST_DEFAULT;
+ }
+ }
+
+ FT_Set_Charmap( face, old_charmap );
+ return error;
+ }
+
+
+
+ FT_LOCAL_DEF( FT_Error )
+ af_face_globals_new( FT_Face face,
+ AF_FaceGlobals *aglobals )
+ {
+ FT_Error error;
+ FT_Memory memory;
+ AF_FaceGlobals globals;
+
+ memory = face->memory;
+
+ if ( !FT_ALLOC( globals, sizeof(*globals) +
+ face->num_glyphs*sizeof(FT_Byte) ) )
+ {
+ globals->face = face;
+ globals->glyph_count = face->num_glyphs;
+ globals->glyph_scripts = (FT_Byte*)( globals+1 );
+
+ error = af_face_globals_compute_script_coverage( globals );
+ if ( error )
+ {
+ af_face_globals_free( globals );
+ globals = NULL;
+ }
+ }
+
+ *aglobals = globals;
+ return error;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ af_face_globals_free( AF_FaceGlobals globals )
+ {
+ if ( globals )
+ {
+ FT_Memory memory = globals->face->memory;
+ FT_UInt nn;
+
+ for ( nn = 0; nn < AF_SCRIPT_MAX; nn++ )
+ {
+ if ( globals->metrics[nn] )
+ {
+ AF_ScriptClass clazz = af_script_classes[nn];
+
+ FT_ASSERT( globals->metrics[nn]->clazz == clazz );
+
+ if ( clazz->script_metrics_done )
+ clazz->script_metrics_done( globals->metrics[nn] );
+
+ FT_FREE( globals->metrics[nn] );
+ }
+ }
+
+ globals->glyph_count = 0;
+ globals->glyph_scripts = NULL; /* no need to free this one !! */
+ globals->face = NULL;
+ FT_FREE( globals );
+ }
+ }
+
+
+ FT_LOCAL_DEF( FT_Error )
+ af_face_globals_get_metrics( AF_FaceGlobals globals,
+ FT_UInt gindex,
+ AF_ScriptMetrics *ametrics )
+ {
+ AF_ScriptMetrics metrics = NULL;
+ FT_UInt index;
+ AF_ScriptClass clazz;
+ FT_Error error = 0;
+
+ if ( gindex >= globals->glyph_count )
+ {
+ error = FT_Err_Invalid_Argument;
+ goto Exit;
+ }
+
+ index = globals->glyph_scripts[ gindex ];
+ clazz = af_script_classes[ index ];
+ metrics = globals->metrics[ clazz->script ];
+ if ( metrics == NULL )
+ {
+ /* create the global metrics object when needed
+ */
+ FT_Memory memory = globals->face->memory;
+
+ if ( FT_ALLOC( metrics, clazz->script_metrics_size ) )
+ goto Exit;
+
+ metrics->clazz = clazz;
+
+ if ( clazz->script_metrics_init )
+ {
+ error = clazz->script_metrics_init( metrics, globals->face );
+ if ( error )
+ {
+ if ( clazz->script_metrics_done )
+ clazz->script_metrics_done( metrics );
+
+ FT_FREE( metrics );
+ goto Exit;
+ }
+ }
+
+ globals->metrics[ clazz->script ] = metrics;
+ }
+
+ Exit:
+ *ametrics = metrics;
+ return error;
+ }
diff --git a/extras/freetype2/src/autofit/afglobal.h b/extras/freetype2/src/autofit/afglobal.h
new file mode 100644
index 000000000..64f35c3ff
--- /dev/null
+++ b/extras/freetype2/src/autofit/afglobal.h
@@ -0,0 +1,41 @@
+#ifndef __AF_GLOBAL_H__
+#define __AF_GLOBAL_H__
+
+#include "aftypes.h"
+
+FT_BEGIN_HEADER
+
+ /**************************************************************************/
+ /**************************************************************************/
+ /***** *****/
+ /***** F A C E G L O B A L S *****/
+ /***** *****/
+ /**************************************************************************/
+ /**************************************************************************/
+
+
+ /*
+ * models the global hints data for a given face, decomposed into
+ * script-specific items..
+ *
+ */
+ typedef struct AF_FaceGlobalsRec_* AF_FaceGlobals;
+
+
+ FT_LOCAL( FT_Error )
+ af_face_globals_new( FT_Face face,
+ AF_FaceGlobals *aglobals );
+
+ FT_LOCAL( FT_Error )
+ af_face_globals_get_metrics( AF_FaceGlobals globals,
+ FT_UInt gindex,
+ AF_ScriptMetrics *ametrics );
+
+ FT_LOCAL( void )
+ af_face_globals_free( AF_FaceGlobals globals );
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __AF_GLOBALS_H__ */
diff --git a/extras/freetype2/src/autofit/afhints.c b/extras/freetype2/src/autofit/afhints.c
new file mode 100644
index 000000000..d0dca1526
--- /dev/null
+++ b/extras/freetype2/src/autofit/afhints.c
@@ -0,0 +1,986 @@
+#include "afhints.h"
+
+#ifdef AF_DEBUG
+
+#include <stdio.h>
+
+ static const char* af_dir_str( AF_Direction dir )
+ {
+ const char* result;
+
+ switch (dir)
+ {
+ case AF_DIR_UP: result = "up"; break;
+ case AF_DIR_DOWN: result = "down"; break;
+ case AF_DIR_LEFT: result = "left"; break;
+ case AF_DIR_RIGHT: result = "right"; break;
+ default: result = "none";
+ }
+ return result;
+ }
+
+#define AF_INDEX_NUM(ptr,base) ( (ptr) ? ((ptr)-(base)) : -1 )
+
+ void
+ af_glyph_hints_dump_points( AF_GlyphHints hints )
+ {
+ AF_Point points = hints->points;
+ AF_Point limit = points + hints->num_points;
+ AF_Point point;
+
+ printf( "Table of points:\n" );
+ printf( " [ index | xorg | yorg | xscale | yscale | xfit | yfit | flags ]\n" );
+ for ( point = points; point < limit; point++ )
+ {
+ printf( " [ %5d | %5d | %5d | %-5.2f | %-5.2f | %-5.2f | %-5.2f | %c%c%c%c%c%c ]\n",
+ point - points,
+ point->fx,
+ point->fy,
+ point->ox/64.0,
+ point->oy/64.0,
+ point->x/64.0,
+ point->y/64.0,
+ (point->flags & AF_FLAG_WEAK_INTERPOLATION) ? 'w' : ' ',
+ (point->flags & AF_FLAG_INFLECTION) ? 'i' : ' ',
+ (point->flags & AF_FLAG_EXTREMA_X) ? '<' : ' ',
+ (point->flags & AF_FLAG_EXTREMA_Y) ? 'v' : ' ',
+ (point->flags & AF_FLAG_ROUND_X) ? '(' : ' ',
+ (point->flags & AF_FLAG_ROUND_Y) ? 'u' : ' '
+ );
+ }
+ printf( "\n" );
+ }
+
+
+ /* A function used to dump the array of linked segments */
+ void
+ af_glyph_hints_dump_segments( AF_GlyphHints hints )
+ {
+ AF_Point points = hints->points;
+ FT_Int dimension;
+
+ for ( dimension = 1; dimension >= 0; dimension-- )
+ {
+ AF_AxisHints axis = &hints->axis[dimension];
+ AF_Segment segments = axis->segments;
+ AF_Segment limit = segments + axis->num_segments;
+ AF_Segment seg;
+
+
+ printf ( "Table of %s segments:\n",
+ dimension == AF_DIMENSION_HORZ ? "vertical" : "horizontal" );
+ printf ( " [ index | pos | dir | link | serif |"
+ " numl | first | start ]\n" );
+
+ for ( seg = segments; seg < limit; seg++ )
+ {
+ printf ( " [ %5d | %4d | %5s | %4d | %5d | %4d | %5d | %5d ]\n",
+ seg - segments,
+ (int)seg->pos,
+ af_dir_str( seg->dir ),
+ AF_INDEX_NUM( seg->link, segments ),
+ AF_INDEX_NUM( seg->serif, segments ),
+ (int)seg->num_linked,
+ seg->first - points,
+ seg->last - points );
+ }
+ printf( "\n" );
+ }
+ }
+
+
+ void
+ af_glyph_hints_dump_edges( AF_GlyphHints hints )
+ {
+ FT_Int dimension;
+
+ for ( dimension = 1; dimension >= 0; dimension-- )
+ {
+ AF_AxisHints axis = &hints->axis[ dimension ];
+ AF_Edge edges = axis->edges;
+ AF_Edge limit = edges + axis->num_edges;
+ AF_Edge edge;
+
+ /* note: AF_DIMENSION_HORZ corresponds to _vertical_ edges
+ * since they have constant X coordinate
+ */
+ printf ( "Table of %s edges:\n",
+ dimension == AF_DIMENSION_HORZ ? "vertical" : "horizontal" );
+ printf ( " [ index | pos | dir | link |"
+ " serif | blue | opos | pos ]\n" );
+
+ for ( edge = edges; edge < limit; edge++ )
+ {
+ printf ( " [ %5d | %4d | %5s | %4d | %5d | %c | %5.2f | %5.2f ]\n",
+ edge - edges,
+ (int)edge->fpos,
+ af_dir_str( edge->dir ),
+ AF_INDEX_NUM( edge->link, edges ),
+ AF_INDEX_NUM( edge->serif, edges ),
+ edge->blue_edge ? 'y' : 'n',
+ edge->opos / 64.0,
+ edge->pos / 64.0 );
+ }
+
+ printf( "\n" );
+ }
+ }
+
+
+
+#endif /* AF_DEBUG */
+
+
+ /* compute the direction value of a given vector */
+ FT_LOCAL_DEF( AF_Direction )
+ af_direction_compute( FT_Pos dx,
+ FT_Pos dy )
+ {
+ AF_Direction dir;
+ FT_Pos ax = FT_ABS( dx );
+ FT_Pos ay = FT_ABS( dy );
+
+
+ dir = AF_DIR_NONE;
+
+ /* atan(1/12) == 4.7 degrees */
+
+ /* test for vertical direction */
+ if ( ax * 12 < ay )
+ {
+ dir = dy > 0 ? AF_DIR_UP : AF_DIR_DOWN;
+ }
+ /* test for horizontal direction */
+ else if ( ay * 12 < ax )
+ {
+ dir = dx > 0 ? AF_DIR_RIGHT : AF_DIR_LEFT;
+ }
+
+ return dir;
+ }
+
+
+ /* compute all inflex points in a given glyph */
+ static void
+ af_glyph_hints_compute_inflections( AF_GlyphHints hints )
+ {
+ AF_Point* contour = hints->contours;
+ AF_Point* contour_limit = contour + hints->num_contours;
+
+
+ /* do each contour separately */
+ for ( ; contour < contour_limit; contour++ )
+ {
+ AF_Point point = contour[0];
+ AF_Point first = point;
+ AF_Point start = point;
+ AF_Point end = point;
+ AF_Point before;
+ AF_Point after;
+ AF_Angle angle_in, angle_seg, angle_out;
+ AF_Angle diff_in, diff_out;
+ FT_Int finished = 0;
+
+
+ /* compute first segment in contour */
+ first = point;
+
+ start = end = first;
+ do
+ {
+ end = end->next;
+ if ( end == first )
+ goto Skip;
+
+ } while ( end->fx == first->fx && end->fy == first->fy );
+
+ angle_seg = af_angle_atan( end->fx - start->fx,
+ end->fy - start->fy );
+
+ /* extend the segment start whenever possible */
+ before = start;
+ do
+ {
+ do
+ {
+ start = before;
+ before = before->prev;
+ if ( before == first )
+ goto Skip;
+
+ } while ( before->fx == start->fx && before->fy == start->fy );
+
+ angle_in = af_angle_atan( start->fx - before->fx,
+ start->fy - before->fy );
+
+ } while ( angle_in == angle_seg );
+
+ first = start;
+ diff_in = af_angle_diff( angle_in, angle_seg );
+
+ /* now, process all segments in the contour */
+ do
+ {
+ /* first, extend current segment's end whenever possible */
+ after = end;
+ do
+ {
+ do
+ {
+ end = after;
+ after = after->next;
+ if ( after == first )
+ finished = 1;
+
+ } while ( end->fx == after->fx && end->fy == after->fy );
+
+ angle_out = af_angle_atan( after->fx - end->fx,
+ after->fy - end->fy );
+
+ } while ( angle_out == angle_seg );
+
+ diff_out = af_angle_diff( angle_seg, angle_out );
+
+ if ( ( diff_in ^ diff_out ) < 0 )
+ {
+ /* diff_in and diff_out have different signs, we have */
+ /* inflection points here... */
+ do
+ {
+ start->flags |= AF_FLAG_INFLECTION;
+ start = start->next;
+
+ } while ( start != end );
+
+ start->flags |= AF_FLAG_INFLECTION;
+ }
+
+ start = end;
+ end = after;
+ angle_seg = angle_out;
+ diff_in = diff_out;
+
+ } while ( !finished );
+
+ Skip:
+ ;
+ }
+ }
+
+
+
+ FT_LOCAL_DEF( void )
+ af_glyph_hints_init( AF_GlyphHints hints,
+ FT_Memory memory )
+ {
+ FT_ZERO( hints );
+ hints->memory = memory;
+ }
+
+
+
+ FT_LOCAL_DEF( void )
+ af_glyph_hints_done( AF_GlyphHints hints )
+ {
+ if ( hints && hints->memory )
+ {
+ FT_Memory memory = hints->memory;
+ AF_Dimension dim;
+
+ /* note that we don't need to free the segment and edge
+ * buffers, since they're really within the hints->points array
+ */
+ for ( dim = 0; dim < 2; dim++ )
+ {
+ AF_AxisHints axis = &hints->axis[ dim ];
+
+ axis->num_segments = 0;
+ axis->num_edges = 0;
+ axis->segments = NULL;
+ axis->edges = NULL;
+ }
+
+ FT_FREE( hints->contours );
+ hints->max_contours = 0;
+ hints->num_contours = 0;
+
+ FT_FREE( hints->points );
+ hints->num_points = 0;
+ hints->max_points = 0;
+
+ hints->memory = NULL;
+ }
+ }
+
+
+
+ FT_LOCAL_DEF( FT_Error )
+ af_glyph_hints_reset( AF_GlyphHints hints,
+ AF_Scaler scaler,
+ AF_ScriptMetrics metrics,
+ FT_Outline* outline )
+ {
+ FT_Error error = FT_Err_Ok;
+ AF_Point points;
+ FT_UInt old_max, new_max;
+ FT_Fixed x_scale = scaler->x_scale;
+ FT_Fixed y_scale = scaler->y_scale;
+ FT_Pos x_delta = scaler->x_delta;
+ FT_Pos y_delta = scaler->y_delta;
+ FT_Memory memory = hints->memory;
+
+ hints->metrics = metrics;
+
+ hints->scaler_flags = scaler->flags;
+ hints->other_flags = 0;
+
+ hints->num_points = 0;
+ hints->num_contours = 0;
+
+ hints->axis[0].num_segments = 0;
+ hints->axis[0].num_edges = 0;
+ hints->axis[1].num_segments = 0;
+ hints->axis[1].num_edges = 0;
+
+ /* first of all, reallocate the contours array when necessary
+ */
+ new_max = (FT_UInt) outline->n_contours;
+ old_max = hints->max_contours;
+ if ( new_max > old_max )
+ {
+ new_max = (new_max + 3) & ~3;
+
+ if ( FT_RENEW_ARRAY( hints->contours, old_max, new_max ) )
+ goto Exit;
+
+ hints->max_contours = new_max;
+ }
+
+ /* then, reallocate the points, segments & edges arrays if needed --
+ * note that we reserved two additional point positions, used to
+ * hint metrics appropriately
+ */
+ new_max = (FT_UInt)( outline->n_points + 2 );
+ old_max = hints->max_points;
+ if ( new_max > old_max )
+ {
+ FT_Byte* items;
+ FT_ULong off1, off2, off3;
+
+ /* we store in a single buffer the following arrays:
+ *
+ * - an array of N AF_PointRec items
+ * - an array of 2*N AF_SegmentRec items
+ * - an array of 2*N AF_EdgeRec items
+ *
+ */
+
+ new_max = ( new_max + 2 + 7 ) & ~7;
+
+#define OFF_PAD2(x,y) (((x)+(y)-1) & ~((y)-1))
+#define OFF_PADX(x,y) ((((x)+(y)-1)/(y))*(y))
+#define OFF_PAD(x,y) ( ((y) & ((y)-1)) ? OFF_PADX(x,y) : OFF_PAD2(x,y) )
+
+#undef OFF_INCREMENT
+#define OFF_INCREMENT( _off, _type, _count ) \
+ ( OFF_PAD( _off, sizeof(_type) ) + (_count)*sizeof(_type))
+
+ off1 = OFF_INCREMENT( 0, AF_PointRec, new_max );
+ off2 = OFF_INCREMENT( off1, AF_SegmentRec, new_max*2 );
+ off3 = OFF_INCREMENT( off2, AF_EdgeRec, new_max*2 );
+
+ FT_FREE( hints->points );
+
+ if ( FT_ALLOC( items, off3 ) )
+ {
+ hints->max_points = 0;
+ hints->axis[0].segments = NULL;
+ hints->axis[0].edges = NULL;
+ hints->axis[1].segments = NULL;
+ hints->axis[1].edges = NULL;
+ goto Exit;
+ }
+
+ /* readjust some pointers
+ */
+ hints->max_points = new_max;
+ hints->points = (AF_Point) items;
+
+ hints->axis[0].segments = (AF_Segment)( items + off1 );
+ hints->axis[1].segments = hints->axis[0].segments + new_max;
+
+ hints->axis[0].edges = (AF_Edge) ( items + off2 );
+ hints->axis[1].edges = hints->axis[0].edges + new_max;
+ }
+
+ hints->num_points = outline->n_points;
+ hints->num_contours = outline->n_contours;
+
+
+ /* We can't rely on the value of `FT_Outline.flags' to know the fill */
+ /* direction used for a glyph, given that some fonts are broken (e.g. */
+ /* the Arphic ones). We thus recompute it each time we need to. */
+ /* */
+ hints->axis[ AF_DIMENSION_HORZ ].major_dir = AF_DIR_UP;
+ hints->axis[ AF_DIMENSION_VERT ].major_dir = AF_DIR_LEFT;
+
+ if ( FT_Outline_Get_Orientation( outline ) == FT_ORIENTATION_POSTSCRIPT )
+ {
+ hints->axis[ AF_DIMENSION_HORZ ].major_dir = AF_DIR_DOWN;
+ hints->axis[ AF_DIMENSION_VERT ].major_dir = AF_DIR_RIGHT;
+ }
+
+ hints->x_scale = x_scale;
+ hints->y_scale = y_scale;
+ hints->x_delta = x_delta;
+ hints->y_delta = y_delta;
+
+ points = hints->points;
+ if ( hints->num_points == 0 )
+ goto Exit;
+
+ {
+ AF_Point point;
+ AF_Point point_limit = points + hints->num_points;
+
+
+ /* compute coordinates & bezier flags */
+ {
+ FT_Vector* vec = outline->points;
+ char* tag = outline->tags;
+
+
+ for ( point = points; point < point_limit; point++, vec++, tag++ )
+ {
+ point->fx = vec->x;
+ point->fy = vec->y;
+ point->ox = point->x = FT_MulFix( vec->x, x_scale ) + x_delta;
+ point->oy = point->y = FT_MulFix( vec->y, y_scale ) + y_delta;
+
+ switch ( FT_CURVE_TAG( *tag ) )
+ {
+ case FT_CURVE_TAG_CONIC:
+ point->flags = AF_FLAG_CONIC;
+ break;
+ case FT_CURVE_TAG_CUBIC:
+ point->flags = AF_FLAG_CUBIC;
+ break;
+ default:
+ point->flags = 0;
+ ;
+ }
+ }
+ }
+
+ /* compute `next' and `prev' */
+ {
+ FT_Int contour_index;
+ AF_Point prev;
+ AF_Point first;
+ AF_Point end;
+
+
+ contour_index = 0;
+
+ first = points;
+ end = points + outline->contours[0];
+ prev = end;
+
+ for ( point = points; point < point_limit; point++ )
+ {
+ point->prev = prev;
+ if ( point < end )
+ {
+ point->next = point + 1;
+ prev = point;
+ }
+ else
+ {
+ point->next = first;
+ contour_index++;
+ if ( point + 1 < point_limit )
+ {
+ end = points + outline->contours[contour_index];
+ first = point + 1;
+ prev = end;
+ }
+ }
+ }
+ }
+
+ /* set-up the contours array */
+ {
+ AF_Point* contour = hints->contours;
+ AF_Point* contour_limit = contour + hints->num_contours;
+ short* end = outline->contours;
+ short idx = 0;
+
+
+ for ( ; contour < contour_limit; contour++, end++ )
+ {
+ contour[0] = points + idx;
+ idx = (short)( end[0] + 1 );
+ }
+ }
+
+ /* compute directions of in & out vectors */
+ {
+ for ( point = points; point < point_limit; point++ )
+ {
+ AF_Point prev;
+ AF_Point next;
+ FT_Pos in_x, in_y, out_x, out_y;
+
+
+ prev = point->prev;
+ in_x = point->fx - prev->fx;
+ in_y = point->fy - prev->fy;
+
+ point->in_dir = af_direction_compute( in_x, in_y );
+
+ next = point->next;
+ out_x = next->fx - point->fx;
+ out_y = next->fy - point->fy;
+
+ point->out_dir = af_direction_compute( out_x, out_y );
+
+ if ( point->flags & ( AF_FLAG_CONIC | AF_FLAG_CUBIC ) )
+ {
+ Is_Weak_Point:
+ point->flags |= AF_FLAG_WEAK_INTERPOLATION;
+ }
+ else if ( point->out_dir == point->in_dir )
+ {
+ AF_Angle angle_in, angle_out, delta;
+
+
+ if ( point->out_dir != AF_DIR_NONE )
+ goto Is_Weak_Point;
+
+ angle_in = af_angle_atan( in_x, in_y );
+ angle_out = af_angle_atan( out_x, out_y );
+ delta = af_angle_diff( angle_in, angle_out );
+
+ if ( delta < 2 && delta > -2 )
+ goto Is_Weak_Point;
+ }
+ else if ( point->in_dir == -point->out_dir )
+ goto Is_Weak_Point;
+ }
+ }
+ }
+
+ /* compute inflection points
+ */
+ af_glyph_hints_compute_inflections( hints );
+
+ Exit:
+ return error;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ af_glyph_hints_save( AF_GlyphHints hints,
+ FT_Outline* outline )
+ {
+ AF_Point point = hints->points;
+ AF_Point limit = point + hints->num_points;
+ FT_Vector* vec = outline->points;
+ char* tag = outline->tags;
+
+ for ( ; point < limit; point++, vec++, tag++ )
+ {
+ vec->x = (FT_Pos) point->x;
+ vec->y = (FT_Pos) point->y;
+
+ if ( point->flags & AF_FLAG_CONIC )
+ tag[0] = FT_CURVE_TAG_CONIC;
+ else if ( point->flags & AF_FLAG_CUBIC )
+ tag[0] = FT_CURVE_TAG_CUBIC;
+ else
+ tag[0] = FT_CURVE_TAG_ON;
+ }
+ }
+
+
+ /*
+ *
+ * E D G E P O I N T G R I D - F I T T I N G
+ *
+ */
+
+
+ FT_LOCAL_DEF( void )
+ af_glyph_hints_align_edge_points( AF_GlyphHints hints,
+ AF_Dimension dim )
+ {
+ AF_AxisHints axis = & hints->axis[ dim ];
+ AF_Edge edges = axis->edges;
+ AF_Edge edge_limit = edges + axis->num_edges;
+ AF_Edge edge;
+
+ for ( edge = edges; edge < edge_limit; edge++ )
+ {
+ /* move the points of each segment */
+ /* in each edge to the edge's position */
+ AF_Segment seg = edge->first;
+
+
+ do
+ {
+ AF_Point point = seg->first;
+
+
+ for (;;)
+ {
+ if ( dim == AF_DIMENSION_HORZ )
+ {
+ point->x = edge->pos;
+ point->flags |= AF_FLAG_TOUCH_X;
+ }
+ else
+ {
+ point->y = edge->pos;
+ point->flags |= AF_FLAG_TOUCH_Y;
+ }
+
+ if ( point == seg->last )
+ break;
+
+ point = point->next;
+ }
+
+ seg = seg->edge_next;
+
+ } while ( seg != edge->first );
+ }
+ }
+
+
+ /*
+ *
+ * S T R O N G P O I N T I N T E R P O L A T I O N
+ *
+ */
+
+
+ /* hint the strong points -- this is equivalent to the TrueType `IP' */
+ /* hinting instruction */
+ FT_LOCAL_DEF( void )
+ af_glyph_hints_align_strong_points( AF_GlyphHints hints,
+ AF_Dimension dim )
+ {
+ AF_Point points = hints->points;
+ AF_Point point_limit = points + hints->num_points;
+ AF_AxisHints axis = &hints->axis[dim];
+ AF_Edge edges = axis->edges;
+ AF_Edge edge_limit = edges + axis->num_edges;
+ AF_Flags touch_flag;
+
+
+ if ( dim == AF_DIMENSION_HORZ )
+ touch_flag = AF_FLAG_TOUCH_X;
+ else
+ touch_flag = AF_FLAG_TOUCH_Y;
+
+ if ( edges < edge_limit )
+ {
+ AF_Point point;
+ AF_Edge edge;
+
+ for ( point = points; point < point_limit; point++ )
+ {
+ FT_Pos u, ou, fu; /* point position */
+ FT_Pos delta;
+
+
+ if ( point->flags & touch_flag )
+ continue;
+
+ /* if this point is candidate to weak interpolation, we will */
+ /* interpolate it after all strong points have been processed */
+ if ( ( point->flags & AF_FLAG_WEAK_INTERPOLATION ) &&
+ !( point->flags & AF_FLAG_INFLECTION ) )
+ continue;
+
+ if ( dim == AF_DIMENSION_VERT )
+ {
+ u = point->fy;
+ ou = point->oy;
+ }
+ else
+ {
+ u = point->fx;
+ ou = point->ox;
+ }
+
+ fu = u;
+
+ /* is the point before the first edge? */
+ edge = edges;
+ delta = edge->fpos - u;
+ if ( delta >= 0 )
+ {
+ u = edge->pos - ( edge->opos - ou );
+ goto Store_Point;
+ }
+
+ /* is the point after the last edge? */
+ edge = edge_limit - 1;
+ delta = u - edge->fpos;
+ if ( delta >= 0 )
+ {
+ u = edge->pos + ( ou - edge->opos );
+ goto Store_Point;
+ }
+
+ {
+ FT_UInt min, max, mid;
+ FT_Pos fpos;
+
+
+ /* find enclosing edges */
+ min = 0;
+ max = edge_limit - edges;
+
+ while ( min < max )
+ {
+ mid = ( max + min ) >> 1;
+ edge = edges + mid;
+ fpos = edge->fpos;
+
+ if ( u < fpos )
+ max = mid;
+ else if ( u > fpos )
+ min = mid + 1;
+ else
+ {
+ /* we are on the edge */
+ u = edge->pos;
+ goto Store_Point;
+ }
+ }
+
+ {
+ AF_Edge before = edges + min - 1;
+ AF_Edge after = edges + min + 0;
+
+
+ /* assert( before && after && before != after ) */
+ if ( before->scale == 0 )
+ before->scale = FT_DivFix( after->pos - before->pos,
+ after->fpos - before->fpos );
+
+ u = before->pos + FT_MulFix( fu - before->fpos,
+ before->scale );
+ }
+ }
+
+
+ Store_Point:
+
+ /* save the point position */
+ if ( dim == AF_DIMENSION_HORZ )
+ point->x = u;
+ else
+ point->y = u;
+
+ point->flags |= touch_flag;
+ }
+ }
+ }
+
+
+ /*
+ *
+ * W E A K P O I N T I N T E R P O L A T I O N
+ *
+ */
+
+ static void
+ af_iup_shift( AF_Point p1,
+ AF_Point p2,
+ AF_Point ref )
+ {
+ AF_Point p;
+ FT_Pos delta = ref->u - ref->v;
+
+
+ for ( p = p1; p < ref; p++ )
+ p->u = p->v + delta;
+
+ for ( p = ref + 1; p <= p2; p++ )
+ p->u = p->v + delta;
+ }
+
+
+ static void
+ af_iup_interp( AF_Point p1,
+ AF_Point p2,
+ AF_Point ref1,
+ AF_Point ref2 )
+ {
+ AF_Point p;
+ FT_Pos u;
+ FT_Pos v1 = ref1->v;
+ FT_Pos v2 = ref2->v;
+ FT_Pos d1 = ref1->u - v1;
+ FT_Pos d2 = ref2->u - v2;
+
+
+ if ( p1 > p2 )
+ return;
+
+ if ( v1 == v2 )
+ {
+ for ( p = p1; p <= p2; p++ )
+ {
+ u = p->v;
+
+ if ( u <= v1 )
+ u += d1;
+ else
+ u += d2;
+
+ p->u = u;
+ }
+ return;
+ }
+
+ if ( v1 < v2 )
+ {
+ for ( p = p1; p <= p2; p++ )
+ {
+ u = p->v;
+
+ if ( u <= v1 )
+ u += d1;
+ else if ( u >= v2 )
+ u += d2;
+ else
+ u = ref1->u + FT_MulDiv( u - v1, ref2->u - ref1->u, v2 - v1 );
+
+ p->u = u;
+ }
+ }
+ else
+ {
+ for ( p = p1; p <= p2; p++ )
+ {
+ u = p->v;
+
+ if ( u <= v2 )
+ u += d2;
+ else if ( u >= v1 )
+ u += d1;
+ else
+ u = ref1->u + FT_MulDiv( u - v1, ref2->u - ref1->u, v2 - v1 );
+
+ p->u = u;
+ }
+ }
+ }
+
+
+ FT_LOCAL_DEF( void )
+ af_glyph_hints_align_weak_points( AF_GlyphHints hints,
+ AF_Dimension dim )
+ {
+ AF_Point points = hints->points;
+ AF_Point point_limit = points + hints->num_points;
+ AF_Point* contour = hints->contours;
+ AF_Point* contour_limit = contour + hints->num_contours;
+ AF_Flags touch_flag;
+ AF_Point point;
+ AF_Point end_point;
+ AF_Point first_point;
+
+
+ /* PASS 1: Move segment points to edge positions */
+
+ if ( dim == AF_DIMENSION_HORZ )
+ {
+ touch_flag = AF_FLAG_TOUCH_X;
+
+ for ( point = points; point < point_limit; point++ )
+ {
+ point->u = point->x;
+ point->v = point->ox;
+ }
+ }
+ else
+ {
+ touch_flag = AF_FLAG_TOUCH_Y;
+
+ for ( point = points; point < point_limit; point++ )
+ {
+ point->u = point->y;
+ point->v = point->oy;
+ }
+ }
+
+ point = points;
+
+ for ( ; contour < contour_limit; contour++ )
+ {
+ point = *contour;
+ end_point = point->prev;
+ first_point = point;
+
+ while ( point <= end_point && !( point->flags & touch_flag ) )
+ point++;
+
+ if ( point <= end_point )
+ {
+ AF_Point first_touched = point;
+ AF_Point cur_touched = point;
+
+
+ point++;
+ while ( point <= end_point )
+ {
+ if ( point->flags & touch_flag )
+ {
+ /* we found two successive touched points; we interpolate */
+ /* all contour points between them */
+ af_iup_interp( cur_touched + 1, point - 1,
+ cur_touched, point );
+ cur_touched = point;
+ }
+ point++;
+ }
+
+ if ( cur_touched == first_touched )
+ {
+ /* this is a special case: only one point was touched in the */
+ /* contour; we thus simply shift the whole contour */
+ af_iup_shift( first_point, end_point, cur_touched );
+ }
+ else
+ {
+ /* now interpolate after the last touched point to the end */
+ /* of the contour */
+ af_iup_interp( cur_touched + 1, end_point,
+ cur_touched, first_touched );
+
+ /* if the first contour point isn't touched, interpolate */
+ /* from the contour start to the first touched point */
+ if ( first_touched > points )
+ af_iup_interp( first_point, first_touched - 1,
+ cur_touched, first_touched );
+ }
+ }
+ }
+
+ /* now save the interpolated values back to x/y */
+ if ( dim == AF_DIMENSION_HORZ )
+ {
+ for ( point = points; point < point_limit; point++ )
+ point->x = point->u;
+ }
+ else
+ {
+ for ( point = points; point < point_limit; point++ )
+ point->y = point->u;
+ }
+ }
diff --git a/extras/freetype2/src/autofit/afhints.h b/extras/freetype2/src/autofit/afhints.h
new file mode 100644
index 000000000..c69cdc66c
--- /dev/null
+++ b/extras/freetype2/src/autofit/afhints.h
@@ -0,0 +1,246 @@
+#ifndef __AFHINTS_H__
+#define __AFHINTS_H__
+
+#include "aftypes.h"
+
+FT_BEGIN_HEADER
+
+ /*
+ * The definition of outline glyph hints. These are shared by all
+ * script analysis routines (until now)
+ *
+ */
+
+ typedef enum
+ {
+ AF_DIMENSION_HORZ = 0, /* x coordinates, i.e. vertical segments & edges */
+ AF_DIMENSION_VERT = 1, /* y coordinates, i.e. horizontal segments & edges */
+
+ AF_DIMENSION_MAX /* do not remove */
+
+ } AF_Dimension;
+
+
+ /* hint directions -- the values are computed so that two vectors are */
+ /* in opposite directions iff `dir1+dir2 == 0' */
+ typedef enum
+ {
+ AF_DIR_NONE = 4,
+ AF_DIR_RIGHT = 1,
+ AF_DIR_LEFT = -1,
+ AF_DIR_UP = 2,
+ AF_DIR_DOWN = -2
+
+ } AF_Direction;
+
+
+ /* point hint flags */
+ typedef enum
+ {
+ AF_FLAG_NONE = 0,
+
+ /* point type flags */
+ AF_FLAG_CONIC = (1 << 0),
+ AF_FLAG_CUBIC = (1 << 1),
+ AF_FLAG_CONTROL = AF_FLAG_CONIC | AF_FLAG_CUBIC,
+
+ /* point extremum flags */
+ AF_FLAG_EXTREMA_X = (1 << 2),
+ AF_FLAG_EXTREMA_Y = (1 << 3),
+
+ /* point roundness flags */
+ AF_FLAG_ROUND_X = (1 << 4),
+ AF_FLAG_ROUND_Y = (1 << 5),
+
+ /* point touch flags */
+ AF_FLAG_TOUCH_X = (1 << 6),
+ AF_FLAG_TOUCH_Y = (1 << 7),
+
+ /* candidates for weak interpolation have this flag set */
+ AF_FLAG_WEAK_INTERPOLATION = (1 << 8),
+
+ /* all inflection points in the outline have this flag set */
+ AF_FLAG_INFLECTION = (1 << 9)
+
+ } AF_Flags;
+
+
+ /* edge hint flags */
+ typedef enum
+ {
+ AF_EDGE_NORMAL = 0,
+ AF_EDGE_ROUND = (1 << 0),
+ AF_EDGE_SERIF = (1 << 1),
+ AF_EDGE_DONE = (1 << 2)
+
+ } AF_Edge_Flags;
+
+
+
+ typedef struct AF_PointRec_* AF_Point;
+ typedef struct AF_SegmentRec_* AF_Segment;
+ typedef struct AF_EdgeRec_* AF_Edge;
+
+
+ typedef struct AF_PointRec_
+ {
+ AF_Flags flags; /* point flags used by hinter */
+ FT_Pos ox, oy; /* original, scaled position */
+ FT_Pos fx, fy; /* original, unscaled position (font units) */
+ FT_Pos x, y; /* current position */
+ FT_Pos u, v; /* current (x,y) or (y,x) depending on context */
+
+ AF_Direction in_dir; /* direction of inwards vector */
+ AF_Direction out_dir; /* direction of outwards vector */
+
+ AF_Point next; /* next point in contour */
+ AF_Point prev; /* previous point in contour */
+
+ } AF_PointRec;
+
+
+ typedef struct AF_SegmentRec_
+ {
+ AF_Edge_Flags flags; /* edge/segment flags for this segment */
+ AF_Direction dir; /* segment direction */
+ FT_Pos pos; /* position of segment */
+ FT_Pos min_coord; /* minimum coordinate of segment */
+ FT_Pos max_coord; /* maximum coordinate of segment */
+
+ AF_Edge edge; /* the segment's parent edge */
+ AF_Segment edge_next; /* link to next segment in parent edge */
+
+ AF_Segment link; /* (stem) link segment */
+ AF_Segment serif; /* primary segment for serifs */
+ FT_Pos num_linked; /* number of linked segments */
+ FT_Pos score; /* used during stem matching */
+
+ AF_Point first; /* first point in edge segment */
+ AF_Point last; /* last point in edge segment */
+ AF_Point* contour; /* ptr to first point of segment's contour */
+
+ } AF_SegmentRec;
+
+
+ typedef struct AF_EdgeRec_
+ {
+ FT_Pos fpos; /* original, unscaled position (font units) */
+ FT_Pos opos; /* original, scaled position */
+ FT_Pos pos; /* current position */
+
+ AF_Edge_Flags flags; /* edge flags */
+ AF_Direction dir; /* edge direction */
+ FT_Fixed scale; /* used to speed up interpolation between edges */
+ AF_Width blue_edge; /* non-NULL if this is a blue edge */
+
+ AF_Edge link;
+ AF_Edge serif;
+ FT_Int num_linked;
+
+ FT_Int score;
+
+ AF_Segment first;
+ AF_Segment last;
+
+ } AF_EdgeRec;
+
+
+ typedef struct AF_AxisHintsRec_
+ {
+ FT_Int num_segments;
+ AF_Segment segments;
+
+ FT_Int num_edges;
+ AF_Edge edges;
+
+ AF_Direction major_dir;
+
+ } AF_AxisHintsRec, *AF_AxisHints;
+
+
+ typedef struct AF_GlyphHintsRec_
+ {
+ FT_Memory memory;
+
+ FT_Fixed x_scale;
+ FT_Pos x_delta;
+
+ FT_Fixed y_scale;
+ FT_Pos y_delta;
+
+ FT_Pos edge_distance_threshold;
+
+ FT_Int max_points;
+ FT_Int num_points;
+ AF_Point points;
+
+ FT_Int max_contours;
+ FT_Int num_contours;
+ AF_Point* contours;
+
+ AF_AxisHintsRec axis[ AF_DIMENSION_MAX ];
+
+ FT_UInt32 scaler_flags; /* copy of scaler flags */
+ FT_UInt32 other_flags; /* free for script-specific implementations */
+ AF_ScriptMetrics metrics;
+
+ } AF_GlyphHintsRec;
+
+
+#define AF_HINTS_TEST_SCALER(h,f) ( (h)->scaler_flags & (f) )
+#define AF_HINTS_TEST_OTHER(h,f) ( (h)->other_flags & (f) )
+
+#define AF_HINTS_DO_HORIZONTAL(h) \
+ !AF_HINTS_TEST_SCALER(h,AF_SCALER_FLAG_NO_HORIZONTAL)
+
+#define AF_HINTS_DO_VERTICAL(h) \
+ !AF_HINTS_TEST_SCALER(h,AF_SCALER_FLAG_NO_VERTICAL)
+
+#define AF_HINTS_DO_ADVANCE(h) \
+ !AF_HINTS_TEST_SCALER(h,AF_SCALER_FLAG_NO_ADVANCE)
+
+
+ FT_LOCAL( AF_Direction )
+ af_direction_compute( FT_Pos dx,
+ FT_Pos dy );
+
+
+ FT_LOCAL( void )
+ af_glyph_hints_init( AF_GlyphHints hints,
+ FT_Memory memory );
+
+
+
+ /* recomputes all AF_Point in a AF_GlyphHints from the definitions
+ * in a source outline
+ */
+ FT_LOCAL( FT_Error )
+ af_glyph_hints_reset( AF_GlyphHints hints,
+ AF_Scaler scaler,
+ AF_ScriptMetrics metrics,
+ FT_Outline* outline );
+
+ FT_LOCAL( void )
+ af_glyph_hints_save( AF_GlyphHints hints,
+ FT_Outline* outline );
+
+ FT_LOCAL( void )
+ af_glyph_hints_align_edge_points( AF_GlyphHints hints,
+ AF_Dimension dim );
+
+ FT_LOCAL( void )
+ af_glyph_hints_align_strong_points( AF_GlyphHints hints,
+ AF_Dimension dim );
+
+ FT_LOCAL( void )
+ af_glyph_hints_align_weak_points( AF_GlyphHints hints,
+ AF_Dimension dim );
+
+ FT_LOCAL( void )
+ af_glyph_hints_done( AF_GlyphHints hints );
+
+/* */
+
+FT_END_HEADER
+
+#endif /* __AFHINTS_H__ */
diff --git a/extras/freetype2/src/autofit/aflatin.c b/extras/freetype2/src/autofit/aflatin.c
new file mode 100644
index 000000000..9a20110fb
--- /dev/null
+++ b/extras/freetype2/src/autofit/aflatin.c
@@ -0,0 +1,1789 @@
+#include "aflatin.h"
+
+ /***************************************************************************/
+ /***************************************************************************/
+ /***** *****/
+ /***** L A T I N G L O B A L M E T R I C S *****/
+ /***** *****/
+ /***************************************************************************/
+ /***************************************************************************/
+
+ static void
+ af_latin_metrics_init_widths( AF_LatinMetrics metrics,
+ FT_Face face )
+ {
+ /* scan the array of segments in each direction */
+ AF_GlyphHintsRec hints[1];
+
+ af_glyph_hints_init( hints, face->memory );
+
+ metrics->axis[ AF_DIMENSION_HORZ ].width_count = 0;
+ metrics->axis[ AF_DIMENSION_VERT ].width_count = 0;
+
+ /* For now, compute the standard width and height from the `o' */
+ {
+ FT_Error error;
+ FT_UInt glyph_index;
+ AF_Dimension dim;
+ AF_ScalerRec scaler[1];
+
+
+ glyph_index = FT_Get_Char_Index( face, 'o' );
+ if ( glyph_index == 0 )
+ goto Exit;
+
+ error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
+ if ( error || face->glyph->outline.n_points <= 0 )
+ goto Exit;
+
+ scaler->x_scale = scaler->y_scale = 0x10000L;
+ scaler->x_delta = scaler->y_delta = 0;
+ scaler->face = face;
+ scaler->render_mode = 0;
+ scaler->flags = 0;
+
+ error = af_glyph_hints_reset( hints, scaler,
+ (AF_ScriptMetrics) metrics,
+ &face->glyph->outline );
+ if ( error )
+ goto Exit;
+
+ for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
+ {
+ AF_LatinAxis axis = & metrics->axis[ dim ];
+ AF_AxisHints axhints = & hints->axis[ dim ];
+ AF_Segment seg, limit, link;
+ FT_UInt num_widths = 0;
+ FT_Pos edge_distance_threshold = 32000;
+
+ af_latin_hints_compute_segments( hints, dim );
+ af_latin_hints_link_segments ( hints, dim );
+
+ seg = axhints->segments;
+ limit = seg + axhints->num_segments;
+
+ for ( ; seg < limit; seg++ )
+ {
+ link = seg->link;
+ /* we only consider stem segments there! */
+ if ( link && link->link == seg && link > seg )
+ {
+ FT_Pos dist;
+
+
+ dist = seg->pos - link->pos;
+ if ( dist < 0 )
+ dist = -dist;
+
+ if ( num_widths < AF_LATIN_MAX_WIDTHS )
+ axis->widths[ num_widths++ ].org = dist;
+ }
+ }
+
+ af_sort_widths( num_widths, axis->widths );
+ axis->width_count = num_widths;
+
+ /* we will now try to find the smallest width */
+ if ( num_widths > 0 && axis->widths[0].org < edge_distance_threshold )
+ edge_distance_threshold = axis->widths[0].org;
+
+ /* Now, compute the edge distance threshold as a fraction of the */
+ /* smallest width in the font. Set it in `hinter->glyph' too! */
+ if ( edge_distance_threshold == 32000 )
+ edge_distance_threshold = 50;
+
+ /* let's try 20% */
+ axis->edge_distance_threshold = edge_distance_threshold / 5;
+ }
+ }
+
+ Exit:
+ af_glyph_hints_done( hints );
+ }
+
+
+
+#define AF_LATIN_MAX_TEST_CHARACTERS 12
+
+
+ static const char* const af_latin_blue_chars[ AF_LATIN_MAX_BLUES ] =
+ {
+ "THEZOCQS",
+ "HEZLOCUS",
+ "fijkdbh",
+ "xzroesc",
+ "xzroesc",
+ "pqgjy"
+ };
+
+
+ static void
+ af_latin_metrics_init_blues( AF_LatinMetrics metrics,
+ FT_Face face )
+ {
+ FT_Pos flats [ AF_LATIN_MAX_TEST_CHARACTERS ];
+ FT_Pos rounds[ AF_LATIN_MAX_TEST_CHARACTERS ];
+ FT_Int num_flats;
+ FT_Int num_rounds;
+ FT_Int bb;
+ AF_LatinBlue blue;
+ FT_Error error;
+ AF_LatinAxis axis = &metrics->axis[ AF_DIMENSION_VERT ];
+ FT_GlyphSlot glyph = face->glyph;
+
+ /* we compute the blues simply by loading each character from the */
+ /* 'af_latin_blue_chars[blues]' string, then compute its top-most or */
+ /* bottom-most points (depending on `AF_IS_TOP_BLUE') */
+
+ AF_LOG(( "blue zones computation\n" ));
+ AF_LOG(( "------------------------------------------------\n" ));
+
+ for ( bb = 0; bb < AF_LATIN_BLUE_MAX; bb++ )
+ {
+ const char* p = af_latin_blue_chars[bb];
+ const char* limit = p + AF_LATIN_MAX_TEST_CHARACTERS;
+ FT_Pos* blue_ref;
+ FT_Pos* blue_shoot;
+
+ AF_LOG(( "blue %3d: ", bb ));
+
+ num_flats = 0;
+ num_rounds = 0;
+
+ for ( ; p < limit && *p; p++ )
+ {
+ FT_UInt glyph_index;
+ FT_Vector* extremum;
+ FT_Vector* points;
+ FT_Vector* point_limit;
+ FT_Vector* point;
+ FT_Bool round;
+
+
+ AF_LOG(( "'%c'", *p ));
+
+ /* load the character in the face -- skip unknown or empty ones */
+ glyph_index = FT_Get_Char_Index( face, (FT_UInt)*p );
+ if ( glyph_index == 0 )
+ continue;
+
+ error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_SCALE );
+ if ( error || glyph->outline.n_points <= 0 )
+ continue;
+
+ /* now compute min or max point indices and coordinates */
+ points = glyph->outline.points;
+ point_limit = points + glyph->outline.n_points;
+ point = points;
+ extremum = point;
+ point++;
+
+ if ( AF_LATIN_IS_TOP_BLUE( bb ) )
+ {
+ for ( ; point < point_limit; point++ )
+ if ( point->y > extremum->y )
+ extremum = point;
+ }
+ else
+ {
+ for ( ; point < point_limit; point++ )
+ if ( point->y < extremum->y )
+ extremum = point;
+ }
+
+ AF_LOG(( "%5d", (int)extremum->y ));
+
+ /* now, check whether the point belongs to a straight or round */
+ /* segment; we first need to find in which contour the extremum */
+ /* lies, then see its previous and next points */
+ {
+ FT_Int idx = (FT_Int)( extremum - points );
+ FT_Int n;
+ FT_Int first, last, prev, next, end;
+ FT_Pos dist;
+
+
+ last = -1;
+ first = 0;
+
+ for ( n = 0; n < glyph->outline.n_contours; n++ )
+ {
+ end = glyph->outline.contours[n];
+ if ( end >= idx )
+ {
+ last = end;
+ break;
+ }
+ first = end + 1;
+ }
+
+ /* XXX: should never happen! */
+ if ( last < 0 )
+ continue;
+
+ /* now look for the previous and next points that are not on the */
+ /* same Y coordinate. Threshold the `closeness'... */
+
+ prev = idx;
+ next = prev;
+
+ do
+ {
+ if ( prev > first )
+ prev--;
+ else
+ prev = last;
+
+ dist = points[prev].y - extremum->y;
+ if ( dist < -5 || dist > 5 )
+ break;
+
+ } while ( prev != idx );
+
+ do
+ {
+ if ( next < last )
+ next++;
+ else
+ next = first;
+
+ dist = points[next].y - extremum->y;
+ if ( dist < -5 || dist > 5 )
+ break;
+
+ } while ( next != idx );
+
+ /* now, set the `round' flag depending on the segment's kind */
+ round = FT_BOOL(
+ FT_CURVE_TAG( glyph->outline.tags[prev] ) != FT_CURVE_TAG_ON ||
+ FT_CURVE_TAG( glyph->outline.tags[next] ) != FT_CURVE_TAG_ON );
+
+ AF_LOG(( "%c ", round ? 'r' : 'f' ));
+ }
+
+ if ( round )
+ rounds[num_rounds++] = extremum->y;
+ else
+ flats[num_flats++] = extremum->y;
+ }
+
+ AF_LOG(( "\n" ));
+
+ if ( num_flats == 0 && num_rounds == 0 )
+ {
+ /* we couldn't find a single glyph to compute this blue zone,
+ * we will simply ignore it then
+ */
+ AF_LOG(( "empty !!\n" ));
+ continue;
+ }
+
+ /* we have computed the contents of the `rounds' and `flats' tables, */
+ /* now determine the reference and overshoot position of the blue -- */
+ /* we simply take the median value after a simple sort */
+ af_sort_pos( num_rounds, rounds );
+ af_sort_pos( num_flats, flats );
+
+ blue = & axis->blues[ axis->blue_count ];
+ blue_ref = & blue->ref.org;
+ blue_shoot = & blue->shoot.org;
+
+ axis->blue_count ++;
+
+ if ( num_flats == 0 )
+ {
+ *blue_ref =
+ *blue_shoot = rounds[num_rounds / 2];
+ }
+ else if ( num_rounds == 0 )
+ {
+ *blue_ref =
+ *blue_shoot = flats[num_flats / 2];
+ }
+ else
+ {
+ *blue_ref = flats[num_flats / 2];
+ *blue_shoot = rounds[num_rounds / 2];
+ }
+
+ /* there are sometimes problems: if the overshoot position of top */
+ /* zones is under its reference position, or the opposite for bottom */
+ /* zones. We must thus check everything there and correct the errors */
+ if ( *blue_shoot != *blue_ref )
+ {
+ FT_Pos ref = *blue_ref;
+ FT_Pos shoot = *blue_shoot;
+ FT_Bool over_ref = FT_BOOL( shoot > ref );
+
+
+ if ( AF_LATIN_IS_TOP_BLUE( bb ) ^ over_ref )
+ *blue_shoot = *blue_ref = ( shoot + ref ) / 2;
+ }
+
+ blue->flags = 0;
+ if ( AF_LATIN_IS_TOP_BLUE(bb) )
+ blue->flags |= AF_LATIN_BLUE_TOP;
+
+ AF_LOG(( "-- ref = %ld, shoot = %ld\n", *blue_ref, *blue_shoot ));
+ }
+
+ return;
+ }
+
+
+ FT_LOCAL_DEF( FT_Error )
+ af_latin_metrics_init( AF_LatinMetrics metrics,
+ FT_Face face )
+ {
+ FT_Error error;
+ FT_CharMap oldmap = face->charmap;
+
+ /* do we have a Unicode charmap in there? */
+ error = FT_Select_Charmap( face, FT_ENCODING_UNICODE );
+ if ( error ) goto Exit;
+
+ metrics->units_per_em = face->units_per_EM;
+
+ af_latin_metrics_init_widths( metrics, face );
+ af_latin_metrics_init_blues( metrics, face );
+
+ Exit:
+ FT_Set_Charmap( face, oldmap );
+ return error;
+ }
+
+
+ static void
+ af_latin_metrics_scale_dim( AF_LatinMetrics metrics,
+ AF_Scaler scaler,
+ AF_Dimension dim )
+ {
+ FT_Fixed scale;
+ FT_Pos delta;
+ AF_LatinAxis axis;
+ FT_UInt nn;
+
+ if ( dim == AF_DIMENSION_HORZ )
+ {
+ scale = scaler->x_scale;
+ delta = scaler->x_delta;
+ }
+ else
+ {
+ scale = scaler->y_scale;
+ delta = scaler->y_delta;
+ }
+
+ axis = & metrics->axis[ dim ];
+
+ if ( axis->org_scale == scale && axis->org_delta == delta )
+ return;
+
+ axis->org_scale = scale;
+ axis->org_delta = delta;
+
+ /* XXX: TODO: Correct Y and X scale according to Chester rules
+ */
+ axis->scale = scale;
+ axis->delta = delta;
+
+ if ( dim == AF_DIMENSION_HORZ )
+ {
+ metrics->root.scaler.x_scale = scale;
+ metrics->root.scaler.x_delta = delta;
+ }
+ else
+ {
+ metrics->root.scaler.y_scale = scale;
+ metrics->root.scaler.y_delta = delta;
+ }
+
+ /* scale the standard widths
+ */
+ for ( nn = 0; nn < axis->width_count; nn++ )
+ {
+ AF_Width width = axis->widths + nn;
+
+ width->cur = FT_MulFix( width->org, scale );
+ width->fit = width->cur;
+ }
+
+ if ( dim == AF_DIMENSION_VERT )
+ {
+ /* scale the blue zones
+ */
+ for ( nn = 0; nn < axis->blue_count; nn++ )
+ {
+ AF_LatinBlue blue = & axis->blues[nn];
+ FT_Pos dist;
+
+ blue->ref.cur = FT_MulFix( blue->ref.org, scale ) + delta;
+ blue->ref.fit = blue->ref.cur;
+
+ blue->shoot.cur = FT_MulFix( blue->shoot.org, scale ) + delta;
+ blue->shoot.fit = blue->shoot.cur;
+
+ /* a blue zone is only active when it is less than 3/4 pixels tall
+ */
+ dist = FT_MulFix( blue->ref.org - blue->shoot.org, scale );
+ if ( dist >= 48 || dist <= -48 )
+ blue->flags |= ~AF_LATIN_BLUE_ACTIVE;
+ }
+ }
+ }
+
+
+ FT_LOCAL_DEF( void )
+ af_latin_metrics_scale( AF_LatinMetrics metrics,
+ AF_Scaler scaler )
+ {
+ af_latin_metrics_scale_dim( metrics, scaler, AF_DIMENSION_HORZ );
+ af_latin_metrics_scale_dim( metrics, scaler, AF_DIMENSION_VERT );
+ }
+
+
+ /***************************************************************************/
+ /***************************************************************************/
+ /***** *****/
+ /***** L A T I N G L Y P H A N A L Y S I S *****/
+ /***** *****/
+ /***************************************************************************/
+ /***************************************************************************/
+
+ FT_LOCAL_DEF( void )
+ af_latin_hints_compute_segments( AF_GlyphHints hints,
+ AF_Dimension dim )
+ {
+ AF_AxisHints axis = &hints->axis[dim];
+ AF_Segment segments = axis->segments;
+ AF_Segment segment = segments;
+ FT_Int num_segments = 0;
+ AF_Point* contour = hints->contours;
+ AF_Point* contour_limit = contour + hints->num_contours;
+ AF_Direction major_dir, segment_dir;
+
+#ifdef AF_HINT_METRICS
+ AF_Point min_point = 0;
+ AF_Point max_point = 0;
+ FT_Pos min_coord = 32000;
+ FT_Pos max_coord = -32000;
+#endif
+
+ major_dir = FT_ABS( axis->major_dir );
+ segment_dir = major_dir;
+
+ /* set up (u,v) in each point */
+ if ( dim == AF_DIMENSION_HORZ )
+ {
+ AF_Point point = hints->points;
+ AF_Point limit = point + hints->num_points;
+
+ for ( ; point < limit; point++ )
+ {
+ point->u = point->fx;
+ point->v = point->fy;
+ }
+ }
+ else
+ {
+ AF_Point point = hints->points;
+ AF_Point limit = point + hints->num_points;
+
+ for ( ; point < limit; point++ )
+ {
+ point->u = point->fy;
+ point->v = point->fx;
+ }
+ }
+
+
+ /* do each contour separately */
+ for ( ; contour < contour_limit; contour++ )
+ {
+ AF_Point point = contour[0];
+ AF_Point last = point->prev;
+ int on_edge = 0;
+ FT_Pos min_pos = 32000; /* minimum segment pos != min_coord */
+ FT_Pos max_pos = -32000; /* maximum segment pos != max_coord */
+ FT_Bool passed;
+
+
+#ifdef AF_HINT_METRICS
+ if ( point->u < min_coord )
+ {
+ min_coord = point->u;
+ min_point = point;
+ }
+ if ( point->u > max_coord )
+ {
+ max_coord = point->u;
+ max_point = point;
+ }
+#endif
+
+ if ( point == last ) /* skip singletons -- just in case */
+ continue;
+
+ if ( FT_ABS( last->out_dir ) == major_dir &&
+ FT_ABS( point->out_dir ) == major_dir )
+ {
+ /* we are already on an edge, try to locate its start */
+ last = point;
+
+ for (;;)
+ {
+ point = point->prev;
+ if ( FT_ABS( point->out_dir ) != major_dir )
+ {
+ point = point->next;
+ break;
+ }
+ if ( point == last )
+ break;
+ }
+ }
+
+ last = point;
+ passed = 0;
+
+ for (;;)
+ {
+ FT_Pos u, v;
+
+
+ if ( on_edge )
+ {
+ u = point->u;
+ if ( u < min_pos )
+ min_pos = u;
+ if ( u > max_pos )
+ max_pos = u;
+
+ if ( point->out_dir != segment_dir || point == last )
+ {
+ /* we are just leaving an edge; record a new segment! */
+ segment->last = point;
+ segment->pos = ( min_pos + max_pos ) >> 1;
+
+ /* a segment is round if either its first or last point */
+ /* is a control point */
+ if ( ( segment->first->flags | point->flags ) &
+ AF_FLAG_CONTROL )
+ segment->flags |= AF_EDGE_ROUND;
+
+ /* compute segment size */
+ min_pos = max_pos = point->v;
+
+ v = segment->first->v;
+ if ( v < min_pos )
+ min_pos = v;
+ if ( v > max_pos )
+ max_pos = v;
+
+ segment->min_coord = min_pos;
+ segment->max_coord = max_pos;
+
+ on_edge = 0;
+ num_segments++;
+ segment++;
+ /* fallthrough */
+ }
+ }
+
+ /* now exit if we are at the start/end point */
+ if ( point == last )
+ {
+ if ( passed )
+ break;
+ passed = 1;
+ }
+
+ if ( !on_edge && FT_ABS( point->out_dir ) == major_dir )
+ {
+ /* this is the start of a new segment! */
+ segment_dir = point->out_dir;
+
+ /* clear all segment fields */
+ FT_ZERO( segment );
+
+ segment->dir = segment_dir;
+ segment->flags = AF_EDGE_NORMAL;
+ min_pos = max_pos = point->u;
+ segment->first = point;
+ segment->last = point;
+ segment->contour = contour;
+ segment->score = 32000;
+ segment->link = NULL;
+ on_edge = 1;
+
+#ifdef AF_HINT_METRICS
+ if ( point == max_point )
+ max_point = 0;
+
+ if ( point == min_point )
+ min_point = 0;
+#endif
+ }
+
+ point = point->next;
+ }
+
+ } /* contours */
+
+#ifdef AF_HINT_METRICS
+ /* we need to ensure that there are edges on the left-most and */
+ /* right-most points of the glyph in order to hint the metrics; */
+ /* we do this by inserting fake segments when needed */
+ if ( dim == AF_DIMENSION_HORZ )
+ {
+ AF_Point point = hints->points;
+ AF_Point point_limit = point + hints->num_points;
+
+ FT_Pos min_pos = 32000;
+ FT_Pos max_pos = -32000;
+
+
+ min_point = 0;
+ max_point = 0;
+
+ /* compute minimum and maximum points */
+ for ( ; point < point_limit; point++ )
+ {
+ FT_Pos x = point->fx;
+
+
+ if ( x < min_pos )
+ {
+ min_pos = x;
+ min_point = point;
+ }
+ if ( x > max_pos )
+ {
+ max_pos = x;
+ max_point = point;
+ }
+ }
+
+ /* insert minimum segment */
+ if ( min_point )
+ {
+ /* clear all segment fields */
+ FT_ZERO( segment );
+
+ segment->dir = segment_dir;
+ segment->flags = AF_EDGE_NORMAL;
+ segment->first = min_point;
+ segment->last = min_point;
+ segment->pos = min_pos;
+ segment->score = 32000;
+ segment->link = NULL;
+
+ num_segments++;
+ segment++;
+ }
+
+ /* insert maximum segment */
+ if ( max_point )
+ {
+ /* clear all segment fields */
+ FT_ZERO( segment );
+
+ segment->dir = segment_dir;
+ segment->flags = AF_EDGE_NORMAL;
+ segment->first = max_point;
+ segment->last = max_point;
+ segment->pos = max_pos;
+ segment->score = 32000;
+ segment->link = NULL;
+
+ num_segments++;
+ segment++;
+ }
+ }
+#endif /* AF_HINT_METRICS */
+
+ axis->num_segments = num_segments;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ af_latin_hints_link_segments( AF_GlyphHints hints,
+ AF_Dimension dim )
+ {
+ AF_AxisHints axis = &hints->axis[dim];
+ AF_Segment segments = axis->segments;
+ AF_Segment segment_limit = segments + axis->num_segments;
+ AF_Direction major_dir = axis->major_dir;
+ AF_Segment seg1, seg2;
+
+ /* now compare each segment to the others */
+ for ( seg1 = segments; seg1 < segment_limit; seg1++ )
+ {
+ /* the fake segments are introduced to hint the metrics -- */
+ /* we must never link them to anything */
+ if ( seg1->first == seg1->last || seg1->dir != major_dir )
+ continue;
+
+ for ( seg2 = segments; seg2 < segment_limit; seg2++ )
+ if ( seg2 != seg1 && seg1->dir + seg2->dir == 0 )
+ {
+ FT_Pos pos1 = seg1->pos;
+ FT_Pos pos2 = seg2->pos;
+ FT_Pos dist = pos2 - pos1;
+
+
+ if ( dist < 0 )
+ continue;
+
+ {
+ FT_Pos min = seg1->min_coord;
+ FT_Pos max = seg1->max_coord;
+ FT_Pos len, score;
+
+
+ if ( min < seg2->min_coord )
+ min = seg2->min_coord;
+
+ if ( max > seg2->max_coord )
+ max = seg2->max_coord;
+
+ len = max - min;
+ if ( len >= 8 )
+ {
+ score = dist + 3000 / len;
+
+ if ( score < seg1->score )
+ {
+ seg1->score = score;
+ seg1->link = seg2;
+ }
+
+ if ( score < seg2->score )
+ {
+ seg2->score = score;
+ seg2->link = seg1;
+ }
+ }
+ }
+ }
+ }
+
+ /* now, compute the `serif' segments */
+ for ( seg1 = segments; seg1 < segment_limit; seg1++ )
+ {
+ seg2 = seg1->link;
+
+ if ( seg2 )
+ {
+ seg2->num_linked++;
+ if ( seg2->link != seg1 )
+ {
+ seg1->link = 0;
+ seg1->serif = seg2->link;
+ }
+ }
+ }
+ }
+
+
+ FT_LOCAL_DEF( void )
+ af_latin_hints_compute_edges( AF_GlyphHints hints,
+ AF_Dimension dim )
+ {
+ AF_AxisHints axis = &hints->axis[dim];
+ AF_Edge edges = axis->edges;
+ AF_Edge edge, edge_limit;
+
+ AF_Segment segments = axis->segments;
+ AF_Segment segment_limit = segments + axis->num_segments;
+ AF_Segment seg;
+
+ AF_Direction up_dir;
+ FT_Fixed scale;
+ FT_Pos edge_distance_threshold;
+
+
+ scale = ( dim == AF_DIMENSION_HORZ ) ? hints->x_scale
+ : hints->y_scale;
+
+ up_dir = ( dim == AF_DIMENSION_HORZ ) ? AF_DIR_UP
+ : AF_DIR_RIGHT;
+
+ /*********************************************************************/
+ /* */
+ /* We will begin by generating a sorted table of edges for the */
+ /* current direction. To do so, we simply scan each segment and try */
+ /* to find an edge in our table that corresponds to its position. */
+ /* */
+ /* If no edge is found, we create and insert a new edge in the */
+ /* sorted table. Otherwise, we simply add the segment to the edge's */
+ /* list which will be processed in the second step to compute the */
+ /* edge's properties. */
+ /* */
+ /* Note that the edges table is sorted along the segment/edge */
+ /* position. */
+ /* */
+ /*********************************************************************/
+
+ edge_distance_threshold = FT_MulFix( hints->edge_distance_threshold,
+ scale );
+ if ( edge_distance_threshold > 64 / 4 )
+ edge_distance_threshold = 64 / 4;
+
+ edge_distance_threshold = FT_DivFix( edge_distance_threshold,
+ scale );
+
+ edge_limit = edges;
+ for ( seg = segments; seg < segment_limit; seg++ )
+ {
+ AF_Edge found = 0;
+
+
+ /* look for an edge corresponding to the segment */
+ for ( edge = edges; edge < edge_limit; edge++ )
+ {
+ FT_Pos dist;
+
+
+ dist = seg->pos - edge->fpos;
+ if ( dist < 0 )
+ dist = -dist;
+
+ if ( dist < edge_distance_threshold )
+ {
+ found = edge;
+ break;
+ }
+ }
+
+ if ( !found )
+ {
+ /* insert a new edge in the list and */
+ /* sort according to the position */
+ while ( edge > edges && edge[-1].fpos > seg->pos )
+ {
+ edge[0] = edge[-1];
+ edge--;
+ }
+ edge_limit++;
+
+ /* clear all edge fields */
+ FT_ZERO( edge );
+
+ /* add the segment to the new edge's list */
+ edge->first = seg;
+ edge->last = seg;
+ edge->fpos = seg->pos;
+ edge->opos = edge->pos = FT_MulFix( seg->pos, scale );
+ seg->edge_next = seg;
+ }
+ else
+ {
+ /* if an edge was found, simply add the segment to the edge's */
+ /* list */
+ seg->edge_next = edge->first;
+ edge->last->edge_next = seg;
+ edge->last = seg;
+ }
+ }
+ axis->num_edges = (FT_Int)( edge_limit - edges );
+
+
+ /*********************************************************************/
+ /* */
+ /* Good, we will now compute each edge's properties according to */
+ /* segments found on its position. Basically, these are: */
+ /* */
+ /* - edge's main direction */
+ /* - stem edge, serif edge or both (which defaults to stem then) */
+ /* - rounded edge, straight or both (which defaults to straight) */
+ /* - link for edge */
+ /* */
+ /*********************************************************************/
+
+ /* first of all, set the `edge' field in each segment -- this is */
+ /* required in order to compute edge links */
+
+ /* Note that I've tried to remove this loop, setting
+ * the "edge" field of each segment directly in the
+ * code above. For some reason, it slows down execution
+ * speed -- on a Sun.
+ */
+ for ( edge = edges; edge < edge_limit; edge++ )
+ {
+ seg = edge->first;
+ if ( seg )
+ do
+ {
+ seg->edge = edge;
+ seg = seg->edge_next;
+ }
+ while ( seg != edge->first );
+ }
+
+ /* now, compute each edge properties */
+ for ( edge = edges; edge < edge_limit; edge++ )
+ {
+ FT_Int is_round = 0; /* does it contain round segments? */
+ FT_Int is_straight = 0; /* does it contain straight segments? */
+ FT_Pos ups = 0; /* number of upwards segments */
+ FT_Pos downs = 0; /* number of downwards segments */
+
+
+ seg = edge->first;
+
+ do
+ {
+ FT_Bool is_serif;
+
+
+ /* check for roundness of segment */
+ if ( seg->flags & AF_EDGE_ROUND )
+ is_round++;
+ else
+ is_straight++;
+
+ /* check for segment direction */
+ if ( seg->dir == up_dir )
+ ups += seg->max_coord-seg->min_coord;
+ else
+ downs += seg->max_coord-seg->min_coord;
+
+ /* check for links -- if seg->serif is set, then seg->link must */
+ /* be ignored */
+ is_serif = (FT_Bool)( seg->serif && seg->serif->edge != edge );
+
+ if ( seg->link || is_serif )
+ {
+ AF_Edge edge2;
+ AF_Segment seg2;
+
+
+ edge2 = edge->link;
+ seg2 = seg->link;
+
+ if ( is_serif )
+ {
+ seg2 = seg->serif;
+ edge2 = edge->serif;
+ }
+
+ if ( edge2 )
+ {
+ FT_Pos edge_delta;
+ FT_Pos seg_delta;
+
+
+ edge_delta = edge->fpos - edge2->fpos;
+ if ( edge_delta < 0 )
+ edge_delta = -edge_delta;
+
+ seg_delta = seg->pos - seg2->pos;
+ if ( seg_delta < 0 )
+ seg_delta = -seg_delta;
+
+ if ( seg_delta < edge_delta )
+ edge2 = seg2->edge;
+ }
+ else
+ edge2 = seg2->edge;
+
+ if ( is_serif )
+ {
+ edge->serif = edge2;
+ edge2->flags |= AF_EDGE_SERIF;
+ }
+ else
+ edge->link = edge2;
+ }
+
+ seg = seg->edge_next;
+
+ } while ( seg != edge->first );
+
+ /* set the round/straight flags */
+ edge->flags = AF_EDGE_NORMAL;
+
+ if ( is_round > 0 && is_round >= is_straight )
+ edge->flags |= AF_EDGE_ROUND;
+
+ /* set the edge's main direction */
+ edge->dir = AF_DIR_NONE;
+
+ if ( ups > downs )
+ edge->dir = up_dir;
+
+ else if ( ups < downs )
+ edge->dir = -up_dir;
+
+ else if ( ups == downs )
+ edge->dir = 0; /* both up and down! */
+
+ /* gets rid of serifs if link is set */
+ /* XXX: This gets rid of many unpleasant artefacts! */
+ /* Example: the `c' in cour.pfa at size 13 */
+
+ if ( edge->serif && edge->link )
+ edge->serif = 0;
+ }
+ }
+
+
+ FT_LOCAL_DEF( void )
+ af_latin_hints_detect_features( AF_GlyphHints hints,
+ AF_Dimension dim )
+ {
+ af_latin_hints_compute_segments( hints, dim );
+ af_latin_hints_link_segments ( hints, dim );
+ af_latin_hints_compute_edges ( hints, dim );
+ }
+
+
+ FT_LOCAL_DEF( void )
+ af_latin_hints_compute_blue_edges( AF_GlyphHints hints,
+ AF_LatinMetrics metrics )
+ {
+ AF_AxisHints axis = &hints->axis[ AF_DIMENSION_VERT ];
+ AF_Edge edge = axis->edges;
+ AF_Edge edge_limit = edge + axis->num_edges;
+ AF_LatinAxis latin = &metrics->axis[ AF_DIMENSION_VERT ];
+ FT_Fixed scale = latin->scale;
+
+
+ /* compute which blue zones are active, i.e. have their scaled */
+ /* size < 3/4 pixels */
+
+ /* for each horizontal edge search the blue zone which is closest */
+ for ( ; edge < edge_limit; edge++ )
+ {
+ FT_Int bb;
+ AF_Width best_blue = NULL;
+ FT_Pos best_dist; /* initial threshold */
+
+
+ /* compute the initial threshold as a fraction of the EM size */
+ best_dist = FT_MulFix( metrics->units_per_em / 40, scale );
+
+ if ( best_dist > 64 / 2 )
+ best_dist = 64 / 2;
+
+ for ( bb = 0; bb < AF_LATIN_BLUE_MAX; bb++ )
+ {
+ AF_LatinBlue blue = latin->blues + bb;
+ FT_Bool is_top_blue, is_major_dir;
+
+ /* skip inactive blue zones (i.e. those that are too small
+ */
+ if ( !(blue->flags & AF_LATIN_BLUE_ACTIVE) )
+ continue;
+
+ /* if it is a top zone, check for right edges -- if it is a bottom */
+ /* zone, check for left edges */
+ /* */
+ /* of course, that's for TrueType */
+ is_top_blue = (blue->flags & AF_LATIN_BLUE_TOP) != 0;
+ is_major_dir = FT_BOOL( edge->dir == axis->major_dir );
+
+ /* if it is a top zone, the edge must be against the major */
+ /* direction; if it is a bottom zone, it must be in the major */
+ /* direction */
+ if ( is_top_blue ^ is_major_dir )
+ {
+ FT_Pos dist;
+
+
+ /* first of all, compare it to the reference position */
+ dist = edge->fpos - blue->ref.org;
+ if ( dist < 0 )
+ dist = -dist;
+
+ dist = FT_MulFix( dist, scale );
+ if ( dist < best_dist )
+ {
+ best_dist = dist;
+ best_blue = & blue->ref;
+ }
+
+ /* now, compare it to the overshoot position if the edge is */
+ /* rounded, and if the edge is over the reference position of a */
+ /* top zone, or under the reference position of a bottom zone */
+ if ( edge->flags & AF_EDGE_ROUND && dist != 0 )
+ {
+ FT_Bool is_under_ref = FT_BOOL( edge->fpos < blue->ref.org );
+
+
+ if ( is_top_blue ^ is_under_ref )
+ {
+ blue = latin->blues + bb;
+ dist = edge->fpos - blue->shoot.org;
+ if ( dist < 0 )
+ dist = -dist;
+
+ dist = FT_MulFix( dist, scale );
+ if ( dist < best_dist )
+ {
+ best_dist = dist;
+ best_blue = & blue->shoot;
+ }
+ }
+ }
+ }
+ }
+
+ if ( best_blue )
+ edge->blue_edge = best_blue;
+ }
+ }
+
+
+ static FT_Error
+ af_latin_hints_init( AF_GlyphHints hints,
+ FT_Outline* outline,
+ AF_LatinMetrics metrics )
+ {
+ FT_Error error;
+ FT_Render_Mode mode;
+
+ error = af_glyph_hints_reset( hints, &metrics->root.scaler,
+ (AF_ScriptMetrics) metrics,
+ outline );
+ if (error)
+ goto Exit;
+
+
+ /* compute flags depending on render mode, etc...
+ */
+
+ mode = metrics->root.scaler.render_mode;
+
+ /* we snap the width of vertical stems for the monochrome and
+ * horizontal LCD rendering targets only.
+ */
+ if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD )
+ hints->other_flags |= AF_LATIN_HINTS_HORZ_SNAP;
+
+ /* we snap the width of horizontal stems for the monochrome and
+ * vertical LCD rendering targets only.
+ */
+ if ( mode == FT_RENDER_MODE_MONO || mode == FT_RENDER_MODE_LCD_V )
+ hints->other_flags |= AF_LATIN_HINTS_VERT_SNAP;
+
+ /* XXX
+ */
+ if ( mode != FT_RENDER_MODE_LIGHT )
+ hints->other_flags |= AF_LATIN_HINTS_STEM_ADJUST;
+
+ if ( mode == FT_RENDER_MODE_MONO )
+ hints->other_flags |= AF_LATIN_HINTS_MONO;
+
+ /* analyze glyph outline
+ */
+ if ( AF_HINTS_DO_HORIZONTAL(hints) )
+ af_latin_hints_detect_features( hints, AF_DIMENSION_HORZ );
+
+ if ( AF_HINTS_DO_VERTICAL(hints) )
+ {
+ af_latin_hints_detect_features( hints, AF_DIMENSION_VERT );
+ af_latin_hints_compute_blue_edges( hints, metrics );
+ }
+
+ Exit:
+ return error;
+ }
+
+ /***************************************************************************/
+ /***************************************************************************/
+ /***** *****/
+ /***** L A T I N G L Y P H G R I D - F I T T I N G *****/
+ /***** *****/
+ /***************************************************************************/
+ /***************************************************************************/
+
+ /* snap a given width in scaled coordinates to one of the */
+ /* current standard widths */
+ static FT_Pos
+ af_latin_snap_width( AF_Width widths,
+ FT_Int count,
+ FT_Pos width )
+ {
+ int n;
+ FT_Pos best = 64 + 32 + 2;
+ FT_Pos reference = width;
+ FT_Pos scaled;
+
+
+ for ( n = 0; n < count; n++ )
+ {
+ FT_Pos w;
+ FT_Pos dist;
+
+
+ w = widths[n].cur;
+ dist = width - w;
+ if ( dist < 0 )
+ dist = -dist;
+ if ( dist < best )
+ {
+ best = dist;
+ reference = w;
+ }
+ }
+
+ scaled = FT_PIX_ROUND( reference );
+
+ if ( width >= reference )
+ {
+ if ( width < scaled + 48 )
+ width = reference;
+ }
+ else
+ {
+ if ( width > scaled - 48 )
+ width = reference;
+ }
+
+ return width;
+ }
+
+
+ /* compute the snapped width of a given stem */
+
+ static FT_Pos
+ af_latin_compute_stem_width( AF_GlyphHints hints,
+ AF_Dimension dim,
+ FT_Pos width,
+ AF_Edge_Flags base_flags,
+ AF_Edge_Flags stem_flags )
+ {
+ AF_LatinMetrics metrics = (AF_LatinMetrics) hints->metrics;
+ AF_LatinAxis axis = & metrics->axis[ dim ];
+ FT_Pos dist = width;
+ FT_Int sign = 0;
+ FT_Int vertical = AF_HINTS_DO_VERTICAL( hints );
+
+
+ if ( !AF_LATIN_HINTS_DO_STEM_ADJUST( hints ) )
+ return width;
+
+ if ( dist < 0 )
+ {
+ dist = -width;
+ sign = 1;
+ }
+
+ if ( ( vertical && !AF_LATIN_HINTS_DO_VERT_SNAP( hints ) ) ||
+ ( !vertical && !AF_LATIN_HINTS_DO_HORZ_SNAP( hints ) ) )
+ {
+ /* smooth hinting process: very lightly quantize the stem width */
+ /* */
+
+ /* leave the widths of serifs alone */
+
+ if ( ( stem_flags & AF_EDGE_SERIF ) && vertical && ( dist < 3 * 64 ) )
+ goto Done_Width;
+
+ else if ( ( base_flags & AF_EDGE_ROUND ) )
+ {
+ if ( dist < 80 )
+ dist = 64;
+ }
+ else if ( dist < 56 )
+ dist = 56;
+
+ if ( axis->width_count > 0 )
+ {
+ FT_Pos delta;
+
+ /* compare to standard width
+ */
+ if ( axis->width_count > 0 )
+ {
+ delta = dist - axis->widths[0].cur;
+
+ if ( delta < 0 )
+ delta = -delta;
+
+ if ( delta < 40 )
+ {
+ dist = axis->widths[ 0 ].cur;
+ if ( dist < 48 )
+ dist = 48;
+
+ goto Done_Width;
+ }
+ }
+
+ if ( dist < 3 * 64 )
+ {
+ delta = dist & 63;
+ dist &= -64;
+
+ if ( delta < 10 )
+ dist += delta;
+
+ else if ( delta < 32 )
+ dist += 10;
+
+ else if ( delta < 54 )
+ dist += 54;
+
+ else
+ dist += delta;
+ }
+ else
+ dist = ( dist + 32 ) & ~63;
+ }
+ }
+ else
+ {
+ /* strong hinting process: snap the stem width to integer pixels */
+ /* */
+ dist = af_latin_snap_width( axis->widths, axis->width_count, dist );
+
+ if ( vertical )
+ {
+ /* in the case of vertical hinting, always round */
+ /* the stem heights to integer pixels */
+ if ( dist >= 64 )
+ dist = ( dist + 16 ) & ~63;
+ else
+ dist = 64;
+ }
+ else
+ {
+ if ( AF_LATIN_HINTS_DO_MONO( hints ) )
+ {
+ /* monochrome horizontal hinting: snap widths to integer pixels */
+ /* with a different threshold */
+ if ( dist < 64 )
+ dist = 64;
+ else
+ dist = ( dist + 32 ) & ~63;
+ }
+ else
+ {
+ /* for horizontal anti-aliased hinting, we adopt a more subtle */
+ /* approach: we strengthen small stems, round stems whose size */
+ /* is between 1 and 2 pixels to an integer, otherwise nothing */
+ if ( dist < 48 )
+ dist = ( dist + 64 ) >> 1;
+
+ else if ( dist < 128 )
+ dist = ( dist + 22 ) & ~63;
+ else
+ /* round otherwise to prevent color fringes in LCD mode */
+ dist = ( dist + 32 ) & ~63;
+ }
+ }
+ }
+
+ Done_Width:
+ if ( sign )
+ dist = -dist;
+
+ return dist;
+ }
+
+
+
+ /* align one stem edge relative to the previous stem edge */
+ static void
+ af_latin_align_linked_edge( AF_GlyphHints hints,
+ AF_Dimension dim,
+ AF_Edge base_edge,
+ AF_Edge stem_edge )
+ {
+ FT_Pos dist = stem_edge->opos - base_edge->opos;
+
+ FT_Pos fitted_width = af_latin_compute_stem_width( hints,
+ dim,
+ dist,
+ base_edge->flags,
+ stem_edge->flags );
+
+ stem_edge->pos = base_edge->pos + fitted_width;
+ }
+
+
+ static void
+ af_latin_align_serif_edge( AF_GlyphHints hints,
+ AF_Edge base,
+ AF_Edge serif )
+ {
+ FT_UNUSED( hints );
+
+ serif->pos = base->pos + (serif->opos - base->opos);
+ }
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
+ /**** E D G E H I N T I N G ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ FT_LOCAL_DEF( void )
+ af_latin_hint_edges( AF_GlyphHints hints,
+ AF_Dimension dim )
+ {
+ AF_AxisHints axis = & hints->axis[dim];
+ AF_Edge edges = axis->edges;
+ AF_Edge edge_limit = edges + axis->num_edges;
+ FT_Int n_edges;
+ AF_Edge edge;
+ AF_Edge anchor = 0;
+ FT_Int has_serifs = 0;
+
+
+ /* we begin by aligning all stems relative to the blue zone */
+ /* if needed -- that's only for horizontal edges */
+ if ( dim == AF_DIMENSION_VERT )
+ {
+ for ( edge = edges; edge < edge_limit; edge++ )
+ {
+ AF_Width blue;
+ AF_Edge edge1, edge2;
+
+
+ if ( edge->flags & AF_EDGE_DONE )
+ continue;
+
+ blue = edge->blue_edge;
+ edge1 = NULL;
+ edge2 = edge->link;
+
+ if ( blue )
+ {
+ edge1 = edge;
+ }
+ else if ( edge2 && edge2->blue_edge )
+ {
+ blue = edge2->blue_edge;
+ edge1 = edge2;
+ edge2 = edge;
+ }
+
+ if ( !edge1 )
+ continue;
+
+ edge1->pos = blue->fit;
+ edge1->flags |= AF_EDGE_DONE;
+
+ if ( edge2 && !edge2->blue_edge )
+ {
+ af_latin_align_linked_edge( hints, dim, edge1, edge2 );
+ edge2->flags |= AF_EDGE_DONE;
+ }
+
+ if ( !anchor )
+ anchor = edge;
+ }
+ }
+
+ /* now we will align all stem edges, trying to maintain the */
+ /* relative order of stems in the glyph */
+ for ( edge = edges; edge < edge_limit; edge++ )
+ {
+ AF_Edge edge2;
+
+
+ if ( edge->flags & AF_EDGE_DONE )
+ continue;
+
+ /* skip all non-stem edges */
+ edge2 = edge->link;
+ if ( !edge2 )
+ {
+ has_serifs++;
+ continue;
+ }
+
+ /* now align the stem */
+
+ /* this should not happen, but it's better to be safe */
+ if ( edge2->blue_edge || edge2 < edge )
+ {
+ af_latin_align_linked_edge( hints, dim, edge2, edge );
+ edge->flags |= AF_EDGE_DONE;
+ continue;
+ }
+
+ if ( !anchor )
+ {
+ FT_Pos org_len, org_center, cur_len;
+ FT_Pos cur_pos1, error1, error2, u_off, d_off;
+
+
+ org_len = edge2->opos - edge->opos;
+ cur_len = af_latin_compute_stem_width( hints, dim, org_len,
+ edge->flags, edge2->flags );
+ if ( cur_len <= 64 )
+ u_off = d_off = 32;
+ else
+ {
+ u_off = 38;
+ d_off = 26;
+ }
+
+ if ( cur_len < 96 )
+ {
+ org_center = edge->opos + ( org_len >> 1 );
+
+ cur_pos1 = FT_PIX_ROUND( org_center );
+
+ error1 = org_center - ( cur_pos1 - u_off );
+ if ( error1 < 0 )
+ error1 = -error1;
+
+ error2 = org_center - ( cur_pos1 + d_off );
+ if ( error2 < 0 )
+ error2 = -error2;
+
+ if ( error1 < error2 )
+ cur_pos1 -= u_off;
+ else
+ cur_pos1 += d_off;
+
+ edge->pos = cur_pos1 - cur_len / 2;
+ edge2->pos = cur_pos1 + cur_len / 2;
+
+ }
+ else
+ edge->pos = FT_PIX_ROUND( edge->opos );
+
+ anchor = edge;
+
+ edge->flags |= AF_EDGE_DONE;
+
+ af_latin_align_linked_edge( hints, dim, edge, edge2 );
+ }
+ else
+ {
+ FT_Pos org_pos, org_len, org_center, cur_len;
+ FT_Pos cur_pos1, cur_pos2, delta1, delta2;
+
+
+ org_pos = anchor->pos + ( edge->opos - anchor->opos );
+ org_len = edge2->opos - edge->opos;
+ org_center = org_pos + ( org_len >> 1 );
+
+ cur_len = af_latin_compute_stem_width( hints, dim, org_len,
+ edge->flags, edge2->flags );
+
+ if ( cur_len < 96 )
+ {
+ FT_Pos u_off, d_off;
+
+
+ cur_pos1 = FT_PIX_ROUND( org_center );
+
+ if (cur_len <= 64 )
+ u_off = d_off = 32;
+ else
+ {
+ u_off = 38;
+ d_off = 26;
+ }
+
+ delta1 = org_center - ( cur_pos1 - u_off );
+ if ( delta1 < 0 )
+ delta1 = -delta1;
+
+ delta2 = org_center - ( cur_pos1 + d_off );
+ if ( delta2 < 0 )
+ delta2 = -delta2;
+
+ if ( delta1 < delta2 )
+ cur_pos1 -= u_off;
+ else
+ cur_pos1 += d_off;
+
+ edge->pos = cur_pos1 - cur_len / 2;
+ edge2->pos = cur_pos1 + cur_len / 2;
+ }
+ else
+ {
+ org_pos = anchor->pos + ( edge->opos - anchor->opos );
+ org_len = edge2->opos - edge->opos;
+ org_center = org_pos + ( org_len >> 1 );
+
+ cur_len = af_latin_compute_stem_width( hints, dim, org_len,
+ edge->flags, edge2->flags );
+
+ cur_pos1 = FT_PIX_ROUND( org_pos );
+ delta1 = ( cur_pos1 + ( cur_len >> 1 ) - org_center );
+ if ( delta1 < 0 )
+ delta1 = -delta1;
+
+ cur_pos2 = FT_PIX_ROUND( org_pos + org_len ) - cur_len;
+ delta2 = ( cur_pos2 + ( cur_len >> 1 ) - org_center );
+ if ( delta2 < 0 )
+ delta2 = -delta2;
+
+ edge->pos = ( delta1 < delta2 ) ? cur_pos1 : cur_pos2;
+ edge2->pos = edge->pos + cur_len;
+ }
+
+ edge->flags |= AF_EDGE_DONE;
+ edge2->flags |= AF_EDGE_DONE;
+
+ if ( edge > edges && edge->pos < edge[-1].pos )
+ edge->pos = edge[-1].pos;
+ }
+ }
+
+ /* make sure that lowercase m's maintain their symmetry */
+
+ /* In general, lowercase m's have six vertical edges if they are sans */
+ /* serif, or twelve if they are avec serif. This implementation is */
+ /* based on that assumption, and seems to work very well with most */
+ /* faces. However, if for a certain face this assumption is not */
+ /* true, the m is just rendered like before. In addition, any stem */
+ /* correction will only be applied to symmetrical glyphs (even if the */
+ /* glyph is not an m), so the potential for unwanted distortion is */
+ /* relatively low. */
+
+ /* We don't handle horizontal edges since we can't easily assure that */
+ /* the third (lowest) stem aligns with the base line; it might end up */
+ /* one pixel higher or lower. */
+
+ n_edges = edge_limit - edges;
+ if ( dim == AF_DIMENSION_HORZ && ( n_edges == 6 || n_edges == 12 ) )
+ {
+ AF_Edge edge1, edge2, edge3;
+ FT_Pos dist1, dist2, span, delta;
+
+
+ if ( n_edges == 6 )
+ {
+ edge1 = edges;
+ edge2 = edges + 2;
+ edge3 = edges + 4;
+ }
+ else
+ {
+ edge1 = edges + 1;
+ edge2 = edges + 5;
+ edge3 = edges + 9;
+ }
+
+ dist1 = edge2->opos - edge1->opos;
+ dist2 = edge3->opos - edge2->opos;
+
+ span = dist1 - dist2;
+ if ( span < 0 )
+ span = -span;
+
+ if ( span < 8 )
+ {
+ delta = edge3->pos - ( 2 * edge2->pos - edge1->pos );
+ edge3->pos -= delta;
+ if ( edge3->link )
+ edge3->link->pos -= delta;
+
+ /* move the serifs along with the stem */
+ if ( n_edges == 12 )
+ {
+ ( edges + 8 )->pos -= delta;
+ ( edges + 11 )->pos -= delta;
+ }
+
+ edge3->flags |= AF_EDGE_DONE;
+ if ( edge3->link )
+ edge3->link->flags |= AF_EDGE_DONE;
+ }
+ }
+
+ if ( has_serifs || !anchor )
+ {
+ /* now hint the remaining edges (serifs and single) in order
+ * to complete our processing
+ */
+ for ( edge = edges; edge < edge_limit; edge++ )
+ {
+ if ( edge->flags & AF_EDGE_DONE )
+ continue;
+
+ if ( edge->serif )
+ af_latin_align_serif_edge( hints, edge->serif, edge );
+ else if ( !anchor )
+ {
+ edge->pos = FT_PIX_ROUND( edge->opos );
+ anchor = edge;
+ }
+ else
+ edge->pos = anchor->pos +
+ FT_PIX_ROUND( edge->opos - anchor->opos );
+
+ edge->flags |= AF_EDGE_DONE;
+
+ if ( edge > edges && edge->pos < edge[-1].pos )
+ edge->pos = edge[-1].pos;
+
+ if ( edge + 1 < edge_limit &&
+ edge[1].flags & AF_EDGE_DONE &&
+ edge->pos > edge[1].pos )
+ edge->pos = edge[1].pos;
+ }
+ }
+ }
+
+
+ static FT_Error
+ af_latin_hints_apply( AF_GlyphHints hints,
+ FT_Outline* outline,
+ AF_LatinMetrics metrics )
+ {
+ AF_Dimension dim;
+
+ FT_UNUSED( metrics );
+
+ for ( dim = 0; dim < AF_DIMENSION_MAX; dim++ )
+ {
+ if ( (dim == AF_DIMENSION_HORZ && AF_HINTS_DO_HORIZONTAL(hints)) ||
+ (dim == AF_DIMENSION_VERT && AF_HINTS_DO_VERTICAL(hints)) )
+ {
+ af_latin_hint_edges( hints, dim );
+ af_glyph_hints_align_edge_points( hints, dim );
+ af_glyph_hints_align_strong_points( hints, dim );
+ af_glyph_hints_align_weak_points( hints, dim );
+ }
+ }
+ af_glyph_hints_save( hints, outline );
+
+ return 0;
+ }
+
+ /***************************************************************************/
+ /***************************************************************************/
+ /***** *****/
+ /***** L A T I N S C R I P T C L A S S *****/
+ /***** *****/
+ /***************************************************************************/
+ /***************************************************************************/
+
+ static const AF_Script_UniRangeRec af_latin_uniranges[] =
+ {
+ { 32, 127 }, /* XXX: TODO: Add new Unicode ranges here !! */
+ { 160, 255 },
+ { 0, 0 }
+ };
+
+ FT_LOCAL_DEF( const AF_ScriptClassRec ) af_latin_script_class =
+ {
+ AF_SCRIPT_LATIN,
+ af_latin_uniranges,
+
+ sizeof( AF_LatinMetricsRec ),
+ (AF_Script_InitMetricsFunc) af_latin_metrics_init,
+ (AF_Script_ScaleMetricsFunc) af_latin_metrics_scale,
+ (AF_Script_DoneMetricsFunc) NULL,
+
+ (AF_Script_InitHintsFunc) af_latin_hints_init,
+ (AF_Script_ApplyHintsFunc) af_latin_hints_apply
+ };
+
diff --git a/extras/freetype2/src/autofit/aflatin.h b/extras/freetype2/src/autofit/aflatin.h
new file mode 100644
index 000000000..a52e42101
--- /dev/null
+++ b/extras/freetype2/src/autofit/aflatin.h
@@ -0,0 +1,168 @@
+#ifndef __AFLATIN_H__
+#define __AFLATIN_H__
+
+#include "afhints.h"
+
+FT_BEGIN_HEADER
+
+ /*
+ * the latin-specific script class
+ *
+ */
+ FT_LOCAL( const AF_ScriptClassRec ) af_latin_script_class;
+
+ /***************************************************************************/
+ /***************************************************************************/
+ /***** *****/
+ /***** L A T I N G L O B A L M E T R I C S *****/
+ /***** *****/
+ /***************************************************************************/
+ /***************************************************************************/
+
+ /*
+ * the following declarations could be embedded in the file "aflatin.c"
+ * they've been made semi-public to allow alternate script hinters to
+ * re-use some of them
+ */
+
+ /*
+ * Latin (global) metrics management
+ *
+ */
+
+ enum
+ {
+ AF_LATIN_BLUE_CAPITAL_TOP,
+ AF_LATIN_BLUE_CAPITAL_BOTTOM,
+ AF_LATIN_BLUE_SMALL_F_TOP,
+ AF_LATIN_BLUE_SMALL_TOP,
+ AF_LATIN_BLUE_SMALL_BOTTOM,
+ AF_LATIN_BLUE_SMALL_MINOR,
+
+ AF_LATIN_BLUE_MAX
+ };
+
+#define AF_LATIN_IS_TOP_BLUE( b ) ( (b) == AF_LATIN_BLUE_CAPITAL_TOP || \
+ (b) == AF_LATIN_BLUE_SMALL_F_TOP || \
+ (b) == AF_LATIN_BLUE_SMALL_TOP )
+
+#define AF_LATIN_MAX_WIDTHS 16
+#define AF_LATIN_MAX_BLUES AF_LATIN_BLUE_MAX
+
+ enum
+ {
+ AF_LATIN_BLUE_ACTIVE = (1 << 0),
+ AF_LATIN_BLUE_TOP = (1 << 1),
+
+ AF_LATIN_BLUE_FLAG_MAX
+ };
+
+
+ typedef struct AF_LatinBlueRec_
+ {
+ AF_WidthRec ref;
+ AF_WidthRec shoot;
+ FT_UInt flags;
+
+ } AF_LatinBlueRec, *AF_LatinBlue;
+
+
+ typedef struct AF_LatinAxisRec_
+ {
+ FT_Fixed scale;
+ FT_Pos delta;
+
+ FT_UInt width_count;
+ AF_WidthRec widths[ AF_LATIN_MAX_WIDTHS ];
+ FT_Pos edge_distance_threshold;
+
+ /* ignored for horizontal metrics */
+ FT_Bool control_overshoot;
+ FT_UInt blue_count;
+ AF_LatinBlueRec blues[ AF_LATIN_BLUE_MAX ];
+
+ FT_Fixed org_scale;
+ FT_Pos org_delta;
+
+ } AF_LatinAxisRec, *AF_LatinAxis;
+
+
+ typedef struct AF_LatinMetricsRec_
+ {
+ AF_ScriptMetricsRec root;
+ FT_UInt units_per_em;
+ AF_LatinAxisRec axis[ AF_DIMENSION_MAX ];
+
+ } AF_LatinMetricsRec, *AF_LatinMetrics;
+
+
+
+ FT_LOCAL( FT_Error )
+ af_latin_metrics_init( AF_LatinMetrics metrics,
+ FT_Face face );
+
+ FT_LOCAL( void )
+ af_latin_metrics_scale( AF_LatinMetrics metrics,
+ AF_Scaler scaler );
+
+
+
+ /***************************************************************************/
+ /***************************************************************************/
+ /***** *****/
+ /***** L A T I N G L Y P H A N A L Y S I S *****/
+ /***** *****/
+ /***************************************************************************/
+ /***************************************************************************/
+
+ enum
+ {
+ AF_LATIN_HINTS_HORZ_SNAP = (1 << 0), /* enable stem width snapping */
+ AF_LATIN_HINTS_VERT_SNAP = (1 << 1), /* enable stem height snapping */
+ AF_LATIN_HINTS_STEM_ADJUST = (1 << 2), /* enable stem width/height adjustment */
+ AF_LATIN_HINTS_MONO = (1 << 3) /* indicate monochrome rendering */
+ };
+
+#define AF_LATIN_HINTS_DO_HORZ_SNAP(h) \
+ AF_HINTS_TEST_OTHER(h,AF_LATIN_HINTS_HORZ_SNAP)
+
+#define AF_LATIN_HINTS_DO_VERT_SNAP(h) \
+ AF_HINTS_TEST_OTHER(h,AF_LATIN_HINTS_VERT_SNAP)
+
+#define AF_LATIN_HINTS_DO_STEM_ADJUST(h) \
+ AF_HINTS_TEST_OTHER(h,AF_LATIN_HINTS_STEM_ADJUST)
+
+#define AF_LATIN_HINTS_DO_MONO(h) \
+ AF_HINTS_TEST_OTHER(h,AF_LATIN_HINTS_MONO)
+
+
+ /* this shouldn't normally be exported. However, other scripts might
+ * like to use this function as-is
+ */
+ FT_LOCAL( void )
+ af_latin_hints_compute_segments( AF_GlyphHints hints,
+ AF_Dimension dim );
+
+ /* this shouldn't normally be exported. However, other scripts might
+ * want to use this function as-is
+ */
+ FT_LOCAL( void )
+ af_latin_hints_link_segments( AF_GlyphHints hints,
+ AF_Dimension dim );
+
+ /* this shouldn't normally be exported. However, other scripts might
+ * want to use this function as-is
+ */
+ FT_LOCAL( void )
+ af_latin_hints_compute_edges( AF_GlyphHints hints,
+ AF_Dimension dim );
+
+ FT_LOCAL( void )
+ af_latin_hints_detect_features( AF_GlyphHints hints,
+ AF_Dimension dim );
+
+/* */
+
+FT_END_HEADER
+
+#endif /* __AFLATIN_H__ */
diff --git a/extras/freetype2/src/autofit/afloader.c b/extras/freetype2/src/autofit/afloader.c
new file mode 100644
index 000000000..ed422384e
--- /dev/null
+++ b/extras/freetype2/src/autofit/afloader.c
@@ -0,0 +1,441 @@
+#include "afloader.h"
+#include "afhints.h"
+#include "afglobal.h"
+#include "aflatin.h"
+
+ FT_LOCAL_DEF( FT_Error )
+ af_loader_init( AF_Loader loader,
+ FT_Memory memory )
+ {
+ FT_Error error;
+
+ FT_ZERO( loader );
+
+ af_glyph_hints_init( &loader->hints, memory );
+
+ error = FT_GlyphLoader_New( memory, &loader->gloader );
+ if ( !error )
+ {
+ error = FT_GlyphLoader_CreateExtra( loader->gloader );
+ if ( error )
+ {
+ FT_GlyphLoader_Done( loader->gloader );
+ loader->gloader = NULL;
+ }
+ }
+ return error;
+ }
+
+
+ FT_LOCAL_DEF( FT_Error )
+ af_loader_reset( AF_Loader loader,
+ FT_Face face )
+ {
+ FT_Error error = 0;
+
+ loader->face = face;
+ loader->globals = (AF_FaceGlobals) face->autohint.data;
+
+ FT_GlyphLoader_Rewind( loader->gloader );
+
+ if ( loader->globals == NULL )
+ {
+ error = af_face_globals_new( face, &loader->globals );
+ if ( !error )
+ {
+ face->autohint.data = (FT_Pointer) loader->globals;
+ face->autohint.finalizer = (FT_Generic_Finalizer) af_face_globals_free;
+ }
+ }
+ return error;
+ }
+
+
+ FT_LOCAL_DEF( void )
+ af_loader_done( AF_Loader loader )
+ {
+ loader->face = NULL;
+ loader->globals = NULL;
+
+ FT_GlyphLoader_Done( loader->gloader );
+ loader->gloader = NULL;
+ }
+
+
+ static FT_Error
+ af_loader_load_g( AF_Loader loader,
+ AF_Scaler scaler,
+ FT_UInt glyph_index,
+ FT_Int32 load_flags,
+ FT_UInt depth )
+ {
+ FT_Error error = 0;
+ FT_Face face = loader->face;
+ FT_GlyphLoader gloader = loader->gloader;
+ AF_ScriptMetrics metrics = loader->metrics;
+ AF_GlyphHints hints = &loader->hints;
+ FT_GlyphSlot slot = face->glyph;
+ FT_Slot_Internal internal = slot->internal;
+
+ error = FT_Load_Glyph( face, glyph_index, load_flags );
+ if ( error )
+ goto Exit;
+
+ loader->transformed = internal->glyph_transformed;
+ if ( loader->transformed )
+ {
+ FT_Matrix inverse;
+
+ loader->trans_matrix = internal->glyph_matrix;
+ loader->trans_delta = internal->glyph_delta;
+
+ inverse = loader->trans_matrix;
+ FT_Matrix_Invert( &inverse );
+ FT_Vector_Transform( &loader->trans_delta, &inverse );
+ }
+
+ /* set linear metrics */
+ slot->linearHoriAdvance = slot->metrics.horiAdvance;
+ slot->linearVertAdvance = slot->metrics.vertAdvance;
+
+ switch ( slot->format )
+ {
+ case FT_GLYPH_FORMAT_OUTLINE:
+ /* translate the loaded glyph when an internal transform
+ * is needed
+ */
+ if ( loader->transformed )
+ {
+ FT_Vector* point = slot->outline.points;
+ FT_Vector* limit = point + slot->outline.n_points;
+
+ for ( ; point < limit; point++ )
+ {
+ point->x += loader->trans_delta.x;
+ point->y += loader->trans_delta.y;
+ }
+ }
+
+ /* copy the outline points in the loader's current */
+ /* extra points which is used to keep original glyph coordinates */
+ error = FT_GlyphLoader_CheckPoints( gloader,
+ slot->outline.n_points + 4,
+ slot->outline.n_contours );
+ if ( error )
+ goto Exit;
+
+ FT_ARRAY_COPY( gloader->current.outline.points,
+ slot->outline.points,
+ slot->outline.n_points );
+
+ FT_ARRAY_COPY( gloader->current.extra_points,
+ slot->outline.points,
+ slot->outline.n_points );
+
+ FT_ARRAY_COPY( gloader->current.outline.contours,
+ slot->outline.contours,
+ slot->outline.n_contours );
+
+ FT_ARRAY_COPY( gloader->current.outline.tags,
+ slot->outline.tags,
+ slot->outline.n_points );
+
+ gloader->current.outline.n_points = slot->outline.n_points;
+ gloader->current.outline.n_contours = slot->outline.n_contours;
+
+ /* compute original horizontal phantom points (and ignore */
+ /* vertical ones) */
+ loader->pp1.x = hints->x_delta;
+ loader->pp1.y = hints->y_delta;
+ loader->pp2.x = FT_MulFix( slot->metrics.horiAdvance,
+ hints->x_scale ) + hints->x_delta;
+ loader->pp2.y = hints->y_delta;
+
+ /* be sure to check for spacing glyphs */
+ if ( slot->outline.n_points == 0 )
+ goto Hint_Metrics;
+
+ /* now load the slot image into the auto-outline and run the */
+ /* automatic hinting process */
+ error = metrics->clazz->script_hints_init( hints,
+ &gloader->current.outline,
+ metrics );
+ if ( error )
+ goto Exit;
+
+ /* apply the hints */
+ metrics->clazz->script_hints_apply( hints,
+ &gloader->current.outline,
+ metrics );
+ /* we now need to hint the metrics according to the change in */
+ /* width/positioning that occured during the hinting process */
+ {
+ FT_Pos old_advance, old_rsb, old_lsb, new_lsb;
+ AF_AxisHints axis = &hints->axis[ AF_DIMENSION_HORZ ];
+ AF_Edge edge1 = axis->edges; /* leftmost edge */
+ AF_Edge edge2 = edge1 + axis->num_edges - 1; /* rightmost edge */
+
+
+ old_advance = loader->pp2.x;
+ old_rsb = old_advance - edge2->opos;
+ old_lsb = edge1->opos;
+ new_lsb = edge1->pos;
+
+ loader->pp1.x = FT_PIX_ROUND( new_lsb - old_lsb );
+ loader->pp2.x = FT_PIX_ROUND( edge2->pos + old_rsb );
+
+#if 0
+ /* try to fix certain bad advance computations */
+ if ( loader->pp2.x + loader->pp1.x == edge2->pos && old_rsb > 4 )
+ loader->pp2.x += 64;
+#endif
+ }
+
+ /* good, we simply add the glyph to our loader's base */
+ FT_GlyphLoader_Add( gloader );
+ break;
+
+ case FT_GLYPH_FORMAT_COMPOSITE:
+ {
+ FT_UInt nn, num_subglyphs = slot->num_subglyphs;
+ FT_UInt num_base_subgs, start_point;
+ FT_SubGlyph subglyph;
+
+
+ start_point = gloader->base.outline.n_points;
+
+ /* first of all, copy the subglyph descriptors in the glyph loader */
+ error = FT_GlyphLoader_CheckSubGlyphs( gloader, num_subglyphs );
+ if ( error )
+ goto Exit;
+
+ FT_ARRAY_COPY( gloader->current.subglyphs,
+ slot->subglyphs,
+ num_subglyphs );
+
+ gloader->current.num_subglyphs = num_subglyphs;
+ num_base_subgs = gloader->base.num_subglyphs;
+
+ /* now, read each subglyph independently */
+ for ( nn = 0; nn < num_subglyphs; nn++ )
+ {
+ FT_Vector pp1, pp2;
+ FT_Pos x, y;
+ FT_UInt num_points, num_new_points, num_base_points;
+
+
+ /* gloader.current.subglyphs can change during glyph loading due */
+ /* to re-allocation -- we must recompute the current subglyph on */
+ /* each iteration */
+ subglyph = gloader->base.subglyphs + num_base_subgs + nn;
+
+ pp1 = loader->pp1;
+ pp2 = loader->pp2;
+
+ num_base_points = gloader->base.outline.n_points;
+
+ error = af_loader_load_g( loader, scaler, subglyph->index,
+ load_flags, depth + 1 );
+ if ( error )
+ goto Exit;
+
+ /* recompute subglyph pointer */
+ subglyph = gloader->base.subglyphs + num_base_subgs + nn;
+
+ if ( subglyph->flags & FT_SUBGLYPH_FLAG_USE_MY_METRICS )
+ {
+ pp1 = loader->pp1;
+ pp2 = loader->pp2;
+ }
+ else
+ {
+ loader->pp1 = pp1;
+ loader->pp2 = pp2;
+ }
+
+ num_points = gloader->base.outline.n_points;
+ num_new_points = num_points - num_base_points;
+
+ /* now perform the transform required for this subglyph */
+
+ if ( subglyph->flags & ( FT_SUBGLYPH_FLAG_SCALE |
+ FT_SUBGLYPH_FLAG_XY_SCALE |
+ FT_SUBGLYPH_FLAG_2X2 ) )
+ {
+ FT_Vector* cur = gloader->base.outline.points +
+ num_base_points;
+ FT_Vector* org = gloader->base.extra_points +
+ num_base_points;
+ FT_Vector* limit = cur + num_new_points;
+
+
+ for ( ; cur < limit; cur++, org++ )
+ {
+ FT_Vector_Transform( cur, &subglyph->transform );
+ FT_Vector_Transform( org, &subglyph->transform );
+ }
+ }
+
+ /* apply offset */
+
+ if ( !( subglyph->flags & FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES ) )
+ {
+ FT_Int k = subglyph->arg1;
+ FT_UInt l = subglyph->arg2;
+ FT_Vector* p1;
+ FT_Vector* p2;
+
+
+ if ( start_point + k >= num_base_points ||
+ l >= (FT_UInt)num_new_points )
+ {
+ error = FT_Err_Invalid_Composite;
+ goto Exit;
+ }
+
+ l += num_base_points;
+
+ /* for now, only use the current point coordinates; */
+ /* we may consider another approach in the near future */
+ p1 = gloader->base.outline.points + start_point + k;
+ p2 = gloader->base.outline.points + start_point + l;
+
+ x = p1->x - p2->x;
+ y = p1->y - p2->y;
+ }
+ else
+ {
+ x = FT_MulFix( subglyph->arg1, hints->x_scale ) + hints->x_delta;
+ y = FT_MulFix( subglyph->arg2, hints->y_scale ) + hints->y_delta;
+
+ x = FT_PIX_ROUND(x);
+ y = FT_PIX_ROUND(y);
+ }
+
+ {
+ FT_Outline dummy = gloader->base.outline;
+
+
+ dummy.points += num_base_points;
+ dummy.n_points = (short)num_new_points;
+
+ FT_Outline_Translate( &dummy, x, y );
+ }
+ }
+ }
+ break;
+
+ default:
+ /* we don't support other formats (yet?) */
+ error = FT_Err_Unimplemented_Feature;
+ }
+
+ Hint_Metrics:
+ if ( depth == 0 )
+ {
+ FT_BBox bbox;
+
+
+ /* transform the hinted outline if needed */
+ if ( loader->transformed )
+ FT_Outline_Transform( &gloader->base.outline, &loader->trans_matrix );
+
+ /* we must translate our final outline by -pp1.x and compute */
+ /* the new metrics */
+ if ( loader->pp1.x )
+ FT_Outline_Translate( &gloader->base.outline, -loader->pp1.x, 0 );
+
+ FT_Outline_Get_CBox( &gloader->base.outline, &bbox );
+
+ bbox.xMin = FT_PIX_FLOOR( bbox.xMin );
+ bbox.yMin = FT_PIX_FLOOR( bbox.yMin );
+ bbox.xMax = FT_PIX_CEIL( bbox.xMax );
+ bbox.yMax = FT_PIX_CEIL( bbox.yMax );
+
+ slot->metrics.width = bbox.xMax - bbox.xMin;
+ slot->metrics.height = bbox.yMax - bbox.yMin;
+ slot->metrics.horiBearingX = bbox.xMin;
+ slot->metrics.horiBearingY = bbox.yMax;
+
+ /* for mono-width fonts (like Andale, Courier, etc.) we need */
+ /* to keep the original rounded advance width */
+#if 0
+ if ( !FT_IS_FIXED_WIDTH( slot->face ) )
+ slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
+ else
+ slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,
+ x_scale );
+#else
+ slot->metrics.horiAdvance = loader->pp2.x - loader->pp1.x;
+#endif
+
+ slot->metrics.horiAdvance = FT_PIX_ROUND( slot->metrics.horiAdvance );
+
+ /* now copy outline into glyph slot */
+ FT_GlyphLoader_Rewind( internal->loader );
+ error = FT_GlyphLoader_CopyPoints( internal->loader, gloader );
+ if ( error )
+ goto Exit;
+
+ slot->outline = internal->loader->base.outline;
+ slot->format = FT_GLYPH_FORMAT_OUTLINE;
+ }
+
+#ifdef DEBUG_HINTER
+ af_debug_hinter = hinter;
+#endif
+
+ Exit:
+ return error;
+ }
+
+
+
+
+ FT_LOCAL_DEF( FT_Error )
+ af_loader_load_glyph( AF_Loader loader,
+ FT_Face face,
+ FT_UInt gindex,
+ FT_UInt32 load_flags )
+ {
+ FT_Error error;
+ FT_Size size = face->size;
+ AF_ScalerRec scaler;
+
+ if ( !size )
+ return FT_Err_Invalid_Argument;
+
+ FT_ZERO( &scaler );
+
+ scaler.face = face;
+ scaler.x_scale = size->metrics.x_scale;
+ scaler.x_delta = 0; /* XXX: TODO: add support for sub-pixel hinting */
+ scaler.y_scale = size->metrics.y_scale;
+ scaler.y_delta = 0; /* XXX: TODO: add support for sub-pixel hinting */
+
+ scaler.render_mode = FT_LOAD_TARGET_MODE( load_flags );
+ scaler.flags = 0; /* XXX: fix this */
+
+ error = af_loader_reset( loader, face );
+ if ( !error )
+ {
+ AF_ScriptMetrics metrics;
+
+ error = af_face_globals_get_metrics( loader->globals, gindex, &metrics );
+ if ( !error )
+ {
+ loader->metrics = metrics;
+
+ metrics->scaler = scaler;
+
+ if ( metrics->clazz->script_metrics_scale )
+ metrics->clazz->script_metrics_scale( metrics, &scaler );
+
+ load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_IGNORE_TRANSFORM;
+ load_flags &= ~FT_LOAD_RENDER;
+
+ error = af_loader_load_g( loader, &scaler, gindex, load_flags, 0 );
+ }
+ }
+ return error;
+ }
diff --git a/extras/freetype2/src/autofit/afloader.h b/extras/freetype2/src/autofit/afloader.h
new file mode 100644
index 000000000..12361560a
--- /dev/null
+++ b/extras/freetype2/src/autofit/afloader.h
@@ -0,0 +1,50 @@
+#ifndef __AF_LOADER_H__
+#define __AF_LOADER_H__
+
+#include "afhints.h"
+#include "afglobal.h"
+
+FT_BEGIN_HEADER
+
+ typedef struct AF_LoaderRec_
+ {
+ FT_Face face; /* current face */
+ AF_FaceGlobals globals; /* current face globals */
+ FT_GlyphLoader gloader; /* glyph loader */
+ AF_GlyphHintsRec hints;
+ AF_ScriptMetrics metrics;
+ FT_Bool transformed;
+ FT_Matrix trans_matrix;
+ FT_Vector trans_delta;
+ FT_Vector pp1;
+ FT_Vector pp2;
+ /* we don't handle vertical phantom points */
+
+ } AF_LoaderRec, *AF_Loader;
+
+
+ FT_LOCAL( FT_Error )
+ af_loader_init( AF_Loader loader,
+ FT_Memory memory );
+
+
+ FT_LOCAL( FT_Error )
+ af_loader_reset( AF_Loader loader,
+ FT_Face face );
+
+
+ FT_LOCAL( void )
+ af_loader_done( AF_Loader loader );
+
+
+ FT_LOCAL( FT_Error )
+ af_loader_load_glyph( AF_Loader loader,
+ FT_Face face,
+ FT_UInt gindex,
+ FT_UInt32 load_flags );
+
+/* */
+
+FT_END_HEADER
+
+#endif /* __AF_LOADER_H__ */
diff --git a/extras/freetype2/src/autofit/afmodule.c b/extras/freetype2/src/autofit/afmodule.c
new file mode 100644
index 000000000..f266a7afe
--- /dev/null
+++ b/extras/freetype2/src/autofit/afmodule.c
@@ -0,0 +1,70 @@
+#include "afmodule.h"
+#include "afloader.h"
+#include FT_INTERNAL_OBJECTS_H
+
+ typedef struct FT_AutofitterRec_
+ {
+ FT_ModuleRec root;
+ AF_LoaderRec loader[1];
+
+ } FT_AutofitterRec, *FT_Autofitter;
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ af_autofitter_init( FT_Autofitter module )
+ {
+ return af_loader_init( module->loader, module->root.library->memory );
+ }
+
+
+ FT_CALLBACK_DEF( void )
+ af_autofitter_done( FT_Autofitter module )
+ {
+ af_loader_done( module->loader );
+ }
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ af_autofitter_load_glyph( FT_Autofitter module,
+ FT_GlyphSlot slot,
+ FT_Size size,
+ FT_UInt glyph_index,
+ FT_Int32 load_flags )
+ {
+ FT_UNUSED(size);
+
+ return af_loader_load_glyph( module->loader, slot->face,
+ glyph_index, load_flags );
+ }
+
+
+
+ FT_CALLBACK_TABLE_DEF
+ const FT_AutoHinter_ServiceRec af_autofitter_service =
+ {
+ NULL,
+ NULL,
+ NULL,
+ (FT_AutoHinter_GlyphLoadFunc) af_autofitter_load_glyph
+ };
+
+
+ FT_CALLBACK_TABLE_DEF
+ const FT_Module_Class autofit_module_class =
+ {
+ FT_MODULE_HINTER,
+ sizeof ( FT_AutofitterRec ),
+
+ "autofitter",
+ 0x10000L, /* version 1.0 of the autofitter */
+ 0x20000L, /* requires FreeType 2.0 or above */
+
+ (const void*) &af_autofitter_service,
+
+ (FT_Module_Constructor) af_autofitter_init,
+ (FT_Module_Destructor) af_autofitter_done,
+ (FT_Module_Requester) 0
+ };
+
+
+/* END */
diff --git a/extras/freetype2/src/autofit/afmodule.h b/extras/freetype2/src/autofit/afmodule.h
new file mode 100644
index 000000000..b898cb375
--- /dev/null
+++ b/extras/freetype2/src/autofit/afmodule.h
@@ -0,0 +1,16 @@
+#ifndef __AFMODULE_H__
+#define __AFMODULE_H__
+
+#include <ft2build.h>
+#include FT_MODULE_H
+
+
+FT_BEGIN_HEADER
+
+ FT_CALLBACK_TABLE
+ const FT_Module_Class autofit_module_class;
+
+
+FT_END_HEADER
+
+#endif /* __AFMODULE_H__ */
diff --git a/extras/freetype2/src/autofit/aftypes.h b/extras/freetype2/src/autofit/aftypes.h
new file mode 100644
index 000000000..abd2ff5fa
--- /dev/null
+++ b/extras/freetype2/src/autofit/aftypes.h
@@ -0,0 +1,268 @@
+#ifndef __AFTYPES_H__
+#define __AFTYPES_H__
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_OUTLINE_H
+#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_DEBUG_H
+
+FT_BEGIN_HEADER
+
+ /**************************************************************************/
+ /**************************************************************************/
+ /***** *****/
+ /***** D E B U G G I N G *****/
+ /***** *****/
+ /**************************************************************************/
+ /**************************************************************************/
+
+#define xxAF_DEBUG
+
+#ifdef AF_DEBUG
+
+# include <stdio.h>
+# define AF_LOG( x ) printf x
+
+#else
+
+# define AF_LOG( x ) do ; while ( 0 ) /* nothing */
+
+#endif /* AF_DEBUG */
+
+ /**************************************************************************/
+ /**************************************************************************/
+ /***** *****/
+ /***** U T I L I T Y *****/
+ /***** *****/
+ /**************************************************************************/
+ /**************************************************************************/
+
+ typedef struct AF_WidthRec_
+ {
+ FT_Pos org; /* original position/width in font units */
+ FT_Pos cur; /* current/scaled position/width in device sub-pixels */
+ FT_Pos fit; /* current/fitted position/width in device sub-pixels */
+
+ } AF_WidthRec, *AF_Width;
+
+
+ FT_LOCAL( void )
+ af_sort_pos( FT_UInt count,
+ FT_Pos* table );
+
+ FT_LOCAL( void )
+ af_sort_widths( FT_UInt count,
+ AF_Width widths );
+
+
+ /**************************************************************************/
+ /**************************************************************************/
+ /***** *****/
+ /***** A N G L E T Y P E S *****/
+ /***** *****/
+ /**************************************************************************/
+ /**************************************************************************/
+
+ /*
+ * Angle type. The auto-fitter doesn't need a very high angular accuracy,
+ * and this allows us to speed up some computations considerably with a
+ * light Cordic algorithm (see afangles.c)
+ *
+ */
+
+ typedef FT_Int AF_Angle;
+
+#define AF_ANGLE_PI 128
+#define AF_ANGLE_2PI (AF_ANGLE_PI*2)
+#define AF_ANGLE_PI2 (AF_ANGLE_PI/2)
+#define AF_ANGLE_PI4 (AF_ANGLE_PI/4)
+
+ /*
+ * compute the angle of a given 2-D vector
+ *
+ */
+ FT_LOCAL( AF_Angle )
+ af_angle_atan( FT_Pos dx,
+ FT_Pos dy );
+
+
+ /*
+ * computes "angle2 - angle1", the result is always within
+ * the range [ -AF_ANGLE_PI .. AF_ANGLE_PI-1 ]
+ *
+ */
+ FT_LOCAL( AF_Angle )
+ af_angle_diff( AF_Angle angle1,
+ AF_Angle angle2 );
+
+
+ /**************************************************************************/
+ /**************************************************************************/
+ /***** *****/
+ /***** O U T L I N E S *****/
+ /***** *****/
+ /**************************************************************************/
+ /**************************************************************************/
+
+ /* opaque handle to glyph-specific hints. see "afhints.h" for more
+ * details
+ */
+ typedef struct AF_GlyphHintsRec_* AF_GlyphHints;
+
+ /* this structure is used to model an input glyph outline to
+ * the auto-hinter. The latter will set the "hints" field
+ * depending on the glyph's script
+ */
+ typedef struct AF_OutlineRec_
+ {
+ FT_Face face;
+ FT_Outline outline;
+ FT_UInt outline_resolution;
+
+ FT_Int advance;
+ FT_UInt metrics_resolution;
+
+ AF_GlyphHints hints;
+
+ } AF_OutlineRec;
+
+
+ /**************************************************************************/
+ /**************************************************************************/
+ /***** *****/
+ /***** S C A L E R S *****/
+ /***** *****/
+ /**************************************************************************/
+ /**************************************************************************/
+
+ /*
+ * A scaler models the target pixel device that will receive the
+ * auto-hinted glyph image
+ *
+ */
+
+ typedef enum
+ {
+ AF_SCALER_FLAG_NO_HORIZONTAL = 1, /* disable horizontal hinting */
+ AF_SCALER_FLAG_NO_VERTICAL = 2, /* disable vertical hinting */
+ AF_SCALER_FLAG_NO_ADVANCE = 4 /* disable advance hinting */
+
+ } AF_ScalerFlags;
+
+
+ typedef struct AF_ScalerRec_
+ {
+ FT_Face face; /* source font face */
+ FT_Fixed x_scale; /* from font units to 1/64th device pixels */
+ FT_Fixed y_scale; /* from font units to 1/64th device pixels */
+ FT_Pos x_delta; /* in 1/64th device pixels */
+ FT_Pos y_delta; /* in 1/64th device pixels */
+ FT_Render_Mode render_mode; /* monochrome, anti-aliased, LCD, etc.. */
+ FT_UInt32 flags; /* additionnal control flags, see above */
+
+ } AF_ScalerRec, *AF_Scaler;
+
+
+
+ /**************************************************************************/
+ /**************************************************************************/
+ /***** *****/
+ /***** S C R I P T S *****/
+ /***** *****/
+ /**************************************************************************/
+ /**************************************************************************/
+
+ /*
+ * the list of know scripts. Each different script correspond to the
+ * following information:
+ *
+ * - a set of Unicode ranges to test weither the face supports the
+ * script
+ *
+ * - a specific global analyzer that will compute global metrics
+ * specific to the script.
+ *
+ * - a specific glyph analyzer that will compute segments and
+ * edges for each glyph covered by the script
+ *
+ * - a specific grid-fitting algorithm that will distort the
+ * scaled glyph outline according to the results of the glyph
+ * analyzer
+ *
+ * note that a given analyzer and/or grid-fitting algorithm can be
+ * used by more than one script
+ */
+ typedef enum
+ {
+ AF_SCRIPT_NONE = 0,
+ AF_SCRIPT_LATIN = 1,
+ /* add new scripts here. don't forget to update the list in "afglobal.c" */
+
+ AF_SCRIPT_MAX /* do not remove */
+
+ } AF_Script;
+
+
+
+ typedef struct AF_ScriptClassRec_ const* AF_ScriptClass;
+
+ typedef struct AF_ScriptMetricsRec_
+ {
+ AF_ScriptClass clazz;
+ AF_ScalerRec scaler;
+
+ } AF_ScriptMetricsRec, *AF_ScriptMetrics;
+
+
+ /* this function parses a FT_Face to compute global metrics for
+ * a specific script
+ */
+ typedef FT_Error (*AF_Script_InitMetricsFunc)( AF_ScriptMetrics metrics,
+ FT_Face face );
+
+ typedef void (*AF_Script_ScaleMetricsFunc)( AF_ScriptMetrics metrics,
+ AF_Scaler scaler );
+
+ typedef void (*AF_Script_DoneMetricsFunc)( AF_ScriptMetrics metrics );
+
+
+ typedef FT_Error (*AF_Script_InitHintsFunc)( AF_GlyphHints hints,
+ FT_Outline* outline,
+ AF_ScriptMetrics metrics );
+
+ typedef void (*AF_Script_ApplyHintsFunc)( AF_GlyphHints hints,
+ FT_Outline* outline,
+ AF_ScriptMetrics metrics );
+
+
+ typedef struct AF_Script_UniRangeRec_
+ {
+ FT_UInt32 first;
+ FT_UInt32 last;
+
+ } AF_Script_UniRangeRec;
+
+ typedef const AF_Script_UniRangeRec * AF_Script_UniRange;
+
+ typedef struct AF_ScriptClassRec_
+ {
+ AF_Script script;
+ AF_Script_UniRange script_uni_ranges; /* last must be { 0, 0 } */
+
+ FT_UInt script_metrics_size;
+ AF_Script_InitMetricsFunc script_metrics_init;
+ AF_Script_ScaleMetricsFunc script_metrics_scale;
+ AF_Script_DoneMetricsFunc script_metrics_done;
+
+ AF_Script_InitHintsFunc script_hints_init;
+ AF_Script_ApplyHintsFunc script_hints_apply;
+
+ } AF_ScriptClassRec;
+
+
+/* */
+
+FT_END_HEADER
+
+#endif /* __AFTYPES_H__ */
diff --git a/extras/freetype2/src/autofit/autofit.c b/extras/freetype2/src/autofit/autofit.c
new file mode 100644
index 000000000..c258e0d7a
--- /dev/null
+++ b/extras/freetype2/src/autofit/autofit.c
@@ -0,0 +1,9 @@
+#define FT_MAKE_OPTION_SINGLE_OBJECT
+#include <ft2build.h>
+#include "afangles.c"
+#include "afglobal.c"
+#include "afhints.c"
+#include "afdummy.c"
+#include "aflatin.c"
+#include "afloader.c"
+#include "afmodule.c"
diff --git a/extras/freetype2/src/autohint/ahglobal.c b/extras/freetype2/src/autohint/ahglobal.c
index efce3444d..e157014b5 100644
--- a/extras/freetype2/src/autohint/ahglobal.c
+++ b/extras/freetype2/src/autohint/ahglobal.c
@@ -4,7 +4,7 @@
/* */
/* Routines used to compute global metrics automatically (body). */
/* */
-/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002, 2003, 2004 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
@@ -27,8 +27,10 @@
#define MAX_TEST_CHARACTERS 12
+ /* cf. AH_BLUE_XXX constants in ahtypes.h */
+
static
- const char* blue_chars[AH_BLUE_MAX] =
+ const char* const blue_chars[AH_BLUE_MAX] =
{
"THEZOCQS",
"HEZLOCUS",
@@ -93,8 +95,8 @@
goto Exit;
/* we compute the blues simply by loading each character from the */
- /* 'blue_chars[blues]' string, then compute its top-most and */
- /* bottom-most points */
+ /* `blue_chars[blues]' string, then compute its top-most or */
+ /* bottom-most points (depending on `AH_IS_TOP_BLUE') */
AH_LOG(( "blue zones computation\n" ));
AH_LOG(( "------------------------------------------------\n" ));
@@ -103,6 +105,7 @@
{
const char* p = blue_chars[blue];
const char* limit = p + MAX_TEST_CHARACTERS;
+
FT_Pos *blue_ref, *blue_shoot;
@@ -235,8 +238,8 @@
AH_LOG(( "\n" ));
/* we have computed the contents of the `rounds' and `flats' tables, */
- /* now determine the reference and overshoot position of the blue; */
- /* we simply take the median value after a simple short */
+ /* now determine the reference and overshoot position of the blue -- */
+ /* we simply take the median value after a simple sort */
sort_values( num_rounds, rounds );
sort_values( num_flats, flats );
@@ -312,7 +315,7 @@
/* stem height of the "-", but it wasn't too good. Moreover, we now */
/* have a single character that gives us standard width and height. */
{
- FT_UInt glyph_index;
+ FT_UInt glyph_index;
glyph_index = FT_Get_Char_Index( hinter->face, 'o' );
@@ -323,7 +326,8 @@
if ( error )
goto Exit;
- error = ah_outline_load( hinter->glyph, 0x10000L, 0x10000L, hinter->face );
+ error = ah_outline_load( hinter->glyph, 0x10000L, 0x10000L,
+ hinter->face );
if ( error )
goto Exit;
@@ -375,7 +379,7 @@
}
/* Now, compute the edge distance threshold as a fraction of the */
- /* smallest width in the font. Set it in `hinter.glyph' too! */
+ /* smallest width in the font. Set it in `hinter->glyph' too! */
if ( edge_distance_threshold == 32000 )
edge_distance_threshold = 50;
diff --git a/extras/freetype2/src/autohint/ahglobal.h b/extras/freetype2/src/autohint/ahglobal.h
index ef99a01fd..5a9bcf835 100644
--- a/extras/freetype2/src/autohint/ahglobal.h
+++ b/extras/freetype2/src/autohint/ahglobal.h
@@ -5,7 +5,7 @@
/* Routines used to compute global metrics automatically */
/* (specification). */
/* */
-/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002, 2003 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
@@ -34,16 +34,16 @@ FT_BEGIN_HEADER
#ifdef FT_CONFIG_CHESTER_SMALL_F
-# define AH_IS_TOP_BLUE( b ) ( (b) == AH_BLUE_CAPITAL_TOP || \
- (b) == AH_BLUE_SMALL_F_TOP || \
- (b) == AH_BLUE_SMALL_TOP )
+#define AH_IS_TOP_BLUE( b ) ( (b) == AH_BLUE_CAPITAL_TOP || \
+ (b) == AH_BLUE_SMALL_F_TOP || \
+ (b) == AH_BLUE_SMALL_TOP )
-#else /* !CHESTER_SMALL_F */
+#else /* !FT_CONFIG_CHESTER_SMALL_F */
-# define AH_IS_TOP_BLUE( b ) ( (b) == AH_BLUE_CAPITAL_TOP || \
- (b) == AH_BLUE_SMALL_TOP )
+#define AH_IS_TOP_BLUE( b ) ( (b) == AH_BLUE_CAPITAL_TOP || \
+ (b) == AH_BLUE_SMALL_TOP )
-#endif /* !CHESTER_SMALL_F */
+#endif /* !FT_CONFIG_CHESTER_SMALL_F */
/* compute global metrics automatically */
diff --git a/extras/freetype2/src/autohint/ahglyph.c b/extras/freetype2/src/autohint/ahglyph.c
index 4f375045f..2a0390be4 100644
--- a/extras/freetype2/src/autohint/ahglyph.c
+++ b/extras/freetype2/src/autohint/ahglyph.c
@@ -5,7 +5,7 @@
/* Routines used to load and analyze a given glyph before hinting */
/* (body). */
/* */
-/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002, 2003, 2004 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
@@ -120,8 +120,8 @@
: ( seg->dir == AH_DIR_RIGHT
? "right"
: "none" ) ) ),
- seg->link ? (seg->link-segments) : -1,
- seg->serif ? (seg->serif-segments) : -1,
+ seg->link ? ( seg->link - segments ) : -1,
+ seg->serif ? ( seg->serif - segments ) : -1,
(int)seg->num_linked,
seg->first - points,
seg->last - points );
@@ -135,18 +135,20 @@
#endif /* AH_DEBUG */
- /* compute the direction value of a given vector.. */
+ /* compute the direction value of a given vector */
static AH_Direction
ah_compute_direction( FT_Pos dx,
FT_Pos dy )
{
AH_Direction dir;
- FT_Pos ax = ABS( dx );
- FT_Pos ay = ABS( dy );
+ FT_Pos ax = FT_ABS( dx );
+ FT_Pos ay = FT_ABS( dy );
dir = AH_DIR_NONE;
+ /* atan(1/12) == 4.7 degrees */
+
/* test for vertical direction */
if ( ax * 12 < ay )
{
@@ -163,10 +165,10 @@
/* this function is used by ah_get_orientation (see below) to test */
- /* the fill direction of a given bbox extrema */
+ /* the fill direction of given bbox extremum */
static FT_Int
- ah_test_extrema( FT_Outline* outline,
- FT_Int n )
+ ah_test_extremum( FT_Outline* outline,
+ FT_Int n )
{
FT_Vector *prev, *cur, *next;
FT_Pos product;
@@ -175,7 +177,9 @@
/* we need to compute the `previous' and `next' point */
- /* for these extrema */
+ /* for this extremum; we check whether the extremum */
+ /* is start or end of a contour and providing */
+ /* appropriate values if so */
cur = outline->points + n;
prev = cur - 1;
next = cur + 1;
@@ -183,7 +187,7 @@
first = 0;
for ( c = 0; c < outline->n_contours; c++ )
{
- last = outline->contours[c];
+ last = outline->contours[c];
if ( n == first )
prev = outline->points + last;
@@ -194,6 +198,10 @@
first = last + 1;
}
+ /* compute the vectorial product -- since we know that the angle */
+ /* is <= 180 degrees (otherwise it wouldn't be an extremum) we */
+ /* can determine the filling orientation if the product is */
+ /* either positive or negative */
product = FT_MulDiv( cur->x - prev->x, /* in.x */
next->y - cur->y, /* out.y */
0x40 )
@@ -218,7 +226,7 @@
/* We do this by computing bounding box points, and computing their */
/* curvature. */
/* */
- /* The function returns either 1 or -1. */
+ /* The function returns either 1 or 2. */
/* */
static FT_Int
ah_get_orientation( FT_Outline* outline )
@@ -272,20 +280,20 @@
}
}
- /* test orientation of the xmin */
- n = ah_test_extrema( outline, indices_xMin );
+ /* test orientation of the extrema */
+ n = ah_test_extremum( outline, indices_xMin );
if ( n )
goto Exit;
- n = ah_test_extrema( outline, indices_yMin );
+ n = ah_test_extremum( outline, indices_yMin );
if ( n )
goto Exit;
- n = ah_test_extrema( outline, indices_xMax );
+ n = ah_test_extremum( outline, indices_xMax );
if ( n )
goto Exit;
- n = ah_test_extrema( outline, indices_yMax );
+ n = ah_test_extremum( outline, indices_yMax );
if ( !n )
n = 1;
@@ -306,14 +314,14 @@
ah_outline_new( FT_Memory memory,
AH_Outline* aoutline )
{
- FT_Error error;
- AH_Outline outline;
+ FT_Error error;
+ AH_Outline outline;
if ( !FT_NEW( outline ) )
{
outline->memory = memory;
- *aoutline = outline;
+ *aoutline = outline;
}
return error;
@@ -410,7 +418,7 @@
/* first of all, reallocate the contours array if necessary */
if ( num_contours > outline->max_contours )
{
- FT_Int new_contours = ( num_contours + 3 ) & -4;
+ FT_Int new_contours = FT_PAD_CEIL( num_contours, 4 );
if ( FT_RENEW_ARRAY( outline->contours,
@@ -427,7 +435,7 @@
/* */
if ( num_points + 2 > outline->max_points )
{
- FT_Int news = ( num_points + 2 + 7 ) & -8;
+ FT_Int news = FT_PAD_CEIL( num_points + 2, 8 );
FT_Int max = outline->max_points;
@@ -452,7 +460,7 @@
/* We can't rely on the value of `FT_Outline.flags' to know the fill */
/* direction used for a glyph, given that some fonts are broken (e.g. */
- /* the Arphic ones). We thus recompute it each time we need to. */
+ /* the Arphic ones). We thus recompute it each time we need to. */
/* */
outline->vert_major_dir = AH_DIR_UP;
outline->horz_major_dir = AH_DIR_LEFT;
@@ -479,7 +487,7 @@
/* compute coordinates */
{
- FT_Vector* vec = source->points;
+ FT_Vector* vec = source->points;
for ( point = points; point < point_limit; vec++, point++ )
@@ -503,9 +511,11 @@
switch ( FT_CURVE_TAG( *tag ) )
{
case FT_CURVE_TAG_CONIC:
- point->flags = AH_FLAG_CONIC; break;
+ point->flags = AH_FLAG_CONIC;
+ break;
case FT_CURVE_TAG_CUBIC:
- point->flags = AH_FLAG_CUBIC; break;
+ point->flags = AH_FLAG_CUBIC;
+ break;
default:
;
}
@@ -585,7 +595,7 @@
point->out_dir = ah_compute_direction( ovec.x, ovec.y );
#ifndef AH_OPTION_NO_WEAK_INTERPOLATION
- if ( point->flags & (AH_FLAG_CONIC | AH_FLAG_CUBIC) )
+ if ( point->flags & ( AH_FLAG_CONIC | AH_FLAG_CUBIC ) )
{
Is_Weak_Point:
point->flags |= AH_FLAG_WEAK_INTERPOLATION;
@@ -631,48 +641,70 @@
AH_Point point_limit = point + outline->num_points;
- for ( ; point < point_limit; point++ )
+ switch ( source )
{
- FT_Pos u, v;
+ case AH_UV_FXY:
+ for ( ; point < point_limit; point++ )
+ {
+ point->u = point->fx;
+ point->v = point->fy;
+ }
+ break;
+
+ case AH_UV_FYX:
+ for ( ; point < point_limit; point++ )
+ {
+ point->u = point->fy;
+ point->v = point->fx;
+ }
+ break;
+
+ case AH_UV_OXY:
+ for ( ; point < point_limit; point++ )
+ {
+ point->u = point->ox;
+ point->v = point->oy;
+ }
+ break;
+ case AH_UV_OYX:
+ for ( ; point < point_limit; point++ )
+ {
+ point->u = point->oy;
+ point->v = point->ox;
+ }
+ break;
+
+ case AH_UV_YX:
+ for ( ; point < point_limit; point++ )
+ {
+ point->u = point->y;
+ point->v = point->x;
+ }
+ break;
+
+ case AH_UV_OX:
+ for ( ; point < point_limit; point++ )
+ {
+ point->u = point->x;
+ point->v = point->ox;
+ }
+ break;
+
+ case AH_UV_OY:
+ for ( ; point < point_limit; point++ )
+ {
+ point->u = point->y;
+ point->v = point->oy;
+ }
+ break;
- switch ( source )
+ default:
+ for ( ; point < point_limit; point++ )
{
- case AH_UV_FXY:
- u = point->fx;
- v = point->fy;
- break;
- case AH_UV_FYX:
- u = point->fy;
- v = point->fx;
- break;
- case AH_UV_OXY:
- u = point->ox;
- v = point->oy;
- break;
- case AH_UV_OYX:
- u = point->oy;
- v = point->ox;
- break;
- case AH_UV_YX:
- u = point->y;
- v = point->x;
- break;
- case AH_UV_OX:
- u = point->x;
- v = point->ox;
- break;
- case AH_UV_OY:
- u = point->y;
- v = point->oy;
- break;
- default:
- u = point->x;
- v = point->y;
- break;
+ point->u = point->x;
+ point->v = point->y;
}
- point->u = u;
- point->v = v;
}
}
@@ -681,8 +713,8 @@
static void
ah_outline_compute_inflections( AH_Outline outline )
{
- AH_Point* contour = outline->contours;
- AH_Point* contour_limit = contour + outline->num_contours;
+ AH_Point* contour = outline->contours;
+ AH_Point* contour_limit = contour + outline->num_contours;
/* load original coordinates in (u,v) */
@@ -692,10 +724,10 @@
for ( ; contour < contour_limit; contour++ )
{
FT_Vector vec;
- AH_Point point = contour[0];
- AH_Point first = point;
- AH_Point start = point;
- AH_Point end = point;
+ AH_Point point = contour[0];
+ AH_Point first = point;
+ AH_Point start = point;
+ AH_Point end = point;
AH_Point before;
AH_Point after;
AH_Angle angle_in, angle_seg, angle_out;
@@ -769,7 +801,6 @@
{
/* diff_in and diff_out have different signs, we have */
/* inflection points here... */
-
do
{
start->flags |= AH_FLAG_INFLECTION;
@@ -829,10 +860,10 @@
/* do each contour separately */
for ( ; contour < contour_limit; contour++ )
{
- AH_Point point = contour[0];
- AH_Point last = point->prev;
- int on_edge = 0;
- FT_Pos min_pos = +32000; /* minimum segment pos != min_coord */
+ AH_Point point = contour[0];
+ AH_Point last = point->prev;
+ int on_edge = 0;
+ FT_Pos min_pos = 32000; /* minimum segment pos != min_coord */
FT_Pos max_pos = -32000; /* maximum segment pos != max_coord */
FT_Bool passed;
@@ -850,11 +881,11 @@
}
#endif
- if ( point == last ) /* skip singletons -- just in case? */
+ if ( point == last ) /* skip singletons -- just in case */
continue;
- if ( ABS( last->out_dir ) == major_dir &&
- ABS( point->out_dir ) == major_dir )
+ if ( FT_ABS( last->out_dir ) == major_dir &&
+ FT_ABS( point->out_dir ) == major_dir )
{
/* we are already on an edge, try to locate its start */
last = point;
@@ -862,7 +893,7 @@
for (;;)
{
point = point->prev;
- if ( ABS( point->out_dir ) != major_dir )
+ if ( FT_ABS( point->out_dir ) != major_dir )
{
point = point->next;
break;
@@ -927,7 +958,7 @@
passed = 1;
}
- if ( !on_edge && ABS( point->out_dir ) == major_dir )
+ if ( !on_edge && FT_ABS( point->out_dir ) == major_dir )
{
/* this is the start of a new segment! */
segment_dir = point->out_dir;
@@ -941,6 +972,8 @@
segment->first = point;
segment->last = point;
segment->contour = contour;
+ segment->score = 32000;
+ segment->link = NULL;
on_edge = 1;
#ifdef AH_HINT_METRICS
@@ -963,11 +996,11 @@
/* we do this by inserting fake segments when needed */
if ( dimension == 0 )
{
- AH_Point point = outline->points;
- AH_Point point_limit = point + outline->num_points;
+ AH_Point point = outline->points;
+ AH_Point point_limit = point + outline->num_points;
- FT_Pos min_pos = 32000;
- FT_Pos max_pos = -32000;
+ FT_Pos min_pos = 32000;
+ FT_Pos max_pos = -32000;
min_point = 0;
@@ -1002,6 +1035,8 @@
segment->first = min_point;
segment->last = min_point;
segment->pos = min_pos;
+ segment->score = 32000;
+ segment->link = NULL;
num_segments++;
segment++;
@@ -1018,6 +1053,8 @@
segment->first = max_point;
segment->last = max_point;
segment->pos = max_pos;
+ segment->score = 32000;
+ segment->link = NULL;
num_segments++;
segment++;
@@ -1030,6 +1067,7 @@
segments = outline->vert_segments;
major_dir = AH_DIR_UP;
p_num_segments = &outline->num_vsegments;
+
ah_setup_uv( outline, AH_UV_FXY );
}
}
@@ -1038,22 +1076,22 @@
FT_LOCAL_DEF( void )
ah_outline_link_segments( AH_Outline outline )
{
- AH_Segment segments;
- AH_Segment segment_limit;
- int dimension;
-
+ AH_Segment segments;
+ AH_Segment segment_limit;
+ AH_Direction major_dir;
+ int dimension;
- ah_setup_uv( outline, AH_UV_FYX );
segments = outline->horz_segments;
segment_limit = segments + outline->num_hsegments;
+ major_dir = outline->horz_major_dir;
for ( dimension = 1; dimension >= 0; dimension-- )
{
AH_Segment seg1;
AH_Segment seg2;
-
+#if 0
/* now compare each segment to the others */
for ( seg1 = segments; seg1 < segment_limit; seg1++ )
{
@@ -1070,7 +1108,7 @@
if ( best_segment )
best_score = seg1->score;
else
- best_score = 32000;
+ best_score = +32000;
for ( seg2 = segments; seg2 < segment_limit; seg2++ )
if ( seg1 != seg2 && seg1->dir + seg2->dir == 0 )
@@ -1125,28 +1163,86 @@
{
seg1->link = best_segment;
seg1->score = best_score;
-
best_segment->num_linked++;
}
+ }
+#endif /* 0 */
+
+#if 1
+ /* the following code does the same, but much faster! */
+
+ /* now compare each segment to the others */
+ for ( seg1 = segments; seg1 < segment_limit; seg1++ )
+ {
+ /* the fake segments are introduced to hint the metrics -- */
+ /* we must never link them to anything */
+ if ( seg1->first == seg1->last || seg1->dir != major_dir )
+ continue;
+
+ for ( seg2 = segments; seg2 < segment_limit; seg2++ )
+ if ( seg2 != seg1 && seg1->dir + seg2->dir == 0 )
+ {
+ FT_Pos pos1 = seg1->pos;
+ FT_Pos pos2 = seg2->pos;
+ FT_Pos dist = pos2 - pos1;
+
+
+ if ( dist < 0 )
+ continue;
+
+ {
+ FT_Pos min = seg1->min_coord;
+ FT_Pos max = seg1->max_coord;
+ FT_Pos len, score;
+
+
+ if ( min < seg2->min_coord )
+ min = seg2->min_coord;
+
+ if ( max > seg2->max_coord )
+ max = seg2->max_coord;
+
+ len = max - min;
+ if ( len >= 8 )
+ {
+ score = dist + 3000 / len;
+
+ if ( score < seg1->score )
+ {
+ seg1->score = score;
+ seg1->link = seg2;
+ }
- } /* edges 1 */
+ if ( score < seg2->score )
+ {
+ seg2->score = score;
+ seg2->link = seg1;
+ }
+ }
+ }
+ }
+ }
+#endif /* 1 */
/* now, compute the `serif' segments */
for ( seg1 = segments; seg1 < segment_limit; seg1++ )
{
seg2 = seg1->link;
- if ( seg2 && seg2->link != seg1 )
+ if ( seg2 )
{
- seg1->link = 0;
- seg1->serif = seg2->link;
+ seg2->num_linked++;
+ if ( seg2->link != seg1 )
+ {
+ seg1->link = 0;
+ seg1->serif = seg2->link;
+ }
}
}
- ah_setup_uv( outline, AH_UV_FXY );
-
segments = outline->vert_segments;
segment_limit = segments + outline->num_vsegments;
+ major_dir = outline->vert_major_dir;
}
}
@@ -1199,6 +1295,9 @@
if ( edge_distance_threshold > 64 / 4 )
edge_distance_threshold = 64 / 4;
+ edge_distance_threshold = FT_DivFix( edge_distance_threshold,
+ scale );
+
edge_limit = edges;
for ( seg = segments; seg < segment_limit; seg++ )
{
@@ -1215,7 +1314,6 @@
if ( dist < 0 )
dist = -dist;
- dist = FT_MulFix( dist, scale );
if ( dist < edge_distance_threshold )
{
found = edge;
@@ -1253,7 +1351,6 @@
edge->last = seg;
}
}
-
*p_num_edges = (FT_Int)( edge_limit - edges );
@@ -1264,13 +1361,19 @@
/* */
/* - edge's main direction */
/* - stem edge, serif edge or both (which defaults to stem then) */
- /* - rounded edge, straigth or both (which defaults to straight) */
+ /* - rounded edge, straight or both (which defaults to straight) */
/* - link for edge */
/* */
/*********************************************************************/
/* first of all, set the `edge' field in each segment -- this is */
/* required in order to compute edge links */
+
+ /* Note that I've tried to remove this loop, setting
+ * the "edge" field of each segment directly in the
+ * code above. For some reason, it slows down execution
+ * speed -- on a Sun.
+ */
for ( edge = edges; edge < edge_limit; edge++ )
{
seg = edge->first;
@@ -1358,12 +1461,12 @@
}
else
edge->link = edge2;
-#else /* !CHESTER_SERIF */
+#else /* !FT_CONFIG_CHESTER_SERIF */
if ( is_serif )
edge->serif = edge2;
else
edge->link = edge2;
-#endif
+#endif /* !FT_CONFIG_CHESTER_SERIF */
}
seg = seg->edge_next;
@@ -1383,10 +1486,10 @@
edge->dir = up_dir;
else if ( ups < downs )
- edge->dir = - up_dir;
+ edge->dir = -up_dir;
else if ( ups == downs )
- edge->dir = 0; /* both up and down !! */
+ edge->dir = 0; /* both up and down! */
/* gets rid of serifs if link is set */
/* XXX: This gets rid of many unpleasant artefacts! */
@@ -1459,7 +1562,7 @@
ref = globals->blue_refs[blue];
shoot = globals->blue_shoots[blue];
- dist = ref-shoot;
+ dist = ref - shoot;
if ( dist < 0 )
dist = -dist;
@@ -1477,7 +1580,7 @@
return;
}
- /* compute for each horizontal edge, which blue zone is closer */
+ /* for each horizontal edge search the blue zone which is closest */
for ( ; edge < edge_limit; edge++ )
{
AH_Blue blue;
@@ -1493,7 +1596,7 @@
best_dist = 64 / 2;
#else
if ( best_dist > 64 / 4 )
- best_dist = 64 / 4;
+ best_dist = 64 / 4;
#endif
for ( blue = AH_BLUE_CAPITAL_TOP; blue < AH_BLUE_MAX; blue++ )
@@ -1507,6 +1610,7 @@
FT_Bool is_major_dir =
FT_BOOL( edge->dir == outline->horz_major_dir );
+
if ( !blue_active[blue] )
continue;
@@ -1569,7 +1673,7 @@
/* ah_outline_scale_blue_edges */
/* */
/* <Description> */
- /* This functions must be called before hinting in order to re-adjust */
+ /* This function must be called before hinting in order to re-adjust */
/* the contents of the detected edges (basically change the `blue */
/* edge' pointer from `design units' to `scaled ones'). */
/* */
diff --git a/extras/freetype2/src/autohint/ahhint.c b/extras/freetype2/src/autohint/ahhint.c
index 5814e37ab..69ac95470 100644
--- a/extras/freetype2/src/autohint/ahhint.c
+++ b/extras/freetype2/src/autohint/ahhint.c
@@ -4,7 +4,7 @@
/* */
/* Glyph hinter (body). */
/* */
-/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002, 2003, 2004 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
@@ -27,11 +27,12 @@
#include FT_OUTLINE_H
-#define FACE_GLOBALS( face ) ((AH_Face_Globals)(face)->autohint.data)
+#define FACE_GLOBALS( face ) ( (AH_Face_Globals)(face)->autohint.data )
#define AH_USE_IUP
#define OPTIM_STEM_SNAP
+
/*************************************************************************/
/*************************************************************************/
/**** ****/
@@ -70,7 +71,7 @@
}
}
- scaled = (reference+32) & -64;
+ scaled = FT_PIX_ROUND( reference );
if ( width >= reference )
{
@@ -88,7 +89,9 @@
/* compute the snapped width of a given stem */
+
#ifdef FT_CONFIG_CHESTER_SERIF
+
static FT_Pos
ah_compute_stem_width( AH_Hinter hinter,
int vertical,
@@ -114,7 +117,7 @@
else if ( ( vertical && !hinter->do_vert_snapping ) ||
( !vertical && !hinter->do_horz_snapping ) )
{
- /* smooth hinting process, very lightly quantize the stem width */
+ /* smooth hinting process: very lightly quantize the stem width */
/* */
/* leave the widths of serifs alone */
@@ -148,8 +151,8 @@
if ( dist < 3 * 64 )
{
- delta = ( dist & 63 );
- dist &= -64;
+ delta = dist & 63;
+ dist &= -64;
if ( delta < 10 )
dist += delta;
@@ -164,12 +167,12 @@
dist += delta;
}
else
- dist = ( dist + 32 ) & -64;
+ dist = ( dist + 32 ) & ~63;
}
}
else
{
- /* strong hinting process, snap the stem width to integer pixels */
+ /* strong hinting process: snap the stem width to integer pixels */
/* */
if ( vertical )
{
@@ -178,13 +181,13 @@
/* in the case of vertical hinting, always round */
/* the stem heights to integer pixels */
if ( dist >= 64 )
- dist = ( dist + 16 ) & -64;
+ dist = ( dist + 16 ) & ~63;
else
dist = 64;
}
else
{
- dist = ah_snap_width( globals->widths, globals->num_widths, dist );
+ dist = ah_snap_width( globals->widths, globals->num_widths, dist );
if ( hinter->flags & AH_HINTER_MONOCHROME )
{
@@ -193,7 +196,7 @@
if ( dist < 64 )
dist = 64;
else
- dist = ( dist + 32 ) & -64;
+ dist = ( dist + 32 ) & ~63;
}
else
{
@@ -204,10 +207,10 @@
dist = ( dist + 64 ) >> 1;
else if ( dist < 128 )
- dist = ( dist + 22 ) & -64;
+ dist = ( dist + 22 ) & ~63;
else
- /* XXX: round otherwise, prevent color fringes in LCD mode */
- dist = ( dist + 32 ) & -64;
+ /* XXX: round otherwise to prevent color fringes in LCD mode */
+ dist = ( dist + 32 ) & ~63;
}
}
}
@@ -218,7 +221,9 @@
return dist;
}
-#else /* !CHESTER_SERIF */
+
+#else /* !FT_CONFIG_CHESTER_SERIF */
+
static FT_Pos
ah_compute_stem_width( AH_Hinter hinter,
int vertical,
@@ -242,7 +247,7 @@
else if ( ( vertical && !hinter->do_vert_snapping ) ||
( !vertical && !hinter->do_horz_snapping ) )
{
- /* smooth hinting process, very lightly quantize the stem width */
+ /* smooth hinting process: very lightly quantize the stem width */
/* */
if ( dist < 64 )
dist = 64;
@@ -263,8 +268,8 @@
if ( dist < 3 * 64 )
{
- delta = ( dist & 63 );
- dist &= -64;
+ delta = dist & 63;
+ dist &= -64;
if ( delta < 10 )
dist += delta;
@@ -279,12 +284,12 @@
dist += delta;
}
else
- dist = ( dist + 32 ) & -64;
+ dist = ( dist + 32 ) & ~63;
}
}
else
{
- /* strong hinting process, snap the stem width to integer pixels */
+ /* strong hinting process: snap the stem width to integer pixels */
/* */
if ( vertical )
{
@@ -293,13 +298,13 @@
/* in the case of vertical hinting, always round */
/* the stem heights to integer pixels */
if ( dist >= 64 )
- dist = ( dist + 16 ) & -64;
+ dist = ( dist + 16 ) & ~63;
else
dist = 64;
}
else
{
- dist = ah_snap_width( globals->widths, globals->num_widths, dist );
+ dist = ah_snap_width( globals->widths, globals->num_widths, dist );
if ( hinter->flags & AH_HINTER_MONOCHROME )
{
@@ -308,7 +313,7 @@
if ( dist < 64 )
dist = 64;
else
- dist = ( dist + 32 ) & -64;
+ dist = ( dist + 32 ) & ~63;
}
else
{
@@ -319,10 +324,10 @@
dist = ( dist + 64 ) >> 1;
else if ( dist < 128 )
- dist = ( dist + 22 ) & -64;
+ dist = ( dist + 22 ) & ~63;
else
- /* XXX: round otherwise, prevent color fringes in LCD mode */
- dist = ( dist + 32 ) & -64;
+ /* XXX: round otherwise to prevent color fringes in LCD mode */
+ dist = ( dist + 32 ) & ~63;
}
}
}
@@ -332,7 +337,8 @@
return dist;
}
-#endif /* !CHESTER_SERIF */
+
+#endif /* !FT_CONFIG_CHESTER_SERIF */
/* align one stem edge relative to the previous stem edge */
@@ -345,17 +351,23 @@
FT_Pos dist = stem_edge->opos - base_edge->opos;
#ifdef FT_CONFIG_CHESTER_SERIF
+
FT_Pos fitted_width = ah_compute_stem_width( hinter,
vertical,
dist,
base_edge->flags,
stem_edge->flags );
+
stem_edge->pos = base_edge->pos + fitted_width;
+
#else
+
stem_edge->pos = base_edge->pos +
ah_compute_stem_width( hinter, vertical, dist );
+
#endif
+
}
@@ -371,6 +383,7 @@
FT_UNUSED( hinter );
FT_UNUSED( vertical );
+
dist = serif->opos - base->opos;
if ( dist < 0 )
{
@@ -378,15 +391,16 @@
sign = -1;
}
- /* do not touch serifs widths !! */
#if 0
+ /* do not touch serifs widths! */
if ( base->flags & AH_EDGE_DONE )
{
if ( dist >= 64 )
- dist = (dist+8) & -64;
+ dist = ( dist + 8 ) & ~63;
else if ( dist <= 32 && !vertical )
dist = ( dist + 33 ) >> 1;
+
else
dist = 0;
}
@@ -407,14 +421,14 @@
/*************************************************************************/
- /* Another alternative edge hinting algorithm */
- static void
- ah_hint_edges_3( AH_Hinter hinter )
+ FT_LOCAL_DEF( void )
+ ah_hinter_hint_edges( AH_Hinter hinter )
{
AH_Edge edges;
AH_Edge edge_limit;
AH_Outline outline = hinter->glyph;
FT_Int dimension;
+ FT_Int n_edges;
edges = outline->horz_edges;
@@ -454,7 +468,7 @@
{
edge1 = edge;
}
- else if (edge2 && edge2->blue_edge)
+ else if ( edge2 && edge2->blue_edge )
{
blue = edge2->blue_edge;
edge1 = edge2;
@@ -478,8 +492,8 @@
}
}
- /* now, we will align all stem edges, trying to maintain the */
- /* relative order of stems in the glyph.. */
+ /* now we will align all stem edges, trying to maintain the */
+ /* relative order of stems in the glyph */
for ( edge = edges; edge < edge_limit; edge++ )
{
AH_EdgeRec* edge2;
@@ -496,12 +510,11 @@
continue;
}
- /* now, align the stem */
+ /* now align the stem */
- /* this should not happen, but it's better to be safe. */
+ /* this should not happen, but it's better to be safe */
if ( edge2->blue_edge || edge2 < edge )
{
-
ah_align_linked_edge( hinter, edge2, edge, dimension );
edge->flags |= AH_EDGE_DONE;
continue;
@@ -509,15 +522,18 @@
if ( !anchor )
{
+
#ifdef FT_CONFIG_CHESTER_STEM
- FT_Pos org_len, org_center, cur_len;
- FT_Pos cur_pos1, error1, error2, u_off, d_off;
- org_len = edge2->opos - edge->opos;
- cur_len = ah_compute_stem_width( hinter, dimension, org_len,
- edge->flags, edge2->flags );
+ FT_Pos org_len, org_center, cur_len;
+ FT_Pos cur_pos1, error1, error2, u_off, d_off;
+
+
+ org_len = edge2->opos - edge->opos;
+ cur_len = ah_compute_stem_width( hinter, dimension, org_len,
+ edge->flags, edge2->flags );
- if (cur_len <= 64 )
+ if ( cur_len <= 64 )
u_off = d_off = 32;
else
{
@@ -529,7 +545,7 @@
{
org_center = edge->opos + ( org_len >> 1 );
- cur_pos1 = ( org_center + 32 ) & -64;
+ cur_pos1 = FT_PIX_ROUND( org_center );
error1 = org_center - ( cur_pos1 - u_off );
if ( error1 < 0 )
@@ -549,46 +565,56 @@
}
else
- edge->pos = ( edge->opos + 32 ) & -64;
+ edge->pos = FT_PIX_ROUND( edge->opos );
- anchor = edge;
+ anchor = edge;
edge->flags |= AH_EDGE_DONE;
ah_align_linked_edge( hinter, edge, edge2, dimension );
-#else /* !CHESTER_STEM */
- edge->pos = ( edge->opos + 32 ) & -64;
+
+#else /* !FT_CONFIG_CHESTER_STEM */
+
+ edge->pos = FT_PIX_ROUND( edge->opos );
anchor = edge;
edge->flags |= AH_EDGE_DONE;
ah_align_linked_edge( hinter, edge, edge2, dimension );
-#endif /* !CHESTER_STEM */
+
+#endif /* !FT_CONFIG_CHESTER_STEM */
+
}
else
{
- FT_Pos org_pos, org_len, org_center, cur_len;
- FT_Pos cur_pos1, cur_pos2, delta1, delta2;
+ FT_Pos org_pos, org_len, org_center, cur_len;
+ FT_Pos cur_pos1, cur_pos2, delta1, delta2;
- org_pos = anchor->pos + (edge->opos - anchor->opos);
+ org_pos = anchor->pos + ( edge->opos - anchor->opos );
org_len = edge2->opos - edge->opos;
org_center = org_pos + ( org_len >> 1 );
#ifdef FT_CONFIG_CHESTER_SERIF
- cur_len = ah_compute_stem_width( hinter, dimension, org_len,
- edge->flags, edge2->flags );
-#else /* !CHESTER_SERIF */
- cur_len = ah_compute_stem_width( hinter, dimension, org_len );
-#endif /* !CHESTER_SERIF */
+
+ cur_len = ah_compute_stem_width( hinter, dimension, org_len,
+ edge->flags, edge2->flags );
+
+
+#else /* !FT_CONFIG_CHESTER_SERIF */
+
+ cur_len = ah_compute_stem_width( hinter, dimension, org_len );
+
+#endif /* !FT_CONFIG_CHESTER_SERIF */
#ifdef FT_CONFIG_CHESTER_STEM
+
if ( cur_len < 96 )
{
FT_Pos u_off, d_off;
- cur_pos1 = ( org_center + 32 ) & -64;
+ cur_pos1 = FT_PIX_ROUND( org_center );
if (cur_len <= 64 )
u_off = d_off = 32;
@@ -598,11 +624,11 @@
d_off = 26;
}
- delta1 = org_center - (cur_pos1 - u_off);
+ delta1 = org_center - ( cur_pos1 - u_off );
if ( delta1 < 0 )
delta1 = -delta1;
- delta2 = org_center - (cur_pos1 + d_off);
+ delta2 = org_center - ( cur_pos1 + d_off );
if ( delta2 < 0 )
delta2 = -delta2;
@@ -616,20 +642,19 @@
}
else
{
-
- org_pos = anchor->pos + (edge->opos - anchor->opos);
+ org_pos = anchor->pos + ( edge->opos - anchor->opos );
org_len = edge2->opos - edge->opos;
org_center = org_pos + ( org_len >> 1 );
cur_len = ah_compute_stem_width( hinter, dimension, org_len,
edge->flags, edge2->flags );
- cur_pos1 = ( org_pos + 32 ) & -64;
+ cur_pos1 = FT_PIX_ROUND( org_pos );
delta1 = ( cur_pos1 + ( cur_len >> 1 ) - org_center );
if ( delta1 < 0 )
delta1 = -delta1;
- cur_pos2 = ( ( org_pos + org_len + 32 ) & -64 ) - cur_len;
+ cur_pos2 = FT_PIX_ROUND( org_pos + org_len ) - cur_len;
delta2 = ( cur_pos2 + ( cur_len >> 1 ) - org_center );
if ( delta2 < 0 )
delta2 = -delta2;
@@ -638,14 +663,14 @@
edge2->pos = edge->pos + cur_len;
}
-#else /* !CHESTER_STEM */
+#else /* !FT_CONFIG_CHESTER_STEM */
- cur_pos1 = ( org_pos + 32 ) & -64;
+ cur_pos1 = FT_PIX_ROUND( org_pos );
delta1 = ( cur_pos1 + ( cur_len >> 1 ) - org_center );
if ( delta1 < 0 )
delta1 = -delta1;
- cur_pos2 = ( ( org_pos + org_len + 32 ) & -64 ) - cur_len;
+ cur_pos2 = FT_PIX_ROUND( org_pos + org_len ) - cur_len;
delta2 = ( cur_pos2 + ( cur_len >> 1 ) - org_center );
if ( delta2 < 0 )
delta2 = -delta2;
@@ -653,7 +678,7 @@
edge->pos = ( delta1 <= delta2 ) ? cur_pos1 : cur_pos2;
edge2->pos = edge->pos + cur_len;
-#endif /* !CHESTER_STEM */
+#endif /* !FT_CONFIG_CHESTER_STEM */
edge->flags |= AH_EDGE_DONE;
edge2->flags |= AH_EDGE_DONE;
@@ -663,11 +688,73 @@
}
}
+ /* make sure that lowercase m's maintain their symmetry */
+
+ /* In general, lowercase m's have six vertical edges if they are sans */
+ /* serif, or twelve if they are avec serif. This implementation is */
+ /* based on that assumption, and seems to work very well with most */
+ /* faces. However, if for a certain face this assumption is not */
+ /* true, the m is just rendered like before. In addition, any stem */
+ /* correction will only be applied to symmetrical glyphs (even if the */
+ /* glyph is not an m), so the potential for unwanted distortion is */
+ /* relatively low. */
+
+ /* We don't handle horizontal edges since we can't easily assure that */
+ /* the third (lowest) stem aligns with the base line; it might end up */
+ /* one pixel higher or lower. */
+
+ n_edges = (FT_Int)( edge_limit - edges );
+ if ( !dimension && ( n_edges == 6 || n_edges == 12 ) )
+ {
+ AH_EdgeRec *edge1, *edge2, *edge3;
+ FT_Pos dist1, dist2, span, delta;
+
+
+ if ( n_edges == 6 )
+ {
+ edge1 = edges;
+ edge2 = edges + 2;
+ edge3 = edges + 4;
+ }
+ else
+ {
+ edge1 = edges + 1;
+ edge2 = edges + 5;
+ edge3 = edges + 9;
+ }
+
+ dist1 = edge2->opos - edge1->opos;
+ dist2 = edge3->opos - edge2->opos;
+
+ span = dist1 - dist2;
+ if ( span < 0 )
+ span = -span;
+
+ if ( span < 8 )
+ {
+ delta = edge3->pos - ( 2 * edge2->pos - edge1->pos );
+ edge3->pos -= delta;
+ if ( edge3->link )
+ edge3->link->pos -= delta;
+
+ /* move the serifs along with the stem */
+ if ( n_edges == 12 )
+ {
+ ( edges + 8 )->pos -= delta;
+ ( edges + 11 )->pos -= delta;
+ }
+
+ edge3->flags |= AH_EDGE_DONE;
+ if ( edge3->link )
+ edge3->link->flags |= AH_EDGE_DONE;
+ }
+ }
+
if ( !has_serifs )
goto Next_Dimension;
- /* now, hint the remaining edges (serifs and single) in order */
- /* to complete our processing */
+ /* now hint the remaining edges (serifs and single) in order */
+ /* to complete our processing */
for ( edge = edges; edge < edge_limit; edge++ )
{
if ( edge->flags & AH_EDGE_DONE )
@@ -677,12 +764,12 @@
ah_align_serif_edge( hinter, edge->serif, edge, dimension );
else if ( !anchor )
{
- edge->pos = ( edge->opos + 32 ) & -64;
+ edge->pos = FT_PIX_ROUND( edge->opos );
anchor = edge;
}
else
edge->pos = anchor->pos +
- ( ( edge->opos-anchor->opos + 32 ) & -64 );
+ FT_PIX_ROUND( edge->opos - anchor->opos );
edge->flags |= AH_EDGE_DONE;
@@ -702,18 +789,6 @@
}
- FT_LOCAL_DEF( void )
- ah_hinter_hint_edges( AH_Hinter hinter )
- {
- /* AH_Interpolate_Blue_Edges( hinter ); -- doesn't seem to help */
- /* reduce the problem of the disappearing eye in the `e' of Times... */
- /* also, creates some artifacts near the blue zones? */
- {
- ah_hint_edges_3( hinter );
- }
- }
-
-
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
@@ -785,6 +860,7 @@
/* hint the strong points -- this is equivalent to the TrueType `IP' */
+ /* hinting instruction */
static void
ah_hinter_align_strong_points( AH_Hinter hinter )
{
@@ -850,7 +926,7 @@
goto Store_Point;
}
- /* is the point after the last edge ? */
+ /* is the point after the last edge? */
edge = edge_limit - 1;
delta = u - edge->fpos;
if ( delta >= 0 )
@@ -859,6 +935,51 @@
goto Store_Point;
}
+#if 1
+ {
+ FT_UInt min, max, mid;
+ FT_Pos fpos;
+
+
+ /* find enclosing edges */
+ min = 0;
+ max = (FT_UInt)( edge_limit - edges );
+
+ while ( min < max )
+ {
+ mid = ( max + min ) >> 1;
+ edge = edges + mid;
+ fpos = edge->fpos;
+
+ if ( u < fpos )
+ max = mid;
+ else if ( u > fpos )
+ min = mid + 1;
+ else
+ {
+ /* we are on the edge */
+ u = edge->pos;
+ goto Store_Point;
+ }
+ }
+
+ {
+ AH_Edge before = edges + min - 1;
+ AH_Edge after = edges + min + 0;
+
+
+ /* assert( before && after && before != after ) */
+ if ( before->scale == 0 )
+ before->scale = FT_DivFix( after->pos - before->pos,
+ after->fpos - before->fpos );
+
+ u = before->pos + FT_MulFix( fu - before->fpos,
+ before->scale );
+ }
+ }
+
+#else /* !0 */
+
/* otherwise, interpolate the point in between */
{
AH_Edge before = 0;
@@ -889,12 +1010,16 @@
after = edge;
}
- /* assert( before && after && before != after ) */
- u = before->pos + FT_MulDiv( fu - before->fpos,
- after->pos - before->pos,
- after->fpos - before->fpos );
+ if ( before->scale == 0 )
+ before->scale = FT_DivFix( after->pos - before->pos,
+ after->fpos - before->fpos );
+
+ u = before->pos + FT_MulFix( fu - before->fpos,
+ before->scale );
}
+#endif /* !0 */
+
Store_Point:
/* save the point position */
@@ -1001,6 +1126,7 @@
/* interpolate weak points -- this is equivalent to the TrueType `IUP' */
+ /* hinting instruction */
static void
ah_hinter_align_weak_points( AH_Hinter hinter )
{
@@ -1141,8 +1267,8 @@
{
FT_Int n;
AH_Face_Globals globals = hinter->globals;
- AH_Globals design = &globals->design;
- AH_Globals scaled = &globals->scaled;
+ AH_Globals design = &globals->design;
+ AH_Globals scaled = &globals->scaled;
/* copy content */
@@ -1173,15 +1299,16 @@
if ( delta2 < 32 )
delta2 = 0;
else if ( delta2 < 64 )
- delta2 = 32 + ( ( ( delta2 - 32 ) + 16 ) & -32 );
+ delta2 = 32 + ( ( ( delta2 - 32 ) + 16 ) & ~31 );
else
- delta2 = ( delta2 + 32 ) & -64;
+ delta2 = FT_PIX_ROUND( delta2 );
if ( delta < 0 )
delta2 = -delta2;
scaled->blue_refs[n] =
- ( FT_MulFix( design->blue_refs[n], y_scale ) + 32 ) & -64;
+ FT_PIX_ROUND( FT_MulFix( design->blue_refs[n], y_scale ) );
+
scaled->blue_shoots[n] = scaled->blue_refs[n] + delta2;
}
@@ -1211,7 +1338,7 @@
ah_outline_done( hinter->glyph );
/* note: the `globals' pointer is _not_ owned by the hinter */
- /* but by the current face object, we don't need to */
+ /* but by the current face object; we don't need to */
/* release it */
hinter->globals = 0;
hinter->face = 0;
@@ -1360,26 +1487,26 @@
}
}
- /* copy the outline points in the loader's current */
- /* extra points, which is used to keep original glyph coordinates */
- error = ah_loader_check_points( gloader, slot->outline.n_points + 2,
+ /* copy the outline points in the loader's current */
+ /* extra points which is used to keep original glyph coordinates */
+ error = ah_loader_check_points( gloader, slot->outline.n_points + 4,
slot->outline.n_contours );
if ( error )
goto Exit;
- FT_MEM_COPY( gloader->current.extra_points, slot->outline.points,
- slot->outline.n_points * sizeof ( FT_Vector ) );
+ FT_ARRAY_COPY( gloader->current.extra_points, slot->outline.points,
+ slot->outline.n_points );
- FT_MEM_COPY( gloader->current.outline.contours, slot->outline.contours,
- slot->outline.n_contours * sizeof ( short ) );
+ FT_ARRAY_COPY( gloader->current.outline.contours, slot->outline.contours,
+ slot->outline.n_contours );
- FT_MEM_COPY( gloader->current.outline.tags, slot->outline.tags,
- slot->outline.n_points * sizeof ( char ) );
+ FT_ARRAY_COPY( gloader->current.outline.tags, slot->outline.tags,
+ slot->outline.n_points );
gloader->current.outline.n_points = slot->outline.n_points;
gloader->current.outline.n_contours = slot->outline.n_contours;
- /* compute original phantom points */
+ /* compute original horizontal phantom points, ignoring vertical ones */
hinter->pp1.x = 0;
hinter->pp1.y = 0;
hinter->pp2.x = FT_MulFix( slot->metrics.horiAdvance, x_scale );
@@ -1389,8 +1516,8 @@
if ( slot->outline.n_points == 0 )
goto Hint_Metrics;
- /* now, load the slot image into the auto-outline, and run the */
- /* automatic hinting process */
+ /* now load the slot image into the auto-outline and run the */
+ /* automatic hinting process */
error = ah_outline_load( outline, x_scale, y_scale, face );
if ( error )
goto Exit;
@@ -1413,6 +1540,7 @@
/* we now need to hint the metrics according to the change in */
/* width/positioning that occured during the hinting process */
+ if ( outline->num_vedges > 0 )
{
FT_Pos old_advance, old_rsb, old_lsb, new_lsb;
AH_Edge edge1 = outline->vert_edges; /* leftmost edge */
@@ -1425,8 +1553,8 @@
old_lsb = edge1->opos;
new_lsb = edge1->pos;
- hinter->pp1.x = ( ( new_lsb - old_lsb ) + 32 ) & -64;
- hinter->pp2.x = ( ( edge2->pos + old_rsb ) + 32 ) & -64;
+ hinter->pp1.x = FT_PIX_ROUND( new_lsb - old_lsb );
+ hinter->pp2.x = FT_PIX_ROUND( edge2->pos + old_rsb );
#if 0
/* try to fix certain bad advance computations */
@@ -1435,6 +1563,12 @@
#endif
}
+ else
+ {
+ hinter->pp1.x = ( hinter->pp1.x + 32 ) & -64;
+ hinter->pp2.x = ( hinter->pp2.x + 32 ) & -64;
+ }
+
/* good, we simply add the glyph to our loader's base */
ah_loader_add( gloader );
break;
@@ -1446,15 +1580,15 @@
FT_SubGlyph subglyph;
- start_point = gloader->base.outline.n_points;
+ start_point = gloader->base.outline.n_points;
/* first of all, copy the subglyph descriptors in the glyph loader */
error = ah_loader_check_subglyphs( gloader, num_subglyphs );
if ( error )
goto Exit;
- FT_MEM_COPY( gloader->current.subglyphs, slot->subglyphs,
- num_subglyphs * sizeof ( FT_SubGlyph ) );
+ FT_ARRAY_COPY( gloader->current.subglyphs, slot->subglyphs,
+ num_subglyphs );
gloader->current.num_subglyphs = num_subglyphs;
num_base_subgs = gloader->base.num_subglyphs;
@@ -1529,8 +1663,8 @@
FT_Vector* p2;
- if ( start_point + k >= num_base_points ||
- l >= (FT_UInt)num_new_points )
+ if ( start_point + k >= num_base_points ||
+ l >= (FT_UInt)num_new_points )
{
error = AH_Err_Invalid_Composite;
goto Exit;
@@ -1538,7 +1672,7 @@
l += num_base_points;
- /* for now, only use the current point coordinates */
+ /* for now, only use the current point coordinates; */
/* we may consider another approach in the near future */
p1 = gloader->base.outline.points + start_point + k;
p2 = gloader->base.outline.points + start_point + l;
@@ -1551,8 +1685,8 @@
x = FT_MulFix( subglyph->arg1, x_scale );
y = FT_MulFix( subglyph->arg2, y_scale );
- x = ( x + 32 ) & -64;
- y = ( y + 32 ) & -64;
+ x = FT_PIX_ROUND(x);
+ y = FT_PIX_ROUND(y);
}
{
@@ -1583,31 +1717,31 @@
if ( hinter->transformed )
FT_Outline_Transform( &gloader->base.outline, &hinter->trans_matrix );
- /* we must translate our final outline by -pp1.x, and compute */
- /* the new metrics */
+ /* we must translate our final outline by -pp1.x and compute */
+ /* the new metrics */
if ( hinter->pp1.x )
FT_Outline_Translate( &gloader->base.outline, -hinter->pp1.x, 0 );
FT_Outline_Get_CBox( &gloader->base.outline, &bbox );
- bbox.xMin &= -64;
- bbox.yMin &= -64;
- bbox.xMax = ( bbox.xMax + 63 ) & -64;
- bbox.yMax = ( bbox.yMax + 63 ) & -64;
+ bbox.xMin = FT_PIX_FLOOR( bbox.xMin );
+ bbox.yMin = FT_PIX_FLOOR( bbox.yMin );
+ bbox.xMax = FT_PIX_CEIL( bbox.xMax );
+ bbox.yMax = FT_PIX_CEIL( bbox.yMax );
slot->metrics.width = bbox.xMax - bbox.xMin;
slot->metrics.height = bbox.yMax - bbox.yMin;
slot->metrics.horiBearingX = bbox.xMin;
slot->metrics.horiBearingY = bbox.yMax;
- /* for mono-width fonts (like Andale, Courier, etc.), we need */
- /* to keep the original rounded advance width */
+ /* for mono-width fonts (like Andale, Courier, etc.) we need */
+ /* to keep the original rounded advance width */
if ( !FT_IS_FIXED_WIDTH( slot->face ) )
slot->metrics.horiAdvance = hinter->pp2.x - hinter->pp1.x;
else
slot->metrics.horiAdvance = FT_MulFix( slot->metrics.horiAdvance,
x_scale );
- slot->metrics.horiAdvance = ( slot->metrics.horiAdvance + 32 ) & -64;
+ slot->metrics.horiAdvance = FT_PIX_ROUND( slot->metrics.horiAdvance );
/* now copy outline into glyph slot */
ah_loader_rewind( slot->internal->loader );
@@ -1641,7 +1775,7 @@
FT_Fixed x_scale = size->metrics.x_scale;
FT_Fixed y_scale = size->metrics.y_scale;
AH_Face_Globals face_globals = FACE_GLOBALS( face );
- FT_Render_Mode hint_mode = FT_LOAD_TARGET_MODE(load_flags);
+ FT_Render_Mode hint_mode = FT_LOAD_TARGET_MODE( load_flags );
/* first of all, we need to check that we're using the correct face and */
@@ -1662,19 +1796,22 @@
}
#ifdef FT_CONFIG_CHESTER_BLUE_SCALE
+
/* try to optimize the y_scale so that the top of non-capital letters
* is aligned on a pixel boundary whenever possible
*/
{
AH_Globals design = &face_globals->design;
- FT_Pos shoot = design->blue_shoots[ AH_BLUE_SMALL_TOP ];
+ FT_Pos shoot = design->blue_shoots[AH_BLUE_SMALL_TOP];
- /* the value of 'shoot' will be -1000 if the font doesn't have */
- /* small latin letters; we simply check the sign here... */
+
+ /* the value of 'shoot' will be -1000 if the font doesn't have */
+ /* small latin letters; we simply check the sign here... */
if ( shoot > 0 )
{
FT_Pos scaled = FT_MulFix( shoot, y_scale );
- FT_Pos fitted = ( scaled + 32 ) & -64;
+ FT_Pos fitted = FT_PIX_ROUND( scaled );
+
if ( scaled != fitted )
{
@@ -1685,10 +1822,11 @@
/* adust x_scale
*/
if ( fitted < scaled )
- x_scale -= x_scale/50; /* x_scale*0.98 with integers */
+ x_scale -= x_scale / 50; /* x_scale*0.98 with integers */
}
}
}
+
#endif /* FT_CONFIG_CHESTER_BLUE_SCALE */
/* now, we must check the current character pixel size to see if we */
@@ -1720,12 +1858,9 @@
hinter->do_stem_adjust = FT_BOOL( hint_mode != FT_RENDER_MODE_LIGHT );
-#if 1
- load_flags = FT_LOAD_NO_SCALE
- | FT_LOAD_IGNORE_TRANSFORM ;
-#else
- load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_RECURSE;
-#endif
+ load_flags |= FT_LOAD_NO_SCALE
+ | FT_LOAD_IGNORE_TRANSFORM;
+ load_flags &= ~FT_LOAD_RENDER;
error = ah_hinter_load( hinter, glyph_index, load_flags, 0 );
diff --git a/extras/freetype2/src/autohint/ahmodule.c b/extras/freetype2/src/autohint/ahmodule.c
index 1819e9ef9..8fce31d61 100644
--- a/extras/freetype2/src/autohint/ahmodule.c
+++ b/extras/freetype2/src/autohint/ahmodule.c
@@ -4,7 +4,7 @@
/* */
/* Auto-hinting module implementation (declaration). */
/* */
-/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002, 2003 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
@@ -119,7 +119,7 @@
FT_CALLBACK_TABLE_DEF
const FT_Module_Class autohint_module_class =
{
- ft_module_hinter,
+ FT_MODULE_HINTER,
sizeof ( FT_AutoHinterRec ),
"autohinter",
diff --git a/extras/freetype2/src/autohint/ahtypes.h b/extras/freetype2/src/autohint/ahtypes.h
index fb1458617..f2cedd288 100644
--- a/extras/freetype2/src/autohint/ahtypes.h
+++ b/extras/freetype2/src/autohint/ahtypes.h
@@ -5,7 +5,7 @@
/* General types and definitions for the auto-hint module */
/* (specification only). */
/* */
-/* Copyright 2000-2001, 2002 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002, 2003, 2004 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
@@ -78,16 +78,6 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* If this option is defined, only weak interpolation will be used to */
- /* place the points between edges. Otherwise, `strong' points are */
- /* detected and later hinted through strong interpolation to correct */
- /* some unpleasant artefacts. */
- /* */
-#undef AH_OPTION_NO_STRONG_INTERPOLATION
-
-
- /*************************************************************************/
- /* */
/* Undefine this macro if you don't want to hint the metrics. There is */
/* no reason to do this (at least for non-CJK scripts), except for */
/* experimentation. */
@@ -121,7 +111,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
- /* see agangles.h */
+ /* see ahangles.h */
typedef FT_Int AH_Angle;
@@ -201,10 +191,6 @@ FT_BEGIN_HEADER
/* */
/* out_dir :: The direction of the outwards vector (point->next). */
/* */
- /* in_angle :: The angle of the inwards vector. */
- /* */
- /* out_angle :: The angle of the outwards vector. */
- /* */
/* next :: The next point in same contour. */
/* */
/* prev :: The previous point in same contour. */
@@ -220,9 +206,6 @@ FT_BEGIN_HEADER
AH_Direction in_dir; /* direction of inwards vector */
AH_Direction out_dir; /* direction of outwards vector */
- AH_Angle in_angle;
- AH_Angle out_angle;
-
AH_Point next; /* next point in contour */
AH_Point prev; /* previous point in contour */
@@ -244,16 +227,9 @@ FT_BEGIN_HEADER
/* */
/* dir :: The segment direction. */
/* */
- /* first :: The first point in the segment. */
+ /* min_coord :: The minimum coordinate of the segment. */
/* */
- /* last :: The last point in the segment. */
- /* */
- /* contour :: A pointer to the first point of the segment's */
- /* contour. */
- /* */
- /* pos :: The segment position in font units. */
- /* */
- /* size :: The segment size. */
+ /* max_coord :: The maximum coordinate of the segment. */
/* */
/* edge :: The edge of the current segment. */
/* */
@@ -267,15 +243,17 @@ FT_BEGIN_HEADER
/* */
/* score :: Used to score the segment when selecting them. */
/* */
+ /* first :: The first point in the segment. */
+ /* */
+ /* last :: The last point in the segment. */
+ /* */
+ /* contour :: A pointer to the first point of the segment's */
+ /* contour. */
+ /* */
typedef struct AH_SegmentRec_
{
AH_Edge_Flags flags;
AH_Direction dir;
-
- AH_Point first; /* first point in edge segment */
- AH_Point last; /* last point in edge segment */
- AH_Point* contour; /* ptr to first point of segment's contour */
-
FT_Pos pos; /* position of segment */
FT_Pos min_coord; /* minimum coordinate of segment */
FT_Pos max_coord; /* maximum coordinate of segment */
@@ -288,6 +266,10 @@ FT_BEGIN_HEADER
FT_Pos num_linked; /* number of linked segments */
FT_Pos score;
+ AH_Point first; /* first point in edge segment */
+ AH_Point last; /* last point in edge segment */
+ AH_Point* contour; /* ptr to first point of segment's contour */
+
} AH_SegmentRec;
@@ -302,50 +284,55 @@ FT_BEGIN_HEADER
/* located on it. */
/* */
/* <Fields> */
- /* flags :: The segment edge flags (straight, rounded, etc.). */
+ /* fpos :: The original edge position in font units. */
/* */
- /* dir :: The main segment direction on this edge. */
+ /* opos :: The original scaled edge position. */
/* */
- /* first :: The first edge segment. */
+ /* pos :: The hinted edge position. */
/* */
- /* last :: The last edge segment. */
+ /* flags :: The segment edge flags (straight, rounded, etc.). */
/* */
- /* fpos :: The original edge position in font units. */
+ /* dir :: The main segment direction on this edge. */
/* */
- /* opos :: The original scaled edge position. */
+ /* scale :: Scaling factor between original and hinted edge */
+ /* positions. */
/* */
- /* pos :: The hinted edge position. */
+ /* blue_edge :: Indicate the blue zone edge this edge is related to. */
+ /* Only set for some of the horizontal edges in a latin */
+ /* font. */
/* */
/* link :: The linked edge. */
/* */
/* serif :: The serif edge. */
/* */
- /* num_paired :: The number of other edges that pair to this one. */
+ /* num_linked :: The number of other edges that pair to this one. */
/* */
/* score :: Used to score the edge when selecting them. */
/* */
- /* blue_edge :: Indicate the blue zone edge this edge is related to. */
- /* Only set for some of the horizontal edges in a Latin */
- /* font. */
+ /* first :: The first edge segment. */
+ /* */
+ /* last :: The last edge segment. */
/* */
typedef struct AH_EdgeRec_
{
- AH_Edge_Flags flags;
- AH_Direction dir;
-
- AH_Segment first;
- AH_Segment last;
-
FT_Pos fpos;
FT_Pos opos;
FT_Pos pos;
+ AH_Edge_Flags flags;
+ AH_Direction dir;
+ FT_Fixed scale;
+ FT_Pos* blue_edge;
+
AH_Edge link;
AH_Edge serif;
FT_Int num_linked;
FT_Int score;
- FT_Pos* blue_edge;
+
+ AH_Segment first;
+ AH_Segment last;
+
} AH_EdgeRec;
@@ -368,7 +355,7 @@ FT_BEGIN_HEADER
FT_Int max_contours;
FT_Int num_contours;
- AH_Point * contours;
+ AH_Point* contours;
FT_Int num_hedges;
AH_Edge horz_edges;
@@ -387,24 +374,24 @@ FT_BEGIN_HEADER
#ifdef FT_CONFIG_CHESTER_SMALL_F
-# define AH_BLUE_CAPITAL_TOP 0 /* THEZOCQS */
-# define AH_BLUE_CAPITAL_BOTTOM ( AH_BLUE_CAPITAL_TOP + 1 ) /* HEZLOCUS */
-# define AH_BLUE_SMALL_F_TOP ( AH_BLUE_CAPITAL_BOTTOM + 1 ) /* fijkdbh */
-# define AH_BLUE_SMALL_TOP ( AH_BLUE_SMALL_F_TOP + 1 ) /* xzroesc */
-# define AH_BLUE_SMALL_BOTTOM ( AH_BLUE_SMALL_TOP + 1 ) /* xzroesc */
-# define AH_BLUE_SMALL_MINOR ( AH_BLUE_SMALL_BOTTOM + 1 ) /* pqgjy */
-# define AH_BLUE_MAX ( AH_BLUE_SMALL_MINOR + 1 )
+#define AH_BLUE_CAPITAL_TOP 0 /* THEZOCQS */
+#define AH_BLUE_CAPITAL_BOTTOM ( AH_BLUE_CAPITAL_TOP + 1 ) /* HEZLOCUS */
+#define AH_BLUE_SMALL_F_TOP ( AH_BLUE_CAPITAL_BOTTOM + 1 ) /* fijkdbh */
+#define AH_BLUE_SMALL_TOP ( AH_BLUE_SMALL_F_TOP + 1 ) /* xzroesc */
+#define AH_BLUE_SMALL_BOTTOM ( AH_BLUE_SMALL_TOP + 1 ) /* xzroesc */
+#define AH_BLUE_SMALL_MINOR ( AH_BLUE_SMALL_BOTTOM + 1 ) /* pqgjy */
+#define AH_BLUE_MAX ( AH_BLUE_SMALL_MINOR + 1 )
-#else /* !CHESTER_SMALL_F */
+#else /* !FT_CONFIG_CHESTER_SMALL_F */
-# define AH_BLUE_CAPITAL_TOP 0 /* THEZOCQS */
-# define AH_BLUE_CAPITAL_BOTTOM ( AH_BLUE_CAPITAL_TOP + 1 ) /* HEZLOCUS */
-# define AH_BLUE_SMALL_TOP ( AH_BLUE_CAPITAL_BOTTOM + 1) /* xzroesc */
-# define AH_BLUE_SMALL_BOTTOM ( AH_BLUE_SMALL_TOP + 1 ) /* xzroesc */
-# define AH_BLUE_SMALL_MINOR ( AH_BLUE_SMALL_BOTTOM + 1 ) /* pqgjy */
-# define AH_BLUE_MAX ( AH_BLUE_SMALL_MINOR + 1 )
+#define AH_BLUE_CAPITAL_TOP 0 /* THEZOCQS */
+#define AH_BLUE_CAPITAL_BOTTOM ( AH_BLUE_CAPITAL_TOP + 1 ) /* HEZLOCUS */
+#define AH_BLUE_SMALL_TOP ( AH_BLUE_CAPITAL_BOTTOM + 1 ) /* xzroesc */
+#define AH_BLUE_SMALL_BOTTOM ( AH_BLUE_SMALL_TOP + 1 ) /* xzroesc */
+#define AH_BLUE_SMALL_MINOR ( AH_BLUE_SMALL_BOTTOM + 1 ) /* pqgjy */
+#define AH_BLUE_MAX ( AH_BLUE_SMALL_MINOR + 1 )
-#endif /* !CHESTER_SMALL_F */
+#endif /* !FT_CONFIG_CHESTER_SMALL_F */
typedef FT_Int AH_Blue;
@@ -429,6 +416,9 @@ FT_BEGIN_HEADER
/* */
/* num_heights :: The number of heights. */
/* */
+ /* stds :: A two-element array giving the default stem width */
+ /* and height. */
+ /* */
/* widths :: Snap widths, including standard one. */
/* */
/* heights :: Snap height, including standard one. */
@@ -474,6 +464,9 @@ FT_BEGIN_HEADER
/* */
/* y_scale :: The current vertical scale. */
/* */
+ /* control_overshoot :: */
+ /* Currently unused. */
+ /* */
typedef struct AH_Face_GlobalsRec_
{
FT_Face face;
@@ -486,39 +479,40 @@ FT_BEGIN_HEADER
} AH_Face_GlobalsRec, *AH_Face_Globals;
- typedef struct AH_HinterRec
+ typedef struct AH_HinterRec_
{
- FT_Memory memory;
- AH_Hinter_Flags flags;
+ FT_Memory memory;
+ AH_Hinter_Flags flags;
- FT_Int algorithm;
- FT_Face face;
+ FT_Int algorithm;
+ FT_Face face;
- AH_Face_Globals globals;
+ AH_Face_Globals globals;
- AH_Outline glyph;
+ AH_Outline glyph;
- AH_Loader loader;
- FT_Vector pp1;
- FT_Vector pp2;
+ AH_Loader loader;
+ FT_Vector pp1; /* horizontal phantom points */
+ FT_Vector pp2;
+ /* we ignore vertical phantom points */
- FT_Bool transformed;
- FT_Vector trans_delta;
- FT_Matrix trans_matrix;
+ FT_Bool transformed;
+ FT_Vector trans_delta;
+ FT_Matrix trans_matrix;
- FT_Bool do_horz_hints; /* disable X hinting */
- FT_Bool do_vert_hints; /* disable Y hinting */
- FT_Bool do_horz_snapping; /* disable X stem size snapping */
- FT_Bool do_vert_snapping; /* disable Y stem size snapping */
- FT_Bool do_stem_adjust; /* disable light stem snapping */
+ FT_Bool do_horz_hints; /* disable X hinting */
+ FT_Bool do_vert_hints; /* disable Y hinting */
+ FT_Bool do_horz_snapping; /* disable X stem size snapping */
+ FT_Bool do_vert_snapping; /* disable Y stem size snapping */
+ FT_Bool do_stem_adjust; /* disable light stem snapping */
} AH_HinterRec, *AH_Hinter;
-#ifdef DEBUG_HINTER
- extern AH_Hinter ah_debug_hinter;
- extern FT_Bool ah_debug_disable_horz;
- extern FT_Bool ah_debug_disable_vert;
+#ifdef DEBUG_HINTER
+ extern AH_Hinter ah_debug_hinter;
+ extern FT_Bool ah_debug_disable_horz;
+ extern FT_Bool ah_debug_disable_vert;
#else
#define ah_debug_disable_horz 0
#define ah_debug_disable_vert 0
diff --git a/extras/freetype2/src/autohint/rules.mk b/extras/freetype2/src/autohint/rules.mk
index 6dcaa20d0..ee264e862 100644
--- a/extras/freetype2/src/autohint/rules.mk
+++ b/extras/freetype2/src/autohint/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2000, 2001 Catharon Productions Inc.
+# Copyright 2000, 2001, 2002, 2003 Catharon Productions Inc.
# Author: David Turner
#
# This file is part of the Catharon Typography Project and shall only
@@ -18,29 +18,28 @@
# AUTO driver directory
#
-AUTO_DIR := $(SRC_)autohint
-AUTO_DIR_ := $(AUTO_DIR)$(SEP)
+AUTO_DIR := $(SRC_DIR)/autohint
# compilation flags for the driver
#
-AUTO_COMPILE := $(FT_COMPILE) $I$(AUTO_DIR)
+AUTO_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(AUTO_DIR))
# AUTO driver sources (i.e., C files)
#
-AUTO_DRV_SRC := $(AUTO_DIR_)ahangles.c \
- $(AUTO_DIR_)ahglobal.c \
- $(AUTO_DIR_)ahglyph.c \
- $(AUTO_DIR_)ahhint.c \
- $(AUTO_DIR_)ahmodule.c
+AUTO_DRV_SRC := $(AUTO_DIR)/ahangles.c \
+ $(AUTO_DIR)/ahglobal.c \
+ $(AUTO_DIR)/ahglyph.c \
+ $(AUTO_DIR)/ahhint.c \
+ $(AUTO_DIR)/ahmodule.c
# AUTO driver headers
#
AUTO_DRV_H := $(AUTO_DRV_SRC:%c=%h) \
- $(AUTO_DIR_)ahloader.h \
- $(AUTO_DIR_)ahtypes.h \
- $(AUTO_DIR_)aherrors.h
+ $(AUTO_DIR)/ahloader.h \
+ $(AUTO_DIR)/ahtypes.h \
+ $(AUTO_DIR)/aherrors.h
# AUTO driver object(s)
@@ -48,25 +47,25 @@ AUTO_DRV_H := $(AUTO_DRV_SRC:%c=%h) \
# AUTO_DRV_OBJ_M is used during `multi' builds.
# AUTO_DRV_OBJ_S is used during `single' builds.
#
-AUTO_DRV_OBJ_M := $(AUTO_DRV_SRC:$(AUTO_DIR_)%.c=$(OBJ_)%.$O)
-AUTO_DRV_OBJ_S := $(OBJ_)autohint.$O
+AUTO_DRV_OBJ_M := $(AUTO_DRV_SRC:$(AUTO_DIR)/%.c=$(OBJ_DIR)/%.$O)
+AUTO_DRV_OBJ_S := $(OBJ_DIR)/autohint.$O
# AUTO driver source file for single build
#
-AUTO_DRV_SRC_S := $(AUTO_DIR_)autohint.c
+AUTO_DRV_SRC_S := $(AUTO_DIR)/autohint.c
# AUTO driver - single object
#
$(AUTO_DRV_OBJ_S): $(AUTO_DRV_SRC_S) $(AUTO_DRV_SRC) \
$(FREETYPE_H) $(AUTO_DRV_H)
- $(AUTO_COMPILE) $T$@ $(AUTO_DRV_SRC_S)
+ $(AUTO_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(AUTO_DRV_SRC_S))
# AUTO driver - multiple objects
#
-$(OBJ_)%.$O: $(AUTO_DIR_)%.c $(FREETYPE_H) $(AUTO_DRV_H)
- $(AUTO_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(AUTO_DIR)/%.c $(FREETYPE_H) $(AUTO_DRV_H)
+ $(AUTO_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
diff --git a/extras/freetype2/src/base/Jamfile b/extras/freetype2/src/base/Jamfile
index 5ebcd7caa..d82e65d6d 100644
--- a/extras/freetype2/src/base/Jamfile
+++ b/extras/freetype2/src/base/Jamfile
@@ -1,4 +1,4 @@
-# FreeType 2 src/base Jamfile (c) 2001, 2002 David Turner
+# FreeType 2 src/base Jamfile (c) 2001, 2002, 2003, 2004 David Turner
#
SubDir FT2_TOP $(FT2_SRC_DIR) base ;
@@ -10,7 +10,7 @@ SubDir FT2_TOP $(FT2_SRC_DIR) base ;
if $(FT2_MULTI)
{
_sources = ftutil ftdbgmem ftstream ftcalc fttrigon ftgloadr ftoutln
- ftobjs ftnames ;
+ ftobjs ftnames ftrfork ;
}
else
{
@@ -24,8 +24,7 @@ SubDir FT2_TOP $(FT2_SRC_DIR) base ;
#
Library $(FT2_LIB) : ftsystem.c ftinit.c ftglyph.c ftmm.c ftbdf.c
ftbbox.c ftdebug.c ftxf86.c fttype1.c ftpfr.c
- ftstroker.c ftwinfnt.c
- ;
+ ftstroke.c ftwinfnt.c ;
# Add Macintosh-specific file to the library when necessary.
#
diff --git a/extras/freetype2/src/base/descrip.mms b/extras/freetype2/src/base/descrip.mms
index 02a806a5f..73bad4d73 100644
--- a/extras/freetype2/src/base/descrip.mms
+++ b/extras/freetype2/src/base/descrip.mms
@@ -3,7 +3,7 @@
#
-# Copyright 2001 by
+# Copyright 2001, 2003, 2004 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,7 +15,7 @@
CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.builds.vms],[--.include],[--.src.base])
-OBJS=ftbase.obj,ftinit.obj,ftglyph.obj,ftdebug.obj,ftbdf.obj,ftmm.obj,fttype1.obj,ftxf86.obj,ftpfr.obj,ftstroker.obj,ftwinfnt.obj
+OBJS=ftbase.obj,ftinit.obj,ftglyph.obj,ftdebug.obj,ftbdf.obj,ftmm.obj,fttype1.obj,ftxf86.obj,ftpfr.obj,ftstroke.obj,ftwinfnt.obj,ftbbox.obj
all : $(OBJS)
library [--.lib]freetype.olb $(OBJS)
diff --git a/extras/freetype2/src/base/ftbase.c b/extras/freetype2/src/base/ftbase.c
index 4ea846dc8..7d5a7fd8e 100644
--- a/extras/freetype2/src/base/ftbase.c
+++ b/extras/freetype2/src/base/ftbase.c
@@ -4,7 +4,7 @@
/* */
/* Single object library component (body only). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,6 +29,10 @@
#include "ftgloadr.c"
#include "ftobjs.c"
#include "ftnames.c"
+#include "ftrfork.c"
+#if defined( __APPLE__ ) && !defined ( DARWIN_NO_CARBON )
+#include "ftmac.c"
+#endif
/* END */
diff --git a/extras/freetype2/src/base/ftbbox.c b/extras/freetype2/src/base/ftbbox.c
index dd445d810..f71c9f0db 100644
--- a/extras/freetype2/src/base/ftbbox.c
+++ b/extras/freetype2/src/base/ftbbox.c
@@ -98,9 +98,9 @@
static void
BBox_Conic_Check( FT_Pos y1,
FT_Pos y2,
- FT_Pos y3,
- FT_Pos* min,
- FT_Pos* max )
+ FT_Pos y3,
+ FT_Pos* min,
+ FT_Pos* max )
{
if ( y1 <= y3 )
{
diff --git a/extras/freetype2/src/base/ftbdf.c b/extras/freetype2/src/base/ftbdf.c
index 3e76e9f32..d2f133db7 100644
--- a/extras/freetype2/src/base/ftbdf.c
+++ b/extras/freetype2/src/base/ftbdf.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing BDF-specific strings (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,24 +17,8 @@
#include <ft2build.h>
-#include FT_INTERNAL_BDF_TYPES_H
#include FT_INTERNAL_OBJECTS_H
-
- static FT_Bool
- test_font_type( FT_Face face, const char* name )
- {
- if ( face && face->driver )
- {
- FT_Module driver = (FT_Module)face->driver;
-
- if ( driver->clazz && driver->clazz->module_name )
- {
- if ( ft_strcmp( driver->clazz->module_name, name ) == 0 )
- return 1;
- }
- }
- return 0;
- }
+#include FT_SERVICE_BDF_H
FT_EXPORT_DEF( FT_Error )
@@ -49,14 +33,15 @@
error = FT_Err_Invalid_Argument;
- if ( test_font_type( face, "bdf" ) )
+ if ( face )
{
- BDF_Public_Face bdf_face = (BDF_Public_Face)face;
+ FT_Service_BDF service;
+
+ FT_FACE_FIND_SERVICE( face, service, BDF );
- encoding = (const char*) bdf_face->charset_encoding;
- registry = (const char*) bdf_face->charset_registry;
- error = 0;
+ if ( service && service->get_charset_id )
+ error = service->get_charset_id( face, &encoding, &registry );
}
if ( acharset_encoding )
@@ -74,23 +59,26 @@
const char* prop_name,
BDF_PropertyRec *aproperty )
{
- FT_Error error;
+ FT_Error error;
+
error = FT_Err_Invalid_Argument;
aproperty->type = BDF_PROPERTY_TYPE_NONE;
- if ( face != NULL && face->driver != NULL )
+ if ( face )
{
- FT_Driver driver = face->driver;
- BDF_GetPropertyFunc func;
+ FT_Service_BDF service;
+
+
+ FT_FACE_FIND_SERVICE( face, service, BDF );
- func = (BDF_GetPropertyFunc) driver->root.clazz->get_interface(
- FT_MODULE( driver ), "get_bdf_property" );
- if ( func )
- error = func( face, prop_name, aproperty );
+ if ( service && service->get_property )
+ error = service->get_property( face, prop_name, aproperty );
}
- return error;
+
+ return error;
}
+
/* END */
diff --git a/extras/freetype2/src/base/ftcalc.c b/extras/freetype2/src/base/ftcalc.c
index 6b78bc3e5..f169642e0 100644
--- a/extras/freetype2/src/base/ftcalc.c
+++ b/extras/freetype2/src/base/ftcalc.c
@@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -74,8 +74,8 @@
FT_EXPORT_DEF( FT_Fixed )
FT_RoundFix( FT_Fixed a )
{
- return ( a >= 0 ) ? ( a + 0x8000L ) & -0x10000L
- : -((-a + 0x8000L ) & -0x10000L );
+ return ( a >= 0 ) ? ( a + 0x8000L ) & ~0xFFFFL
+ : -((-a + 0x8000L ) & ~0xFFFFL );
}
@@ -84,8 +84,8 @@
FT_EXPORT_DEF( FT_Fixed )
FT_CeilFix( FT_Fixed a )
{
- return ( a >= 0 ) ? ( a + 0xFFFFL ) & -0x10000L
- : -((-a + 0xFFFFL ) & -0x10000L );
+ return ( a >= 0 ) ? ( a + 0xFFFFL ) & ~0xFFFFL
+ : -((-a + 0xFFFFL ) & ~0xFFFFL );
}
@@ -94,8 +94,8 @@
FT_EXPORT_DEF( FT_Fixed )
FT_FloorFix( FT_Fixed a )
{
- return ( a >= 0 ) ? a & -0x10000L
- : -((-a) & -0x10000L );
+ return ( a >= 0 ) ? a & ~0xFFFFL
+ : -((-a) & ~0xFFFFL );
}
@@ -155,6 +155,33 @@
}
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+
+ /* documentation is in ftcalc.h */
+
+ FT_BASE_DEF( FT_Long )
+ FT_MulDiv_No_Round( FT_Long a,
+ FT_Long b,
+ FT_Long c )
+ {
+ FT_Int s;
+ FT_Long d;
+
+
+ s = 1;
+ if ( a < 0 ) { a = -a; s = -1; }
+ if ( b < 0 ) { b = -b; s = -s; }
+ if ( c < 0 ) { c = -c; s = -s; }
+
+ d = (FT_Long)( c > 0 ? (FT_Int64)a * b / c
+ : 0x7FFFFFFFL );
+
+ return ( s > 0 ) ? d : -d;
+ }
+
+#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+
+
/* documentation is in freetype.h */
FT_EXPORT_DEF( FT_Long )
@@ -168,7 +195,7 @@
if ( a < 0 ) { a = -a; s = -1; }
if ( b < 0 ) { b = -b; s = -s; }
- c = (FT_Long)( ( (FT_Int64)a * b + 0x8000 ) >> 16 );
+ c = (FT_Long)( ( (FT_Int64)a * b + 0x8000L ) >> 16 );
return ( s > 0 ) ? c : -c ;
}
@@ -298,14 +325,13 @@
if ( a == 0 || b == c )
return a;
- s = a; a = ABS( a );
- s ^= b; b = ABS( b );
- s ^= c; c = ABS( c );
+ s = a; a = FT_ABS( a );
+ s ^= b; b = FT_ABS( b );
+ s ^= c; c = FT_ABS( c );
if ( a <= 46340L && b <= 46340L && c <= 176095L && c > 0 )
- {
a = ( a * b + ( c >> 1 ) ) / c;
- }
+
else if ( c > 0 )
{
FT_Int64 temp, temp2;
@@ -325,6 +351,43 @@
}
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+
+ FT_BASE_DEF( FT_Long )
+ FT_MulDiv_No_Round( FT_Long a,
+ FT_Long b,
+ FT_Long c )
+ {
+ long s;
+
+
+ if ( a == 0 || b == c )
+ return a;
+
+ s = a; a = FT_ABS( a );
+ s ^= b; b = FT_ABS( b );
+ s ^= c; c = FT_ABS( c );
+
+ if ( a <= 46340L && b <= 46340L && c > 0 )
+ a = a * b / c;
+
+ else if ( c > 0 )
+ {
+ FT_Int64 temp;
+
+
+ ft_multo64( a, b, &temp );
+ a = ft_div64by32( temp.hi, temp.lo, c );
+ }
+ else
+ a = 0x7FFFFFFFL;
+
+ return ( s < 0 ? -a : a );
+ }
+
+#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+
+
/* documentation is in freetype.h */
FT_EXPORT_DEF( FT_Long )
@@ -338,23 +401,23 @@
if ( a == 0 || b == 0x10000L )
return a;
- s = a; a = ABS(a);
- s ^= b; b = ABS(b);
+ s = a; a = FT_ABS(a);
+ s ^= b; b = FT_ABS(b);
ua = (FT_ULong)a;
ub = (FT_ULong)b;
if ( ua <= 2048 && ub <= 1048576L )
{
- ua = ( ua * ub + 0x8000 ) >> 16;
+ ua = ( ua * ub + 0x8000L ) >> 16;
}
else
{
- FT_ULong al = ua & 0xFFFF;
+ FT_ULong al = ua & 0xFFFFL;
ua = ( ua >> 16 ) * ub + al * ( ub >> 16 ) +
- ( ( al * ( ub & 0xFFFF ) + 0x8000 ) >> 16 );
+ ( ( al * ( ub & 0xFFFFL ) + 0x8000L ) >> 16 );
}
return ( s < 0 ? -(FT_Long)ua : (FT_Long)ua );
@@ -371,8 +434,8 @@
FT_UInt32 q;
- s = a; a = ABS(a);
- s ^= b; b = ABS(b);
+ s = a; a = FT_ABS(a);
+ s ^= b; b = FT_ABS(b);
if ( b == 0 )
{
@@ -411,8 +474,8 @@
FT_Int32 s;
- s = x; x = ABS( x );
- s ^= y; y = ABS( y );
+ s = x; x = FT_ABS( x );
+ s ^= y; y = FT_ABS( y );
ft_multo64( x, y, z );
@@ -445,7 +508,7 @@
x->lo = (FT_UInt32)-(FT_Int32)x->lo;
x->hi = ~x->hi + !x->lo;
}
- s ^= y; y = ABS( y );
+ s ^= y; y = FT_ABS( y );
/* Shortcut */
if ( x->hi == 0 )
@@ -499,7 +562,7 @@
x->lo = (FT_UInt32)-(FT_Int32)x->lo;
x->hi = ~x->hi + !x->lo;
}
- s ^= y; y = ABS( y );
+ s ^= y; y = FT_ABS( y );
/* Shortcut */
if ( x->hi == 0 )
diff --git a/extras/freetype2/src/base/ftdbgmem.c b/extras/freetype2/src/base/ftdbgmem.c
index 15d186a20..152220c60 100644
--- a/extras/freetype2/src/base/ftdbgmem.c
+++ b/extras/freetype2/src/base/ftdbgmem.c
@@ -4,7 +4,7 @@
/* */
/* Memory debugger (body). */
/* */
-/* Copyright 2001, 2002 by */
+/* Copyright 2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -604,7 +604,7 @@
p = getenv( "FT2_ALLOC_TOTAL_MAX" );
if ( p != NULL )
{
- FT_Long total_max = atol(p);
+ FT_Long total_max = ft_atol(p);
if ( total_max > 0 )
{
@@ -616,7 +616,7 @@
p = getenv( "FT2_ALLOC_COUNT_MAX" );
if ( p != NULL )
{
- FT_Long total_count = atol(p);
+ FT_Long total_count = ft_atol(p);
if ( total_count > 0 )
{
diff --git a/extras/freetype2/src/base/ftdebug.c b/extras/freetype2/src/base/ftdebug.c
index 48a214380..a6c18412b 100644
--- a/extras/freetype2/src/base/ftdebug.c
+++ b/extras/freetype2/src/base/ftdebug.c
@@ -4,7 +4,7 @@
/* */
/* Debugging and logging component (body). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -82,8 +82,9 @@
/* array of trace levels, initialized to 0 */
int ft_trace_levels[trace_count];
+
/* define array of trace toggle names */
-#define FT_TRACE_DEF(x) #x ,
+#define FT_TRACE_DEF( x ) #x ,
static const char* ft_trace_toggles[trace_count + 1] =
{
@@ -94,19 +95,43 @@
#undef FT_TRACE_DEF
+ /* documentation is in ftdebug.h */
+
+ FT_EXPORT_DEF( FT_Int )
+ FT_Trace_Get_Count( void )
+ {
+ return trace_count;
+ }
+
+
+ /* documentation is in ftdebug.h */
+
+ FT_EXPORT_DEF( const char * )
+ FT_Trace_Get_Name( FT_Int idx )
+ {
+ int max = FT_Trace_Get_Count();
+
+
+ if ( idx < max )
+ return ft_trace_toggles[idx];
+ else
+ return NULL;
+ }
+
+
/*************************************************************************/
/* */
/* Initialize the tracing sub-system. This is done by retrieving the */
- /* value of the "FT2_DEBUG" environment variable. It must be a list of */
- /* toggles, separated by spaces, `;' or `,'. Example: */
+ /* value of the `FT2_DEBUG' environment variable. It must be a list of */
+ /* toggles, separated by spaces, `;', or `,'. Example: */
/* */
- /* "any:3 memory:6 stream:5" */
+ /* export FT2_DEBUG="any:3 memory:6 stream:5" */
/* */
- /* This will request that all levels be set to 3, except the trace level */
- /* for the memory and stream components which are set to 6 and 5, */
+ /* This requests that all levels be set to 3, except the trace level for */
+ /* the memory and stream components which are set to 6 and 5, */
/* respectively. */
/* */
- /* See the file <freetype/internal/fttrace.h> for details of the */
+ /* See the file <include/freetype/internal/fttrace.h> for details of the */
/* available toggle names. */
/* */
/* The level must be between 0 and 6; 0 means quiet (except for serious */
@@ -117,6 +142,7 @@
{
const char* ft2_debug = getenv( "FT2_DEBUG" );
+
if ( ft2_debug )
{
const char* p = ft2_debug;
@@ -133,10 +159,10 @@
q = p;
while ( *p && *p != ':' )
p++;
-
+
if ( *p == ':' && p > q )
{
- FT_Int n, i, len = (FT_Int)(p - q);
+ FT_Int n, i, len = (FT_Int)( p - q );
FT_Int level = -1, found = -1;
@@ -171,7 +197,7 @@
{
if ( found == trace_any )
{
- /* special case for "any" */
+ /* special case for `any' */
for ( n = 0; n < trace_count; n++ )
ft_trace_levels[n] = level;
}
@@ -183,14 +209,33 @@
}
}
+
#else /* !FT_DEBUG_LEVEL_TRACE */
+
FT_BASE_DEF( void )
ft_debug_init( void )
{
/* nothing */
}
+
+ FT_EXPORT_DEF( FT_Int )
+ FT_Trace_Get_Count( void )
+ {
+ return 0;
+ }
+
+
+ FT_EXPORT_DEF( const char * )
+ FT_Trace_Get_Name( FT_Int idx )
+ {
+ FT_UNUSED( idx );
+
+ return NULL;
+ }
+
+
#endif /* !FT_DEBUG_LEVEL_TRACE */
diff --git a/extras/freetype2/src/base/ftgloadr.c b/extras/freetype2/src/base/ftgloadr.c
index 5a2eb5160..0308f713c 100644
--- a/extras/freetype2/src/base/ftgloadr.c
+++ b/extras/freetype2/src/base/ftgloadr.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph loader (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,6 +19,7 @@
#include <ft2build.h>
#include FT_INTERNAL_GLYPH_LOADER_H
#include FT_INTERNAL_MEMORY_H
+#include FT_INTERNAL_OBJECTS_H
#undef FT_COMPONENT
#define FT_COMPONENT trace_gloader
@@ -205,7 +206,7 @@
if ( new_max > old_max )
{
- new_max = ( new_max + 7 ) & -8;
+ new_max = FT_PAD_CEIL( new_max, 8 );
if ( FT_RENEW_ARRAY( base->points, old_max, new_max ) ||
FT_RENEW_ARRAY( base->tags, old_max, new_max ) )
@@ -225,7 +226,7 @@
n_contours;
if ( new_max > old_max )
{
- new_max = ( new_max + 3 ) & -4;
+ new_max = FT_PAD_CEIL( new_max, 4 );
if ( FT_RENEW_ARRAY( base->contours, old_max, new_max ) )
goto Exit;
@@ -261,7 +262,7 @@
old_max = loader->max_subglyphs;
if ( new_max > old_max )
{
- new_max = ( new_max + 1 ) & -2;
+ new_max = FT_PAD_CEIL( new_max, 2 );
if ( FT_RENEW_ARRAY( base->subglyphs, old_max, new_max ) )
goto Exit;
@@ -336,17 +337,17 @@
FT_Outline* in = &source->base.outline;
- FT_MEM_COPY( out->points, in->points,
- num_points * sizeof ( FT_Vector ) );
- FT_MEM_COPY( out->tags, in->tags,
- num_points * sizeof ( char ) );
- FT_MEM_COPY( out->contours, in->contours,
- num_contours * sizeof ( short ) );
+ FT_ARRAY_COPY( out->points, in->points,
+ num_points );
+ FT_ARRAY_COPY( out->tags, in->tags,
+ num_points );
+ FT_ARRAY_COPY( out->contours, in->contours,
+ num_contours );
/* do we need to copy the extra points? */
if ( target->use_extra && source->use_extra )
- FT_MEM_COPY( target->base.extra_points, source->base.extra_points,
- num_points * sizeof ( FT_Vector ) );
+ FT_ARRAY_COPY( target->base.extra_points, source->base.extra_points,
+ num_points );
out->n_points = (short)num_points;
out->n_contours = (short)num_contours;
diff --git a/extras/freetype2/src/base/ftglyph.c b/extras/freetype2/src/base/ftglyph.c
index dbd31ea82..c6c458cc1 100644
--- a/extras/freetype2/src/base/ftglyph.c
+++ b/extras/freetype2/src/base/ftglyph.c
@@ -4,7 +4,7 @@
/* */
/* FreeType convenience functions to handle glyphs (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -57,7 +57,7 @@
FT_EXPORT_DEF( void )
FT_Matrix_Multiply( const FT_Matrix* a,
- FT_Matrix* b )
+ FT_Matrix *b )
{
FT_Fixed xx, xy, yx, yy;
@@ -158,8 +158,8 @@
glyph->left = slot->bitmap_left;
glyph->top = slot->bitmap_top;
- if ( slot->flags & FT_GLYPH_OWN_BITMAP )
- slot->flags &= ~FT_GLYPH_OWN_BITMAP;
+ if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
+ slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
else
{
/* copy the bitmap into a new buffer */
@@ -206,6 +206,7 @@
}
+ FT_CALLBACK_TABLE_DEF
const FT_Glyph_Class ft_bitmap_glyph_class =
{
sizeof( FT_BitmapGlyphRec ),
@@ -253,14 +254,11 @@
goto Exit;
/* copy it */
- FT_MEM_COPY( target->points, source->points,
- source->n_points * sizeof ( FT_Vector ) );
+ FT_ARRAY_COPY( target->points, source->points, source->n_points );
- FT_MEM_COPY( target->tags, source->tags,
- source->n_points * sizeof ( FT_Byte ) );
+ FT_ARRAY_COPY( target->tags, source->tags, source->n_points );
- FT_MEM_COPY( target->contours, source->contours,
- source->n_contours * sizeof ( FT_Short ) );
+ FT_ARRAY_COPY( target->contours, source->contours, source->n_contours );
/* copy all flags, except the `FT_OUTLINE_OWNER' one */
target->flags = source->flags | FT_OUTLINE_OWNER;
@@ -327,6 +325,7 @@
}
+ FT_CALLBACK_TABLE_DEF
const FT_Glyph_Class ft_outline_glyph_class =
{
sizeof( FT_OutlineGlyphRec ),
@@ -421,7 +420,7 @@
FT_Get_Glyph( FT_GlyphSlot slot,
FT_Glyph *aglyph )
{
- FT_Library library = slot->library;
+ FT_Library library;
FT_Error error;
FT_Glyph glyph;
@@ -431,6 +430,8 @@
if ( !slot )
return FT_Err_Invalid_Slot_Handle;
+ library = slot->library;
+
if ( !aglyph )
return FT_Err_Invalid_Argument;
@@ -541,16 +542,18 @@
clazz->glyph_bbox( glyph, acbox );
/* perform grid fitting if needed */
- if ( bbox_mode & ft_glyph_bbox_gridfit )
+ if ( bbox_mode == FT_GLYPH_BBOX_GRIDFIT ||
+ bbox_mode == FT_GLYPH_BBOX_PIXELS )
{
- acbox->xMin &= -64;
- acbox->yMin &= -64;
- acbox->xMax = ( acbox->xMax + 63 ) & -64;
- acbox->yMax = ( acbox->yMax + 63 ) & -64;
+ acbox->xMin = FT_PIX_FLOOR( acbox->xMin );
+ acbox->yMin = FT_PIX_FLOOR( acbox->yMin );
+ acbox->xMax = FT_PIX_CEIL( acbox->xMax );
+ acbox->yMax = FT_PIX_CEIL( acbox->yMax );
}
/* convert to integer pixels if needed */
- if ( bbox_mode & ft_glyph_bbox_truncate )
+ if ( bbox_mode == FT_GLYPH_BBOX_TRUNCATE ||
+ bbox_mode == FT_GLYPH_BBOX_PIXELS )
{
acbox->xMin >>= 6;
acbox->yMin >>= 6;
@@ -571,12 +574,13 @@
FT_Vector* origin,
FT_Bool destroy )
{
- FT_GlyphSlotRec dummy;
- FT_Error error = FT_Err_Ok;
- FT_Glyph glyph;
- FT_BitmapGlyph bitmap = NULL;
+ FT_GlyphSlotRec dummy;
+ FT_GlyphSlot_InternalRec dummy_internal;
+ FT_Error error = FT_Err_Ok;
+ FT_Glyph glyph;
+ FT_BitmapGlyph bitmap = NULL;
- const FT_Glyph_Class* clazz;
+ const FT_Glyph_Class* clazz;
/* check argument */
@@ -592,7 +596,7 @@
clazz = glyph->clazz;
- /* when called with a bitmap glyph, do nothing and return succesfully */
+ /* when called with a bitmap glyph, do nothing and return successfully */
if ( clazz == &ft_bitmap_glyph_class )
goto Exit;
@@ -600,8 +604,10 @@
goto Bad;
FT_MEM_ZERO( &dummy, sizeof ( dummy ) );
- dummy.library = glyph->library;
- dummy.format = clazz->glyph_format;
+ FT_MEM_ZERO( &dummy_internal, sizeof ( dummy_internal ) );
+ dummy.internal = &dummy_internal;
+ dummy.library = glyph->library;
+ dummy.format = clazz->glyph_format;
/* create result bitmap glyph */
error = ft_new_glyph( glyph->library, &ft_bitmap_glyph_class,
@@ -609,7 +615,7 @@
if ( error )
goto Exit;
-#if 0
+#if 1
/* if `origin' is set, translate the glyph image */
if ( origin )
FT_Glyph_Transform( glyph, 0, origin );
@@ -622,7 +628,7 @@
if ( !error )
error = FT_Render_Glyph_Internal( glyph->library, &dummy, render_mode );
-#if 0
+#if 1
if ( !destroy && origin )
{
FT_Vector v;
diff --git a/extras/freetype2/src/base/ftmac.c b/extras/freetype2/src/base/ftmac.c
index 2d37d397e..c71475382 100644
--- a/extras/freetype2/src/base/ftmac.c
+++ b/extras/freetype2/src/base/ftmac.c
@@ -4,7 +4,7 @@
/* */
/* Mac FOND support. Written by just@letterror.com. */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* Just van Rossum, David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -62,15 +62,28 @@
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_INTERNAL_STREAM_H
+
+#ifdef __GNUC__
+#include "../truetype/ttobjs.h"
+#include "../type1/t1objs.h"
+ /* This is for Mac OS X. Without redefinition, OS_INLINE */
+ /* expands to `static inline' which doesn't survive the */
+ /* -ansi compilation flag of GCC. */
+#define OS_INLINE static __inline__
+#include <Carbon/Carbon.h>
+#else
#include "truetype/ttobjs.h"
#include "type1/t1objs.h"
-
#include <Resources.h>
#include <Fonts.h>
#include <Errors.h>
#include <Files.h>
#include <TextUtils.h>
+#endif
+#if defined( __MWERKS__ ) && !TARGET_RT_MAC_MACHO
+#include <FSp_fopen.h>
+#endif
#include FT_MAC_H
@@ -82,12 +95,50 @@
#define PREFER_LWFN 1
#endif
+
+#if defined( __MWERKS__ ) && !TARGET_RT_MAC_MACHO
+
+#define STREAM_FILE( stream ) ( (FILE*)stream->descriptor.pointer )
+
+
+ FT_CALLBACK_DEF( void )
+ ft_FSp_stream_close( FT_Stream stream )
+ {
+ fclose( STREAM_FILE( stream ) );
+
+ stream->descriptor.pointer = NULL;
+ stream->size = 0;
+ stream->base = 0;
+ }
+
+
+ FT_CALLBACK_DEF( unsigned long )
+ ft_FSp_stream_io( FT_Stream stream,
+ unsigned long offset,
+ unsigned char* buffer,
+ unsigned long count )
+ {
+ FILE* file;
+
+
+ file = STREAM_FILE( stream );
+
+ fseek( file, offset, SEEK_SET );
+
+ return (unsigned long)fread( buffer, 1, count, file );
+ }
+
+#endif /* __MWERKS__ && !TARGET_RT_MAC_MACHO */
+
+
/* Given a pathname, fill in a file spec. */
static int
file_spec_from_path( const char* pathname,
FSSpec* spec )
{
-#if TARGET_API_MAC_CARBON
+
+#if !TARGET_API_MAC_OS8 && \
+ !( defined( __MWERKS__ ) && !TARGET_RT_MAC_MACHO )
OSErr e;
FSRef ref;
@@ -118,12 +169,13 @@
return 0;
#endif
+
}
/* Return the file type of the file specified by spec. */
static OSType
- get_file_type( FSSpec* spec )
+ get_file_type( const FSSpec* spec )
{
FInfo finfo;
@@ -135,22 +187,6 @@
}
-#if TARGET_API_MAC_CARBON
-
- /* is this a Mac OS X .dfont file */
- static Boolean
- is_dfont( FSSpec* spec )
- {
- int nameLen = spec->name[0];
-
-
- return nameLen >= 6 &&
- !memcmp( spec->name + nameLen - 5, ".dfont", 6 );
- }
-
-#endif
-
-
/* Given a PostScript font name, create the Macintosh LWFN file name. */
static void
create_lwfn_name( char* ps_name,
@@ -165,7 +201,7 @@
while ( *q )
{
- if ( isupper( *q ) )
+ if ( ft_isupper( *q ) )
{
if ( count )
max = 3;
@@ -212,9 +248,9 @@
/* Make a file spec for an LWFN file from a FOND resource and
a file name. */
static FT_Error
- make_lwfn_spec( Handle fond,
- unsigned char* file_name,
- FSSpec* spec )
+ make_lwfn_spec( Handle fond,
+ const unsigned char* file_name,
+ FSSpec* spec )
{
FT_Error error;
short ref_num, v_ref_num;
@@ -235,12 +271,24 @@
}
+ static short
+ count_faces_sfnt( char *fond_data )
+ {
+ /* The count is 1 greater than the value in the FOND. */
+ /* Isn't that cute? :-) */
+
+ return 1 + *( (short *)( fond_data + sizeof ( FamRec ) ) );
+ }
+
+
/* Look inside the FOND data, answer whether there should be an SFNT
resource, and answer the name of a possible LWFN Type 1 file.
Thanks to Paul Miller (paulm@profoundeffects.com) for the fix
to load a face OTHER than the first one in the FOND!
*/
+
+
static void
parse_fond( char* fond_data,
short* have_sfnt,
@@ -260,19 +308,24 @@
fond = (FamRec*)fond_data;
assoc = (AsscEntry*)( fond_data + sizeof ( FamRec ) + 2 );
base_assoc = assoc;
- assoc += face_index; /* add on the face_index! */
- /* if the face at this index is not scalable,
- fall back to the first one (old behavior) */
- if ( assoc->fontSize == 0 )
+ /* Let's do a little range checking before we get too excited here */
+ if ( face_index < count_faces_sfnt( fond_data ) )
{
- *have_sfnt = 1;
- *sfnt_id = assoc->fontID;
- }
- else if ( base_assoc->fontSize == 0 )
- {
- *have_sfnt = 1;
- *sfnt_id = base_assoc->fontID;
+ assoc += face_index; /* add on the face_index! */
+
+ /* if the face at this index is not scalable,
+ fall back to the first one (old behavior) */
+ if ( assoc->fontSize == 0 )
+ {
+ *have_sfnt = 1;
+ *sfnt_id = assoc->fontID;
+ }
+ else if ( base_assoc->fontSize == 0 )
+ {
+ *have_sfnt = 1;
+ *sfnt_id = base_assoc->fontID;
+ }
}
if ( fond->ffStylOff )
@@ -304,7 +357,7 @@
if ( ps_name_len != 0 )
{
- memcpy(ps_name, names[0] + 1, ps_name_len);
+ ft_memcpy(ps_name, names[0] + 1, ps_name_len);
ps_name[ps_name_len] = 0;
}
if ( style->indexes[0] > 1 )
@@ -312,7 +365,7 @@
unsigned char* suffixes = names[style->indexes[0] - 1];
- for ( i = 1; i < suffixes[0]; i++ )
+ for ( i = 1; i <= suffixes[0]; i++ )
{
unsigned char* s;
size_t j = suffixes[i] - 1;
@@ -325,7 +378,7 @@
if ( s_len != 0 && ps_name_len + s_len < sizeof ( ps_name ) )
{
- memcpy( ps_name + ps_name_len, s + 1, s_len );
+ ft_memcpy( ps_name + ps_name_len, s + 1, s_len );
ps_name_len += s_len;
ps_name[ps_name_len] = 0;
}
@@ -339,6 +392,33 @@
}
+ static short
+ count_faces( Handle fond )
+ {
+ short sfnt_id, have_sfnt, have_lwfn = 0;
+ Str255 lwfn_file_name;
+ FSSpec lwfn_spec;
+
+
+ HLock( fond );
+ parse_fond( *fond, &have_sfnt, &sfnt_id, lwfn_file_name, 0 );
+ HUnlock( fond );
+
+ if ( lwfn_file_name[0] )
+ {
+ if ( make_lwfn_spec( fond, lwfn_file_name, &lwfn_spec ) == FT_Err_Ok )
+ have_lwfn = 1; /* yeah, we got one! */
+ else
+ have_lwfn = 0; /* no LWFN file found */
+ }
+
+ if ( have_lwfn && ( !have_sfnt || PREFER_LWFN ) )
+ return 1;
+ else
+ return count_faces_sfnt( *fond );
+ }
+
+
/* Read Type 1 data from the POST resources inside the LWFN file,
return a PFB buffer. This is somewhat convoluted because the FT2
PFB parser wants the ASCII header as one chunk, and the LWFN
@@ -346,12 +426,12 @@
of the same type together. */
static FT_Error
read_lwfn( FT_Memory memory,
- FSSpec* lwfn_spec,
+ short res_ref,
FT_Byte** pfb_data,
FT_ULong* size )
{
FT_Error error = FT_Err_Ok;
- short res_ref, res_id;
+ short res_id;
unsigned char *buffer, *p, *size_p = NULL;
FT_ULong total_size = 0;
FT_ULong post_size, pfb_chunk_size;
@@ -359,13 +439,10 @@
char code, last_code;
- res_ref = FSpOpenResFile( lwfn_spec, fsRdPerm );
- if ( ResError() )
- return FT_Err_Out_Of_Memory;
UseResFile( res_ref );
- /* First pass: load all POST resources, and determine the size of
- the output buffer. */
+ /* First pass: load all POST resources, and determine the size of */
+ /* the output buffer. */
res_id = 501;
last_code = -1;
@@ -392,8 +469,8 @@
if ( FT_ALLOC( buffer, (FT_Long)total_size ) )
goto Error;
- /* Second pass: append all POST data to the buffer, add PFB fields.
- Glue all consecutive chunks of the same type together. */
+ /* Second pass: append all POST data to the buffer, add PFB fields. */
+ /* Glue all consecutive chunks of the same type together. */
p = buffer;
res_id = 501;
last_code = -1;
@@ -538,32 +615,75 @@
args.driver = FT_Get_Module( library, driver_name );
}
+ /* At this point, face_index has served its purpose; */
+ /* whoever calls this function has already used it to */
+ /* locate the correct font data. We should not propagate */
+ /* this index to FT_Open_Face() (unless it is negative). */
+
+ if ( face_index > 0 )
+ face_index = 0;
+
error = FT_Open_Face( library, &args, face_index, aface );
if ( error == FT_Err_Ok )
(*aface)->face_flags &= ~FT_FACE_FLAG_EXTERNAL_STREAM;
- else
+
+ return error;
+ }
+
+
+ static FT_Error
+ OpenFileAsResource( const FSSpec* spec,
+ short *p_res_ref )
+ {
+ FT_Error error;
+
+#if !TARGET_API_MAC_OS8
+
+ FSRef hostContainerRef;
+
+
+ error = FSpMakeFSRef( spec, &hostContainerRef );
+ if ( error == noErr )
+ error = FSOpenResourceFile( &hostContainerRef,
+ 0, NULL, fsRdPerm, p_res_ref );
+
+ /* If the above fails, then it is probably not a resource file */
+ /* However, it has been reported that FSOpenResourceFile() sometimes */
+ /* fails on some old resource-fork files, which FSpOpenResFile() can */
+ /* open. So, just try again with FSpOpenResFile() and see what */
+ /* happens :-) */
+
+ if ( error != noErr )
+
+#endif /* !TARGET_API_MAC_OS8 */
+
{
- FT_Stream_CloseFunc( stream );
- FT_FREE( stream );
+ *p_res_ref = FSpOpenResFile( spec, fsRdPerm );
+ error = ResError();
}
- return error;
+ return error ? FT_Err_Cannot_Open_Resource : FT_Err_Ok;
}
/* Create a new FT_Face from a file spec to an LWFN file. */
static FT_Error
- FT_New_Face_From_LWFN( FT_Library library,
- FSSpec* spec,
- FT_Long face_index,
- FT_Face *aface )
+ FT_New_Face_From_LWFN( FT_Library library,
+ const FSSpec* lwfn_spec,
+ FT_Long face_index,
+ FT_Face *aface )
{
FT_Byte* pfb_data;
FT_ULong pfb_size;
FT_Error error;
+ short res_ref;
- error = read_lwfn( library->memory, spec, &pfb_data, &pfb_size );
+ error = OpenFileAsResource( lwfn_spec, &res_ref );
+ if ( error )
+ return error;
+
+ error = read_lwfn( library->memory, res_ref, &pfb_data, &pfb_size );
if ( error )
return error;
@@ -588,6 +708,7 @@
size_t sfnt_size;
FT_Error error = 0;
FT_Memory memory = library->memory;
+ int is_cff;
sfnt = GetResource( 'sfnt', sfnt_id );
@@ -606,11 +727,16 @@
HUnlock( sfnt );
ReleaseResource( sfnt );
+ is_cff = sfnt_size > 4 && sfnt_data[0] == 'O' &&
+ sfnt_data[1] == 'T' &&
+ sfnt_data[2] == 'T' &&
+ sfnt_data[3] == 'O';
+
return open_face_from_buffer( library,
sfnt_data,
sfnt_size,
face_index,
- "truetype",
+ is_cff ? "cff" : "truetype",
aface );
}
@@ -618,83 +744,34 @@
/* Create a new FT_Face from a file spec to a suitcase file. */
static FT_Error
FT_New_Face_From_Suitcase( FT_Library library,
- FSSpec* spec,
+ short res_ref,
FT_Long face_index,
FT_Face *aface )
{
FT_Error error = FT_Err_Ok;
- short res_ref, res_index;
+ short res_index;
Handle fond;
+ short num_faces;
- res_ref = FSpOpenResFile( spec, fsRdPerm );
- if ( ResError() )
- return FT_Err_Cannot_Open_Resource;
UseResFile( res_ref );
- /* face_index may be -1, in which case we
- just need to do a sanity check */
- if ( face_index < 0 )
- res_index = 1;
- else
- {
- res_index = (short)( face_index + 1 );
- face_index = 0;
- }
- fond = Get1IndResource( 'FOND', res_index );
- if ( ResError() )
+ for ( res_index = 1; ; ++res_index )
{
- error = FT_Err_Cannot_Open_Resource;
- goto Error;
- }
-
- error = FT_New_Face_From_FOND( library, fond, face_index, aface );
-
- Error:
- CloseResFile( res_ref );
- return error;
- }
-
-
-#if TARGET_API_MAC_CARBON
-
- /* Create a new FT_Face from a file spec to a suitcase file. */
- static FT_Error
- FT_New_Face_From_dfont( FT_Library library,
- FSSpec* spec,
- FT_Long face_index,
- FT_Face* aface )
- {
- FT_Error error = FT_Err_Ok;
- short res_ref, res_index;
- Handle fond;
- FSRef hostContainerRef;
-
-
- error = FSpMakeFSRef( spec, &hostContainerRef );
- if ( error == noErr )
- error = FSOpenResourceFile( &hostContainerRef,
- 0, NULL, fsRdPerm, &res_ref );
-
- if ( error != noErr )
- return FT_Err_Cannot_Open_Resource;
+ fond = Get1IndResource( 'FOND', res_index );
+ if ( ResError() )
+ {
+ error = FT_Err_Cannot_Open_Resource;
+ goto Error;
+ }
+ if ( face_index < 0 )
+ break;
- UseResFile( res_ref );
+ num_faces = count_faces( fond );
+ if ( face_index < num_faces )
+ break;
- /* face_index may be -1, in which case we
- just need to do a sanity check */
- if ( face_index < 0 )
- res_index = 1;
- else
- {
- res_index = (short)( face_index + 1 );
- face_index = 0;
- }
- fond = Get1IndResource( 'FOND', res_index );
- if ( ResError() )
- {
- error = FT_Err_Cannot_Open_Resource;
- goto Error;
+ face_index -= num_faces;
}
error = FT_New_Face_From_FOND( library, fond, face_index, aface );
@@ -704,8 +781,6 @@
return error;
}
-#endif
-
/* documentation is in ftmac.h */
@@ -757,9 +832,9 @@
/* documentation is in ftmac.h */
FT_EXPORT_DEF( FT_Error )
- FT_GetFile_From_Mac_Name( char* fontName,
- FSSpec* pathSpec,
- FT_Long* face_index )
+ FT_GetFile_From_Mac_Name( const char* fontName,
+ FSSpec* pathSpec,
+ FT_Long* face_index )
{
OptionBits options = kFMUseGlobalScopeOption;
@@ -820,7 +895,7 @@
the_font = font;
}
else
- ++(*face_index);
+ ++(*face_index);
}
}
@@ -839,23 +914,46 @@
return FT_Err_Unknown_File_Format;
}
+ /* Common function to load a new FT_Face from a resource file. */
- static long
- ResourceForkSize(FSSpec* spec)
+ static FT_Error
+ FT_New_Face_From_Resource( FT_Library library,
+ const FSSpec *spec,
+ FT_Long face_index,
+ FT_Face *aface )
{
- long len;
- short refNum;
- OSErr e;
+ OSType file_type;
+ short res_ref;
+ FT_Error error;
- e = FSpOpenRF( spec, fsRdPerm, &refNum ); /* I.M. Files 2-155 */
- if ( e == noErr )
+ if ( OpenFileAsResource( spec, &res_ref ) == FT_Err_Ok )
{
- e = GetEOF( refNum, &len );
- FSClose( refNum );
+ /* LWFN is a (very) specific file format, check for it explicitly */
+
+ file_type = get_file_type( spec );
+ if ( file_type == 'LWFN' )
+ return FT_New_Face_From_LWFN( library, spec, face_index, aface );
+
+ /* Otherwise the file type doesn't matter (there are more than */
+ /* `FFIL' and `tfil'). Just try opening it as a font suitcase; */
+ /* if it works, fine. */
+
+ error = FT_New_Face_From_Suitcase( library, res_ref,
+ face_index, aface );
+ if ( error == 0 )
+ return error;
+
+ /* else forget about the resource fork and fall through to */
+ /* data fork formats */
+
+ CloseResFile( res_ref );
}
- return ( e == noErr ) ? len : 0;
+ /* let it fall through to normal loader (.ttf, .otf, etc.); */
+ /* we signal this by returning no error and no FT_Face */
+ *aface = NULL;
+ return 0;
}
@@ -878,7 +976,7 @@
{
FT_Open_Args args;
FSSpec spec;
- OSType file_type;
+ FT_Error error;
/* test for valid `library' and `aface' delayed to FT_Open_Face() */
@@ -888,31 +986,106 @@
if ( file_spec_from_path( pathname, &spec ) )
return FT_Err_Invalid_Argument;
- /* Regardless of type, don't try to use the resource fork if it is */
- /* empty. Some TTF fonts have type `FFIL', for example, but they */
- /* only have data forks. */
+ error = FT_New_Face_From_Resource( library, &spec, face_index, aface );
+ if ( error != 0 || *aface != NULL )
+ return error;
- if ( ResourceForkSize( &spec ) != 0 )
- {
- file_type = get_file_type( &spec );
- if ( file_type == 'FFIL' || file_type == 'tfil' )
- return FT_New_Face_From_Suitcase( library, &spec, face_index, aface );
+ /* let it fall through to normal loader (.ttf, .otf, etc.) */
+ args.flags = FT_OPEN_PATHNAME;
+ args.pathname = (char*)pathname;
+ return FT_Open_Face( library, &args, face_index, aface );
+ }
- if ( file_type == 'LWFN' )
- return FT_New_Face_From_LWFN( library, &spec, face_index, aface );
- }
-#if TARGET_API_MAC_CARBON
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* FT_New_Face_From_FSSpec */
+ /* */
+ /* <Description> */
+ /* FT_New_Face_From_FSSpec is identical to FT_New_Face except it */
+ /* accepts an FSSpec instead of a path. */
+ /* */
+ FT_EXPORT_DEF( FT_Error )
+ FT_New_Face_From_FSSpec( FT_Library library,
+ const FSSpec *spec,
+ FT_Long face_index,
+ FT_Face *aface )
+ {
+ FT_Open_Args args;
+ FT_Error error;
+ FT_Stream stream;
+ FILE* file;
+ FT_Memory memory;
- if ( is_dfont( &spec ) )
- return FT_New_Face_From_dfont( library, &spec, face_index, aface );
-#endif
+ /* test for valid `library' and `aface' delayed to FT_Open_Face() */
+ if ( !spec )
+ return FT_Err_Invalid_Argument;
+
+ error = FT_New_Face_From_Resource( library, spec, face_index, aface );
+ if ( error != 0 || *aface != NULL )
+ return error;
/* let it fall through to normal loader (.ttf, .otf, etc.) */
- args.flags = FT_OPEN_PATHNAME;
- args.pathname = (char*)pathname;
- return FT_Open_Face( library, &args, face_index, aface );
+
+#if defined( __MWERKS__ ) && !TARGET_RT_MAC_MACHO
+
+ /* Codewarrior's C library can open a FILE from a FSSpec */
+ /* but we must compile with FSp_fopen.c in addition to */
+ /* runtime libraries. */
+
+ memory = library->memory;
+
+ if ( FT_NEW( stream ) )
+ return error;
+ stream->memory = memory;
+
+ file = FSp_fopen( spec, "rb" );
+ if ( !file )
+ return FT_Err_Cannot_Open_Resource;
+
+ fseek( file, 0, SEEK_END );
+ stream->size = ftell( file );
+ fseek( file, 0, SEEK_SET );
+
+ stream->descriptor.pointer = file;
+ stream->pathname.pointer = NULL;
+ stream->pos = 0;
+
+ stream->read = ft_FSp_stream_io;
+ stream->close = ft_FSp_stream_close;
+
+ args.flags = FT_OPEN_STREAM;
+ args.stream = stream;
+
+ error = FT_Open_Face( library, &args, face_index, aface );
+ if ( error == FT_Err_Ok )
+ (*aface)->face_flags &= ~FT_FACE_FLAG_EXTERNAL_STREAM;
+
+#else /* !(__MWERKS__ && !TARGET_RT_MAC_MACHO) */
+
+ {
+ FSRef ref;
+ UInt8 path[256];
+ OSErr err;
+
+
+ err = FSpMakeFSRef(spec, &ref);
+ if ( !err )
+ {
+ err = FSRefMakePath( &ref, path, sizeof ( path ) );
+ if ( !err )
+ error = FT_New_Face( library, (const char*)path,
+ face_index, aface );
+ }
+ if ( err )
+ error = FT_Err_Cannot_Open_Resource;
+ }
+
+#endif /* !(__MWERKS__ && !TARGET_RT_MAC_MACHO) */
+
+ return error;
}
diff --git a/extras/freetype2/src/base/ftmm.c b/extras/freetype2/src/base/ftmm.c
index 229a04316..0bb281309 100644
--- a/extras/freetype2/src/base/ftmm.c
+++ b/extras/freetype2/src/base/ftmm.c
@@ -4,7 +4,7 @@
/* */
/* Multiple Master font support (body). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,6 +19,7 @@
#include <ft2build.h>
#include FT_MULTIPLE_MASTERS_H
#include FT_INTERNAL_OBJECTS_H
+#include FT_SERVICE_MULTIPLE_MASTERS_H
/*************************************************************************/
@@ -31,15 +32,15 @@
#define FT_COMPONENT trace_mm
- /* documentation is in ftmm.h */
-
- FT_EXPORT_DEF( FT_Error )
- FT_Get_Multi_Master( FT_Face face,
- FT_Multi_Master *amaster )
+ static FT_Error
+ ft_face_get_mm_service( FT_Face face,
+ FT_Service_MultiMasters *aservice )
{
FT_Error error;
+ *aservice = NULL;
+
if ( !face )
return FT_Err_Invalid_Face_Handle;
@@ -47,14 +48,34 @@
if ( FT_HAS_MULTIPLE_MASTERS( face ) )
{
- FT_Driver driver = face->driver;
- FT_Get_MM_Func func;
+ FT_FACE_LOOKUP_SERVICE( face,
+ *aservice,
+ MULTI_MASTERS );
+
+ if ( aservice )
+ error = FT_Err_Ok;
+ }
+
+ return error;
+ }
+
+
+ /* documentation is in ftmm.h */
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Get_Multi_Master( FT_Face face,
+ FT_Multi_Master *amaster )
+ {
+ FT_Error error;
+ FT_Service_MultiMasters service;
- func = (FT_Get_MM_Func)driver->root.clazz->get_interface(
- FT_MODULE( driver ), "get_mm" );
- if ( func )
- error = func( face, amaster );
+ error = ft_face_get_mm_service( face, &service );
+ if ( !error )
+ {
+ error = FT_Err_Invalid_Argument;
+ if ( service->get_mm )
+ error = service->get_mm( face, amaster );
}
return error;
@@ -68,24 +89,16 @@
FT_UInt num_coords,
FT_Long* coords )
{
- FT_Error error;
-
-
- if ( !face )
- return FT_Err_Invalid_Face_Handle;
+ FT_Error error;
+ FT_Service_MultiMasters service;
- error = FT_Err_Invalid_Argument;
- if ( FT_HAS_MULTIPLE_MASTERS( face ) )
+ error = ft_face_get_mm_service( face, &service );
+ if ( !error )
{
- FT_Driver driver = face->driver;
- FT_Set_MM_Design_Func func;
-
-
- func = (FT_Set_MM_Design_Func)driver->root.clazz->get_interface(
- FT_MODULE( driver ), "set_mm_design" );
- if ( func )
- error = func( face, num_coords, coords );
+ error = FT_Err_Invalid_Argument;
+ if ( service->set_mm_design )
+ error = service->set_mm_design( face, num_coords, coords );
}
return error;
@@ -99,24 +112,16 @@
FT_UInt num_coords,
FT_Fixed* coords )
{
- FT_Error error;
+ FT_Error error;
+ FT_Service_MultiMasters service;
- if ( !face )
- return FT_Err_Invalid_Face_Handle;
-
- error = FT_Err_Invalid_Argument;
-
- if ( FT_HAS_MULTIPLE_MASTERS( face ) )
+ error = ft_face_get_mm_service( face, &service );
+ if ( !error )
{
- FT_Driver driver = face->driver;
- FT_Set_MM_Blend_Func func;
-
-
- func = (FT_Set_MM_Blend_Func)driver->root.clazz->get_interface(
- FT_MODULE( driver ), "set_mm_blend" );
- if ( func )
- error = func( face, num_coords, coords );
+ error = FT_Err_Invalid_Argument;
+ if ( service->set_mm_blend )
+ error = service->set_mm_blend( face, num_coords, coords );
}
return error;
diff --git a/extras/freetype2/src/base/ftobjs.c b/extras/freetype2/src/base/ftobjs.c
index 40fd28604..517e83e42 100644
--- a/extras/freetype2/src/base/ftobjs.c
+++ b/extras/freetype2/src/base/ftobjs.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,12 +21,42 @@
#include FT_OUTLINE_H
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_RFORK_H
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_SFNT_H /* for SFNT_Load_Table_Func */
#include FT_TRUETYPE_TABLES_H
#include FT_TRUETYPE_IDS_H
#include FT_OUTLINE_H
+#include FT_SERVICE_SFNT_H
+#include FT_SERVICE_POSTSCRIPT_NAME_H
+#include FT_SERVICE_GLYPH_DICT_H
+#include FT_SERVICE_TT_CMAP_H
+
+
+ FT_BASE_DEF( FT_Pointer )
+ ft_service_list_lookup( FT_ServiceDesc service_descriptors,
+ const char* service_id )
+ {
+ FT_Pointer result = NULL;
+ FT_ServiceDesc desc = service_descriptors;
+
+
+ if ( desc && service_id )
+ {
+ for ( ; desc->serv_id != NULL; desc++ )
+ {
+ if ( ft_strcmp( desc->serv_id, service_id ) == 0 )
+ {
+ result = (FT_Pointer)desc->serv_data;
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
FT_BASE_DEF( void )
ft_validator_init( FT_Validator valid,
@@ -74,12 +104,12 @@
/*************************************************************************/
- /* create a new input stream from a FT_Open_Args structure */
- /* */
- static FT_Error
- ft_input_stream_new( FT_Library library,
- const FT_Open_Args* args,
- FT_Stream* astream )
+ /* create a new input stream from an FT_Open_Args structure */
+ /* */
+ FT_BASE_DEF( FT_Error )
+ FT_Stream_New( FT_Library library,
+ const FT_Open_Args* args,
+ FT_Stream *astream )
{
FT_Error error;
FT_Memory memory;
@@ -137,9 +167,9 @@
}
- static void
- ft_input_stream_free( FT_Stream stream,
- FT_Int external )
+ FT_BASE_DEF( void )
+ FT_Stream_Free( FT_Stream stream,
+ FT_Int external )
{
if ( stream )
{
@@ -198,16 +228,17 @@
return error;
}
+
FT_BASE_DEF( void )
ft_glyphslot_free_bitmap( FT_GlyphSlot slot )
{
- if ( slot->flags & FT_GLYPH_OWN_BITMAP )
+ if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
{
FT_Memory memory = FT_FACE_MEMORY( slot->face );
-
-
+
+
FT_FREE( slot->bitmap.buffer );
- slot->flags &= ~FT_GLYPH_OWN_BITMAP;
+ slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
}
else
{
@@ -220,14 +251,14 @@
FT_BASE_DEF( void )
ft_glyphslot_set_bitmap( FT_GlyphSlot slot,
- FT_Pointer buffer )
+ FT_Byte* buffer )
{
ft_glyphslot_free_bitmap( slot );
-
+
slot->bitmap.buffer = buffer;
-
- FT_ASSERT( (slot->flags & FT_GLYPH_OWN_BITMAP) == 0 );
- }
+
+ FT_ASSERT( (slot->internal->flags & FT_GLYPH_OWN_BITMAP) == 0 );
+ }
FT_BASE_DEF( FT_Error )
@@ -235,15 +266,15 @@
FT_ULong size )
{
FT_Memory memory = FT_FACE_MEMORY( slot->face );
-
-
- if ( slot->flags & FT_GLYPH_OWN_BITMAP )
+
+
+ if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
FT_FREE( slot->bitmap.buffer );
else
- slot->flags |= FT_GLYPH_OWN_BITMAP;
-
+ slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
+
return FT_MEM_ALLOC( slot->bitmap.buffer, size );
- }
+ }
static void
@@ -260,7 +291,7 @@
slot->bitmap.rows = 0;
slot->bitmap.pitch = 0;
slot->bitmap.pixel_mode = 0;
- /* don't touch 'slot->bitmap.buffer' !! */
+ /* don't touch 'slot->bitmap.buffer'! */
slot->bitmap_left = 0;
slot->bitmap_top = 0;
@@ -426,23 +457,6 @@
}
- /* documentation is in freetype.h */
-
- FT_EXPORT_DEF( void )
- FT_Set_Hint_Flags( FT_Face face,
- FT_ULong flags )
- {
- FT_Face_Internal internal;
-
- if ( !face )
- return;
-
- internal = face->internal;
-
- internal->hint_flags = (FT_UInt)flags;
- }
-
-
static FT_Renderer
ft_lookup_glyph_renderer( FT_GlyphSlot slot );
@@ -465,7 +479,7 @@
if ( !face || !face->size || !face->glyph )
return FT_Err_Invalid_Face_Handle;
- if ( glyph_index > (FT_UInt)face->num_glyphs )
+ if ( glyph_index >= (FT_UInt)face->num_glyphs )
return FT_Err_Invalid_Argument;
slot = face->glyph;
@@ -503,7 +517,10 @@
autohint = 0;
}
- if ( autohint )
+ /* don't apply autohinting if glyph is vertically distorted or */
+ /* mirrored */
+ if ( autohint && !( face->internal->transform_matrix.yy <= 0 ||
+ face->internal->transform_matrix.yx != 0 ) )
{
FT_AutoHinter_Service hinting;
@@ -560,17 +577,17 @@
}
/* compute the linear advance in 16.16 pixels */
- if ( ( load_flags & FT_LOAD_LINEAR_DESIGN ) == 0 )
+ if ( ( load_flags & FT_LOAD_LINEAR_DESIGN ) == 0 &&
+ ( face->face_flags & FT_FACE_FLAG_SCALABLE ) )
{
- FT_UInt EM = face->units_per_EM;
FT_Size_Metrics* metrics = &face->size->metrics;
slot->linearHoriAdvance = FT_MulDiv( slot->linearHoriAdvance,
- (FT_Long)metrics->x_ppem << 16, EM );
+ metrics->x_scale, 64 );
slot->linearVertAdvance = FT_MulDiv( slot->linearVertAdvance,
- (FT_Long)metrics->y_ppem << 16, EM );
+ metrics->y_scale, 64 );
}
if ( ( load_flags & FT_LOAD_IGNORE_TRANSFORM ) == 0 )
@@ -656,6 +673,28 @@
}
+ static void
+ destroy_charmaps( FT_Face face,
+ FT_Memory memory )
+ {
+ FT_Int n;
+
+
+ for ( n = 0; n < face->num_charmaps; n++ )
+ {
+ FT_CMap cmap = FT_CMAP( face->charmaps[n] );
+
+
+ FT_CMap_Done( cmap );
+
+ face->charmaps[n] = NULL;
+ }
+
+ FT_FREE( face->charmaps );
+ face->num_charmaps = 0;
+ }
+
+
/* destructor for faces list */
static void
destroy_face( FT_Memory memory,
@@ -676,9 +715,9 @@
/* discard all sizes for this face */
FT_List_Finalize( &face->sizes_list,
- (FT_List_Destructor)destroy_size,
- memory,
- driver );
+ (FT_List_Destructor)destroy_size,
+ memory,
+ driver );
face->size = 0;
/* now discard client data */
@@ -686,31 +725,14 @@
face->generic.finalizer( face );
/* discard charmaps */
- {
- FT_Int n;
-
-
- for ( n = 0; n < face->num_charmaps; n++ )
- {
- FT_CMap cmap = FT_CMAP( face->charmaps[n] );
-
-
- FT_CMap_Done( cmap );
-
- face->charmaps[n] = NULL;
- }
-
- FT_FREE( face->charmaps );
- face->num_charmaps = 0;
- }
-
+ destroy_charmaps( face, memory );
/* finalize format-specific stuff */
if ( clazz->done_face )
clazz->done_face( face );
/* close the stream for this face if needed */
- ft_input_stream_free(
+ FT_Stream_Free(
face->stream,
( face->face_flags & FT_FACE_FLAG_EXTERNAL_STREAM ) != 0 );
@@ -719,7 +741,6 @@
/* get rid of it */
if ( face->internal )
{
- FT_FREE( face->internal->postscript_name );
FT_FREE( face->internal );
}
FT_FREE( face );
@@ -748,11 +769,11 @@
/* <Description> */
/* This function finds a Unicode charmap, if there is one. */
/* And if there is more than one, it tries to favour the more */
- /* extensive one, i.e. one that supports UCS-4 against those which */
+ /* extensive one, i.e., one that supports UCS-4 against those which */
/* are limited to the BMP (said UCS-2 encoding.) */
/* */
/* This function is called from open_face() (just below), and also */
- /* from FT_Select_Charmap( , FT_ENCODING_UNICODE). */
+ /* from FT_Select_Charmap( ..., FT_ENCODING_UNICODE). */
/* */
static FT_Error
find_unicode_charmap( FT_Face face )
@@ -763,7 +784,7 @@
/* caller should have already checked that `face' is valid */
- FT_ASSERT ( face );
+ FT_ASSERT( face );
first = face->charmaps;
@@ -771,26 +792,26 @@
return FT_Err_Invalid_CharMap_Handle;
/*
- * the original TrueType specification(s) only specified charmap
+ * The original TrueType specification(s) only specified charmap
* formats that are capable of mapping 8 or 16 bit character codes to
* glyph indices.
*
- * however, recent updates to the Apple and OpenType specifications
+ * However, recent updates to the Apple and OpenType specifications
* introduced new formats that are capable of mapping 32-bit character
- * codes as well. And these are already used on some fonts, mainly to
+ * codes as well. And these are already used on some fonts, mainly to
* map non-BMP Asian ideographs as defined in Unicode.
*
- * for compatibility purposes, these fonts generally come with
+ * For compatibility purposes, these fonts generally come with
* *several* Unicode charmaps:
*
- * - one of them in the "old" 16-bit format, that cannot access
- * all glyphs in the font
+ * - One of them in the "old" 16-bit format, that cannot access
+ * all glyphs in the font.
*
- * - another one in the "new" 32-bit format, that can access all
+ * - Another one in the "new" 32-bit format, that can access all
* the glyphs.
*
- * this function has been written to always favor a 32-bit charmap
- * when found. Otherwise, a 16-bit one is returned when found
+ * This function has been written to always favor a 32-bit charmap
+ * when found. Otherwise, a 16-bit one is returned when found.
*/
/* since the `interesting' table, with id's 3,10, is normally the */
@@ -848,10 +869,10 @@
FT_Long face_index,
FT_Int num_params,
FT_Parameter* params,
- FT_Face* aface )
+ FT_Face *aface )
{
FT_Memory memory;
- FT_Driver_Class clazz;
+ FT_Driver_Class clazz;
FT_Face face = 0;
FT_Error error, error2;
FT_Face_Internal internal;
@@ -897,11 +918,10 @@
/* select Unicode charmap by default */
error2 = find_unicode_charmap( face );
- /* if no Unicode charmap can be found, FT_Err_Invalid_CharMap_Handle is
- * returned.
- */
+ /* if no Unicode charmap can be found, FT_Err_Invalid_CharMap_Handle */
+ /* is returned. */
- /* no error should happen, but we want to play safe. */
+ /* no error should happen, but we want to play safe */
if ( error2 && error2 != FT_Err_Invalid_CharMap_Handle )
{
error = error2;
@@ -913,8 +933,9 @@
Fail:
if ( error )
{
+ destroy_charmaps( face, memory );
clazz->done_face( face );
- FT_FREE( face->internal );
+ FT_FREE( internal );
FT_FREE( face );
*aface = 0;
}
@@ -976,6 +997,536 @@
}
+#if !defined( FT_MACINTOSH ) && defined( FT_CONFIG_OPTION_MAC_FONTS )
+
+ /* The behavior here is very similar to that in base/ftmac.c, but it */
+ /* is designed to work on non-mac systems, so no mac specific calls. */
+ /* */
+ /* We look at the file and determine if it is a mac dfont file or a mac */
+ /* resource file, or a macbinary file containing a mac resource file. */
+ /* */
+ /* Unlike ftmac I'm not going to look at a `FOND'. I don't really see */
+ /* the point, especially since there may be multiple `FOND' resources. */
+ /* Instead I'll just look for `sfnt' and `POST' resources, ordered as */
+ /* they occur in the file. */
+ /* */
+ /* Note that multiple `POST' resources do not mean multiple postscript */
+ /* fonts; they all get jammed together to make what is essentially a */
+ /* pfb file. */
+ /* */
+ /* We aren't interested in `NFNT' or `FONT' bitmap resources. */
+ /* */
+ /* As soon as we get an `sfnt' load it into memory and pass it off to */
+ /* FT_Open_Face. */
+ /* */
+ /* If we have a (set of) `POST' resources, massage them into a (memory) */
+ /* pfb file and pass that to FT_Open_Face. (As with ftmac.c I'm not */
+ /* going to try to save the kerning info. After all that lives in the */
+ /* `FOND' which isn't in the file containing the `POST' resources so */
+ /* we don't really have access to it. */
+
+
+ /* Finalizer for a memory stream; gets called by FT_Done_Face().
+ It frees the memory it uses. */
+ /* from ftmac.c */
+ static void
+ memory_stream_close( FT_Stream stream )
+ {
+ FT_Memory memory = stream->memory;
+
+
+ FT_FREE( stream->base );
+
+ stream->size = 0;
+ stream->base = 0;
+ stream->close = 0;
+ }
+
+
+ /* Create a new memory stream from a buffer and a size. */
+ /* from ftmac.c */
+ static FT_Error
+ new_memory_stream( FT_Library library,
+ FT_Byte* base,
+ FT_ULong size,
+ FT_Stream_CloseFunc close,
+ FT_Stream *astream )
+ {
+ FT_Error error;
+ FT_Memory memory;
+ FT_Stream stream;
+
+
+ if ( !library )
+ return FT_Err_Invalid_Library_Handle;
+
+ if ( !base )
+ return FT_Err_Invalid_Argument;
+
+ *astream = 0;
+ memory = library->memory;
+ if ( FT_NEW( stream ) )
+ goto Exit;
+
+ FT_Stream_OpenMemory( stream, base, size );
+
+ stream->close = close;
+
+ *astream = stream;
+
+ Exit:
+ return error;
+ }
+
+
+ /* Create a new FT_Face given a buffer and a driver name. */
+ /* from ftmac.c */
+ static FT_Error
+ open_face_from_buffer( FT_Library library,
+ FT_Byte* base,
+ FT_ULong size,
+ FT_Long face_index,
+ const char* driver_name,
+ FT_Face *aface )
+ {
+ FT_Open_Args args;
+ FT_Error error;
+ FT_Stream stream;
+ FT_Memory memory = library->memory;
+
+
+ error = new_memory_stream( library,
+ base,
+ size,
+ memory_stream_close,
+ &stream );
+ if ( error )
+ {
+ FT_FREE( base );
+ return error;
+ }
+
+ args.flags = FT_OPEN_STREAM;
+ args.stream = stream;
+ if ( driver_name )
+ {
+ args.flags = args.flags | FT_OPEN_DRIVER;
+ args.driver = FT_Get_Module( library, driver_name );
+ }
+
+ error = FT_Open_Face( library, &args, face_index, aface );
+
+ if ( error == FT_Err_Ok )
+ (*aface)->face_flags &= ~FT_FACE_FLAG_EXTERNAL_STREAM;
+ else
+ {
+ FT_Stream_Close( stream );
+ FT_FREE( stream );
+ }
+
+ return error;
+ }
+
+
+ /* The resource header says we've got resource_cnt `POST' (type1) */
+ /* resources in this file. They all need to be coalesced into */
+ /* one lump which gets passed on to the type1 driver. */
+ /* Here can be only one PostScript font in a file so face_index */
+ /* must be 0 (or -1). */
+ /* */
+ static FT_Error
+ Mac_Read_POST_Resource( FT_Library library,
+ FT_Stream stream,
+ FT_Long *offsets,
+ FT_Long resource_cnt,
+ FT_Long face_index,
+ FT_Face *aface )
+ {
+ FT_Error error = FT_Err_Cannot_Open_Resource;
+ FT_Memory memory = library->memory;
+ FT_Byte* pfb_data;
+ int i, type, flags;
+ FT_Long len;
+ FT_Long pfb_len, pfb_pos, pfb_lenpos;
+ FT_Long rlen, temp;
+
+
+ if ( face_index == -1 )
+ face_index = 0;
+ if ( face_index != 0 )
+ return error;
+
+ /* Find the length of all the POST resources, concatenated. Assume */
+ /* worst case (each resource in its own section). */
+ pfb_len = 0;
+ for ( i = 0; i < resource_cnt; ++i )
+ {
+ error = FT_Stream_Seek( stream, offsets[i] );
+ if ( error )
+ goto Exit;
+ if ( FT_READ_LONG( temp ) )
+ goto Exit;
+ pfb_len += temp + 6;
+ }
+
+ if ( FT_ALLOC( pfb_data, (FT_Long)pfb_len + 2 ) )
+ goto Exit;
+
+ pfb_data[0] = 0x80;
+ pfb_data[1] = 1; /* Ascii section */
+ pfb_data[2] = 0; /* 4-byte length, fill in later */
+ pfb_data[3] = 0;
+ pfb_data[4] = 0;
+ pfb_data[5] = 0;
+ pfb_pos = 7;
+ pfb_lenpos = 2;
+
+ len = 0;
+ type = 1;
+ for ( i = 0; i < resource_cnt; ++i )
+ {
+ error = FT_Stream_Seek( stream, offsets[i] );
+ if ( error )
+ goto Exit2;
+ if ( FT_READ_LONG( rlen ) )
+ goto Exit;
+ if ( FT_READ_USHORT( flags ) )
+ goto Exit;
+ rlen -= 2; /* the flags are part of the resource */
+ if ( ( flags >> 8 ) == type )
+ len += rlen;
+ else
+ {
+ pfb_data[pfb_lenpos ] = (FT_Byte)( len );
+ pfb_data[pfb_lenpos + 1] = (FT_Byte)( len >> 8 );
+ pfb_data[pfb_lenpos + 2] = (FT_Byte)( len >> 16 );
+ pfb_data[pfb_lenpos + 3] = (FT_Byte)( len >> 24 );
+
+ if ( ( flags >> 8 ) == 5 ) /* End of font mark */
+ break;
+
+ pfb_data[pfb_pos++] = 0x80;
+
+ type = flags >> 8;
+ len = rlen;
+
+ pfb_data[pfb_pos++] = (FT_Byte)type;
+ pfb_lenpos = (FT_Byte)pfb_pos;
+ pfb_data[pfb_pos++] = 0; /* 4-byte length, fill in later */
+ pfb_data[pfb_pos++] = 0;
+ pfb_data[pfb_pos++] = 0;
+ pfb_data[pfb_pos++] = 0;
+ }
+
+ error = FT_Stream_Read( stream, (FT_Byte *)pfb_data + pfb_pos, rlen );
+ pfb_pos += rlen;
+ }
+
+ pfb_data[pfb_pos++] = 0x80;
+ pfb_data[pfb_pos++] = 3;
+
+ pfb_data[pfb_lenpos ] = (FT_Byte)( len );
+ pfb_data[pfb_lenpos + 1] = (FT_Byte)( len >> 8 );
+ pfb_data[pfb_lenpos + 2] = (FT_Byte)( len >> 16 );
+ pfb_data[pfb_lenpos + 3] = (FT_Byte)( len >> 24 );
+
+ return open_face_from_buffer( library,
+ pfb_data,
+ pfb_pos,
+ face_index,
+ "type1",
+ aface );
+
+ Exit2:
+ FT_FREE( pfb_data );
+
+ Exit:
+ return error;
+ }
+
+
+ /* The resource header says we've got resource_cnt `sfnt' */
+ /* (TrueType/OpenType) resources in this file. Look through */
+ /* them for the one indicated by face_index, load it into mem, */
+ /* pass it on the the truetype driver and return it. */
+ /* */
+ static FT_Error
+ Mac_Read_sfnt_Resource( FT_Library library,
+ FT_Stream stream,
+ FT_Long *offsets,
+ FT_Long resource_cnt,
+ FT_Long face_index,
+ FT_Face *aface )
+ {
+ FT_Memory memory = library->memory;
+ FT_Byte* sfnt_data;
+ FT_Error error;
+ FT_Long flag_offset;
+ FT_Long rlen;
+ int is_cff;
+
+
+ if ( face_index == -1 )
+ face_index = 0;
+ if ( face_index >= resource_cnt )
+ return FT_Err_Cannot_Open_Resource;
+
+ flag_offset = offsets[face_index];
+ error = FT_Stream_Seek( stream, flag_offset );
+ if ( error )
+ goto Exit;
+
+ if ( FT_READ_LONG( rlen ) )
+ goto Exit;
+ if ( rlen == -1 )
+ return FT_Err_Cannot_Open_Resource;
+
+ if ( FT_ALLOC( sfnt_data, (FT_Long)rlen ) )
+ return error;
+ error = FT_Stream_Read( stream, (FT_Byte *)sfnt_data, rlen );
+ if ( error )
+ goto Exit;
+
+ is_cff = rlen > 4 && sfnt_data[0] == 'O' &&
+ sfnt_data[1] == 'T' &&
+ sfnt_data[2] == 'T' &&
+ sfnt_data[3] == 'O';
+
+ error = open_face_from_buffer( library,
+ sfnt_data,
+ rlen,
+ face_index,
+ is_cff ? "cff" : "truetype",
+ aface );
+
+ Exit:
+ return error;
+ }
+
+
+ /* Check for a valid resource fork header, or a valid dfont */
+ /* header. In a resource fork the first 16 bytes are repeated */
+ /* at the location specified by bytes 4-7. In a dfont bytes */
+ /* 4-7 point to 16 bytes of zeroes instead. */
+ /* */
+ static FT_Error
+ IsMacResource( FT_Library library,
+ FT_Stream stream,
+ FT_Long resource_offset,
+ FT_Long face_index,
+ FT_Face *aface )
+ {
+ FT_Memory memory = library->memory;
+ FT_Error error;
+ FT_Long map_offset, rdara_pos;
+ FT_Long *data_offsets;
+ FT_Long count;
+
+
+ error = FT_Raccess_Get_HeaderInfo( library, stream, resource_offset,
+ &map_offset, &rdara_pos );
+ if ( error )
+ return error;
+
+ error = FT_Raccess_Get_DataOffsets( library, stream,
+ map_offset, rdara_pos,
+ FT_MAKE_TAG( 'P', 'O', 'S', 'T' ),
+ &data_offsets, &count );
+ if ( !error )
+ {
+ error = Mac_Read_POST_Resource( library, stream, data_offsets, count,
+ face_index, aface );
+ FT_FREE( data_offsets );
+ return error;
+ }
+
+ error = FT_Raccess_Get_DataOffsets( library, stream,
+ map_offset, rdara_pos,
+ FT_MAKE_TAG( 's', 'f', 'n', 't' ),
+ &data_offsets, &count );
+ if ( !error )
+ {
+ error = Mac_Read_sfnt_Resource( library, stream, data_offsets, count,
+ face_index, aface );
+ FT_FREE( data_offsets );
+ }
+
+ return error;
+ }
+
+
+ /* Check for a valid macbinary header, and if we find one */
+ /* check that the (flattened) resource fork in it is valid. */
+ /* */
+ static FT_Error
+ IsMacBinary( FT_Library library,
+ FT_Stream stream,
+ FT_Long face_index,
+ FT_Face *aface )
+ {
+ unsigned char header[128];
+ FT_Error error;
+ FT_Long dlen, offset;
+
+
+ error = FT_Stream_Seek( stream, 0 );
+ if ( error )
+ goto Exit;
+
+ error = FT_Stream_Read( stream, (FT_Byte*)header, 128 );
+ if ( error )
+ goto Exit;
+
+ if ( header[ 0] != 0 ||
+ header[74] != 0 ||
+ header[82] != 0 ||
+ header[ 1] == 0 ||
+ header[ 1] > 33 ||
+ header[63] != 0 ||
+ header[2 + header[1]] != 0 )
+ return FT_Err_Unknown_File_Format;
+
+ dlen = ( header[0x53] << 24 ) |
+ ( header[0x54] << 16 ) |
+ ( header[0x55] << 8 ) |
+ header[0x56];
+#if 0
+ rlen = ( header[0x57] << 24 ) |
+ ( header[0x58] << 16 ) |
+ ( header[0x59] << 8 ) |
+ header[0x5a];
+#endif /* 0 */
+ offset = 128 + ( ( dlen + 127 ) & ~127 );
+
+ return IsMacResource( library, stream, offset, face_index, aface );
+
+ Exit:
+ return error;
+ }
+
+
+ static FT_Error
+ load_face_in_embedded_rfork( FT_Library library,
+ FT_Stream stream,
+ FT_Long face_index,
+ FT_Face *aface,
+ const FT_Open_Args *args )
+ {
+
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_raccess
+
+ FT_Memory memory = library->memory;
+ FT_Error error = FT_Err_Unknown_File_Format;
+ int i;
+
+ char * file_names[FT_RACCESS_N_RULES];
+ FT_Long offsets[FT_RACCESS_N_RULES];
+ FT_Error errors[FT_RACCESS_N_RULES];
+
+ FT_Open_Args args2;
+ FT_Stream stream2;
+
+
+ FT_Raccess_Guess( library, stream,
+ args->pathname, file_names, offsets, errors );
+
+ for ( i = 0; i < FT_RACCESS_N_RULES; i++ )
+ {
+ if ( errors[i] )
+ {
+ FT_TRACE3(( "Error[%d] has occurred in rule %d\n", errors[i], i ));
+ continue;
+ }
+
+ args2.flags = FT_OPEN_PATHNAME;
+ args2.pathname = file_names[i] ? file_names[i] : args->pathname;
+
+ FT_TRACE3(( "Try rule %d: %s (offset=%d) ...",
+ i, args2.pathname, offsets[i] ));
+
+ error = FT_Stream_New( library, &args2, &stream2 );
+ if ( error )
+ {
+ FT_TRACE3(( "failed\n" ));
+ continue;
+ }
+
+ error = IsMacResource( library, stream2, offsets[i],
+ face_index, aface );
+ FT_Stream_Close( stream2 );
+
+ FT_TRACE3(( "%s\n", error ? "failed": "successful" ));
+
+ if ( !error )
+ break;
+ }
+
+ for (i = 0; i < FT_RACCESS_N_RULES; i++)
+ {
+ if ( file_names[i] )
+ FT_FREE( file_names[i] );
+ }
+
+ /* Caller (load_mac_face) requires FT_Err_Unknown_File_Format. */
+ if ( error )
+ error = FT_Err_Unknown_File_Format;
+
+ return error;
+
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_objs
+
+ }
+
+
+ /* Check for some macintosh formats. */
+ /* Is this a macbinary file? If so look at the resource fork. */
+ /* Is this a mac dfont file? */
+ /* Is this an old style resource fork? (in data) */
+ /* Else call load_face_in_embedded_rfork to try extra rules */
+ /* (defined in `ftrfork.c'). */
+ /* */
+ static FT_Error
+ load_mac_face( FT_Library library,
+ FT_Stream stream,
+ FT_Long face_index,
+ FT_Face *aface,
+ const FT_Open_Args *args )
+ {
+ FT_Error error;
+ FT_UNUSED( args );
+
+
+ error = IsMacBinary( library, stream, face_index, aface );
+ if ( FT_ERROR_BASE( error ) == FT_Err_Unknown_File_Format )
+ {
+
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_raccess
+
+ FT_TRACE3(( "Try as dfont: %s ...", args->pathname ));
+
+ error = IsMacResource( library, stream, 0, face_index, aface );
+
+ FT_TRACE3(( "%s\n", error ? "failed" : "successful" ));
+
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_objs
+
+ }
+
+ if ( ( FT_ERROR_BASE( error ) == FT_Err_Unknown_File_Format ||
+ FT_ERROR_BASE( error ) == FT_Err_Invalid_Stream_Operation ) &&
+ ( args->flags & FT_OPEN_PATHNAME ) )
+ error = load_face_in_embedded_rfork( library, stream,
+ face_index, aface, args );
+ return error;
+ }
+
+#endif /* !FT_MACINTOSH && FT_CONFIG_OPTION_MAC_FONTS */
+
+
/* documentation is in freetype.h */
FT_EXPORT_DEF( FT_Error )
@@ -994,7 +1545,7 @@
/* test for valid `library' delayed to */
- /* ft_input_stream_new() */
+ /* FT_Stream_New() */
if ( !aface || !args )
return FT_Err_Invalid_Argument;
@@ -1005,7 +1556,7 @@
args->stream );
/* create input stream */
- error = ft_input_stream_new( library, args, &stream );
+ error = FT_Stream_New( library, args, &stream );
if ( error )
goto Exit;
@@ -1038,7 +1589,7 @@
else
error = FT_Err_Invalid_Handle;
- ft_input_stream_free( stream, external_stream );
+ FT_Stream_Free( stream, external_stream );
goto Fail;
}
else
@@ -1066,20 +1617,45 @@
}
error = open_face( driver, stream, face_index,
- num_params, params, &face );
+ num_params, params, &face );
if ( !error )
goto Success;
if ( FT_ERROR_BASE( error ) != FT_Err_Unknown_File_Format )
- goto Fail2;
+ goto Fail3;
}
}
+ Fail3:
+ /* If we are on the mac, and we get an FT_Err_Invalid_Stream_Operation */
+ /* it may be because we have an empty data fork, so we need to check */
+ /* the resource fork. */
+ if ( FT_ERROR_BASE( error ) != FT_Err_Unknown_File_Format &&
+ FT_ERROR_BASE( error ) != FT_Err_Invalid_Stream_Operation )
+ goto Fail2;
+
+#if !defined( FT_MACINTOSH ) && defined( FT_CONFIG_OPTION_MAC_FONTS )
+ error = load_mac_face( library, stream, face_index, aface, args );
+ if ( !error )
+ {
+ /* We don't want to go to Success here. We've already done that. */
+ /* On the other hand, if we succeeded we still need to close this */
+ /* stream (we opened a different stream which extracted the */
+ /* interesting information out of this stream here. That stream */
+ /* will still be open and the face will point to it). */
+ FT_Stream_Free( stream, external_stream );
+ return error;
+ }
+
+ if ( FT_ERROR_BASE( error ) != FT_Err_Unknown_File_Format )
+ goto Fail2;
+#endif /* !FT_MACINTOSH && FT_CONFIG_OPTION_MAC_FONTS */
+
/* no driver is able to handle this format */
error = FT_Err_Unknown_File_Format;
Fail2:
- ft_input_stream_free( stream, external_stream );
+ FT_Stream_Free( stream, external_stream );
goto Fail;
}
@@ -1188,7 +1764,7 @@
FT_Driver_Class clazz;
- /* test for valid `parameters' delayed to ft_input_stream_new() */
+ /* test for valid `parameters' delayed to FT_Stream_New() */
if ( !face )
return FT_Err_Invalid_Face_Handle;
@@ -1197,7 +1773,7 @@
if ( !driver )
return FT_Err_Invalid_Driver_Handle;
- error = ft_input_stream_new( driver->root.library, parameters, &stream );
+ error = FT_Stream_New( driver->root.library, parameters, &stream );
if ( error )
goto Exit;
@@ -1210,7 +1786,7 @@
error = clazz->attach_file( face, stream );
/* close the attached stream */
- ft_input_stream_free( stream,
+ FT_Stream_Free( stream,
(FT_Bool)( parameters->stream &&
( parameters->flags & FT_OPEN_STREAM ) ) );
@@ -1368,17 +1944,17 @@
{
/* Compute root ascender, descender, test height, and max_advance */
- metrics->ascender = ( FT_MulFix( face->ascender,
- metrics->y_scale ) + 63 ) & -64;
+ metrics->ascender = FT_PIX_CEIL( FT_MulFix( face->ascender,
+ metrics->y_scale ) );
- metrics->descender = ( FT_MulFix( face->descender,
- metrics->y_scale ) + 0 ) & -64;
+ metrics->descender = FT_PIX_FLOOR( FT_MulFix( face->descender,
+ metrics->y_scale ) );
- metrics->height = ( FT_MulFix( face->height,
- metrics->y_scale ) + 32 ) & -64;
+ metrics->height = FT_PIX_ROUND( FT_MulFix( face->height,
+ metrics->y_scale ) );
- metrics->max_advance = ( FT_MulFix( face->max_advance_width,
- metrics->x_scale ) + 32 ) & -64;
+ metrics->max_advance = FT_PIX_ROUND( FT_MulFix( face->max_advance_width,
+ metrics->x_scale ) );
}
@@ -1403,6 +1979,7 @@
driver = face->driver;
metrics = &face->size->metrics;
+ clazz = driver->clazz;
if ( !char_width )
char_width = char_height;
@@ -1416,22 +1993,27 @@
if ( !vert_resolution )
vert_resolution = 72;
- driver = face->driver;
- clazz = driver->clazz;
-
/* default processing -- this can be overridden by the driver */
if ( char_width < 1 * 64 )
char_width = 1 * 64;
if ( char_height < 1 * 64 )
char_height = 1 * 64;
- /* Compute pixel sizes in 26.6 units. we use rounding
- */
- dim_x = ( ( char_width * horz_resolution + (36+32*72) ) / 72 ) & -64;
- dim_y = ( ( char_height * vert_resolution + (36+32*72) ) / 72 ) & -64;
+ /* Compute pixel sizes in 26.6 units with rounding */
+ dim_x = ( char_width * horz_resolution + 36 ) / 72;
+ dim_y = ( char_height * vert_resolution + 36 ) / 72;
+
+ {
+ FT_UShort x_ppem = (FT_UShort)( ( dim_x + 32 ) >> 6 );
+ FT_UShort y_ppem = (FT_UShort)( ( dim_y + 32 ) >> 6 );
+
+
+ if ( x_ppem == metrics->x_ppem && y_ppem == metrics->y_ppem )
+ return FT_Err_Ok;
- metrics->x_ppem = (FT_UShort)( dim_x >> 6 );
- metrics->y_ppem = (FT_UShort)( dim_y >> 6 );
+ metrics->x_ppem = x_ppem;
+ metrics->y_ppem = y_ppem;
+ }
metrics->x_scale = 0x10000L;
metrics->y_scale = 0x10000L;
@@ -1464,16 +2046,16 @@
FT_Error error = FT_Err_Ok;
FT_Driver driver;
FT_Driver_Class clazz;
- FT_Size_Metrics* metrics = &face->size->metrics;
+ FT_Size_Metrics* metrics;
if ( !face || !face->size || !face->driver )
return FT_Err_Invalid_Face_Handle;
- driver = face->driver;
- clazz = driver->clazz;
+ driver = face->driver;
+ metrics = &face->size->metrics;
+ clazz = driver->clazz;
- /* default processing -- this can be overridden by the driver */
if ( pixel_width == 0 )
pixel_width = pixel_height;
@@ -1485,6 +2067,12 @@
if ( pixel_height < 1 )
pixel_height = 1;
+ /* use `>=' to avoid potention compiler warning on 16bit platforms */
+ if ( pixel_width >= 0xFFFFU )
+ pixel_width = 0xFFFFU;
+ if ( pixel_height >= 0xFFFFU )
+ pixel_height = 0xFFFFU;
+
metrics->x_ppem = (FT_UShort)pixel_width;
metrics->y_ppem = (FT_UShort)pixel_height;
@@ -1546,8 +2134,8 @@
if ( kern_mode != FT_KERNING_UNFITTED )
{
- akerning->x = ( akerning->x + 32 ) & -64;
- akerning->y = ( akerning->y + 32 ) & -64;
+ akerning->x = FT_PIX_ROUND( akerning->x );
+ akerning->y = FT_PIX_ROUND( akerning->y );
}
}
}
@@ -1570,10 +2158,10 @@
if ( !face )
return FT_Err_Invalid_Face_Handle;
- /* FT_ENCODING_UNICODE is special. We try to find the `best' Unicode */
- /* charmap available, i.e. one with UCS-4 characters, if possible. */
- /* */
- /* This is done by find_unicode_charmap() above, to share code. */
+ /* FT_ENCODING_UNICODE is special. We try to find the `best' Unicode */
+ /* charmap available, i.e., one with UCS-4 characters, if possible. */
+ /* */
+ /* This is done by find_unicode_charmap() above, to share code. */
if ( encoding == FT_ENCODING_UNICODE )
return find_unicode_charmap( face );
@@ -1661,7 +2249,7 @@
return FT_Err_Invalid_Argument;
face = charmap->face;
- memory = FT_FACE_MEMORY(face);
+ memory = FT_FACE_MEMORY( face );
if ( !FT_ALLOC( cmap, clazz->size ) )
{
@@ -1717,7 +2305,6 @@
}
-
/* documentation is in freetype.h */
FT_EXPORT_DEF( FT_ULong )
@@ -1741,8 +2328,8 @@
return result;
}
- /* documentation is in freetype.h */
+ /* documentation is in freetype.h */
FT_EXPORT_DEF( FT_ULong )
FT_Get_Next_Char( FT_Face face,
@@ -1770,7 +2357,6 @@
}
-
/* documentation is in freetype.h */
FT_EXPORT_DEF( FT_UInt )
@@ -1782,21 +2368,15 @@
if ( face && FT_HAS_GLYPH_NAMES( face ) )
{
- /* now, lookup for glyph name */
- FT_Driver driver = face->driver;
- FT_Module_Class* clazz = FT_MODULE_CLASS( driver );
+ FT_Service_GlyphDict service;
- if ( clazz->get_interface )
- {
- FT_Face_GetGlyphNameIndexFunc requester;
+ FT_FACE_LOOKUP_SERVICE( face,
+ service,
+ GLYPH_DICT );
-
- requester = (FT_Face_GetGlyphNameIndexFunc)clazz->get_interface(
- FT_MODULE( driver ), "name_index" );
- if ( requester )
- result = requester( face, glyph_name );
- }
+ if ( service && service->name_index )
+ result = service->name_index( face, glyph_name );
}
return result;
@@ -1822,21 +2402,15 @@
glyph_index <= (FT_UInt)face->num_glyphs &&
FT_HAS_GLYPH_NAMES( face ) )
{
- /* now, lookup for glyph name */
- FT_Driver driver = face->driver;
- FT_Module_Class* clazz = FT_MODULE_CLASS( driver );
+ FT_Service_GlyphDict service;
- if ( clazz->get_interface )
- {
- FT_Face_GetGlyphNameFunc requester;
-
+ FT_FACE_LOOKUP_SERVICE( face,
+ service,
+ GLYPH_DICT );
- requester = (FT_Face_GetGlyphNameFunc)clazz->get_interface(
- FT_MODULE( driver ), "glyph_name" );
- if ( requester )
- error = requester( face, glyph_index, buffer, buffer_max );
- }
+ if ( service && service->get_name )
+ error = service->get_name( face, glyph_index, buffer, buffer_max );
}
return error;
@@ -1854,25 +2428,19 @@
if ( !face )
goto Exit;
- result = face->internal->postscript_name;
if ( !result )
{
- /* now, look up glyph name */
- FT_Driver driver = face->driver;
- FT_Module_Class* clazz = FT_MODULE_CLASS( driver );
+ FT_Service_PsFontName service;
- if ( clazz->get_interface )
- {
- FT_Face_GetPostscriptNameFunc requester;
-
+ FT_FACE_LOOKUP_SERVICE( face,
+ service,
+ POSTSCRIPT_FONT_NAME );
- requester = (FT_Face_GetPostscriptNameFunc)clazz->get_interface(
- FT_MODULE( driver ), "postscript_name" );
- if ( requester )
- result = requester( face );
- }
+ if ( service && service->get_ps_font_name )
+ result = service->get_ps_font_name( face );
}
+
Exit:
return result;
}
@@ -1884,21 +2452,17 @@
FT_Get_Sfnt_Table( FT_Face face,
FT_Sfnt_Tag tag )
{
- void* table = 0;
- FT_Get_Sfnt_Table_Func func;
- FT_Driver driver;
-
+ void* table = 0;
+ FT_Service_SFNT_Table service;
- if ( !face || !FT_IS_SFNT( face ) )
- goto Exit;
- driver = face->driver;
- func = (FT_Get_Sfnt_Table_Func)driver->root.clazz->get_interface(
- FT_MODULE( driver ), "get_sfnt" );
- if ( func )
- table = func( face, tag );
+ if ( face && FT_IS_SFNT( face ) )
+ {
+ FT_FACE_FIND_SERVICE( face, service, SFNT_TABLE );
+ if ( service != NULL )
+ table = service->get_table( face, tag );
+ }
- Exit:
return table;
}
@@ -1906,26 +2470,45 @@
/* documentation is in tttables.h */
FT_EXPORT_DEF( FT_Error )
- FT_Load_Sfnt_Table( FT_Face face,
- FT_ULong tag,
- FT_Long offset,
- FT_Byte* buffer,
- FT_ULong* length )
+ FT_Load_Sfnt_Table( FT_Face face,
+ FT_ULong tag,
+ FT_Long offset,
+ FT_Byte* buffer,
+ FT_ULong* length )
{
- SFNT_Load_Table_Func func;
- FT_Driver driver;
+ FT_Service_SFNT_Table service;
if ( !face || !FT_IS_SFNT( face ) )
return FT_Err_Invalid_Face_Handle;
- driver = face->driver;
- func = (SFNT_Load_Table_Func) driver->root.clazz->get_interface(
- FT_MODULE( driver ), "load_sfnt" );
- if ( !func )
+ FT_FACE_FIND_SERVICE( face, service, SFNT_TABLE );
+ if ( service == NULL )
return FT_Err_Unimplemented_Feature;
- return func( face, tag, offset, buffer, length );
+ return service->load_table( face, tag, offset, buffer, length );
+ }
+
+
+ FT_EXPORT_DEF( FT_ULong )
+ FT_Get_CMap_Language_ID( FT_CharMap charmap )
+ {
+ FT_Service_TTCMaps service;
+ FT_Face face;
+ TT_CMapInfo cmap_info;
+
+
+ if ( !charmap || !charmap->face )
+ return 0;
+
+ face = charmap->face;
+ FT_FACE_FIND_SERVICE( face, service, TT_CMAP );
+ if ( service == NULL )
+ return 0;
+ if ( service->get_cmap_info( charmap, &cmap_info ))
+ return 0;
+
+ return cmap_info.language;
}
@@ -2475,6 +3058,50 @@
}
+ FT_BASE_DEF( FT_Pointer )
+ ft_module_get_service( FT_Module module,
+ const char* service_id )
+ {
+ FT_Pointer result = NULL;
+
+ if ( module )
+ {
+ FT_ASSERT( module->clazz && module->clazz->get_interface );
+
+ /* first, look for the service in the module
+ */
+ if ( module->clazz->get_interface )
+ result = module->clazz->get_interface( module, service_id );
+
+ if ( result == NULL )
+ {
+ /* we didn't find it, look in all other modules then
+ */
+ FT_Library library = module->library;
+ FT_Module* cur = library->modules;
+ FT_Module* limit = cur + library->num_modules;
+
+ for ( ; cur < limit; cur++ )
+ {
+ if ( cur[0] != module )
+ {
+ FT_ASSERT( cur[0]->clazz );
+
+ if ( cur[0]->clazz->get_interface )
+ {
+ result = cur[0]->clazz->get_interface( cur[0], service_id );
+ if ( result != NULL )
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+
/* documentation is in ftmodule.h */
FT_EXPORT_DEF( FT_Error )
diff --git a/extras/freetype2/src/base/ftoutln.c b/extras/freetype2/src/base/ftoutln.c
index c59043bc0..5cae931f6 100644
--- a/extras/freetype2/src/base/ftoutln.c
+++ b/extras/freetype2/src/base/ftoutln.c
@@ -4,7 +4,7 @@
/* */
/* FreeType outline management (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -26,6 +26,7 @@
#include <ft2build.h>
#include FT_OUTLINE_H
#include FT_INTERNAL_OBJECTS_H
+#include FT_TRIGONOMETRY_H
/*************************************************************************/
@@ -357,14 +358,11 @@
source->n_contours != target->n_contours )
return FT_Err_Invalid_Argument;
- FT_MEM_COPY( target->points, source->points,
- source->n_points * sizeof ( FT_Vector ) );
+ FT_ARRAY_COPY( target->points, source->points, source->n_points );
- FT_MEM_COPY( target->tags, source->tags,
- source->n_points * sizeof ( FT_Byte ) );
+ FT_ARRAY_COPY( target->tags, source->tags, source->n_points );
- FT_MEM_COPY( target->contours, source->contours,
- source->n_contours * sizeof ( FT_Short ) );
+ FT_ARRAY_COPY( target->contours, source->contours, source->n_contours );
/* copy all flags, except the `FT_OUTLINE_OWNER' one */
is_owner = target->flags & FT_OUTLINE_OWNER;
@@ -655,4 +653,143 @@
}
+ typedef struct FT_OrientationExtremumRec_
+ {
+ FT_Int index;
+ FT_Long pos;
+ FT_Int first;
+ FT_Int last;
+
+ } FT_OrientationExtremumRec;
+
+
+ static FT_Orientation
+ ft_orientation_extremum_compute( FT_OrientationExtremumRec* extremum,
+ FT_Outline* outline )
+ {
+ FT_Vector *point, *first, *last, *prev, *next;
+ FT_Vector* points = outline->points;
+ FT_Angle angle_in, angle_out;
+
+
+ /* compute the previous and next points in the same contour */
+ point = points + extremum->index;
+ first = points + extremum->first;
+ last = points + extremum->last;
+
+ prev = point;
+ next = point;
+
+ do
+ {
+ prev = ( prev == first ) ? last : prev - 1;
+ if ( prev == point )
+ return FT_ORIENTATION_TRUETYPE; /* degenerate case */
+
+ } while ( prev->x != point->x || prev->y != point->y );
+
+ do
+ {
+ next = ( next == last ) ? first : next + 1;
+ if ( next == point )
+ return FT_ORIENTATION_TRUETYPE; /* shouldn't happen */
+
+ } while ( next->x != point->x || next->y != point->y );
+
+ /* now compute the orientation of the `out' vector relative */
+ /* to the `in' vector. */
+ angle_in = FT_Atan2( point->x - prev->x, point->y - prev->y );
+ angle_out = FT_Atan2( next->x - point->x, next->y - point->y );
+
+ return ( FT_Angle_Diff( angle_in, angle_out ) >= 0 )
+ ? FT_ORIENTATION_TRUETYPE
+ : FT_ORIENTATION_POSTSCRIPT;
+ }
+
+
+ FT_EXPORT_DEF( FT_Orientation )
+ FT_Outline_Get_Orientation( FT_Outline* outline )
+ {
+ FT_Orientation result = FT_ORIENTATION_TRUETYPE;
+
+
+ if ( outline && outline->n_points > 0 )
+ {
+ FT_OrientationExtremumRec xmin, ymin, xmax, ymax;
+ FT_Int n;
+ FT_Int first, last;
+ FT_Vector* points = outline->points;
+
+
+ xmin.pos = ymin.pos = +32768L;
+ xmax.pos = ymax.pos = -32768L;
+
+ xmin.index = ymin.index = xmax.index = ymax.index = -1;
+
+ first = 0;
+ for ( n = 0; n < outline->n_contours; n++, first = last + 1 )
+ {
+ last = outline->contours[n];
+
+ /* skip single-point contours; these are degenerated cases */
+ if ( last > first + 1 )
+ {
+ FT_Int i;
+
+
+ for ( i = first; i < last; i++ )
+ {
+ FT_Pos x = points[i].x;
+ FT_Pos y = points[i].y;
+
+
+ if ( x < xmin.pos )
+ {
+ xmin.pos = x;
+ xmin.index = i;
+ xmin.first = first;
+ xmin.last = last;
+ }
+ if ( x > xmax.pos )
+ {
+ xmax.pos = x;
+ xmax.index = i;
+ xmax.first = first;
+ xmax.last = last;
+ }
+ if ( y < ymin.pos )
+ {
+ ymin.pos = y;
+ ymin.index = i;
+ ymin.first = first;
+ ymin.last = last;
+ }
+ if ( y > ymax.pos )
+ {
+ ymax.pos = y;
+ ymax.index = i;
+ ymax.first = first;
+ ymax.last = last;
+ }
+ }
+ }
+
+ if ( xmin.index >= 0 )
+ result = ft_orientation_extremum_compute( &xmin, outline );
+
+ else if ( xmax.index >= 0 )
+ result = ft_orientation_extremum_compute( &xmax, outline );
+
+ else if ( ymin.index >= 0 )
+ result = ft_orientation_extremum_compute( &ymin, outline );
+
+ else if ( ymax.index >= 0 )
+ result = ft_orientation_extremum_compute( &ymax, outline );
+ }
+ }
+
+ return result;
+ }
+
+
/* END */
diff --git a/extras/freetype2/src/base/ftpfr.c b/extras/freetype2/src/base/ftpfr.c
index bf2c2a2a5..fb959e37f 100644
--- a/extras/freetype2/src/base/ftpfr.c
+++ b/extras/freetype2/src/base/ftpfr.c
@@ -2,9 +2,9 @@
/* */
/* ftpfr.c */
/* */
-/* FreeType API for accessing PFR-specific data */
+/* FreeType API for accessing PFR-specific data (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -16,48 +16,36 @@
/***************************************************************************/
#include <ft2build.h>
-#include FT_INTERNAL_PFR_H
#include FT_INTERNAL_OBJECTS_H
+#include FT_SERVICE_PFR_H
- /* check the format */
- static FT_Error
- ft_pfr_check( FT_Face face,
- FT_PFR_Service *aservice )
+ /* check the format */
+ static FT_Service_PfrMetrics
+ ft_pfr_check( FT_Face face )
{
- FT_Error error = FT_Err_Bad_Argument;
+ FT_Service_PfrMetrics service;
- if ( face && face->driver )
- {
- FT_Module module = (FT_Module) face->driver;
- const char* name = module->clazz->module_name;
- if ( name[0] == 'p' &&
- name[1] == 'f' &&
- name[2] == 'r' &&
- name[4] == 0 )
- {
- *aservice = (FT_PFR_Service) module->clazz->module_interface;
- error = 0;
- }
- }
- return error;
- }
+ FT_FACE_LOOKUP_SERVICE( face, service, PFR_METRICS );
+ return service;
+ }
FT_EXPORT_DEF( FT_Error )
- FT_Get_PFR_Metrics( FT_Face face,
- FT_UInt *aoutline_resolution,
- FT_UInt *ametrics_resolution,
- FT_Fixed *ametrics_x_scale,
- FT_Fixed *ametrics_y_scale )
+ FT_Get_PFR_Metrics( FT_Face face,
+ FT_UInt *aoutline_resolution,
+ FT_UInt *ametrics_resolution,
+ FT_Fixed *ametrics_x_scale,
+ FT_Fixed *ametrics_y_scale )
{
- FT_Error error;
- FT_PFR_Service service;
+ FT_Error error = FT_Err_Ok;
+ FT_Service_PfrMetrics service;
+
- error = ft_pfr_check( face, &service );
- if ( !error )
+ service = ft_pfr_check( face );
+ if ( service )
{
error = service->get_metrics( face,
aoutline_resolution,
@@ -65,41 +53,74 @@
ametrics_x_scale,
ametrics_y_scale );
}
+ else if ( face )
+ {
+ FT_Fixed x_scale, y_scale;
+
+
+ /* this is not a PFR font */
+ *aoutline_resolution = face->units_per_EM;
+ *ametrics_resolution = face->units_per_EM;
+
+ x_scale = y_scale = 0x10000L;
+ if ( face->size )
+ {
+ x_scale = face->size->metrics.x_scale;
+ y_scale = face->size->metrics.y_scale;
+ }
+ *ametrics_x_scale = x_scale;
+ *ametrics_y_scale = y_scale;
+ }
+ else
+ error = FT_Err_Invalid_Argument;
+
return error;
}
+
FT_EXPORT_DEF( FT_Error )
FT_Get_PFR_Kerning( FT_Face face,
FT_UInt left,
FT_UInt right,
FT_Vector *avector )
{
- FT_Error error;
- FT_PFR_Service service;
+ FT_Error error;
+ FT_Service_PfrMetrics service;
- error = ft_pfr_check( face, &service );
- if ( !error )
- {
+
+ service = ft_pfr_check( face );
+ if ( service )
error = service->get_kerning( face, left, right, avector );
- }
+ else if ( face )
+ error = FT_Get_Kerning( face, left, right,
+ FT_KERNING_UNSCALED, avector );
+ else
+ error = FT_Err_Invalid_Argument;
+
return error;
}
FT_EXPORT_DEF( FT_Error )
- FT_Get_PFR_Advance( FT_Face face,
- FT_UInt gindex,
- FT_Pos *aadvance )
+ FT_Get_PFR_Advance( FT_Face face,
+ FT_UInt gindex,
+ FT_Pos *aadvance )
{
- FT_Error error;
- FT_PFR_Service service;
+ FT_Error error;
+ FT_Service_PfrMetrics service;
- error = ft_pfr_check( face, &service );
- if ( !error )
+
+ service = ft_pfr_check( face );
+ if ( service )
{
error = service->get_advance( face, gindex, aadvance );
}
+ else
+ /* XXX: TODO: PROVIDE ADVANCE-LOADING METHOD TO ALL FONT DRIVERS */
+ error = FT_Err_Invalid_Argument;
+
return error;
}
+
/* END */
diff --git a/extras/freetype2/src/base/ftrfork.c b/extras/freetype2/src/base/ftrfork.c
new file mode 100644
index 000000000..cf790ccc0
--- /dev/null
+++ b/extras/freetype2/src/base/ftrfork.c
@@ -0,0 +1,717 @@
+/***************************************************************************/
+/* */
+/* ftrfork.c */
+/* */
+/* Embedded resource forks accessor (body). */
+/* */
+/* Copyright 2004 by */
+/* Masatake YAMATO and Redhat K.K. */
+/* */
+/* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */
+/* derived from ftobjs.c. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+/***************************************************************************/
+/* Development of the code in this file is support of */
+/* Information-technology Promotion Agency, Japan. */
+/***************************************************************************/
+
+
+#include <ft2build.h>
+#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_STREAM_H
+#include FT_INTERNAL_RFORK_H
+
+
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_raccess
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
+ /**** ****/
+ /**** Resource fork directory access ****/
+ /**** ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ FT_BASE_DEF( FT_Error )
+ FT_Raccess_Get_HeaderInfo( FT_Library library,
+ FT_Stream stream,
+ FT_Long rfork_offset,
+ FT_Long *map_offset,
+ FT_Long *rdata_pos )
+ {
+ FT_Error error;
+ unsigned char head[16], head2[16];
+ FT_Long map_pos, rdata_len;
+ int allzeros, allmatch, i;
+ FT_Long type_list;
+
+ FT_UNUSED( library );
+
+
+ error = FT_Stream_Seek( stream, rfork_offset );
+ if ( error )
+ return error;
+
+ error = FT_Stream_Read( stream, (FT_Byte *)head, 16 );
+ if ( error )
+ return error;
+
+ *rdata_pos = rfork_offset + ( ( head[0] << 24 ) |
+ ( head[1] << 16 ) |
+ ( head[2] << 8 ) |
+ head[3] );
+ map_pos = rfork_offset + ( ( head[4] << 24 ) |
+ ( head[5] << 16 ) |
+ ( head[6] << 8 ) |
+ head[7] );
+ rdata_len = ( head[ 8] << 24 ) |
+ ( head[ 9] << 16 ) |
+ ( head[10] << 8 ) |
+ head[11];
+
+ /* map_len = head[12] .. head[15] */
+
+ if ( *rdata_pos + rdata_len != map_pos || map_pos == rfork_offset )
+ return FT_Err_Unknown_File_Format;
+
+ error = FT_Stream_Seek( stream, map_pos );
+ if ( error )
+ return error;
+
+ head2[15] = (FT_Byte)( head[15] + 1 ); /* make it be different */
+
+ error = FT_Stream_Read( stream, (FT_Byte*)head2, 16 );
+ if ( error )
+ return error;
+
+ allzeros = 1;
+ allmatch = 1;
+ for ( i = 0; i < 16; ++i )
+ {
+ if ( head2[i] != 0 )
+ allzeros = 0;
+ if ( head2[i] != head[i] )
+ allmatch = 0;
+ }
+ if ( !allzeros && !allmatch )
+ return FT_Err_Unknown_File_Format;
+
+ /* If we have reached this point then it is probably a mac resource */
+ /* file. Now, does it contain any interesting resources? */
+ /* Skip handle to next resource map, the file resource number, and */
+ /* attributes. */
+ (void)FT_STREAM_SKIP( 4 /* skip handle to next resource map */
+ + 2 /* skip file resource number */
+ + 2 ); /* skip attributes */
+
+ if ( FT_READ_USHORT( type_list ) )
+ return error;
+ if ( type_list == -1 )
+ return FT_Err_Unknown_File_Format;
+
+ error = FT_Stream_Seek( stream, map_pos + type_list );
+ if ( error )
+ return error;
+
+ *map_offset = map_pos + type_list;
+ return FT_Err_Ok;
+ }
+
+
+ FT_BASE_DEF( FT_Error )
+ FT_Raccess_Get_DataOffsets( FT_Library library,
+ FT_Stream stream,
+ FT_Long map_offset,
+ FT_Long rdata_pos,
+ FT_Long tag,
+ FT_Long **offsets,
+ FT_Long *count )
+ {
+ FT_Error error;
+ int i, j, cnt, subcnt;
+ FT_Long tag_internal, rpos;
+ FT_Memory memory = library->memory;
+ FT_Long temp;
+ FT_Long *offsets_internal;
+
+
+ error = FT_Stream_Seek( stream, map_offset );
+ if ( error )
+ return error;
+
+ if ( FT_READ_USHORT( cnt ) )
+ return error;
+ cnt++;
+
+ for ( i = 0; i < cnt; ++i )
+ {
+ if ( FT_READ_LONG( tag_internal ) ||
+ FT_READ_USHORT( subcnt ) ||
+ FT_READ_USHORT( rpos ) )
+ return error;
+
+ FT_TRACE2(( "Resource tags: %c%c%c%c\n",
+ (char)( 0xff & ( tag_internal >> 24 ) ),
+ (char)( 0xff & ( tag_internal >> 16 ) ),
+ (char)( 0xff & ( tag_internal >> 8 ) ),
+ (char)( 0xff & ( tag_internal >> 0 ) ) ));
+
+ if ( tag_internal == tag )
+ {
+ *count = subcnt + 1;
+ rpos += map_offset;
+
+ error = FT_Stream_Seek( stream, rpos );
+ if ( error )
+ return error;
+
+ if ( FT_ALLOC( offsets_internal, *count * sizeof( FT_Long ) ) )
+ return error;
+
+ for ( j = 0; j < *count; ++j )
+ {
+ (void)FT_STREAM_SKIP( 2 ); /* resource id */
+ (void)FT_STREAM_SKIP( 2 ); /* rsource name */
+
+ if ( FT_READ_LONG( temp ) )
+ {
+ FT_FREE( offsets_internal );
+ return error;
+ }
+
+ offsets_internal[j] = rdata_pos + ( temp & 0xFFFFFFL );
+
+ (void)FT_STREAM_SKIP( 4 ); /* mbz */
+ }
+
+ *offsets = offsets_internal;
+
+ return FT_Err_Ok;
+ }
+ }
+
+ return FT_Err_Cannot_Open_Resource;
+ }
+
+
+#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+ /**** ****/
+ /**** ****/
+ /**** Guessing functions ****/
+ /**** ****/
+ /**** When you add a new guessing function, ****/
+ /**** update FT_RACCESS_N_RULES in ftrfork.h. ****/
+ /**** ****/
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ typedef FT_Error
+ (*raccess_guess_func)( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset );
+
+
+ static FT_Error
+ raccess_guess_apple_double( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset );
+
+ static FT_Error
+ raccess_guess_apple_single( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset );
+
+ static FT_Error
+ raccess_guess_darwin_ufs_export( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset );
+
+ static FT_Error
+ raccess_guess_darwin_hfsplus( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset );
+
+ static FT_Error
+ raccess_guess_vfat( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset );
+
+ static FT_Error
+ raccess_guess_linux_cap( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset );
+
+ static FT_Error
+ raccess_guess_linux_double( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset );
+
+ static FT_Error
+ raccess_guess_linux_netatalk( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset );
+
+
+ /*************************************************************************/
+ /**** ****/
+ /**** Helper functions ****/
+ /**** ****/
+ /*************************************************************************/
+
+ static FT_Error
+ raccess_guess_apple_generic( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ FT_Int32 magic,
+ FT_Long *result_offset );
+
+ static FT_Error
+ raccess_guess_linux_double_from_file_name( FT_Library library,
+ char * file_name,
+ FT_Long *result_offset );
+
+ static char *
+ raccess_make_file_name( FT_Memory memory,
+ const char *original_name,
+ const char *insertion );
+
+
+ FT_BASE_DEF( void )
+ FT_Raccess_Guess( FT_Library library,
+ FT_Stream stream,
+ char* base_name,
+ char **new_names,
+ FT_Long *offsets,
+ FT_Error *errors )
+ {
+ FT_Long i;
+
+
+ raccess_guess_func funcs[FT_RACCESS_N_RULES] =
+ {
+ raccess_guess_apple_double,
+ raccess_guess_apple_single,
+ raccess_guess_darwin_ufs_export,
+ raccess_guess_darwin_hfsplus,
+ raccess_guess_vfat,
+ raccess_guess_linux_cap,
+ raccess_guess_linux_double,
+ raccess_guess_linux_netatalk,
+ };
+
+ for ( i = 0; i < FT_RACCESS_N_RULES; i++ )
+ {
+ new_names[i] = NULL;
+ errors[i] = FT_Stream_Seek( stream, 0 );
+ if ( errors[i] )
+ continue ;
+
+ errors[i] = (funcs[i])( library, stream, base_name,
+ &(new_names[i]), &(offsets[i]) );
+ }
+
+ return;
+ }
+
+
+ static FT_Error
+ raccess_guess_apple_double( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset )
+ {
+ FT_Int32 magic = ( 0x00 << 24 | 0x05 << 16 | 0x16 << 8 | 0x07 );
+
+
+ *result_file_name = NULL;
+ return raccess_guess_apple_generic( library, stream, base_file_name,
+ magic, result_offset );
+ }
+
+
+ static FT_Error
+ raccess_guess_apple_single( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset )
+ {
+ FT_Int32 magic = (0x00 << 24 | 0x05 << 16 | 0x16 << 8 | 0x00);
+
+
+ *result_file_name = NULL;
+ return raccess_guess_apple_generic( library, stream, base_file_name,
+ magic, result_offset );
+ }
+
+
+ static FT_Error
+ raccess_guess_darwin_ufs_export( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset )
+ {
+ char* newpath;
+ FT_Error error;
+ FT_Memory memory;
+
+ FT_UNUSED( stream );
+
+
+ memory = library->memory;
+ newpath = raccess_make_file_name( memory, base_file_name, "._" );
+ if ( !newpath )
+ return FT_Err_Out_Of_Memory;
+
+ error = raccess_guess_linux_double_from_file_name( library, newpath,
+ result_offset );
+ if ( !error )
+ *result_file_name = newpath;
+ else
+ FT_FREE( newpath );
+
+ return error;
+ }
+
+
+ static FT_Error
+ raccess_guess_darwin_hfsplus( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset )
+ {
+ /*
+ Only meaningful on systems with hfs+ drivers (or Macs).
+ */
+ FT_Error error;
+ char* newpath;
+ FT_Memory memory;
+
+ FT_UNUSED( stream );
+
+
+ memory = library->memory;
+
+ if ( FT_ALLOC( newpath,
+ ft_strlen( base_file_name ) + ft_strlen( "/rsrc" ) + 1 ) )
+ return error;
+
+ ft_strcpy( newpath, base_file_name );
+ ft_strcat( newpath, "/rsrc" );
+ *result_file_name = newpath;
+ *result_offset = 0;
+ return FT_Err_Ok;
+ }
+
+
+ static FT_Error
+ raccess_guess_vfat( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset )
+ {
+ char* newpath;
+ FT_Memory memory;
+
+ FT_UNUSED( stream );
+
+
+ memory = library->memory;
+
+ newpath = raccess_make_file_name( memory, base_file_name,
+ "resource.frk/" );
+ if ( !newpath )
+ return FT_Err_Out_Of_Memory;
+
+ *result_file_name = newpath;
+ *result_offset = 0;
+
+ return FT_Err_Ok;
+ }
+
+
+ static FT_Error
+ raccess_guess_linux_cap( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset )
+ {
+ char* newpath;
+ FT_Memory memory;
+
+ FT_UNUSED( stream );
+
+
+ memory = library->memory;
+
+ newpath = raccess_make_file_name( memory, base_file_name, ".resource/" );
+ if ( !newpath )
+ return FT_Err_Out_Of_Memory;
+
+ *result_file_name = newpath;
+ *result_offset = 0;
+
+ return FT_Err_Ok;
+ }
+
+
+ static FT_Error
+ raccess_guess_linux_double( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset )
+ {
+ char* newpath;
+ FT_Error error;
+ FT_Memory memory;
+
+ FT_UNUSED( stream );
+
+
+ memory = library->memory;
+
+ newpath = raccess_make_file_name( memory, base_file_name, "%" );
+ if ( !newpath )
+ return FT_Err_Out_Of_Memory;
+
+ error = raccess_guess_linux_double_from_file_name( library, newpath,
+ result_offset );
+ if ( !error )
+ *result_file_name = newpath;
+ else
+ FT_FREE( newpath );
+
+ return error;
+ }
+
+
+ static FT_Error
+ raccess_guess_linux_netatalk( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ char **result_file_name,
+ FT_Long *result_offset )
+ {
+ char* newpath;
+ FT_Error error;
+ FT_Memory memory;
+
+ FT_UNUSED( stream );
+
+
+ memory = library->memory;
+
+ newpath = raccess_make_file_name( memory, base_file_name,
+ ".AppleDouble/" );
+ if ( !newpath )
+ return FT_Err_Out_Of_Memory;
+
+ error = raccess_guess_linux_double_from_file_name( library, newpath,
+ result_offset );
+ if ( !error )
+ *result_file_name = newpath;
+ else
+ FT_FREE( newpath );
+
+ return error;
+ }
+
+
+ static FT_Error
+ raccess_guess_apple_generic( FT_Library library,
+ FT_Stream stream,
+ char * base_file_name,
+ FT_Int32 magic,
+ FT_Long *result_offset )
+ {
+ FT_Int32 magic_from_stream;
+ FT_Error error;
+ FT_Int32 version_number;
+ FT_UShort n_of_entries;
+
+ int i;
+ FT_UInt32 entry_id, entry_offset, entry_length;
+
+ const FT_UInt32 resource_fork_entry_id = 0x2;
+
+ FT_UNUSED( library );
+ FT_UNUSED( base_file_name );
+
+
+ if ( FT_READ_LONG ( magic_from_stream ) )
+ return error;
+ if ( magic_from_stream != magic )
+ return FT_Err_Unknown_File_Format;
+
+ if ( FT_READ_LONG( version_number ) )
+ return error;
+
+ /* filler */
+ error = FT_Stream_Skip( stream, 16 );
+ if ( error )
+ return error;
+
+ if ( FT_READ_USHORT( n_of_entries ) )
+ return error;
+ if ( n_of_entries == 0 )
+ return FT_Err_Unknown_File_Format;
+
+ for ( i = 0; i < n_of_entries; i++ )
+ {
+ if ( FT_READ_LONG( entry_id ) )
+ return error;
+ if ( entry_id == resource_fork_entry_id )
+ {
+ if ( FT_READ_LONG( entry_offset ) ||
+ FT_READ_LONG( entry_length ) )
+ continue;
+ *result_offset = entry_offset;
+
+ return FT_Err_Ok;
+ }
+ else
+ FT_Stream_Skip( stream, 4 + 4 ); /* offset + length */
+ }
+
+ return FT_Err_Unknown_File_Format;
+ }
+
+
+ static FT_Error
+ raccess_guess_linux_double_from_file_name( FT_Library library,
+ char * file_name,
+ FT_Long *result_offset )
+ {
+ FT_Memory memory;
+ FT_Open_Args args2;
+ FT_Stream stream2;
+ char * nouse = NULL;
+ FT_Error error;
+
+
+ memory = library->memory;
+
+ args2.flags = FT_OPEN_PATHNAME;
+ args2.pathname = file_name;
+ error = FT_Stream_New( library, &args2, &stream2 );
+ if ( error )
+ return error;
+
+ error = raccess_guess_apple_double( library, stream2, file_name,
+ &nouse, result_offset );
+
+ FT_Stream_Close( stream2 );
+
+ return error;
+ }
+
+
+ static char*
+ raccess_make_file_name( FT_Memory memory,
+ const char *original_name,
+ const char *insertion )
+ {
+ char* new_name;
+ char* tmp;
+ const char* slash;
+ unsigned new_length;
+ FT_ULong error;
+
+ new_length = ft_strlen( original_name ) + ft_strlen( insertion );
+ if ( FT_ALLOC( new_name, new_length + 1 ) )
+ return NULL;
+
+ tmp = ft_strrchr( original_name, '/' );
+ if ( tmp )
+ {
+ ft_strncpy( new_name, original_name, tmp - original_name + 1 );
+ new_name[tmp - original_name + 1] = '\0';
+ slash = tmp + 1;
+ }
+ else
+ {
+ slash = original_name;
+ new_name[0] = '\0';
+ }
+
+ ft_strcat( new_name, insertion );
+ ft_strcat( new_name, slash );
+
+ return new_name;
+ }
+
+
+#else /* !FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */
+
+
+ /*************************************************************************/
+ /* Dummy function; just sets errors */
+ /*************************************************************************/
+
+ FT_BASE_DEF( void )
+ FT_Raccess_Guess( FT_Library library,
+ FT_Stream stream,
+ char* base_name,
+ char **new_names,
+ FT_Long *offsets,
+ FT_Error *errors )
+ {
+ int i;
+
+
+ for ( i = 0; i < FT_RACCESS_N_RULES; i++ )
+ {
+ new_names[i] = NULL;
+ offsets[i] = 0;
+ errors[i] = FT_Err_Unimplemented_Feature;
+ }
+ }
+
+
+#endif /* !FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */
+
+
+/* END */
diff --git a/extras/freetype2/src/base/ftstream.c b/extras/freetype2/src/base/ftstream.c
index 60e785681..7ff1e9053 100644
--- a/extras/freetype2/src/base/ftstream.c
+++ b/extras/freetype2/src/base/ftstream.c
@@ -4,7 +4,7 @@
/* */
/* I/O stream support (body). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -770,15 +770,15 @@
p = (FT_Byte*)structure + fields->offset;
switch ( fields->size )
{
- case 1:
+ case (8 / FT_CHAR_BIT):
*(FT_Byte*)p = (FT_Byte)value;
break;
- case 2:
+ case (16 / FT_CHAR_BIT):
*(FT_UShort*)p = (FT_UShort)value;
break;
- case 4:
+ case (32 / FT_CHAR_BIT):
*(FT_UInt32*)p = (FT_UInt32)value;
break;
diff --git a/extras/freetype2/src/base/ftstroke.c b/extras/freetype2/src/base/ftstroke.c
new file mode 100644
index 000000000..10aad2db8
--- /dev/null
+++ b/extras/freetype2/src/base/ftstroke.c
@@ -0,0 +1,1906 @@
+/***************************************************************************/
+/* */
+/* ftstroke.c */
+/* */
+/* FreeType path stroker (body). */
+/* */
+/* Copyright 2002, 2003, 2004 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#include <ft2build.h>
+#include FT_STROKER_H
+#include FT_TRIGONOMETRY_H
+#include FT_OUTLINE_H
+#include FT_INTERNAL_MEMORY_H
+#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_OBJECTS_H
+
+ FT_EXPORT_DEF( FT_StrokerBorder )
+ FT_Outline_GetInsideBorder( FT_Outline* outline )
+ {
+ FT_Orientation o = FT_Outline_Get_Orientation( outline );
+
+
+ return o == FT_ORIENTATION_TRUETYPE ? FT_STROKER_BORDER_RIGHT
+ : FT_STROKER_BORDER_LEFT ;
+ }
+
+
+ FT_EXPORT_DEF( FT_StrokerBorder )
+ FT_Outline_GetOutsideBorder( FT_Outline* outline )
+ {
+ FT_Orientation o = FT_Outline_Get_Orientation( outline );
+
+
+ return o == FT_ORIENTATION_TRUETYPE ? FT_STROKER_BORDER_LEFT
+ : FT_STROKER_BORDER_RIGHT ;
+ }
+
+
+ /***************************************************************************/
+ /***************************************************************************/
+ /***** *****/
+ /***** BEZIER COMPUTATIONS *****/
+ /***** *****/
+ /***************************************************************************/
+ /***************************************************************************/
+
+#define FT_SMALL_CONIC_THRESHOLD ( FT_ANGLE_PI / 6 )
+#define FT_SMALL_CUBIC_THRESHOLD ( FT_ANGLE_PI / 6 )
+#define FT_EPSILON 2
+
+#define FT_IS_SMALL( x ) ( (x) > -FT_EPSILON && (x) < FT_EPSILON )
+
+
+ static FT_Pos
+ ft_pos_abs( FT_Pos x )
+ {
+ return x >= 0 ? x : -x ;
+ }
+
+
+ static void
+ ft_conic_split( FT_Vector* base )
+ {
+ FT_Pos a, b;
+
+
+ base[4].x = base[2].x;
+ b = base[1].x;
+ a = base[3].x = ( base[2].x + b ) / 2;
+ b = base[1].x = ( base[0].x + b ) / 2;
+ base[2].x = ( a + b ) / 2;
+
+ base[4].y = base[2].y;
+ b = base[1].y;
+ a = base[3].y = ( base[2].y + b ) / 2;
+ b = base[1].y = ( base[0].y + b ) / 2;
+ base[2].y = ( a + b ) / 2;
+ }
+
+
+ static FT_Bool
+ ft_conic_is_small_enough( FT_Vector* base,
+ FT_Angle *angle_in,
+ FT_Angle *angle_out )
+ {
+ FT_Vector d1, d2;
+ FT_Angle theta;
+ FT_Int close1, close2;
+
+
+ d1.x = base[1].x - base[2].x;
+ d1.y = base[1].y - base[2].y;
+ d2.x = base[0].x - base[1].x;
+ d2.y = base[0].y - base[1].y;
+
+ close1 = FT_IS_SMALL( d1.x ) && FT_IS_SMALL( d1.y );
+ close2 = FT_IS_SMALL( d2.x ) && FT_IS_SMALL( d2.y );
+
+ if ( close1 )
+ {
+ if ( close2 )
+ *angle_in = *angle_out = 0;
+ else
+ *angle_in = *angle_out = FT_Atan2( d2.x, d2.y );
+ }
+ else if ( close2 )
+ {
+ *angle_in = *angle_out = FT_Atan2( d1.x, d1.y );
+ }
+ else
+ {
+ *angle_in = FT_Atan2( d1.x, d1.y );
+ *angle_out = FT_Atan2( d2.x, d2.y );
+ }
+
+ theta = ft_pos_abs( FT_Angle_Diff( *angle_in, *angle_out ) );
+
+ return FT_BOOL( theta < FT_SMALL_CONIC_THRESHOLD );
+ }
+
+
+ static void
+ ft_cubic_split( FT_Vector* base )
+ {
+ FT_Pos a, b, c, d;
+
+
+ base[6].x = base[3].x;
+ c = base[1].x;
+ d = base[2].x;
+ base[1].x = a = ( base[0].x + c ) / 2;
+ base[5].x = b = ( base[3].x + d ) / 2;
+ c = ( c + d ) / 2;
+ base[2].x = a = ( a + c ) / 2;
+ base[4].x = b = ( b + c ) / 2;
+ base[3].x = ( a + b ) / 2;
+
+ base[6].y = base[3].y;
+ c = base[1].y;
+ d = base[2].y;
+ base[1].y = a = ( base[0].y + c ) / 2;
+ base[5].y = b = ( base[3].y + d ) / 2;
+ c = ( c + d ) / 2;
+ base[2].y = a = ( a + c ) / 2;
+ base[4].y = b = ( b + c ) / 2;
+ base[3].y = ( a + b ) / 2;
+ }
+
+
+ static FT_Bool
+ ft_cubic_is_small_enough( FT_Vector* base,
+ FT_Angle *angle_in,
+ FT_Angle *angle_mid,
+ FT_Angle *angle_out )
+ {
+ FT_Vector d1, d2, d3;
+ FT_Angle theta1, theta2;
+ FT_Int close1, close2, close3;
+
+
+ d1.x = base[2].x - base[3].x;
+ d1.y = base[2].y - base[3].y;
+ d2.x = base[1].x - base[2].x;
+ d2.y = base[1].y - base[2].y;
+ d3.x = base[0].x - base[1].x;
+ d3.y = base[0].y - base[1].y;
+
+ close1 = FT_IS_SMALL( d1.x ) && FT_IS_SMALL( d1.y );
+ close2 = FT_IS_SMALL( d2.x ) && FT_IS_SMALL( d2.y );
+ close3 = FT_IS_SMALL( d3.x ) && FT_IS_SMALL( d3.y );
+
+ if ( close1 || close3 )
+ {
+ if ( close2 )
+ {
+ /* basically a point */
+ *angle_in = *angle_out = *angle_mid = 0;
+ }
+ else if ( close1 )
+ {
+ *angle_in = *angle_mid = FT_Atan2( d2.x, d2.y );
+ *angle_out = FT_Atan2( d3.x, d3.y );
+ }
+ else /* close2 */
+ {
+ *angle_in = FT_Atan2( d1.x, d1.y );
+ *angle_mid = *angle_out = FT_Atan2( d2.x, d2.y );
+ }
+ }
+ else if ( close2 )
+ {
+ *angle_in = *angle_mid = FT_Atan2( d1.x, d1.y );
+ *angle_out = FT_Atan2( d3.x, d3.y );
+ }
+ else
+ {
+ *angle_in = FT_Atan2( d1.x, d1.y );
+ *angle_mid = FT_Atan2( d2.x, d2.y );
+ *angle_out = FT_Atan2( d3.x, d3.y );
+ }
+
+ theta1 = ft_pos_abs( FT_Angle_Diff( *angle_in, *angle_mid ) );
+ theta2 = ft_pos_abs( FT_Angle_Diff( *angle_mid, *angle_out ) );
+
+ return FT_BOOL( theta1 < FT_SMALL_CUBIC_THRESHOLD &&
+ theta2 < FT_SMALL_CUBIC_THRESHOLD );
+ }
+
+
+ /***************************************************************************/
+ /***************************************************************************/
+ /***** *****/
+ /***** STROKE BORDERS *****/
+ /***** *****/
+ /***************************************************************************/
+ /***************************************************************************/
+
+ typedef enum
+ {
+ FT_STROKE_TAG_ON = 1, /* on-curve point */
+ FT_STROKE_TAG_CUBIC = 2, /* cubic off-point */
+ FT_STROKE_TAG_BEGIN = 4, /* sub-path start */
+ FT_STROKE_TAG_END = 8 /* sub-path end */
+
+ } FT_StrokeTags;
+
+
+ typedef struct FT_StrokeBorderRec_
+ {
+ FT_UInt num_points;
+ FT_UInt max_points;
+ FT_Vector* points;
+ FT_Byte* tags;
+ FT_Bool movable;
+ FT_Int start; /* index of current sub-path start point */
+ FT_Memory memory;
+ FT_Bool valid;
+
+ } FT_StrokeBorderRec, *FT_StrokeBorder;
+
+
+ static FT_Error
+ ft_stroke_border_grow( FT_StrokeBorder border,
+ FT_UInt new_points )
+ {
+ FT_UInt old_max = border->max_points;
+ FT_UInt new_max = border->num_points + new_points;
+ FT_Error error = 0;
+
+
+ if ( new_max > old_max )
+ {
+ FT_UInt cur_max = old_max;
+ FT_Memory memory = border->memory;
+
+
+ while ( cur_max < new_max )
+ cur_max += ( cur_max >> 1 ) + 16;
+
+ if ( FT_RENEW_ARRAY( border->points, old_max, cur_max ) ||
+ FT_RENEW_ARRAY( border->tags, old_max, cur_max ) )
+ goto Exit;
+
+ border->max_points = cur_max;
+ }
+ Exit:
+ return error;
+ }
+
+
+ static void
+ ft_stroke_border_close( FT_StrokeBorder border )
+ {
+ FT_ASSERT( border->start >= 0 );
+
+ /* don't record empty paths! */
+ if ( border->num_points > (FT_UInt)border->start )
+ {
+ border->tags[border->start ] |= FT_STROKE_TAG_BEGIN;
+ border->tags[border->num_points - 1] |= FT_STROKE_TAG_END;
+ }
+
+ border->start = -1;
+ border->movable = 0;
+ }
+
+
+ static FT_Error
+ ft_stroke_border_lineto( FT_StrokeBorder border,
+ FT_Vector* to,
+ FT_Bool movable )
+ {
+ FT_Error error = 0;
+
+
+ FT_ASSERT( border->start >= 0 );
+
+ if ( border->movable )
+ {
+ /* move last point */
+ border->points[border->num_points - 1] = *to;
+ }
+ else
+ {
+ /* add one point */
+ error = ft_stroke_border_grow( border, 1 );
+ if ( !error )
+ {
+ FT_Vector* vec = border->points + border->num_points;
+ FT_Byte* tag = border->tags + border->num_points;
+
+
+ vec[0] = *to;
+ tag[0] = FT_STROKE_TAG_ON;
+
+ border->num_points += 1;
+ }
+ }
+ border->movable = movable;
+ return error;
+ }
+
+
+ static FT_Error
+ ft_stroke_border_conicto( FT_StrokeBorder border,
+ FT_Vector* control,
+ FT_Vector* to )
+ {
+ FT_Error error;
+
+
+ FT_ASSERT( border->start >= 0 );
+
+ error = ft_stroke_border_grow( border, 2 );
+ if ( !error )
+ {
+ FT_Vector* vec = border->points + border->num_points;
+ FT_Byte* tag = border->tags + border->num_points;
+
+ vec[0] = *control;
+ vec[1] = *to;
+
+ tag[0] = 0;
+ tag[1] = FT_STROKE_TAG_ON;
+
+ border->num_points += 2;
+ }
+ border->movable = 0;
+ return error;
+ }
+
+
+ static FT_Error
+ ft_stroke_border_cubicto( FT_StrokeBorder border,
+ FT_Vector* control1,
+ FT_Vector* control2,
+ FT_Vector* to )
+ {
+ FT_Error error;
+
+
+ FT_ASSERT( border->start >= 0 );
+
+ error = ft_stroke_border_grow( border, 3 );
+ if ( !error )
+ {
+ FT_Vector* vec = border->points + border->num_points;
+ FT_Byte* tag = border->tags + border->num_points;
+
+
+ vec[0] = *control1;
+ vec[1] = *control2;
+ vec[2] = *to;
+
+ tag[0] = FT_STROKE_TAG_CUBIC;
+ tag[1] = FT_STROKE_TAG_CUBIC;
+ tag[2] = FT_STROKE_TAG_ON;
+
+ border->num_points += 3;
+ }
+ border->movable = 0;
+ return error;
+ }
+
+
+#define FT_ARC_CUBIC_ANGLE ( FT_ANGLE_PI / 2 )
+
+
+ static FT_Error
+ ft_stroke_border_arcto( FT_StrokeBorder border,
+ FT_Vector* center,
+ FT_Fixed radius,
+ FT_Angle angle_start,
+ FT_Angle angle_diff )
+ {
+ FT_Angle total, angle, step, rotate, next, theta;
+ FT_Vector a, b, a2, b2;
+ FT_Fixed length;
+ FT_Error error = 0;
+
+
+ /* compute start point */
+ FT_Vector_From_Polar( &a, radius, angle_start );
+ a.x += center->x;
+ a.y += center->y;
+
+ total = angle_diff;
+ angle = angle_start;
+ rotate = ( angle_diff >= 0 ) ? FT_ANGLE_PI2 : -FT_ANGLE_PI2;
+
+ while ( total != 0 )
+ {
+ step = total;
+ if ( step > FT_ARC_CUBIC_ANGLE )
+ step = FT_ARC_CUBIC_ANGLE;
+
+ else if ( step < -FT_ARC_CUBIC_ANGLE )
+ step = -FT_ARC_CUBIC_ANGLE;
+
+ next = angle + step;
+ theta = step;
+ if ( theta < 0 )
+ theta = -theta;
+
+ theta >>= 1;
+
+ /* compute end point */
+ FT_Vector_From_Polar( &b, radius, next );
+ b.x += center->x;
+ b.y += center->y;
+
+ /* compute first and second control points */
+ length = FT_MulDiv( radius, FT_Sin( theta ) * 4,
+ ( 0x10000L + FT_Cos( theta ) ) * 3 );
+
+ FT_Vector_From_Polar( &a2, length, angle + rotate );
+ a2.x += a.x;
+ a2.y += a.y;
+
+ FT_Vector_From_Polar( &b2, length, next - rotate );
+ b2.x += b.x;
+ b2.y += b.y;
+
+ /* add cubic arc */
+ error = ft_stroke_border_cubicto( border, &a2, &b2, &b );
+ if ( error )
+ break;
+
+ /* process the rest of the arc ?? */
+ a = b;
+ total -= step;
+ angle = next;
+ }
+
+ return error;
+ }
+
+
+ static FT_Error
+ ft_stroke_border_moveto( FT_StrokeBorder border,
+ FT_Vector* to )
+ {
+ /* close current open path if any ? */
+ if ( border->start >= 0 )
+ ft_stroke_border_close( border );
+
+ border->start = border->num_points;
+ border->movable = 0;
+
+ return ft_stroke_border_lineto( border, to, 0 );
+ }
+
+
+ static void
+ ft_stroke_border_init( FT_StrokeBorder border,
+ FT_Memory memory )
+ {
+ border->memory = memory;
+ border->points = NULL;
+ border->tags = NULL;
+
+ border->num_points = 0;
+ border->max_points = 0;
+ border->start = -1;
+ border->valid = 0;
+ }
+
+
+ static void
+ ft_stroke_border_reset( FT_StrokeBorder border )
+ {
+ border->num_points = 0;
+ border->start = -1;
+ border->valid = 0;
+ }
+
+
+ static void
+ ft_stroke_border_done( FT_StrokeBorder border )
+ {
+ FT_Memory memory = border->memory;
+
+
+ FT_FREE( border->points );
+ FT_FREE( border->tags );
+
+ border->num_points = 0;
+ border->max_points = 0;
+ border->start = -1;
+ border->valid = 0;
+ }
+
+
+ static FT_Error
+ ft_stroke_border_get_counts( FT_StrokeBorder border,
+ FT_UInt *anum_points,
+ FT_UInt *anum_contours )
+ {
+ FT_Error error = 0;
+ FT_UInt num_points = 0;
+ FT_UInt num_contours = 0;
+
+ FT_UInt count = border->num_points;
+ FT_Vector* point = border->points;
+ FT_Byte* tags = border->tags;
+ FT_Int in_contour = 0;
+
+
+ for ( ; count > 0; count--, num_points++, point++, tags++ )
+ {
+ if ( tags[0] & FT_STROKE_TAG_BEGIN )
+ {
+ if ( in_contour != 0 )
+ goto Fail;
+
+ in_contour = 1;
+ }
+ else if ( in_contour == 0 )
+ goto Fail;
+
+ if ( tags[0] & FT_STROKE_TAG_END )
+ {
+ if ( in_contour == 0 )
+ goto Fail;
+
+ in_contour = 0;
+ num_contours++;
+ }
+ }
+
+ if ( in_contour != 0 )
+ goto Fail;
+
+ border->valid = 1;
+
+ Exit:
+ *anum_points = num_points;
+ *anum_contours = num_contours;
+ return error;
+
+ Fail:
+ num_points = 0;
+ num_contours = 0;
+ goto Exit;
+ }
+
+
+ static void
+ ft_stroke_border_export( FT_StrokeBorder border,
+ FT_Outline* outline )
+ {
+ /* copy point locations */
+ FT_ARRAY_COPY( outline->points + outline->n_points,
+ border->points,
+ border->num_points );
+
+ /* copy tags */
+ {
+ FT_UInt count = border->num_points;
+ FT_Byte* read = border->tags;
+ FT_Byte* write = (FT_Byte*)outline->tags + outline->n_points;
+
+
+ for ( ; count > 0; count--, read++, write++ )
+ {
+ if ( *read & FT_STROKE_TAG_ON )
+ *write = FT_CURVE_TAG_ON;
+ else if ( *read & FT_STROKE_TAG_CUBIC )
+ *write = FT_CURVE_TAG_CUBIC;
+ else
+ *write = FT_CURVE_TAG_CONIC;
+ }
+ }
+
+ /* copy contours */
+ {
+ FT_UInt count = border->num_points;
+ FT_Byte* tags = border->tags;
+ FT_Short* write = outline->contours + outline->n_contours;
+ FT_Short idx = (FT_Short)outline->n_points;
+
+
+ for ( ; count > 0; count--, tags++, idx++ )
+ {
+ if ( *tags & FT_STROKE_TAG_END )
+ {
+ *write++ = idx;
+ outline->n_contours++;
+ }
+ }
+ }
+
+ outline->n_points = (short)( outline->n_points + border->num_points );
+
+ FT_ASSERT( FT_Outline_Check( outline ) == 0 );
+ }
+
+
+ /***************************************************************************/
+ /***************************************************************************/
+ /***** *****/
+ /***** STROKER *****/
+ /***** *****/
+ /***************************************************************************/
+ /***************************************************************************/
+
+#define FT_SIDE_TO_ROTATE( s ) ( FT_ANGLE_PI2 - (s) * FT_ANGLE_PI )
+
+ typedef struct FT_StrokerRec_
+ {
+ FT_Angle angle_in;
+ FT_Angle angle_out;
+ FT_Vector center;
+ FT_Bool first_point;
+ FT_Bool subpath_open;
+ FT_Angle subpath_angle;
+ FT_Vector subpath_start;
+
+ FT_Stroker_LineCap line_cap;
+ FT_Stroker_LineJoin line_join;
+ FT_Fixed miter_limit;
+ FT_Fixed radius;
+
+ FT_Bool valid;
+ FT_StrokeBorderRec borders[2];
+ FT_Memory memory;
+
+ } FT_StrokerRec;
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Stroker_New( FT_Memory memory,
+ FT_Stroker *astroker )
+ {
+ FT_Error error;
+ FT_Stroker stroker;
+
+
+ if ( !FT_NEW( stroker ) )
+ {
+ stroker->memory = memory;
+
+ ft_stroke_border_init( &stroker->borders[0], memory );
+ ft_stroke_border_init( &stroker->borders[1], memory );
+ }
+ *astroker = stroker;
+ return error;
+ }
+
+
+ FT_EXPORT_DEF( void )
+ FT_Stroker_Set( FT_Stroker stroker,
+ FT_Fixed radius,
+ FT_Stroker_LineCap line_cap,
+ FT_Stroker_LineJoin line_join,
+ FT_Fixed miter_limit )
+ {
+ stroker->radius = radius;
+ stroker->line_cap = line_cap;
+ stroker->line_join = line_join;
+ stroker->miter_limit = miter_limit;
+
+ FT_Stroker_Rewind( stroker );
+ }
+
+
+ FT_EXPORT_DEF( void )
+ FT_Stroker_Rewind( FT_Stroker stroker )
+ {
+ if ( stroker )
+ {
+ ft_stroke_border_reset( &stroker->borders[0] );
+ ft_stroke_border_reset( &stroker->borders[1] );
+ }
+ }
+
+
+ FT_EXPORT_DEF( void )
+ FT_Stroker_Done( FT_Stroker stroker )
+ {
+ if ( stroker )
+ {
+ FT_Memory memory = stroker->memory;
+
+
+ ft_stroke_border_done( &stroker->borders[0] );
+ ft_stroke_border_done( &stroker->borders[1] );
+
+ stroker->memory = NULL;
+ FT_FREE( stroker );
+ }
+ }
+
+
+ /* creates a circular arc at a corner or cap */
+ static FT_Error
+ ft_stroker_arcto( FT_Stroker stroker,
+ FT_Int side )
+ {
+ FT_Angle total, rotate;
+ FT_Fixed radius = stroker->radius;
+ FT_Error error = 0;
+ FT_StrokeBorder border = stroker->borders + side;
+
+
+ rotate = FT_SIDE_TO_ROTATE( side );
+
+ total = FT_Angle_Diff( stroker->angle_in, stroker->angle_out );
+ if ( total == FT_ANGLE_PI )
+ total = -rotate * 2;
+
+ error = ft_stroke_border_arcto( border,
+ &stroker->center,
+ radius,
+ stroker->angle_in + rotate,
+ total );
+ border->movable = 0;
+ return error;
+ }
+
+
+ /* adds a cap at the end of an opened path */
+ static FT_Error
+ ft_stroker_cap( FT_Stroker stroker,
+ FT_Angle angle,
+ FT_Int side )
+ {
+ FT_Error error = 0;
+
+
+ if ( stroker->line_cap == FT_STROKER_LINECAP_ROUND )
+ {
+ /* add a round cap */
+ stroker->angle_in = angle;
+ stroker->angle_out = angle + FT_ANGLE_PI;
+ error = ft_stroker_arcto( stroker, side );
+ }
+ else if ( stroker->line_cap == FT_STROKER_LINECAP_SQUARE )
+ {
+ /* add a square cap */
+ FT_Vector delta, delta2;
+ FT_Angle rotate = FT_SIDE_TO_ROTATE( side );
+ FT_Fixed radius = stroker->radius;
+ FT_StrokeBorder border = stroker->borders + side;
+
+
+ FT_Vector_From_Polar( &delta2, radius, angle + rotate );
+ FT_Vector_From_Polar( &delta, radius, angle );
+
+ delta.x += stroker->center.x + delta2.x;
+ delta.y += stroker->center.y + delta2.y;
+
+ error = ft_stroke_border_lineto( border, &delta, 0 );
+ if ( error )
+ goto Exit;
+
+ FT_Vector_From_Polar( &delta2, radius, angle - rotate );
+ FT_Vector_From_Polar( &delta, radius, angle );
+
+ delta.x += delta2.x + stroker->center.x;
+ delta.y += delta2.y + stroker->center.y;
+
+ error = ft_stroke_border_lineto( border, &delta, 0 );
+ }
+
+ Exit:
+ return error;
+ }
+
+
+ /* process an inside corner, i.e. compute intersection */
+ static FT_Error
+ ft_stroker_inside( FT_Stroker stroker,
+ FT_Int side)
+ {
+ FT_StrokeBorder border = stroker->borders + side;
+ FT_Angle phi, theta, rotate;
+ FT_Fixed length, thcos, sigma;
+ FT_Vector delta;
+ FT_Error error = 0;
+
+
+ rotate = FT_SIDE_TO_ROTATE( side );
+
+ /* compute median angle */
+ theta = FT_Angle_Diff( stroker->angle_in, stroker->angle_out );
+ if ( theta == FT_ANGLE_PI )
+ theta = rotate;
+ else
+ theta = theta / 2;
+
+ phi = stroker->angle_in + theta;
+
+ thcos = FT_Cos( theta );
+ sigma = FT_MulFix( stroker->miter_limit, thcos );
+
+ if ( sigma < 0x10000L )
+ {
+ FT_Vector_From_Polar( &delta, stroker->radius,
+ stroker->angle_out + rotate );
+ delta.x += stroker->center.x;
+ delta.y += stroker->center.y;
+ border->movable = 0;
+ }
+ else
+ {
+ length = FT_DivFix( stroker->radius, thcos );
+
+ FT_Vector_From_Polar( &delta, length, phi + rotate );
+ delta.x += stroker->center.x;
+ delta.y += stroker->center.y;
+ }
+
+ error = ft_stroke_border_lineto( border, &delta, 0 );
+
+ return error;
+ }
+
+
+ /* process an outside corner, i.e. compute bevel/miter/round */
+ static FT_Error
+ ft_stroker_outside( FT_Stroker stroker,
+ FT_Int side )
+ {
+ FT_StrokeBorder border = stroker->borders + side;
+ FT_Error error;
+ FT_Angle rotate;
+
+
+ if ( stroker->line_join == FT_STROKER_LINEJOIN_ROUND )
+ {
+ error = ft_stroker_arcto( stroker, side );
+ }
+ else
+ {
+ /* this is a mitered or beveled corner */
+ FT_Fixed sigma, radius = stroker->radius;
+ FT_Angle theta, phi;
+ FT_Fixed thcos;
+ FT_Bool miter;
+
+
+ rotate = FT_SIDE_TO_ROTATE( side );
+ miter = FT_BOOL( stroker->line_join == FT_STROKER_LINEJOIN_MITER );
+
+ theta = FT_Angle_Diff( stroker->angle_in, stroker->angle_out );
+ if ( theta == FT_ANGLE_PI )
+ {
+ theta = rotate;
+ phi = stroker->angle_in;
+ }
+ else
+ {
+ theta = theta / 2;
+ phi = stroker->angle_in + theta + rotate;
+ }
+
+ thcos = FT_Cos( theta );
+ sigma = FT_MulFix( stroker->miter_limit, thcos );
+
+ if ( sigma >= 0x10000L )
+ miter = 0;
+
+ if ( miter ) /* this is a miter (broken angle) */
+ {
+ FT_Vector middle, delta;
+ FT_Fixed length;
+
+
+ /* compute middle point */
+ FT_Vector_From_Polar( &middle,
+ FT_MulFix( radius, stroker->miter_limit ),
+ phi );
+ middle.x += stroker->center.x;
+ middle.y += stroker->center.y;
+
+ /* compute first angle point */
+ length = FT_MulFix( radius,
+ FT_DivFix( 0x10000L - sigma,
+ ft_pos_abs( FT_Sin( theta ) ) ) );
+
+ FT_Vector_From_Polar( &delta, length, phi + rotate );
+ delta.x += middle.x;
+ delta.y += middle.y;
+
+ error = ft_stroke_border_lineto( border, &delta, 0 );
+ if ( error )
+ goto Exit;
+
+ /* compute second angle point */
+ FT_Vector_From_Polar( &delta, length, phi - rotate );
+ delta.x += middle.x;
+ delta.y += middle.y;
+
+ error = ft_stroke_border_lineto( border, &delta, 0 );
+ if ( error )
+ goto Exit;
+
+ /* finally, add a movable end point */
+ FT_Vector_From_Polar( &delta, radius, stroker->angle_out + rotate );
+ delta.x += stroker->center.x;
+ delta.y += stroker->center.y;
+
+ error = ft_stroke_border_lineto( border, &delta, 1 );
+ }
+
+ else /* this is a bevel (intersection) */
+ {
+ FT_Fixed length;
+ FT_Vector delta;
+
+
+ length = FT_DivFix( stroker->radius, thcos );
+
+ FT_Vector_From_Polar( &delta, length, phi );
+ delta.x += stroker->center.x;
+ delta.y += stroker->center.y;
+
+ error = ft_stroke_border_lineto( border, &delta, 0 );
+ if (error) goto Exit;
+
+ /* now add end point */
+ FT_Vector_From_Polar( &delta, stroker->radius,
+ stroker->angle_out + rotate );
+ delta.x += stroker->center.x;
+ delta.y += stroker->center.y;
+
+ error = ft_stroke_border_lineto( border, &delta, 1 );
+ }
+ }
+
+ Exit:
+ return error;
+ }
+
+
+ static FT_Error
+ ft_stroker_process_corner( FT_Stroker stroker )
+ {
+ FT_Error error = 0;
+ FT_Angle turn;
+ FT_Int inside_side;
+
+
+ turn = FT_Angle_Diff( stroker->angle_in, stroker->angle_out );
+
+ /* no specific corner processing is required if the turn is 0 */
+ if ( turn == 0 )
+ goto Exit;
+
+ /* when we turn to the right, the inside side is 0 */
+ inside_side = 0;
+
+ /* otherwise, the inside side is 1 */
+ if ( turn < 0 )
+ inside_side = 1;
+
+ /* process the inside side */
+ error = ft_stroker_inside( stroker, inside_side );
+ if ( error )
+ goto Exit;
+
+ /* process the outside side */
+ error = ft_stroker_outside( stroker, 1 - inside_side );
+
+ Exit:
+ return error;
+ }
+
+
+ /* add two points to the left and right borders corresponding to the */
+ /* start of the subpath.. */
+ static FT_Error
+ ft_stroker_subpath_start( FT_Stroker stroker,
+ FT_Angle start_angle )
+ {
+ FT_Vector delta;
+ FT_Vector point;
+ FT_Error error;
+ FT_StrokeBorder border;
+
+
+ FT_Vector_From_Polar( &delta, stroker->radius,
+ start_angle + FT_ANGLE_PI2 );
+
+ point.x = stroker->center.x + delta.x;
+ point.y = stroker->center.y + delta.y;
+
+ border = stroker->borders;
+ error = ft_stroke_border_moveto( border, &point );
+ if ( error )
+ goto Exit;
+
+ point.x = stroker->center.x - delta.x;
+ point.y = stroker->center.y - delta.y;
+
+ border++;
+ error = ft_stroke_border_moveto( border, &point );
+
+ /* save angle for last cap */
+ stroker->subpath_angle = start_angle;
+ stroker->first_point = 0;
+
+ Exit:
+ return error;
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Stroker_LineTo( FT_Stroker stroker,
+ FT_Vector* to )
+ {
+ FT_Error error = 0;
+ FT_StrokeBorder border;
+ FT_Vector delta;
+ FT_Angle angle;
+ FT_Int side;
+
+ delta.x = to->x - stroker->center.x;
+ delta.y = to->y - stroker->center.y;
+
+ angle = FT_Atan2( delta.x, delta.y );
+ FT_Vector_From_Polar( &delta, stroker->radius, angle + FT_ANGLE_PI2 );
+
+ /* process corner if necessary */
+ if ( stroker->first_point )
+ {
+ /* This is the first segment of a subpath. We need to */
+ /* add a point to each border at their respective starting */
+ /* point locations. */
+ error = ft_stroker_subpath_start( stroker, angle );
+ if ( error )
+ goto Exit;
+ }
+ else
+ {
+ /* process the current corner */
+ stroker->angle_out = angle;
+ error = ft_stroker_process_corner( stroker );
+ if ( error )
+ goto Exit;
+ }
+
+ /* now add a line segment to both the "inside" and "outside" paths */
+
+ for ( border = stroker->borders, side = 1; side >= 0; side--, border++ )
+ {
+ FT_Vector point;
+
+
+ point.x = to->x + delta.x;
+ point.y = to->y + delta.y;
+
+ error = ft_stroke_border_lineto( border, &point, 1 );
+ if ( error )
+ goto Exit;
+
+ delta.x = -delta.x;
+ delta.y = -delta.y;
+ }
+
+ stroker->angle_in = angle;
+ stroker->center = *to;
+
+ Exit:
+ return error;
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Stroker_ConicTo( FT_Stroker stroker,
+ FT_Vector* control,
+ FT_Vector* to )
+ {
+ FT_Error error = 0;
+ FT_Vector bez_stack[34];
+ FT_Vector* arc;
+ FT_Vector* limit = bez_stack + 30;
+ FT_Angle start_angle;
+ FT_Bool first_arc = 1;
+
+
+ arc = bez_stack;
+ arc[0] = *to;
+ arc[1] = *control;
+ arc[2] = stroker->center;
+
+ while ( arc >= bez_stack )
+ {
+ FT_Angle angle_in, angle_out;
+
+
+ angle_in = angle_out = 0; /* remove compiler warnings */
+
+ if ( arc < limit &&
+ !ft_conic_is_small_enough( arc, &angle_in, &angle_out ) )
+ {
+ ft_conic_split( arc );
+ arc += 2;
+ continue;
+ }
+
+ if ( first_arc )
+ {
+ first_arc = 0;
+
+ start_angle = angle_in;
+
+ /* process corner if necessary */
+ if ( stroker->first_point )
+ error = ft_stroker_subpath_start( stroker, start_angle );
+ else
+ {
+ stroker->angle_out = start_angle;
+ error = ft_stroker_process_corner( stroker );
+ }
+ }
+
+ /* the arc's angle is small enough; we can add it directly to each */
+ /* border */
+ {
+ FT_Vector ctrl, end;
+ FT_Angle theta, phi, rotate;
+ FT_Fixed length;
+ FT_Int side;
+
+
+ theta = FT_Angle_Diff( angle_in, angle_out ) / 2;
+ phi = angle_in + theta;
+ length = FT_DivFix( stroker->radius, FT_Cos( theta ) );
+
+ for ( side = 0; side <= 1; side++ )
+ {
+ rotate = FT_SIDE_TO_ROTATE( side );
+
+ /* compute control point */
+ FT_Vector_From_Polar( &ctrl, length, phi + rotate );
+ ctrl.x += arc[1].x;
+ ctrl.y += arc[1].y;
+
+ /* compute end point */
+ FT_Vector_From_Polar( &end, stroker->radius, angle_out + rotate );
+ end.x += arc[0].x;
+ end.y += arc[0].y;
+
+ error = ft_stroke_border_conicto( stroker->borders + side,
+ &ctrl, &end );
+ if ( error )
+ goto Exit;
+ }
+ }
+
+ arc -= 2;
+
+ if ( arc < bez_stack )
+ stroker->angle_in = angle_out;
+ }
+
+ stroker->center = *to;
+
+ Exit:
+ return error;
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Stroker_CubicTo( FT_Stroker stroker,
+ FT_Vector* control1,
+ FT_Vector* control2,
+ FT_Vector* to )
+ {
+ FT_Error error = 0;
+ FT_Vector bez_stack[37];
+ FT_Vector* arc;
+ FT_Vector* limit = bez_stack + 32;
+ FT_Angle start_angle;
+ FT_Bool first_arc = 1;
+
+
+ arc = bez_stack;
+ arc[0] = *to;
+ arc[1] = *control2;
+ arc[2] = *control1;
+ arc[3] = stroker->center;
+
+ while ( arc >= bez_stack )
+ {
+ FT_Angle angle_in, angle_mid, angle_out;
+
+
+ /* remove compiler warnings */
+ angle_in = angle_out = angle_mid = 0;
+
+ if ( arc < limit &&
+ !ft_cubic_is_small_enough( arc, &angle_in,
+ &angle_mid, &angle_out ) )
+ {
+ ft_cubic_split( arc );
+ arc += 3;
+ continue;
+ }
+
+ if ( first_arc )
+ {
+ first_arc = 0;
+
+ /* process corner if necessary */
+ start_angle = angle_in;
+
+ if ( stroker->first_point )
+ error = ft_stroker_subpath_start( stroker, start_angle );
+ else
+ {
+ stroker->angle_out = start_angle;
+ error = ft_stroker_process_corner( stroker );
+ }
+ if ( error )
+ goto Exit;
+ }
+
+ /* the arc's angle is small enough; we can add it directly to each */
+ /* border */
+ {
+ FT_Vector ctrl1, ctrl2, end;
+ FT_Angle theta1, phi1, theta2, phi2, rotate;
+ FT_Fixed length1, length2;
+ FT_Int side;
+
+
+ theta1 = ft_pos_abs( angle_mid - angle_in ) / 2;
+ theta2 = ft_pos_abs( angle_out - angle_mid ) / 2;
+ phi1 = (angle_mid + angle_in ) / 2;
+ phi2 = (angle_mid + angle_out ) / 2;
+ length1 = FT_DivFix( stroker->radius, FT_Cos( theta1 ) );
+ length2 = FT_DivFix( stroker->radius, FT_Cos(theta2) );
+
+ for ( side = 0; side <= 1; side++ )
+ {
+ rotate = FT_SIDE_TO_ROTATE( side );
+
+ /* compute control points */
+ FT_Vector_From_Polar( &ctrl1, length1, phi1 + rotate );
+ ctrl1.x += arc[2].x;
+ ctrl1.y += arc[2].y;
+
+ FT_Vector_From_Polar( &ctrl2, length2, phi2 + rotate );
+ ctrl2.x += arc[1].x;
+ ctrl2.y += arc[1].y;
+
+ /* compute end point */
+ FT_Vector_From_Polar( &end, stroker->radius, angle_out + rotate );
+ end.x += arc[0].x;
+ end.y += arc[0].y;
+
+ error = ft_stroke_border_cubicto( stroker->borders + side,
+ &ctrl1, &ctrl2, &end );
+ if ( error )
+ goto Exit;
+ }
+ }
+
+ arc -= 3;
+ if ( arc < bez_stack )
+ stroker->angle_in = angle_out;
+ }
+
+ stroker->center = *to;
+
+ Exit:
+ return error;
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Stroker_BeginSubPath( FT_Stroker stroker,
+ FT_Vector* to,
+ FT_Bool open )
+ {
+ /* We cannot process the first point, because there is not enough */
+ /* information regarding its corner/cap. The latter will be processed */
+ /* in the "end_subpath" routine. */
+ /* */
+ stroker->first_point = 1;
+ stroker->center = *to;
+ stroker->subpath_open = open;
+
+ /* record the subpath start point index for each border */
+ stroker->subpath_start = *to;
+ return 0;
+ }
+
+
+ static FT_Error
+ ft_stroker_add_reverse_left( FT_Stroker stroker,
+ FT_Bool open )
+ {
+ FT_StrokeBorder right = stroker->borders + 0;
+ FT_StrokeBorder left = stroker->borders + 1;
+ FT_Int new_points;
+ FT_Error error = 0;
+
+
+ FT_ASSERT( left->start >= 0 );
+
+ new_points = left->num_points - left->start;
+ if ( new_points > 0 )
+ {
+ error = ft_stroke_border_grow( right, (FT_UInt)new_points );
+ if ( error )
+ goto Exit;
+
+ {
+ FT_Vector* dst_point = right->points + right->num_points;
+ FT_Byte* dst_tag = right->tags + right->num_points;
+ FT_Vector* src_point = left->points + left->num_points - 1;
+ FT_Byte* src_tag = left->tags + left->num_points - 1;
+
+ while ( src_point >= left->points + left->start )
+ {
+ *dst_point = *src_point;
+ *dst_tag = *src_tag;
+
+ if ( open )
+ dst_tag[0] &= ~( FT_STROKE_TAG_BEGIN | FT_STROKE_TAG_END );
+ else
+ {
+ /* switch begin/end tags if necessary.. */
+ if ( dst_tag[0] & ( FT_STROKE_TAG_BEGIN | FT_STROKE_TAG_END ) )
+ dst_tag[0] ^= ( FT_STROKE_TAG_BEGIN | FT_STROKE_TAG_END );
+ }
+
+ src_point--;
+ src_tag--;
+ dst_point++;
+ dst_tag++;
+ }
+ }
+
+ left->num_points = left->start;
+ right->num_points += new_points;
+
+ right->movable = 0;
+ left->movable = 0;
+ }
+
+ Exit:
+ return error;
+ }
+
+
+ /* there's a lot of magic in this function! */
+ FT_EXPORT_DEF( FT_Error )
+ FT_Stroker_EndSubPath( FT_Stroker stroker )
+ {
+ FT_Error error = 0;
+
+ if ( stroker->subpath_open )
+ {
+ FT_StrokeBorder right = stroker->borders;
+
+ /* All right, this is an opened path, we need to add a cap between */
+ /* right & left, add the reverse of left, then add a final cap */
+ /* between left & right. */
+ error = ft_stroker_cap( stroker, stroker->angle_in, 0 );
+ if ( error )
+ goto Exit;
+
+ /* add reversed points from "left" to "right" */
+ error = ft_stroker_add_reverse_left( stroker, 1 );
+ if ( error )
+ goto Exit;
+
+ /* now add the final cap */
+ stroker->center = stroker->subpath_start;
+ error = ft_stroker_cap( stroker,
+ stroker->subpath_angle + FT_ANGLE_PI, 0 );
+ if ( error )
+ goto Exit;
+
+ /* Now end the right subpath accordingly. The left one is */
+ /* rewind and doesn't need further processing. */
+ ft_stroke_border_close( right );
+ }
+ else
+ {
+ FT_Angle turn;
+ FT_Int inside_side;
+
+ /* close the path if needed */
+ if ( stroker->center.x != stroker->subpath_start.x ||
+ stroker->center.y != stroker->subpath_start.y )
+ {
+ error = FT_Stroker_LineTo( stroker, &stroker->subpath_start );
+ if ( error )
+ goto Exit;
+ }
+
+ /* process the corner */
+ stroker->angle_out = stroker->subpath_angle;
+ turn = FT_Angle_Diff( stroker->angle_in,
+ stroker->angle_out );
+
+ /* no specific corner processing is required if the turn is 0 */
+ if ( turn != 0 )
+ {
+ /* when we turn to the right, the inside side is 0 */
+ inside_side = 0;
+
+ /* otherwise, the inside side is 1 */
+ if ( turn < 0 )
+ inside_side = 1;
+
+ /* IMPORTANT: WE DO NOT PROCESS THE INSIDE BORDER HERE! */
+ /* process the inside side */
+ /* error = ft_stroker_inside( stroker, inside_side ); */
+ /* if ( error ) */
+ /* goto Exit; */
+
+ /* process the outside side */
+ error = ft_stroker_outside( stroker, 1 - inside_side );
+ if ( error )
+ goto Exit;
+ }
+
+ /* then end our two subpaths */
+ ft_stroke_border_close( stroker->borders + 0 );
+ ft_stroke_border_close( stroker->borders + 1 );
+ }
+
+ Exit:
+ return error;
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Stroker_GetBorderCounts( FT_Stroker stroker,
+ FT_StrokerBorder border,
+ FT_UInt *anum_points,
+ FT_UInt *anum_contours )
+ {
+ FT_UInt num_points = 0, num_contours = 0;
+ FT_Error error;
+
+
+ if ( !stroker || border > 1 )
+ {
+ error = FT_Err_Invalid_Argument;
+ goto Exit;
+ }
+
+ error = ft_stroke_border_get_counts( stroker->borders + border,
+ &num_points, &num_contours );
+ Exit:
+ if ( anum_points )
+ *anum_points = num_points;
+
+ if ( anum_contours )
+ *anum_contours = num_contours;
+
+ return error;
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Stroker_GetCounts( FT_Stroker stroker,
+ FT_UInt *anum_points,
+ FT_UInt *anum_contours )
+ {
+ FT_UInt count1, count2, num_points = 0;
+ FT_UInt count3, count4, num_contours = 0;
+ FT_Error error;
+
+
+ error = ft_stroke_border_get_counts( stroker->borders + 0,
+ &count1, &count2 );
+ if ( error )
+ goto Exit;
+
+ error = ft_stroke_border_get_counts( stroker->borders + 1,
+ &count3, &count4 );
+ if ( error )
+ goto Exit;
+
+ num_points = count1 + count3;
+ num_contours = count2 + count4;
+
+ Exit:
+ *anum_points = num_points;
+ *anum_contours = num_contours;
+ return error;
+ }
+
+
+ FT_EXPORT_DEF( void )
+ FT_Stroker_ExportBorder( FT_Stroker stroker,
+ FT_StrokerBorder border,
+ FT_Outline* outline )
+ {
+ if ( border == FT_STROKER_BORDER_LEFT ||
+ border == FT_STROKER_BORDER_RIGHT )
+ {
+ FT_StrokeBorder sborder = & stroker->borders[border];
+
+
+ if ( sborder->valid )
+ ft_stroke_border_export( sborder, outline );
+ }
+ }
+
+
+ FT_EXPORT_DEF( void )
+ FT_Stroker_Export( FT_Stroker stroker,
+ FT_Outline* outline )
+ {
+ FT_Stroker_ExportBorder( stroker, FT_STROKER_BORDER_LEFT, outline );
+ FT_Stroker_ExportBorder( stroker, FT_STROKER_BORDER_RIGHT, outline );
+ }
+
+
+ /*
+ * The following is very similar to FT_Outline_Decompose, except
+ * that we do support opened paths, and do not scale the outline.
+ */
+ FT_EXPORT_DEF( FT_Error )
+ FT_Stroker_ParseOutline( FT_Stroker stroker,
+ FT_Outline* outline,
+ FT_Bool opened )
+ {
+ FT_Vector v_last;
+ FT_Vector v_control;
+ FT_Vector v_start;
+
+ FT_Vector* point;
+ FT_Vector* limit;
+ char* tags;
+
+ FT_Error error;
+
+ FT_Int n; /* index of contour in outline */
+ FT_UInt first; /* index of first point in contour */
+ FT_Int tag; /* current point's state */
+
+
+ if ( !outline || !stroker )
+ return FT_Err_Invalid_Argument;
+
+ FT_Stroker_Rewind( stroker );
+
+ first = 0;
+
+ for ( n = 0; n < outline->n_contours; n++ )
+ {
+ FT_Int last; /* index of last point in contour */
+
+
+ last = outline->contours[n];
+ limit = outline->points + last;
+
+ v_start = outline->points[first];
+ v_last = outline->points[last];
+
+ v_control = v_start;
+
+ point = outline->points + first;
+ tags = outline->tags + first;
+ tag = FT_CURVE_TAG( tags[0] );
+
+ /* A contour cannot start with a cubic control point! */
+ if ( tag == FT_CURVE_TAG_CUBIC )
+ goto Invalid_Outline;
+
+ /* check first point to determine origin */
+ if ( tag == FT_CURVE_TAG_CONIC )
+ {
+ /* First point is conic control. Yes, this happens. */
+ if ( FT_CURVE_TAG( outline->tags[last] ) == FT_CURVE_TAG_ON )
+ {
+ /* start at last point if it is on the curve */
+ v_start = v_last;
+ limit--;
+ }
+ else
+ {
+ /* if both first and last points are conic, */
+ /* start at their middle and record its position */
+ /* for closure */
+ v_start.x = ( v_start.x + v_last.x ) / 2;
+ v_start.y = ( v_start.y + v_last.y ) / 2;
+
+ v_last = v_start;
+ }
+ point--;
+ tags--;
+ }
+
+ error = FT_Stroker_BeginSubPath( stroker, &v_start, opened );
+ if ( error )
+ goto Exit;
+
+ while ( point < limit )
+ {
+ point++;
+ tags++;
+
+ tag = FT_CURVE_TAG( tags[0] );
+ switch ( tag )
+ {
+ case FT_CURVE_TAG_ON: /* emit a single line_to */
+ {
+ FT_Vector vec;
+
+
+ vec.x = point->x;
+ vec.y = point->y;
+
+ error = FT_Stroker_LineTo( stroker, &vec );
+ if ( error )
+ goto Exit;
+ continue;
+ }
+
+ case FT_CURVE_TAG_CONIC: /* consume conic arcs */
+ v_control.x = point->x;
+ v_control.y = point->y;
+
+ Do_Conic:
+ if ( point < limit )
+ {
+ FT_Vector vec;
+ FT_Vector v_middle;
+
+
+ point++;
+ tags++;
+ tag = FT_CURVE_TAG( tags[0] );
+
+ vec = point[0];
+
+ if ( tag == FT_CURVE_TAG_ON )
+ {
+ error = FT_Stroker_ConicTo( stroker, &v_control, &vec );
+ if ( error )
+ goto Exit;
+ continue;
+ }
+
+ if ( tag != FT_CURVE_TAG_CONIC )
+ goto Invalid_Outline;
+
+ v_middle.x = ( v_control.x + vec.x ) / 2;
+ v_middle.y = ( v_control.y + vec.y ) / 2;
+
+ error = FT_Stroker_ConicTo( stroker, &v_control, &v_middle );
+ if ( error )
+ goto Exit;
+
+ v_control = vec;
+ goto Do_Conic;
+ }
+
+ error = FT_Stroker_ConicTo( stroker, &v_control, &v_start );
+ goto Close;
+
+ default: /* FT_CURVE_TAG_CUBIC */
+ {
+ FT_Vector vec1, vec2;
+
+
+ if ( point + 1 > limit ||
+ FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )
+ goto Invalid_Outline;
+
+ point += 2;
+ tags += 2;
+
+ vec1 = point[-2];
+ vec2 = point[-1];
+
+ if ( point <= limit )
+ {
+ FT_Vector vec;
+
+
+ vec = point[0];
+
+ error = FT_Stroker_CubicTo( stroker, &vec1, &vec2, &vec );
+ if ( error )
+ goto Exit;
+ continue;
+ }
+
+ error = FT_Stroker_CubicTo( stroker, &vec1, &vec2, &v_start );
+ goto Close;
+ }
+ }
+ }
+
+ Close:
+ if ( error )
+ goto Exit;
+
+ error = FT_Stroker_EndSubPath( stroker );
+ if ( error )
+ goto Exit;
+
+ first = last + 1;
+ }
+
+ return 0;
+
+ Exit:
+ return error;
+
+ Invalid_Outline:
+ return FT_Err_Invalid_Outline;
+ }
+
+
+ extern const FT_Glyph_Class ft_outline_glyph_class;
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Glyph_Stroke( FT_Glyph *pglyph,
+ FT_Stroker stroker,
+ FT_Bool destroy )
+ {
+ FT_Error error = FT_Err_Invalid_Argument;
+ FT_Glyph glyph = NULL;
+
+
+ if ( pglyph == NULL )
+ goto Exit;
+
+ glyph = *pglyph;
+ if ( glyph == NULL || glyph->clazz != &ft_outline_glyph_class )
+ goto Exit;
+
+ {
+ FT_Glyph copy;
+
+
+ error = FT_Glyph_Copy( glyph, &copy );
+ if ( error )
+ goto Exit;
+
+ glyph = copy;
+ }
+
+ {
+ FT_OutlineGlyph oglyph = (FT_OutlineGlyph) glyph;
+ FT_Outline* outline = &oglyph->outline;
+ FT_UInt num_points, num_contours;
+
+
+ error = FT_Stroker_ParseOutline( stroker, outline, 0 );
+ if ( error )
+ goto Fail;
+
+ (void)FT_Stroker_GetCounts( stroker, &num_points, &num_contours );
+
+ FT_Outline_Done( glyph->library, outline );
+
+ error = FT_Outline_New( glyph->library,
+ num_points, num_contours, outline );
+ if ( error )
+ goto Fail;
+
+ outline->n_points = 0;
+ outline->n_contours = 0;
+
+ FT_Stroker_Export( stroker, outline );
+ }
+
+ if ( destroy )
+ FT_Done_Glyph( *pglyph );
+
+ *pglyph = glyph;
+ goto Exit;
+
+ Fail:
+ FT_Done_Glyph( glyph );
+ glyph = NULL;
+
+ if ( !destroy )
+ *pglyph = NULL;
+
+ Exit:
+ return error;
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Glyph_StrokeBorder( FT_Glyph *pglyph,
+ FT_Stroker stroker,
+ FT_Bool inside,
+ FT_Bool destroy )
+ {
+ FT_Error error = FT_Err_Invalid_Argument;
+ FT_Glyph glyph = NULL;
+
+
+ if ( pglyph == NULL )
+ goto Exit;
+
+ glyph = *pglyph;
+ if ( glyph == NULL || glyph->clazz != &ft_outline_glyph_class )
+ goto Exit;
+
+ {
+ FT_Glyph copy;
+
+
+ error = FT_Glyph_Copy( glyph, &copy );
+ if ( error )
+ goto Exit;
+
+ glyph = copy;
+ }
+
+ {
+ FT_OutlineGlyph oglyph = (FT_OutlineGlyph) glyph;
+ FT_StrokerBorder border;
+ FT_Outline* outline = &oglyph->outline;
+ FT_UInt num_points, num_contours;
+
+
+ border = FT_Outline_GetOutsideBorder( outline );
+ if ( inside )
+ {
+ if ( border == FT_STROKER_BORDER_LEFT )
+ border = FT_STROKER_BORDER_RIGHT;
+ else
+ border = FT_STROKER_BORDER_LEFT;
+ }
+
+ error = FT_Stroker_ParseOutline( stroker, outline, 0 );
+ if ( error )
+ goto Fail;
+
+ (void)FT_Stroker_GetBorderCounts( stroker, border,
+ &num_points, &num_contours );
+
+ FT_Outline_Done( glyph->library, outline );
+
+ error = FT_Outline_New( glyph->library,
+ num_points,
+ num_contours,
+ outline );
+ if ( error )
+ goto Fail;
+
+ outline->n_points = 0;
+ outline->n_contours = 0;
+
+ FT_Stroker_ExportBorder( stroker, border, outline );
+ }
+
+ if ( destroy )
+ FT_Done_Glyph( *pglyph );
+
+ *pglyph = glyph;
+ goto Exit;
+
+ Fail:
+ FT_Done_Glyph( glyph );
+ glyph = NULL;
+
+ if ( !destroy )
+ *pglyph = NULL;
+
+ Exit:
+ return error;
+ }
+
+
+/* END */
diff --git a/extras/freetype2/src/base/ftsynth.c b/extras/freetype2/src/base/ftsynth.c
index 45459f3ee..cee36822f 100644
--- a/extras/freetype2/src/base/ftsynth.c
+++ b/extras/freetype2/src/base/ftsynth.c
@@ -4,7 +4,7 @@
/* */
/* FreeType synthesizing code for emboldening and slanting (body). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -82,14 +82,14 @@
/* we need to compute the `previous' and `next' point */
/* for these extrema. */
- cur = outline->points + n;
- prev = cur - 1;
- next = cur + 1;
+ cur = outline->points + n;
+ prev = cur - 1;
+ next = cur + 1;
first = 0;
for ( c = 0; c < outline->n_contours; c++ )
{
- last = outline->contours[c];
+ last = outline->contours[c];
if ( n == first )
prev = outline->points + last;
@@ -279,7 +279,8 @@
first = last + 1;
}
- slot->metrics.horiAdvance = ( slot->metrics.horiAdvance + distance*4 ) & -64;
+ slot->metrics.horiAdvance =
+ ( slot->metrics.horiAdvance + distance*4 ) & ~63;
}
diff --git a/extras/freetype2/src/base/fttrigon.c b/extras/freetype2/src/base/fttrigon.c
index c16fa2468..5347dd852 100644
--- a/extras/freetype2/src/base/fttrigon.c
+++ b/extras/freetype2/src/base/fttrigon.c
@@ -4,7 +4,7 @@
/* */
/* FreeType trigonometric functions (body). */
/* */
-/* Copyright 2001 by */
+/* Copyright 2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,6 +17,7 @@
#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
#include FT_TRIGONOMETRY_H
@@ -71,10 +72,10 @@
val = ( val >= 0 ) ? val : -val;
v1 = (FT_UInt32)val >> 16;
- v2 = (FT_UInt32)val & 0xFFFF;
+ v2 = (FT_UInt32)val & 0xFFFFL;
k1 = FT_TRIG_SCALE >> 16; /* constant */
- k2 = FT_TRIG_SCALE & 0xFFFF; /* constant */
+ k2 = FT_TRIG_SCALE & 0xFFFFL; /* constant */
hi = k1 * v1;
lo1 = k1 * v2 + k2 * v1; /* can't overflow */
@@ -271,9 +272,9 @@
/* round theta */
if ( theta >= 0 )
- theta = ( theta + 16 ) & -32;
+ theta = FT_PAD_ROUND( theta, 32 );
else
- theta = - (( -theta + 16 ) & -32);
+ theta = - FT_PAD_ROUND( -theta, 32 );
vec->x = x;
vec->y = theta;
@@ -356,6 +357,14 @@
}
+ /* these macros return 0 for positive numbers,
+ and -1 for negative ones */
+#define FT_SIGN_LONG( x ) ( (x) >> ( FT_SIZEOF_LONG * 8 - 1 ) )
+#define FT_SIGN_INT( x ) ( (x) >> ( FT_SIZEOF_INT * 8 - 1 ) )
+#define FT_SIGN_INT32( x ) ( (x) >> 31 )
+#define FT_SIGN_INT16( x ) ( (x) >> 15 )
+
+
/* documentation is in fttrigon.h */
FT_EXPORT_DEF( void )
@@ -376,10 +385,13 @@
v.x = ft_trig_downscale( v.x );
v.y = ft_trig_downscale( v.y );
- if ( shift >= 0 )
+ if ( shift > 0 )
{
- vec->x = v.x >> shift;
- vec->y = v.y >> shift;
+ FT_Int32 half = 1L << ( shift - 1 );
+
+
+ vec->x = ( v.x + half + FT_SIGN_LONG( v.x ) ) >> shift;
+ vec->y = ( v.y + half + FT_SIGN_LONG( v.y ) ) >> shift;
}
else
{
diff --git a/extras/freetype2/src/base/fttype1.c b/extras/freetype2/src/base/fttype1.c
index d8b188647..553b84f56 100644
--- a/extras/freetype2/src/base/fttype1.c
+++ b/extras/freetype2/src/base/fttype1.c
@@ -4,7 +4,7 @@
/* */
/* FreeType utility file for PS names support (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,9 +17,9 @@
#include <ft2build.h>
-#include FT_INTERNAL_TYPE1_TYPES_H
-#include FT_INTERNAL_TYPE42_TYPES_H
#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_SERVICE_H
+#include FT_SERVICE_POSTSCRIPT_INFO_H
/* documentation is in t1tables.h */
@@ -28,56 +28,39 @@
FT_Get_PS_Font_Info( FT_Face face,
PS_FontInfoRec* afont_info )
{
- PS_FontInfo font_info = NULL;
- FT_Error error = FT_Err_Invalid_Argument;
- const char* driver_name;
+ FT_Error error = FT_Err_Invalid_Argument;
- if ( face && face->driver && face->driver->root.clazz )
+ if ( face )
{
- driver_name = face->driver->root.clazz->module_name;
- if ( ft_strcmp( driver_name, "type1" ) == 0 )
- font_info = &((T1_Face)face)->type1.font_info;
- else if ( ft_strcmp( driver_name, "t1cid" ) == 0 )
- font_info = &((CID_Face)face)->cid.font_info;
- else if ( ft_strcmp( driver_name, "type42" ) == 0 )
- font_info = &((T42_Face)face)->type1.font_info;
- }
- if ( font_info != NULL )
- {
- *afont_info = *font_info;
- error = FT_Err_Ok;
+ FT_Service_PsInfo service = NULL;
+
+
+ FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
+
+ if ( service && service->ps_get_font_info )
+ error = service->ps_get_font_info( face, afont_info );
}
return error;
}
- /* XXX: Bad hack, but I didn't want to change several drivers here. */
-
/* documentation is in t1tables.h */
FT_EXPORT_DEF( FT_Int )
FT_Has_PS_Glyph_Names( FT_Face face )
{
- FT_Int result = 0;
- const char* driver_name;
+ FT_Int result = 0;
+ FT_Service_PsInfo service = NULL;
- if ( face && face->driver && face->driver->root.clazz )
+ if ( face )
{
- /* Currently, only the type1, type42, and cff drivers provide */
- /* reliable glyph names... */
-
- /* We could probably hack the TrueType driver to recognize */
- /* certain cases where the glyph names are most certainly */
- /* correct (e.g. using a 20 or 22 format `post' table), but */
- /* this will probably happen later... */
-
- driver_name = face->driver->root.clazz->module_name;
- result = ( ft_strcmp( driver_name, "type1" ) == 0 ||
- ft_strcmp( driver_name, "type42" ) == 0 ||
- ft_strcmp( driver_name, "cff" ) == 0 );
+ FT_FACE_FIND_SERVICE( face, service, POSTSCRIPT_INFO );
+
+ if ( service && service->ps_has_glyph_names )
+ result = service->ps_has_glyph_names( face );
}
return result;
diff --git a/extras/freetype2/src/base/ftwinfnt.c b/extras/freetype2/src/base/ftwinfnt.c
index 88644e954..46f618c51 100644
--- a/extras/freetype2/src/base/ftwinfnt.c
+++ b/extras/freetype2/src/base/ftwinfnt.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for accessing Windows FNT specific info (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,36 +18,30 @@
#include <ft2build.h>
#include FT_WINFONTS_H
-#include FT_INTERNAL_FNT_TYPES_H
#include FT_INTERNAL_OBJECTS_H
+#include FT_SERVICE_WINFNT_H
FT_EXPORT_DEF( FT_Error )
- FT_Get_WinFNT_Header( FT_Face face,
- FT_WinFNT_HeaderRec *header )
+ FT_Get_WinFNT_Header( FT_Face face,
+ FT_WinFNT_HeaderRec *header )
{
- FT_Error error;
+ FT_Service_WinFnt service;
+ FT_Error error;
+
error = FT_Err_Invalid_Argument;
- if ( face != NULL && face->driver != NULL )
+ if ( face != NULL )
{
- FT_Module driver = (FT_Module) face->driver;
-
+ FT_FACE_LOOKUP_SERVICE( face, service, WINFNT );
- if ( driver->clazz && driver->clazz->module_name &&
- ft_strcmp( driver->clazz->module_name, "winfonts" ) == 0 )
+ if ( service != NULL )
{
- FNT_Size size = (FNT_Size)face->size;
- FNT_Font font = size->font;
-
- if (font)
- {
- FT_MEM_COPY( header, &font->header, sizeof(*header) );
- error = 0;
- }
+ error = service->get_header( face, header );
}
}
+
return error;
}
diff --git a/extras/freetype2/src/base/ftxf86.c b/extras/freetype2/src/base/ftxf86.c
index 6fd7722a0..04e80236e 100644
--- a/extras/freetype2/src/base/ftxf86.c
+++ b/extras/freetype2/src/base/ftxf86.c
@@ -4,7 +4,7 @@
/* */
/* FreeType utility file for X11 support (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,59 +19,16 @@
#include <ft2build.h>
#include FT_XFREE86_H
#include FT_INTERNAL_OBJECTS_H
-
- /* XXX: This really is a sad hack, but I didn't want to change every */
- /* driver just to support this at the moment, since other important */
- /* changes are coming anyway. */
-
- typedef struct FT_FontFormatRec_
- {
- const char* driver_name;
- const char* format_name;
-
- } FT_FontFormatRec;
-
+#include FT_SERVICE_XFREE86_NAME_H
FT_EXPORT_DEF( const char* )
FT_Get_X11_Font_Format( FT_Face face )
{
- static const FT_FontFormatRec font_formats[] =
- {
- { "type1", "Type 1" },
- { "truetype", "TrueType" },
- { "bdf", "BDF" },
- { "pcf", "PCF" },
- { "type42", "Type 42" },
- { "cidtype1", "CID Type 1" },
- { "cff", "CFF" },
- { "pfr", "PFR" },
- { "winfonts", "Windows FNT" }
- };
-
const char* result = NULL;
- if ( face && face->driver )
- {
- FT_Module driver = (FT_Module)face->driver;
-
-
- if ( driver->clazz && driver->clazz->module_name )
- {
- FT_Int n;
- FT_Int count = sizeof( font_formats ) / sizeof ( font_formats[0] );
-
-
- result = driver->clazz->module_name;
-
- for ( n = 0; n < count; n++ )
- if ( ft_strcmp( result, font_formats[n].driver_name ) == 0 )
- {
- result = font_formats[n].format_name;
- break;
- }
- }
- }
+ if ( face )
+ FT_FACE_FIND_SERVICE( face, result, XF86_NAME );
return result;
}
diff --git a/extras/freetype2/src/base/rules.mk b/extras/freetype2/src/base/rules.mk
index da345ddc5..8017e8589 100644
--- a/extras/freetype2/src/base/rules.mk
+++ b/extras/freetype2/src/base/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002 by
+# Copyright 1996-2000, 2002, 2003, 2004 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -25,23 +25,24 @@
# BASE_H is defined in freetype.mk to simplify the dependency rules.
-BASE_COMPILE := $(FT_COMPILE) $I$(SRC_)base
+BASE_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SRC_DIR)/base)
# Base layer sources
#
# ftsystem, ftinit, and ftdebug are handled by freetype.mk
#
-BASE_SRC := $(BASE_)ftcalc.c \
- $(BASE_)fttrigon.c \
- $(BASE_)ftutil.c \
- $(BASE_)ftstream.c \
- $(BASE_)ftgloadr.c \
- $(BASE_)ftoutln.c \
- $(BASE_)ftobjs.c \
- $(BASE_)ftapi.c \
- $(BASE_)ftnames.c \
- $(BASE_)ftdbgmem.c
+BASE_SRC := $(BASE_DIR)/ftapi.c \
+ $(BASE_DIR)/ftcalc.c \
+ $(BASE_DIR)/ftdbgmem.c \
+ $(BASE_DIR)/ftgloadr.c \
+ $(BASE_DIR)/ftnames.c \
+ $(BASE_DIR)/ftobjs.c \
+ $(BASE_DIR)/ftoutln.c \
+ $(BASE_DIR)/ftrfork.c \
+ $(BASE_DIR)/ftstream.c \
+ $(BASE_DIR)/fttrigon.c \
+ $(BASE_DIR)/ftutil.c
# Base layer `extensions' sources
#
@@ -49,19 +50,19 @@ BASE_SRC := $(BASE_)ftcalc.c \
# object. It will then be linked to the final executable only if one of its
# symbols is used by the application.
#
-BASE_EXT_SRC := $(BASE_)ftglyph.c \
- $(BASE_)ftmm.c \
- $(BASE_)ftbdf.c \
- $(BASE_)fttype1.c \
- $(BASE_)ftxf86.c \
- $(BASE_)ftpfr.c \
- $(BASE_)ftstroker.c \
- $(BASE_)ftwinfnt.c \
- $(BASE_)ftbbox.c
+BASE_EXT_SRC := $(BASE_DIR)/ftbbox.c \
+ $(BASE_DIR)/ftbdf.c \
+ $(BASE_DIR)/ftglyph.c \
+ $(BASE_DIR)/ftmm.c \
+ $(BASE_DIR)/ftpfr.c \
+ $(BASE_DIR)/ftstroke.c \
+ $(BASE_DIR)/fttype1.c \
+ $(BASE_DIR)/ftwinfnt.c \
+ $(BASE_DIR)/ftxf86.c
# Default extensions objects
#
-BASE_EXT_OBJ := $(BASE_EXT_SRC:$(BASE_)%.c=$(OBJ_)%.$O)
+BASE_EXT_OBJ := $(BASE_EXT_SRC:$(BASE_DIR)/%.c=$(OBJ_DIR)/%.$O)
# Base layer object(s)
@@ -72,23 +73,24 @@ BASE_EXT_OBJ := $(BASE_EXT_SRC:$(BASE_)%.c=$(OBJ_)%.$O)
# BASE_OBJ_S is used during `single' builds (the whole base layer is
# compiled as a single object file using ftbase.c).
#
-BASE_OBJ_M := $(BASE_SRC:$(BASE_)%.c=$(OBJ_)%.$O)
-BASE_OBJ_S := $(OBJ_)ftbase.$O
+BASE_OBJ_M := $(BASE_SRC:$(BASE_DIR)/%.c=$(OBJ_DIR)/%.$O)
+BASE_OBJ_S := $(OBJ_DIR)/ftbase.$O
# Base layer root source file for single build
#
-BASE_SRC_S := $(BASE_)ftbase.c
+BASE_SRC_S := $(BASE_DIR)/ftbase.c
# Base layer - single object build
#
$(BASE_OBJ_S): $(BASE_SRC_S) $(BASE_SRC) $(FREETYPE_H)
- $(BASE_COMPILE) $T$@ $(BASE_SRC_S)
+ $(BASE_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(BASE_SRC_S))
# Multiple objects build + extensions
#
-$(OBJ_)%.$O: $(BASE_)%.c $(FREETYPE_H)
- $(BASE_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(BASE_DIR)/%.c $(FREETYPE_H)
+ $(BASE_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
# EOF
diff --git a/extras/freetype2/src/bdf/bdf.h b/extras/freetype2/src/bdf/bdf.h
index 6a4bb821f..4dab5ae9d 100644
--- a/extras/freetype2/src/bdf/bdf.h
+++ b/extras/freetype2/src/bdf/bdf.h
@@ -1,6 +1,6 @@
/*
* Copyright 2000 Computing Research Labs, New Mexico State University
- * Copyright 2001, 2002 Francesco Zappa Nardelli
+ * Copyright 2001, 2002, 2003 Francesco Zappa Nardelli
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -159,8 +159,8 @@ FT_BEGIN_HEADER
typedef struct _hashnode_
{
- char* key;
- void* data;
+ const char* key;
+ void* data;
} _hashnode, *hashnode;
@@ -283,7 +283,7 @@ FT_BEGIN_HEADER
FT_LOCAL( bdf_property_t * )
bdf_get_font_property( bdf_font_t* font,
- char* name );
+ const char* name );
FT_END_HEADER
diff --git a/extras/freetype2/src/bdf/bdfdrivr.c b/extras/freetype2/src/bdf/bdfdrivr.c
index 4f60266cb..2e8f93ca6 100644
--- a/extras/freetype2/src/bdf/bdfdrivr.c
+++ b/extras/freetype2/src/bdf/bdfdrivr.c
@@ -2,7 +2,7 @@
FreeType font driver for bdf files
- Copyright (C) 2001-2002 by
+ Copyright (C) 2001, 2002, 2003, 2004 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -31,6 +31,9 @@ THE SOFTWARE.
#include FT_INTERNAL_OBJECTS_H
#include FT_BDF_H
+#include FT_SERVICE_BDF_H
+#include FT_SERVICE_XFREE86_NAME_H
+
#include "bdf.h"
#include "bdfdrivr.h"
@@ -65,7 +68,7 @@ THE SOFTWARE.
cmap->num_encodings = face->bdffont->glyphs_used;
cmap->encodings = face->en_table;
- return FT_Err_Ok;
+ return BDF_Err_Ok;
}
@@ -169,6 +172,116 @@ THE SOFTWARE.
};
+ static FT_Error
+ bdf_interpret_style( BDF_Face bdf )
+ {
+ FT_Error error = BDF_Err_Ok;
+ FT_Face face = FT_FACE( bdf );
+ FT_Memory memory = face->memory;
+ bdf_font_t* font = bdf->bdffont;
+ bdf_property_t* prop;
+
+ char *istr = NULL, *bstr = NULL;
+ char *sstr = NULL, *astr = NULL;
+
+ int parts = 0, len = 0;
+
+
+ face->style_flags = 0;
+
+ prop = bdf_get_font_property( font, (char *)"SLANT" );
+ if ( prop && prop->format == BDF_ATOM &&
+ prop->value.atom &&
+ ( *(prop->value.atom) == 'O' || *(prop->value.atom) == 'o' ||
+ *(prop->value.atom) == 'I' || *(prop->value.atom) == 'i' ) )
+ {
+ face->style_flags |= FT_STYLE_FLAG_ITALIC;
+ istr = ( *(prop->value.atom) == 'O' || *(prop->value.atom) == 'o' )
+ ? (char *)"Oblique"
+ : (char *)"Italic";
+ len += ft_strlen( istr );
+ parts++;
+ }
+
+ prop = bdf_get_font_property( font, (char *)"WEIGHT_NAME" );
+ if ( prop && prop->format == BDF_ATOM &&
+ prop->value.atom &&
+ ( *(prop->value.atom) == 'B' || *(prop->value.atom) == 'b' ) )
+ {
+ face->style_flags |= FT_STYLE_FLAG_BOLD;
+ bstr = (char *)"Bold";
+ len += ft_strlen( bstr );
+ parts++;
+ }
+
+ prop = bdf_get_font_property( font, (char *)"SETWIDTH_NAME" );
+ if ( prop && prop->format == BDF_ATOM &&
+ prop->value.atom && *(prop->value.atom) &&
+ !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )
+ {
+ sstr = (char *)(prop->value.atom);
+ len += ft_strlen( sstr );
+ parts++;
+ }
+
+ prop = bdf_get_font_property( font, (char *)"ADD_STYLE_NAME" );
+ if ( prop && prop->format == BDF_ATOM &&
+ prop->value.atom && *(prop->value.atom) &&
+ !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )
+ {
+ astr = (char *)(prop->value.atom);
+ len += ft_strlen( astr );
+ parts++;
+ }
+
+ if ( !parts || !len )
+ face->style_name = (char *)"Regular";
+ else
+ {
+ char *style, *s;
+ unsigned int i;
+
+
+ if ( FT_ALLOC( style, len + parts ) )
+ return error;
+
+ s = style;
+
+ if ( astr )
+ {
+ ft_strcpy( s, astr );
+ for ( i = 0; i < ft_strlen( astr ); i++, s++ )
+ if ( *s == ' ' )
+ *s = '-'; /* replace spaces with dashes */
+ *(s++) = ' ';
+ }
+ if ( bstr )
+ {
+ ft_strcpy( s, bstr );
+ s += ft_strlen( bstr );
+ *(s++) = ' ';
+ }
+ if ( istr )
+ {
+ ft_strcpy( s, istr );
+ s += ft_strlen( istr );
+ *(s++) = ' ';
+ }
+ if ( sstr )
+ {
+ ft_strcpy( s, sstr );
+ for ( i = 0; i < ft_strlen( sstr ); i++, s++ )
+ if ( *s == ' ' )
+ *s = '-'; /* replace spaces with dashes */
+ *(s++) = ' ';
+ }
+ *(--s) = '\0'; /* overwrite last ' ', terminate the string */
+
+ face->style_name = style; /* allocated string */
+ }
+
+ return error;
+ }
FT_CALLBACK_DEF( FT_Error )
@@ -250,35 +363,18 @@ THE SOFTWARE.
FT_FACE_FLAG_HORIZONTAL |
FT_FACE_FLAG_FAST_GLYPHS;
- prop = bdf_get_font_property( font, (char *)"SPACING" );
- if ( prop != NULL )
- if ( prop->format == BDF_ATOM )
- if ( prop->value.atom != NULL )
- if ( ( *(prop->value.atom) == 'M' ) ||
- ( *(prop->value.atom) == 'C' ) )
- root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
+ prop = bdf_get_font_property( font, "SPACING" );
+ if ( prop && prop->format == BDF_ATOM &&
+ prop->value.atom &&
+ ( *(prop->value.atom) == 'M' || *(prop->value.atom) == 'm' ||
+ *(prop->value.atom) == 'C' || *(prop->value.atom) == 'c' ) )
+ root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
/* FZ XXX: TO DO: FT_FACE_FLAGS_VERTICAL */
/* FZ XXX: I need a font to implement this */
- root->style_flags = 0;
- prop = bdf_get_font_property( font, (char *)"SLANT" );
- if ( prop != NULL )
- if ( prop->format == BDF_ATOM )
- if ( prop->value.atom != NULL )
- if ( ( *(prop->value.atom) == 'O' ) ||
- ( *(prop->value.atom) == 'I' ) )
- root->style_flags |= FT_STYLE_FLAG_ITALIC;
-
- prop = bdf_get_font_property( font, (char *)"WEIGHT_NAME" );
- if ( prop != NULL )
- if ( prop->format == BDF_ATOM )
- if ( prop->value.atom != NULL )
- if ( *(prop->value.atom) == 'B' )
- root->style_flags |= FT_STYLE_FLAG_BOLD;
-
- prop = bdf_get_font_property( font, (char *)"FAMILY_NAME" );
- if ( ( prop != NULL ) && ( prop->value.atom != NULL ) )
+ prop = bdf_get_font_property( font, "FAMILY_NAME" );
+ if ( prop && prop->value.atom )
{
int l = ft_strlen( prop->value.atom ) + 1;
@@ -290,16 +386,8 @@ THE SOFTWARE.
else
root->family_name = 0;
- root->style_name = (char *)"Regular";
- if ( root->style_flags & FT_STYLE_FLAG_BOLD )
- {
- if ( root->style_flags & FT_STYLE_FLAG_ITALIC )
- root->style_name = (char *)"Bold Italic";
- else
- root->style_name = (char *)"Bold";
- }
- else if ( root->style_flags & FT_STYLE_FLAG_ITALIC )
- root->style_name = (char *)"Italic";
+ if ( ( error = bdf_interpret_style( face ) ) != 0 )
+ goto Exit;
root->num_glyphs = font->glyphs_size; /* unencoded included */
@@ -307,45 +395,50 @@ THE SOFTWARE.
if ( FT_NEW_ARRAY( root->available_sizes, 1 ) )
goto Exit;
- prop = bdf_get_font_property( font, (char *)"AVERAGE_WIDTH" );
- if ( ( prop != NULL ) && ( prop->value.int32 >= 10 ) )
- root->available_sizes->width = (short)( prop->value.int32 / 10 );
-
- prop = bdf_get_font_property( font, (char *)"PIXEL_SIZE" );
- if ( prop != NULL )
- root->available_sizes->height = (short) prop->value.int32;
- else
{
- prop = bdf_get_font_property( font, (char *)"POINT_SIZE" );
- if ( prop != NULL )
- {
- bdf_property_t *yres;
+ FT_Bitmap_Size* bsize = root->available_sizes;
+ FT_Short resolution_x = 0, resolution_y = 0;
- yres = bdf_get_font_property( font, (char *)"RESOLUTION_Y" );
- if ( yres != NULL )
- {
- FT_TRACE4(( "POINT_SIZE: %d RESOLUTION_Y: %d\n",
- prop->value.int32, yres->value.int32 ));
- root->available_sizes->height =
- (FT_Short)( prop->value.int32 * yres->value.int32 / 720 );
- }
- }
- }
+ FT_MEM_ZERO( bsize, sizeof ( FT_Bitmap_Size ) );
- if ( root->available_sizes->width == 0 )
- {
- if ( root->available_sizes->height == 0 )
+ bsize->height = font->font_ascent + font->font_descent;
+
+ prop = bdf_get_font_property( font, "AVERAGE_WIDTH" );
+ if ( prop )
+ bsize->width = (FT_Short)( ( prop->value.int32 + 5 ) / 10 );
+ else
+ bsize->width = bsize->height * 2/3;
+
+ prop = bdf_get_font_property( font, "POINT_SIZE" );
+ if ( prop )
+ /* convert from 722.7 decipoints to 72 points per inch */
+ bsize->size =
+ (FT_Pos)( ( prop->value.int32 * 64 * 7200 + 36135L ) / 72270L );
+
+ prop = bdf_get_font_property( font, "PIXEL_SIZE" );
+ if ( prop )
+ bsize->y_ppem = (FT_Short)prop->value.int32 << 6;
+
+ prop = bdf_get_font_property( font, "RESOLUTION_X" );
+ if ( prop )
+ resolution_x = (FT_Short)prop->value.int32;
+
+ prop = bdf_get_font_property( font, "RESOLUTION_Y" );
+ if ( prop )
+ resolution_y = (FT_Short)prop->value.int32;
+
+ if ( bsize->y_ppem == 0 )
{
- /* some fonts have broken SIZE declaration (jiskan24.bdf) */
- FT_ERROR(( "BDF_Face_Init: reading size\n" ));
- root->available_sizes->width = (FT_Short)font->point_size;
+ bsize->y_ppem = bsize->size;
+ if ( resolution_y )
+ bsize->y_ppem = bsize->y_ppem * resolution_y / 72;
}
+ if ( resolution_x && resolution_y )
+ bsize->x_ppem = bsize->y_ppem * resolution_x / resolution_y;
else
- root->available_sizes->width = root->available_sizes->height;
+ bsize->x_ppem = bsize->y_ppem;
}
- if ( root->available_sizes->height == 0 )
- root->available_sizes->height = root->available_sizes->width;
/* encoding table */
{
@@ -371,28 +464,42 @@ THE SOFTWARE.
charset_registry =
- bdf_get_font_property( font, (char *)"CHARSET_REGISTRY" );
+ bdf_get_font_property( font, "CHARSET_REGISTRY" );
charset_encoding =
- bdf_get_font_property( font, (char *)"CHARSET_ENCODING" );
- if ( ( charset_registry != NULL ) && ( charset_encoding != NULL ) )
+ bdf_get_font_property( font, "CHARSET_ENCODING" );
+ if ( charset_registry && charset_encoding )
{
- if ( ( charset_registry->format == BDF_ATOM ) &&
- ( charset_encoding->format == BDF_ATOM ) &&
- ( charset_registry->value.atom != NULL ) &&
- ( charset_encoding->value.atom != NULL ) )
+ if ( charset_registry->format == BDF_ATOM &&
+ charset_encoding->format == BDF_ATOM &&
+ charset_registry->value.atom &&
+ charset_encoding->value.atom )
{
+ const char* s;
+
+
if ( FT_NEW_ARRAY( face->charset_encoding,
- strlen( charset_encoding->value.atom ) + 1 ) )
+ ft_strlen( charset_encoding->value.atom ) + 1 ) )
goto Exit;
if ( FT_NEW_ARRAY( face->charset_registry,
- strlen( charset_registry->value.atom ) + 1 ) )
+ ft_strlen( charset_registry->value.atom ) + 1 ) )
goto Exit;
+
ft_strcpy( face->charset_registry, charset_registry->value.atom );
ft_strcpy( face->charset_encoding, charset_encoding->value.atom );
- if ( !ft_strcmp( face->charset_registry, "ISO10646" ) ||
- ( !ft_strcmp( face->charset_registry, "ISO8859" ) &&
- !ft_strcmp( face->charset_encoding, "1" ) ) )
+
+ /* Uh, oh, compare first letters manually to avoid dependency
+ on locales. */
+ s = face->charset_registry;
+ if ( ( s[0] == 'i' || s[0] == 'I' ) &&
+ ( s[1] == 's' || s[1] == 'S' ) &&
+ ( s[2] == 'o' || s[2] == 'O' ) )
+ {
+ s += 3;
+ if ( !ft_strcmp( s, "10646" ) ||
+ ( !ft_strcmp( s, "8859" ) &&
+ !ft_strcmp( face->charset_encoding, "1" ) ) )
unicode_charmap = 1;
+ }
{
FT_CharMapRec charmap;
@@ -460,13 +567,15 @@ THE SOFTWARE.
FT_TRACE4(( "rec %d - pres %d\n",
- size->metrics.y_ppem, root->available_sizes->height ));
+ size->metrics.y_ppem, root->available_sizes->y_ppem ));
- if ( size->metrics.y_ppem == root->available_sizes->height )
+ if ( size->metrics.y_ppem == root->available_sizes->y_ppem >> 6 )
{
- size->metrics.ascender = face->bdffont->bbx.ascent << 6;
- size->metrics.descender = face->bdffont->bbx.descent * ( -64 );
- size->metrics.height = face->bdffont->bbx.height << 6;
+ size->metrics.ascender = face->bdffont->font_ascent << 6;
+ size->metrics.descender = -face->bdffont->font_descent << 6;
+ size->metrics.height = ( face->bdffont->font_ascent +
+ face->bdffont->font_descent ) << 6;
+ size->metrics.max_advance = face->bdffont->bbx.width << 6;
return BDF_Err_Ok;
}
@@ -611,14 +720,13 @@ THE SOFTWARE.
}
}
- slot->bitmap_left = 0;
+ slot->bitmap_left = glyph.bbx.x_offset;
slot->bitmap_top = glyph.bbx.ascent;
/* FZ XXX: TODO: vertical metrics */
slot->metrics.horiAdvance = glyph.dwidth << 6;
slot->metrics.horiBearingX = glyph.bbx.x_offset << 6;
- slot->metrics.horiBearingY = ( glyph.bbx.y_offset +
- glyph.bbx.height ) << 6;
+ slot->metrics.horiBearingY = glyph.bbx.ascent << 6;
slot->metrics.width = bitmap->width << 6;
slot->metrics.height = bitmap->rows << 6;
@@ -630,6 +738,12 @@ THE SOFTWARE.
}
+ /*
+ *
+ * BDF SERVICE
+ *
+ */
+
static FT_Error
bdf_get_bdf_property( BDF_Face face,
const char* prop_name,
@@ -637,56 +751,89 @@ THE SOFTWARE.
{
bdf_property_t* prop;
+
FT_ASSERT( face && face->bdffont );
- prop = bdf_get_font_property( face->bdffont, (char*)prop_name );
- if ( prop != NULL )
+ prop = bdf_get_font_property( face->bdffont, prop_name );
+ if ( prop )
{
switch ( prop->format )
{
- case BDF_ATOM:
- aproperty->type = BDF_PROPERTY_TYPE_ATOM;
- aproperty->u.atom = prop->value.atom;
- break;
-
- case BDF_INTEGER:
- aproperty->type = BDF_PROPERTY_TYPE_INTEGER;
- aproperty->u.integer = prop->value.int32;
- break;
-
- case BDF_CARDINAL:
- aproperty->type = BDF_PROPERTY_TYPE_CARDINAL;
- aproperty->u.cardinal = prop->value.card32;
- break;
-
- default:
- goto Fail;
+ case BDF_ATOM:
+ aproperty->type = BDF_PROPERTY_TYPE_ATOM;
+ aproperty->u.atom = prop->value.atom;
+ break;
+
+ case BDF_INTEGER:
+ aproperty->type = BDF_PROPERTY_TYPE_INTEGER;
+ aproperty->u.integer = prop->value.int32;
+ break;
+
+ case BDF_CARDINAL:
+ aproperty->type = BDF_PROPERTY_TYPE_CARDINAL;
+ aproperty->u.cardinal = prop->value.card32;
+ break;
+
+ default:
+ goto Fail;
}
return 0;
}
+
Fail:
- return FT_Err_Invalid_Argument;
+ return BDF_Err_Invalid_Argument;
+ }
+
+ static FT_Error
+ bdf_get_charset_id( BDF_Face face,
+ const char* *acharset_encoding,
+ const char* *acharset_registry )
+ {
+ *acharset_encoding = face->charset_encoding;
+ *acharset_registry = face->charset_registry;
+
+ return 0;
}
+ static const FT_Service_BDFRec bdf_service_bdf =
+ {
+ (FT_BDF_GetCharsetIdFunc)bdf_get_charset_id,
+ (FT_BDF_GetPropertyFunc) bdf_get_bdf_property
+ };
+
+
+ /*
+ *
+ * SERVICES LIST
+ *
+ */
+
+ static const FT_ServiceDescRec bdf_services[] =
+ {
+ { FT_SERVICE_ID_BDF, &bdf_service_bdf },
+ { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_BDF },
+ { NULL, NULL }
+ };
+
+
static FT_Module_Interface
bdf_driver_requester( FT_Module module,
const char* name )
{
FT_UNUSED( module );
- if ( name && ft_strcmp( name, "get_bdf_property" ) == 0 )
- return (FT_Module_Interface) bdf_get_bdf_property;
-
- return NULL;
+ return ft_service_list_lookup( bdf_services, name );
}
+
FT_CALLBACK_TABLE_DEF
const FT_Driver_ClassRec bdf_driver_class =
{
{
- ft_module_font_driver,
+ FT_MODULE_FONT_DRIVER |
+ FT_MODULE_DRIVER_NO_OUTLINES,
sizeof ( FT_DriverRec ),
"bdf",
diff --git a/extras/freetype2/src/bdf/bdfdrivr.h b/extras/freetype2/src/bdf/bdfdrivr.h
index 5c5896459..148041ff2 100644
--- a/extras/freetype2/src/bdf/bdfdrivr.h
+++ b/extras/freetype2/src/bdf/bdfdrivr.h
@@ -2,7 +2,7 @@
FreeType font driver for bdf fonts
- Copyright (C) 2001, 2002 by
+ Copyright (C) 2001, 2002, 2003 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -39,8 +39,8 @@ FT_BEGIN_HEADER
typedef struct BDF_encoding_el_
{
- FT_ULong enc;
- FT_Short glyph;
+ FT_ULong enc;
+ FT_UShort glyph;
} BDF_encoding_el;
diff --git a/extras/freetype2/src/bdf/bdflib.c b/extras/freetype2/src/bdf/bdflib.c
index 7496e6061..be0e3987e 100644
--- a/extras/freetype2/src/bdf/bdflib.c
+++ b/extras/freetype2/src/bdf/bdflib.c
@@ -1,6 +1,6 @@
/*
* Copyright 2000 Computing Research Labs, New Mexico State University
- * Copyright 2001, 2002 Francesco Zappa Nardelli
+ * Copyright 2001, 2002, 2003, 2004 Francesco Zappa Nardelli
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -163,7 +163,7 @@
{ (char *)"_MULE_RELATIVE_COMPOSE", BDF_INTEGER, 1, { 0 } },
};
- static unsigned long
+ static const unsigned long
_num_bdf_properties = sizeof ( _bdf_properties ) /
sizeof ( _bdf_properties[0] );
@@ -183,10 +183,10 @@
(*hash_free_func)( hashnode node );
static hashnode*
- hash_bucket( char* key,
- hashtable* ht )
+ hash_bucket( const char* key,
+ hashtable* ht )
{
- char* kp = key;
+ const char* kp = key;
unsigned long res = 0;
hashnode* bp = ht->table, *ndp;
@@ -317,7 +317,7 @@
static hashnode
- hash_lookup( char* key,
+ hash_lookup( const char* key,
hashtable* ht )
{
hashnode *np = hash_bucket( key, ht );
@@ -391,7 +391,7 @@
/* An empty string for empty fields. */
- static char empty[1] = { 0 }; /* XXX eliminate this */
+ static const char empty[1] = { 0 }; /* XXX eliminate this */
/* Assume the line is NULL-terminated and that the `list' parameter */
@@ -468,7 +468,7 @@
}
/* Assign the field appropriately. */
- list->field[list->used++] = ( ep > sp ) ? sp : empty;
+ list->field[list->used++] = ( ep > sp ) ? sp : (char*)empty;
sp = ep;
@@ -511,7 +511,7 @@
}
if ( final_empty )
- list->field[list->used++] = empty;
+ list->field[list->used++] = (char*)empty;
if ( list->used == list->size )
{
@@ -641,7 +641,7 @@
{
_bdf_line_func_t cb;
unsigned long lineno;
- int n, res, done, refill, bytes, hold;
+ int n, done, refill, bytes, hold;
char *ls, *le, *pp, *pe, *hp;
char *buf = 0;
FT_Memory memory = stream->memory;
@@ -661,7 +661,7 @@
lineno = 1;
buf[0] = 0;
- res = done = 0;
+ done = 0;
pp = ls = le = buf;
bytes = 65536L;
@@ -696,7 +696,7 @@
le -= n;
n = pe - pp;
- FT_MEM_COPY( buf, pp, n );
+ FT_MEM_MOVE( buf, pp, n );
pp = buf + n;
bytes = 65536L - n;
@@ -1443,7 +1443,6 @@
unsigned char* bp;
unsigned long i, slen, nibbles;
- _bdf_line_func_t* next;
_bdf_parse_t* p;
bdf_glyph_t* glyph;
bdf_font_t* font;
@@ -1451,11 +1450,11 @@
FT_Memory memory;
FT_Error error = BDF_Err_Ok;
+ FT_UNUSED( call_data );
FT_UNUSED( lineno ); /* only used in debug mode */
- next = (_bdf_line_func_t *)call_data;
- p = (_bdf_parse_t *) client_data;
+ p = (_bdf_parse_t *)client_data;
font = p->font;
memory = font->memory;
@@ -1771,14 +1770,14 @@
/* Determine the overall font bounding box as the characters are */
/* loaded so corrections can be done later if indicated. */
- p->maxas = (short)MAX( glyph->bbx.ascent, p->maxas );
- p->maxds = (short)MAX( glyph->bbx.descent, p->maxds );
+ p->maxas = (short)FT_MAX( glyph->bbx.ascent, p->maxas );
+ p->maxds = (short)FT_MAX( glyph->bbx.descent, p->maxds );
p->rbearing = (short)( glyph->bbx.width + glyph->bbx.x_offset );
- p->maxrb = (short)MAX( p->rbearing, p->maxrb );
- p->minlb = (short)MIN( glyph->bbx.x_offset, p->minlb );
- p->maxlb = (short)MAX( glyph->bbx.x_offset, p->maxlb );
+ p->maxrb = (short)FT_MAX( p->rbearing, p->maxrb );
+ p->minlb = (short)FT_MIN( glyph->bbx.x_offset, p->minlb );
+ p->maxlb = (short)FT_MAX( glyph->bbx.x_offset, p->maxlb );
if ( !( p->flags & _BDF_DWIDTH ) )
{
@@ -1883,7 +1882,7 @@
/* */
/* This is *always* done regardless of the options, because X11 */
/* requires these two fields to compile fonts. */
- if ( bdf_get_font_property( p->font, (char *)"FONT_ASCENT" ) == 0 )
+ if ( bdf_get_font_property( p->font, "FONT_ASCENT" ) == 0 )
{
p->font->font_ascent = p->font->bbx.ascent;
ft_sprintf( nbuf, "%hd", p->font->bbx.ascent );
@@ -1895,7 +1894,7 @@
p->font->modified = 1;
}
- if ( bdf_get_font_property( p->font, (char *)"FONT_DESCENT" ) == 0 )
+ if ( bdf_get_font_property( p->font, "FONT_DESCENT" ) == 0 )
{
p->font->font_descent = p->font->bbx.descent;
ft_sprintf( nbuf, "%hd", p->font->bbx.descent );
@@ -2419,7 +2418,7 @@
FT_LOCAL_DEF( bdf_property_t * )
bdf_get_font_property( bdf_font_t* font,
- char* name )
+ const char* name )
{
hashnode hn;
diff --git a/extras/freetype2/src/bdf/rules.mk b/extras/freetype2/src/bdf/rules.mk
index b1a3ed9f8..25d98e55b 100644
--- a/extras/freetype2/src/bdf/rules.mk
+++ b/extras/freetype2/src/bdf/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2001, 2002 by
+# Copyright (C) 2001, 2002, 2003 by
# Francesco Zappa Nardelli
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -29,46 +29,46 @@
# bdf driver directory
#
-BDF_DIR := $(SRC_)bdf
-BDF_DIR_ := $(BDF_DIR)$(SEP)
+BDF_DIR := $(SRC_DIR)/bdf
-BDF_COMPILE := $(FT_COMPILE) $I$(BDF_DIR)
+BDF_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(BDF_DIR))
# bdf driver sources (i.e., C files)
#
-BDF_DRV_SRC := $(BDF_DIR_)bdflib.c $(BDF_DIR_)bdfdrivr.c
+BDF_DRV_SRC := $(BDF_DIR)/bdflib.c \
+ $(BDF_DIR)/bdfdrivr.c
# bdf driver headers
#
-BDF_DRV_H := $(BDF_DIR_)bdf.h \
- $(BDF_DIR_)bdfdrivr.h
+BDF_DRV_H := $(BDF_DIR)/bdf.h \
+ $(BDF_DIR)/bdfdrivr.h
# bdf driver object(s)
#
# BDF_DRV_OBJ_M is used during `multi' builds
# BDF_DRV_OBJ_S is used during `single' builds
#
-BDF_DRV_OBJ_M := $(BDF_DRV_SRC:$(BDF_DIR_)%.c=$(OBJ_)%.$O)
-BDF_DRV_OBJ_S := $(OBJ_)bdf.$O
+BDF_DRV_OBJ_M := $(BDF_DRV_SRC:$(BDF_DIR)/%.c=$(OBJ_DIR)/%.$O)
+BDF_DRV_OBJ_S := $(OBJ_DIR)/bdf.$O
# bdf driver source file for single build
#
-BDF_DRV_SRC_S := $(BDF_DIR_)bdf.c
+BDF_DRV_SRC_S := $(BDF_DIR)/bdf.c
# bdf driver - single object
#
$(BDF_DRV_OBJ_S): $(BDF_DRV_SRC_S) $(BDF_DRV_SRC) $(FREETYPE_H) $(BDF_DRV_H)
- $(BDF_COMPILE) $T$@ $(BDF_DRV_SRC_S)
+ $(BDF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(BDF_DRV_SRC_S))
# bdf driver - multiple objects
#
-$(OBJ_)%.$O: $(BDF_DIR_)%.c $(FREETYPE_H) $(BDF_DRV_H)
- $(BDF_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(BDF_DIR)/%.c $(FREETYPE_H) $(BDF_DRV_H)
+ $(BDF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
@@ -76,4 +76,5 @@ $(OBJ_)%.$O: $(BDF_DIR_)%.c $(FREETYPE_H) $(BDF_DRV_H)
DRV_OBJS_S += $(BDF_DRV_OBJ_S)
DRV_OBJS_M += $(BDF_DRV_OBJ_M)
+
# EOF
diff --git a/extras/freetype2/src/cache/Jamfile b/extras/freetype2/src/cache/Jamfile
index 099fd5e36..b269c9557 100644
--- a/extras/freetype2/src/cache/Jamfile
+++ b/extras/freetype2/src/cache/Jamfile
@@ -1,4 +1,4 @@
-# FreeType 2 src/cache Jamfile (c) 2001 David Turner
+# FreeType 2 src/cache Jamfile (c) 2001, 2003, 2004 David Turner
#
SubDir FT2_TOP $(FT2_SRC_DIR) cache ;
@@ -14,7 +14,15 @@ HDRMACRO [ FT2_SubDir include ftcache.h ] ;
if $(FT2_MULTI)
{
- _sources = ftlru ftcmanag ftccache ftcglyph ftcsbits ftcimage ftccmap ;
+ _sources = ftcmru
+ ftcmanag
+ ftccache
+ ftcglyph
+ ftcsbits
+ ftcimage
+ ftcbasic
+ ftccmap
+ ;
}
else
{
diff --git a/extras/freetype2/src/cache/descrip.mms b/extras/freetype2/src/cache/descrip.mms
index ea12f2e37..4d967dc18 100644
--- a/extras/freetype2/src/cache/descrip.mms
+++ b/extras/freetype2/src/cache/descrip.mms
@@ -3,7 +3,7 @@
#
-# Copyright 2001, 2002 by
+# Copyright 2001, 2002, 2003, 2004 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -20,7 +20,6 @@ OBJS=ftcache.obj
all : $(OBJS)
library [--.lib]freetype.olb $(OBJS)
-ftcache.obj : ftcache.c ftlru.c ftcmanag.c ftccache.c ftcglyph.c ftcimage.c \
- ftcsbits.c ftccmap.c
+ftcache.obj : ftcache.c
# EOF
diff --git a/extras/freetype2/src/cache/ftcache.c b/extras/freetype2/src/cache/ftcache.c
index 07e85e1ea..d41e91e5e 100644
--- a/extras/freetype2/src/cache/ftcache.c
+++ b/extras/freetype2/src/cache/ftcache.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType Caching sub-system (body only). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,13 +19,13 @@
#define FT_MAKE_OPTION_SINGLE_OBJECT
#include <ft2build.h>
-#include "ftlru.c"
+#include "ftcmru.c"
#include "ftcmanag.c"
#include "ftccache.c"
+#include "ftccmap.c"
#include "ftcglyph.c"
#include "ftcimage.c"
#include "ftcsbits.c"
-#include "ftccmap.c"
-
+#include "ftcbasic.c"
/* END */
diff --git a/extras/freetype2/src/cache/ftcbasic.c b/extras/freetype2/src/cache/ftcbasic.c
new file mode 100644
index 000000000..5d5061cfb
--- /dev/null
+++ b/extras/freetype2/src/cache/ftcbasic.c
@@ -0,0 +1,425 @@
+/***************************************************************************/
+/* */
+/* ftcbasic.c */
+/* */
+/* The FreeType basic cache interface (body). */
+/* */
+/* Copyright 2003, 2004 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#include <ft2build.h>
+#include FT_CACHE_H
+#include FT_CACHE_INTERNAL_GLYPH_H
+#include FT_CACHE_INTERNAL_IMAGE_H
+#include FT_CACHE_INTERNAL_SBITS_H
+#include FT_INTERNAL_MEMORY_H
+
+#include "ftccback.h"
+#include "ftcerror.h"
+
+
+ /*
+ * Basic Families
+ *
+ */
+ typedef struct FTC_BasicAttrRec_
+ {
+ FTC_ScalerRec scaler;
+ FT_UInt load_flags;
+
+ } FTC_BasicAttrRec, *FTC_BasicAttrs;
+
+#define FTC_BASIC_ATTR_COMPARE( a, b ) \
+ ( FTC_SCALER_COMPARE( &(a)->scaler, &(b)->scaler ) && \
+ (a)->load_flags == (b)->load_flags )
+
+#define FTC_BASIC_ATTR_HASH( a ) \
+ ( FTC_SCALER_HASH( &(a)->scaler ) + 31*(a)->load_flags )
+
+
+ typedef struct FTC_BasicQueryRec_
+ {
+ FTC_GQueryRec gquery;
+ FTC_BasicAttrRec attrs;
+
+ } FTC_BasicQueryRec, *FTC_BasicQuery;
+
+
+ typedef struct FTC_BasicFamilyRec_
+ {
+ FTC_FamilyRec family;
+ FTC_BasicAttrRec attrs;
+
+ } FTC_BasicFamilyRec, *FTC_BasicFamily;
+
+
+ FT_CALLBACK_DEF( FT_Bool )
+ ftc_basic_family_compare( FTC_BasicFamily family,
+ FTC_BasicQuery query )
+ {
+ return FT_BOOL( FTC_BASIC_ATTR_COMPARE( &family->attrs, &query->attrs ) );
+ }
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ ftc_basic_family_init( FTC_BasicFamily family,
+ FTC_BasicQuery query,
+ FTC_Cache cache )
+ {
+ FTC_Family_Init( FTC_FAMILY( family ), cache );
+ family->attrs = query->attrs;
+ return 0;
+ }
+
+
+ FT_CALLBACK_DEF( FT_UInt )
+ ftc_basic_family_get_count( FTC_BasicFamily family,
+ FTC_Manager manager )
+ {
+ FT_Error error;
+ FT_Face face;
+ FT_UInt result = 0;
+
+
+ error = FTC_Manager_LookupFace( manager, family->attrs.scaler.face_id,
+ &face );
+ if ( !error )
+ result = face->num_glyphs;
+
+ return result;
+ }
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ ftc_basic_family_load_bitmap( FTC_BasicFamily family,
+ FT_UInt gindex,
+ FTC_Manager manager,
+ FT_Face *aface )
+ {
+ FT_Error error;
+ FT_Size size;
+
+
+ error = FTC_Manager_LookupSize( manager, &family->attrs.scaler, &size );
+ if ( !error )
+ {
+ FT_Face face = size->face;
+
+
+ error = FT_Load_Glyph( face, gindex,
+ family->attrs.load_flags | FT_LOAD_RENDER );
+ if ( !error )
+ *aface = face;
+ }
+
+ return error;
+ }
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ ftc_basic_family_load_glyph( FTC_BasicFamily family,
+ FT_UInt gindex,
+ FTC_Cache cache,
+ FT_Glyph *aglyph )
+ {
+ FT_Error error;
+ FTC_Scaler scaler = &family->attrs.scaler;
+ FT_Face face;
+ FT_Size size;
+
+
+ /* we will now load the glyph image */
+ error = FTC_Manager_LookupSize( cache->manager,
+ scaler,
+ &size );
+ if ( !error )
+ {
+ face = size->face;
+
+ error = FT_Load_Glyph( face, gindex, family->attrs.load_flags );
+ if ( !error )
+ {
+ if ( face->glyph->format == FT_GLYPH_FORMAT_BITMAP ||
+ face->glyph->format == FT_GLYPH_FORMAT_OUTLINE )
+ {
+ /* ok, copy it */
+ FT_Glyph glyph;
+
+
+ error = FT_Get_Glyph( face->glyph, &glyph );
+ if ( !error )
+ {
+ *aglyph = glyph;
+ goto Exit;
+ }
+ }
+ else
+ error = FTC_Err_Invalid_Argument;
+ }
+ }
+
+ Exit:
+ return error;
+ }
+
+
+ FT_CALLBACK_DEF( FT_Bool )
+ ftc_basic_gnode_compare_faceid( FTC_GNode gnode,
+ FTC_FaceID face_id,
+ FTC_Cache cache )
+ {
+ FTC_BasicFamily family = (FTC_BasicFamily)gnode->family;
+ FT_Bool result;
+
+
+ result = FT_BOOL( family->attrs.scaler.face_id == face_id );
+ if ( result )
+ {
+ /* we must call this function to avoid this node from appearing
+ * in later lookups with the same face_id!
+ */
+ FTC_GNode_UnselectFamily( gnode, cache );
+ }
+ return result;
+ }
+
+
+ /*
+ *
+ * basic image cache
+ *
+ */
+
+ FT_CALLBACK_TABLE_DEF
+ const FTC_IFamilyClassRec ftc_basic_image_family_class =
+ {
+ {
+ sizeof( FTC_BasicFamilyRec ),
+ (FTC_MruNode_CompareFunc)ftc_basic_family_compare,
+ (FTC_MruNode_InitFunc) ftc_basic_family_init,
+ (FTC_MruNode_ResetFunc) NULL,
+ (FTC_MruNode_DoneFunc) NULL
+ },
+ (FTC_IFamily_LoadGlyphFunc)ftc_basic_family_load_glyph
+ };
+
+
+ FT_CALLBACK_TABLE_DEF
+ const FTC_GCacheClassRec ftc_basic_image_cache_class =
+ {
+ {
+ (FTC_Node_NewFunc) ftc_inode_new,
+ (FTC_Node_WeightFunc) ftc_inode_weight,
+ (FTC_Node_CompareFunc)ftc_gnode_compare,
+ (FTC_Node_CompareFunc)ftc_basic_gnode_compare_faceid,
+ (FTC_Node_FreeFunc) ftc_inode_free,
+
+ sizeof( FTC_GCacheRec ),
+ (FTC_Cache_InitFunc) ftc_gcache_init,
+ (FTC_Cache_DoneFunc) ftc_gcache_done
+ },
+ (FTC_MruListClass)&ftc_basic_image_family_class
+ };
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FTC_ImageCache_New( FTC_Manager manager,
+ FTC_ImageCache *acache )
+ {
+ return FTC_GCache_New( manager, &ftc_basic_image_cache_class,
+ (FTC_GCache*)acache );
+ }
+
+
+ /* documentation is in ftcimage.h */
+
+ FT_EXPORT_DEF( FT_Error )
+ FTC_ImageCache_Lookup( FTC_ImageCache cache,
+ FTC_ImageType type,
+ FT_UInt gindex,
+ FT_Glyph *aglyph,
+ FTC_Node *anode )
+ {
+ FTC_BasicQueryRec query;
+ FTC_INode node;
+ FT_Error error;
+ FT_UInt32 hash;
+
+
+ /* some argument checks are delayed to FTC_Cache_Lookup */
+ if ( !aglyph )
+ {
+ error = FTC_Err_Invalid_Argument;
+ goto Exit;
+ }
+
+ *aglyph = NULL;
+ if ( anode )
+ *anode = NULL;
+
+ query.attrs.scaler.face_id = type->face_id;
+ query.attrs.scaler.width = type->width;
+ query.attrs.scaler.height = type->height;
+ query.attrs.scaler.pixel = 1;
+ query.attrs.load_flags = type->flags;
+
+ query.attrs.scaler.x_res = 0; /* make compilers happy */
+ query.attrs.scaler.y_res = 0;
+
+ hash = FTC_BASIC_ATTR_HASH( &query.attrs ) + gindex;
+
+#if 1 /* inlining is about 50% faster! */
+ FTC_GCACHE_LOOKUP_CMP( cache,
+ ftc_basic_family_compare,
+ FTC_GNode_Compare,
+ hash, gindex,
+ &query,
+ node,
+ error );
+#else
+ error = FTC_GCache_Lookup( FTC_GCACHE( cache ),
+ hash, gindex,
+ FTC_GQUERY( &query ),
+ (FTC_Node*) &node );
+#endif
+ if ( !error )
+ {
+ *aglyph = FTC_INODE( node )->glyph;
+
+ if ( anode )
+ {
+ *anode = FTC_NODE( node );
+ FTC_NODE( node )->ref_count++;
+ }
+ }
+
+ Exit:
+ return error;
+ }
+
+
+ /*
+ *
+ * basic small bitmap cache
+ *
+ */
+
+
+ FT_CALLBACK_TABLE_DEF
+ const FTC_SFamilyClassRec ftc_basic_sbit_family_class =
+ {
+ {
+ sizeof( FTC_BasicFamilyRec ),
+ (FTC_MruNode_CompareFunc)ftc_basic_family_compare,
+ (FTC_MruNode_InitFunc) ftc_basic_family_init,
+ (FTC_MruNode_ResetFunc) NULL,
+ (FTC_MruNode_DoneFunc) NULL
+ },
+ (FTC_SFamily_GetCountFunc) ftc_basic_family_get_count,
+ (FTC_SFamily_LoadGlyphFunc)ftc_basic_family_load_bitmap
+ };
+
+
+ FT_CALLBACK_TABLE_DEF
+ const FTC_GCacheClassRec ftc_basic_sbit_cache_class =
+ {
+ {
+ (FTC_Node_NewFunc) ftc_snode_new,
+ (FTC_Node_WeightFunc) ftc_snode_weight,
+ (FTC_Node_CompareFunc)ftc_snode_compare,
+ (FTC_Node_CompareFunc)ftc_basic_gnode_compare_faceid,
+ (FTC_Node_FreeFunc) ftc_snode_free,
+
+ sizeof( FTC_GCacheRec ),
+ (FTC_Cache_InitFunc) ftc_gcache_init,
+ (FTC_Cache_DoneFunc) ftc_gcache_done
+ },
+ (FTC_MruListClass)&ftc_basic_sbit_family_class
+ };
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FTC_SBitCache_New( FTC_Manager manager,
+ FTC_SBitCache *acache )
+ {
+ return FTC_GCache_New( manager, &ftc_basic_sbit_cache_class,
+ (FTC_GCache*)acache );
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FTC_SBitCache_Lookup( FTC_SBitCache cache,
+ FTC_ImageType type,
+ FT_UInt gindex,
+ FTC_SBit *ansbit,
+ FTC_Node *anode )
+ {
+ FT_Error error;
+ FTC_BasicQueryRec query;
+ FTC_SNode node;
+ FT_UInt32 hash;
+
+
+ if ( anode )
+ *anode = NULL;
+
+ /* other argument checks delayed to FTC_Cache_Lookup */
+ if ( !ansbit )
+ return FTC_Err_Invalid_Argument;
+
+ *ansbit = NULL;
+
+ query.attrs.scaler.face_id = type->face_id;
+ query.attrs.scaler.width = type->width;
+ query.attrs.scaler.height = type->height;
+ query.attrs.scaler.pixel = 1;
+ query.attrs.load_flags = type->flags;
+
+ query.attrs.scaler.x_res = 0; /* make compilers happy */
+ query.attrs.scaler.y_res = 0;
+
+ /* beware, the hash must be the same for all glyph ranges! */
+ hash = FTC_BASIC_ATTR_HASH( &query.attrs ) +
+ gindex / FTC_SBIT_ITEMS_PER_NODE;
+
+#if 1 /* inlining is about 50% faster! */
+ FTC_GCACHE_LOOKUP_CMP( cache,
+ ftc_basic_family_compare,
+ FTC_SNode_Compare,
+ hash, gindex,
+ &query,
+ node,
+ error );
+#else
+ error = FTC_GCache_Lookup( FTC_GCACHE( cache ),
+ hash,
+ gindex,
+ FTC_GQUERY( &query ),
+ (FTC_Node*)&node );
+#endif
+ if ( error )
+ goto Exit;
+
+ *ansbit = node->sbits + ( gindex - FTC_GNODE( node )->gindex );
+
+ if ( anode )
+ {
+ *anode = FTC_NODE( node );
+ FTC_NODE( node )->ref_count++;
+ }
+
+ Exit:
+ return error;
+ }
+
+
+/* END */
diff --git a/extras/freetype2/src/cache/ftccache.c b/extras/freetype2/src/cache/ftccache.c
index a12fedc66..2b6bee9cf 100644
--- a/extras/freetype2/src/cache/ftccache.c
+++ b/extras/freetype2/src/cache/ftccache.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType internal cache interface (body). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,10 +17,11 @@
#include <ft2build.h>
-#include FT_CACHE_MANAGER_H
+#include FT_CACHE_INTERNAL_MANAGER_H
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DEBUG_H
+#include "ftccback.h"
#include "ftcerror.h"
@@ -40,208 +41,194 @@
/*************************************************************************/
/*************************************************************************/
- FT_EXPORT_DEF( void )
- ftc_node_done( FTC_Node node,
- FTC_Cache cache )
+ /* add a new node to the head of the manager's circular MRU list */
+ static void
+ ftc_node_mru_link( FTC_Node node,
+ FTC_Manager manager )
{
- FTC_Family family;
- FTC_FamilyEntry entry;
-
+ FTC_MruNode_Prepend( (FTC_MruNode*)&manager->nodes_list,
+ (FTC_MruNode)node );
+ manager->num_nodes++;
+ }
- entry = cache->manager->families.entries + node->fam_index;
- family = entry->family;
- /* remove from parent set table - eventually destroy the set */
- if ( --family->num_nodes == 0 )
- FT_LruList_Remove( cache->families, (FT_LruNode) family );
+ /* remove a node from the manager's MRU list */
+ static void
+ ftc_node_mru_unlink( FTC_Node node,
+ FTC_Manager manager )
+ {
+ FTC_MruNode_Remove( (FTC_MruNode*)&manager->nodes_list,
+ (FTC_MruNode)node );
+ manager->num_nodes--;
}
- /* add a new node to the head of the manager's circular MRU list */
+ /* move a node to the head of the manager's MRU list */
static void
- ftc_node_mru_link( FTC_Node node,
- FTC_Manager manager )
+ ftc_node_mru_up( FTC_Node node,
+ FTC_Manager manager )
{
- FTC_Node first = manager->nodes_list;
+ FTC_MruNode_Up( (FTC_MruNode*)&manager->nodes_list,
+ (FTC_MruNode)node );
+ }
- if ( first )
+ /* Note that this function cannot fail. If we cannot re-size the
+ * buckets array appropriately, we simply degrade the hash table's
+ * performance!
+ */
+ static void
+ ftc_cache_resize( FTC_Cache cache )
+ {
+ for (;;)
{
- FTC_Node last = first->mru_prev;
+ FTC_Node node, *pnode;
+ FT_UInt p = cache->p;
+ FT_UInt mask = cache->mask;
+ FT_UInt count = mask + p + 1; /* number of buckets */
- FT_ASSERT( last->mru_next == first );
+ /* do we need to shrink the buckets array? */
+ if ( cache->slack < 0 )
+ {
+ FTC_Node new_list = NULL;
- node->mru_prev = last;
- node->mru_next = first;
- last->mru_next = node;
- first->mru_prev = node;
- }
- else
- {
- FT_ASSERT( manager->num_nodes == 0 );
+ /* try to expand the buckets array _before_ splitting
+ * the bucket lists
+ */
+ if ( p >= mask )
+ {
+ FT_Memory memory = cache->memory;
- node->mru_next = node;
- node->mru_prev = node;
- }
- manager->nodes_list = node;
- manager->num_nodes++;
- }
+ /* if we can't expand the array, leave immediately */
+ if ( FT_MEM_RENEW_ARRAY( cache->buckets, (mask+1)*2, (mask+1)*4 ) )
+ break;
+ }
+ /* split a single bucket */
+ pnode = cache->buckets + p;
- /* remove a node from the manager's MRU list */
- static void
- ftc_node_mru_unlink( FTC_Node node,
- FTC_Manager manager )
- {
- FTC_Node first = manager->nodes_list;
- FTC_Node prev = node->mru_prev;
- FTC_Node next = node->mru_next;
+ for (;;)
+ {
+ node = *pnode;
+ if ( node == NULL )
+ break;
+ if ( node->hash & ( mask + 1 ) )
+ {
+ *pnode = node->link;
+ node->link = new_list;
+ new_list = node;
+ }
+ else
+ pnode = &node->link;
+ }
- FT_ASSERT( first != NULL && manager->num_nodes > 0 );
- FT_ASSERT( next->mru_prev == node );
- FT_ASSERT( prev->mru_next == node );
+ cache->buckets[p + mask + 1] = new_list;
- next->mru_prev = prev;
- prev->mru_next = next;
+ cache->slack += FTC_HASH_MAX_LOAD;
- if ( node == first )
- {
- /* this is the last node in the list; update its head pointer */
- if ( node == next )
- manager->nodes_list = NULL;
- else
- manager->nodes_list = next;
- }
+ if ( p >= mask )
+ {
+ cache->mask = 2 * mask + 1;
+ cache->p = 0;
+ }
+ else
+ cache->p = p + 1;
+ }
- node->mru_next = NULL;
- node->mru_prev = NULL;
- manager->num_nodes--;
- }
+ /* do we need to expand the buckets array? */
+ else if ( cache->slack > (FT_Long)count * FTC_HASH_SUB_LOAD )
+ {
+ FT_UInt old_index = p + mask;
+ FTC_Node* pold;
- /* move a node to the head of the manager's MRU list */
- static void
- ftc_node_mru_up( FTC_Node node,
- FTC_Manager manager )
- {
- FTC_Node first = manager->nodes_list;
+ if ( old_index + 1 <= FTC_HASH_INITIAL_SIZE )
+ break;
+ if ( p == 0 )
+ {
+ FT_Memory memory = cache->memory;
- if ( node != first )
- {
- FTC_Node prev = node->mru_prev;
- FTC_Node next = node->mru_next;
- FTC_Node last;
+ /* if we can't shrink the array, leave immediately */
+ if ( FT_MEM_RENEW_ARRAY( cache->buckets,
+ ( mask + 1 ) * 2, mask + 1 ) )
+ break;
+
+ cache->mask >>= 1;
+ p = cache->mask;
+ }
+ else
+ p--;
- prev->mru_next = next;
- next->mru_prev = prev;
+ pnode = cache->buckets + p;
+ while ( *pnode )
+ pnode = &(*pnode)->link;
- last = first->mru_prev;
- node->mru_next = first;
- node->mru_prev = last;
- first->mru_prev = node;
- last->mru_next = node;
+ pold = cache->buckets + old_index;
+ *pnode = *pold;
+ *pold = NULL;
- manager->nodes_list = node;
+ cache->slack -= FTC_HASH_MAX_LOAD;
+ cache->p = p;
+ }
+ else /* the hash table is balanced */
+ break;
}
}
/* remove a node from its cache's hash table */
- static FT_Error
- ftc_node_hash_unlink( FTC_Node node,
+ static void
+ ftc_node_hash_unlink( FTC_Node node0,
FTC_Cache cache )
{
- FT_Error error = 0;
FTC_Node *pnode;
- FT_UInt idx, num_buckets;
+ FT_UInt idx;
- idx = (FT_UInt)( node->hash & cache->mask );
+ idx = (FT_UInt)( node0->hash & cache->mask );
if ( idx < cache->p )
- idx = (FT_UInt)( node->hash & ( 2 * cache->mask + 1 ) );
+ idx = (FT_UInt)( node0->hash & ( 2 * cache->mask + 1 ) );
pnode = cache->buckets + idx;
for (;;)
{
- if ( *pnode == NULL )
+ FTC_Node node = *pnode;
+
+
+ if ( node == NULL )
{
FT_ERROR(( "ftc_node_hash_unlink: unknown node!\n" ));
- return FT_Err_Ok;
+ return;
}
- if ( *pnode == node )
- {
- *pnode = node->link;
- node->link = NULL;
+ if ( node == node0 )
break;
- }
pnode = &(*pnode)->link;
}
- num_buckets = ( cache->p + cache->mask + 1 );
-
- if ( ++cache->slack > (FT_Long)num_buckets * FTC_HASH_SUB_LOAD )
- {
- FT_UInt p = cache->p;
- FT_UInt mask = cache->mask;
- FT_UInt old_index = p + mask;
- FTC_Node* pold;
-
-
- if ( old_index+1 <= FTC_HASH_INITIAL_SIZE )
- goto Exit;
-
- if ( p == 0 )
- {
- FT_Memory memory = cache->memory;
-
-
- cache->mask >>= 1;
- p = cache->mask;
-
- if ( FT_RENEW_ARRAY( cache->buckets, ( mask + 1 ) * 2, (mask+1) ) )
- {
- FT_ERROR(( "ftc_node_hash_unlink: couldn't shunk buckets!\n" ));
- goto Exit;
- }
- }
- else
- p--;
-
- pnode = cache->buckets + p;
- while ( *pnode )
- pnode = &(*pnode)->link;
+ *pnode = node0->link;
+ node0->link = NULL;
- pold = cache->buckets + old_index;
- *pnode = *pold;
- *pold = NULL;
-
- cache->slack -= FTC_HASH_MAX_LOAD;
- cache->p = p;
- }
-
- Exit:
- return error;
+ cache->slack++;
+ ftc_cache_resize( cache );
}
-
- /* add a node to the "top" of its cache's hash table */
- static FT_Error
+ /* add a node to the `top' of its cache's hash table */
+ static void
ftc_node_hash_link( FTC_Node node,
FTC_Cache cache )
{
FTC_Node *pnode;
FT_UInt idx;
- FT_Error error = 0;
idx = (FT_UInt)( node->hash & cache->mask );
@@ -253,85 +240,29 @@
node->link = *pnode;
*pnode = node;
- if ( --cache->slack < 0 )
- {
- FT_UInt p = cache->p;
- FT_UInt mask = cache->mask;
- FTC_Node new_list;
-
-
- /* split a single bucket */
- new_list = NULL;
- pnode = cache->buckets + p;
-
- for (;;)
- {
- node = *pnode;
- if ( node == NULL )
- break;
-
- if ( node->hash & ( mask + 1 ) )
- {
- *pnode = node->link;
- node->link = new_list;
- new_list = node;
- }
- else
- pnode = &node->link;
- }
-
- cache->buckets[p + mask + 1] = new_list;
-
- cache->slack += FTC_HASH_MAX_LOAD;
-
- if ( p >= mask )
- {
- FT_Memory memory = cache->memory;
-
-
- if ( FT_RENEW_ARRAY( cache->buckets,
- ( mask + 1 ) * 2, ( mask + 1 ) * 4 ) )
- {
- FT_ERROR(( "ftc_node_hash_link: couldn't expand buckets!\n" ));
- goto Exit;
- }
-
- cache->mask = 2 * mask + 1;
- cache->p = 0;
- }
- else
- cache->p = p + 1;
- }
-
- Exit:
- return error;
+ cache->slack--;
+ ftc_cache_resize( cache );
}
-
-
/* remove a node from the cache manager */
FT_EXPORT_DEF( void )
ftc_node_destroy( FTC_Node node,
FTC_Manager manager )
{
- FT_Memory memory = manager->library->memory;
- FTC_Cache cache;
- FTC_FamilyEntry entry;
- FTC_Cache_Class clazz;
+ FTC_Cache cache;
#ifdef FT_DEBUG_ERROR
/* find node's cache */
- if ( node->fam_index >= manager->families.count )
+ if ( node->cache_index >= manager->num_caches )
{
FT_ERROR(( "ftc_node_destroy: invalid node handle\n" ));
return;
}
#endif
- entry = manager->families.entries + node->fam_index;
- cache = entry->cache;
+ cache = manager->caches[node->cache_index];
#ifdef FT_DEBUG_ERROR
if ( cache == NULL )
@@ -341,9 +272,7 @@
}
#endif
- clazz = cache->clazz;
-
- manager->cur_weight -= clazz->node_weight( node, cache );
+ manager->cur_weight -= cache->clazz.node_weight( node, cache );
/* remove node from mru list */
ftc_node_mru_unlink( node, manager );
@@ -352,10 +281,7 @@
ftc_node_hash_unlink( node, cache );
/* now finalize it */
- if ( clazz->node_done )
- clazz->node_done( node, cache );
-
- FT_FREE( node );
+ cache->clazz.node_free( node, cache );
#if 0
/* check, just in case of general corruption :-) */
@@ -369,120 +295,42 @@
/*************************************************************************/
/*************************************************************************/
/***** *****/
- /***** CACHE FAMILY DEFINITIONS *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- FT_EXPORT_DEF( FT_Error )
- ftc_family_init( FTC_Family family,
- FTC_Query query,
- FTC_Cache cache )
- {
- FT_Error error;
- FTC_Manager manager = cache->manager;
- FT_Memory memory = manager->library->memory;
- FTC_FamilyEntry entry;
-
-
- family->cache = cache;
- family->num_nodes = 0;
-
- /* now add to manager's family table */
- error = ftc_family_table_alloc( &manager->families, memory, &entry );
- if ( !error )
- {
- entry->cache = cache;
- entry->family = family;
- family->fam_index = entry->index;
-
- query->family = family; /* save family in query */
- }
-
- return error;
- }
-
-
- FT_EXPORT_DEF( void )
- ftc_family_done( FTC_Family family )
- {
- if ( family && family->cache )
- {
- FTC_Manager manager = family->cache->manager;
-
-
- /* remove from manager's family table */
- ftc_family_table_free( &manager->families, family->fam_index );
- }
- }
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
/***** ABSTRACT CACHE CLASS *****/
/***** *****/
/*************************************************************************/
/*************************************************************************/
-
FT_EXPORT_DEF( FT_Error )
- ftc_cache_init( FTC_Cache cache )
+ FTC_Cache_Init( FTC_Cache cache )
{
- FT_Memory memory = cache->memory;
- FTC_Cache_Class clazz = cache->clazz;
- FT_Error error;
+ FT_Memory memory = cache->memory;
cache->p = 0;
cache->mask = FTC_HASH_INITIAL_SIZE - 1;
cache->slack = FTC_HASH_INITIAL_SIZE * FTC_HASH_MAX_LOAD;
- if ( FT_NEW_ARRAY( cache->buckets, FTC_HASH_INITIAL_SIZE * 2 ) )
- goto Exit;
+ return ( FT_MEM_NEW_ARRAY( cache->buckets, FTC_HASH_INITIAL_SIZE * 2 ) );
+ }
- /* now, initialize the lru list of families for this cache */
- if ( clazz->family_size > 0 )
- {
- FT_LruList_ClassRec* lru_class = &cache->family_class;
-
-
- lru_class->list_size = sizeof( FT_LruListRec );
- lru_class->list_init = NULL;
- lru_class->list_done = NULL;
-
- lru_class->node_size = clazz->family_size;
- lru_class->node_init = (FT_LruNode_InitFunc) clazz->family_init;
- lru_class->node_done = (FT_LruNode_DoneFunc) clazz->family_done;
- lru_class->node_flush = (FT_LruNode_FlushFunc) NULL;
- lru_class->node_compare = (FT_LruNode_CompareFunc)clazz->family_compare;
-
- error = FT_LruList_New( (FT_LruList_Class) lru_class,
- 0, /* max items == 0 => unbounded list */
- cache,
- memory,
- &cache->families );
- if ( error )
- FT_FREE( cache->buckets );
- }
- Exit:
- return error;
+ FT_LOCAL_DEF( FT_Error )
+ ftc_cache_init( FTC_Cache cache )
+ {
+ return FTC_Cache_Init( cache );
}
FT_EXPORT_DEF( void )
- ftc_cache_clear( FTC_Cache cache )
+ FTC_Cache_Clear( FTC_Cache cache )
{
if ( cache )
{
- FT_Memory memory = cache->memory;
- FTC_Cache_Class clazz = cache->clazz;
- FTC_Manager manager = cache->manager;
- FT_UFast i;
- FT_UInt count;
+ FTC_Manager manager = cache->manager;
+ FT_UFast i;
+ FT_UInt count;
+
count = cache->p + cache->mask + 1;
@@ -500,307 +348,256 @@
ftc_node_mru_unlink( node, manager );
/* now finalize it */
- manager->cur_weight -= clazz->node_weight( node, cache );
+ manager->cur_weight -= cache->clazz.node_weight( node, cache );
- if ( clazz->node_done )
- clazz->node_done( node, cache );
-
- FT_FREE( node );
+ cache->clazz.node_free( node, cache );
node = next;
}
cache->buckets[i] = NULL;
}
-
- cache->p = 0;
-
- /* destroy the families */
- if ( cache->families )
- FT_LruList_Reset( cache->families );
+ ftc_cache_resize( cache );
}
}
FT_EXPORT_DEF( void )
- ftc_cache_done( FTC_Cache cache )
+ FTC_Cache_Done( FTC_Cache cache )
{
- if ( cache )
+ if ( cache->memory )
{
FT_Memory memory = cache->memory;
- ftc_cache_clear( cache );
+ FTC_Cache_Clear( cache );
FT_FREE( cache->buckets );
cache->mask = 0;
+ cache->p = 0;
cache->slack = 0;
- if ( cache->families )
- {
- FT_LruList_Destroy( cache->families );
- cache->families = NULL;
- }
+ cache->memory = NULL;
}
}
- /* Look up a node in "top" of its cache's hash table. */
- /* If not found, create a new node. */
- /* */
- FT_EXPORT_DEF( FT_Error )
- ftc_cache_lookup( FTC_Cache cache,
- FTC_Query query,
- FTC_Node *anode )
+ FT_LOCAL_DEF( void )
+ ftc_cache_done( FTC_Cache cache )
{
- FT_Error error = FT_Err_Ok;
- FTC_Manager manager;
- FT_LruNode lru;
- FT_UInt free_count = 0;
-
-
- if ( !cache || !query || !anode )
- return FTC_Err_Invalid_Argument;
-
- *anode = NULL;
-
- query->hash = 0;
- query->family = NULL;
-
- manager = cache->manager;
-
- /* here's a small note explaining what's hapenning in the code below.
- *
- * we need to deal intelligently with out-of-memory (OOM) conditions
- * when trying to create a new family or cache node during the lookup.
- *
- * when an OOM is detected, we'll try to free one or more "old" nodes
- * from the cache, then try again. it may be necessary to do that several
- * times, so a loop is needed.
- *
- * the local variable "free_count" holds the number of "old" nodes to
- * discard on each attempt. it starts at 1 and doubles on each iteration.
- * the loop stops when:
- *
- * - a non-OOM error is detected
- * - a succesful lookup is performed
- * - there are no more unused nodes in the cache
- *
- * for the record, remember that all used nodes appear _before_
- * unused ones in the manager's MRU node list.
- */
+ FTC_Cache_Done( cache );
+ }
- for (;;)
- {
- {
- /* first of all, find the relevant family */
- FT_LruList list = cache->families;
- FT_LruNode fam, *pfam;
- FT_LruNode_CompareFunc compare = list->clazz->node_compare;
- pfam = &list->nodes;
- for (;;)
- {
- fam = *pfam;
- if ( fam == NULL )
- {
- error = FT_LruList_Lookup( list, query, &lru );
- if ( error )
- goto Fail;
+ static void
+ ftc_cache_add( FTC_Cache cache,
+ FT_UInt32 hash,
+ FTC_Node node )
+ {
+ node->hash = hash;
+ node->cache_index = (FT_UInt16) cache->index;
+ node->ref_count = 0;
- goto Skip;
- }
+ ftc_node_hash_link( node, cache );
+ ftc_node_mru_link( node, cache->manager );
- if ( compare( fam, query, list->data ) )
- break;
+ {
+ FTC_Manager manager = cache->manager;
- pfam = &fam->next;
- }
- FT_ASSERT( fam != NULL );
+ manager->cur_weight += cache->clazz.node_weight( node, cache );
- /* move to top of list when needed */
- if ( fam != list->nodes )
- {
- *pfam = fam->next;
- fam->next = list->nodes;
- list->nodes = fam;
- }
+ if ( manager->cur_weight >= manager->max_weight )
+ {
+ node->ref_count++;
+ FTC_Manager_Compress( manager );
+ node->ref_count--;
+ }
+ }
+ }
- lru = fam;
- Skip:
- ;
- }
+ FT_EXPORT_DEF( FT_Error )
+ FTC_Cache_NewNode( FTC_Cache cache,
+ FT_UInt32 hash,
+ FT_Pointer query,
+ FTC_Node *anode )
+ {
+ FT_Error error;
+ FTC_Node node;
+
+ /*
+ * Try to allocate a new cache node. Note that in case of
+ * out-of-memory error (OOM), we'll flush the cache a bit,
+ * then try again.
+ *
+ * On each try, the `tries' variable gives the number
+ * of old nodes we want to flush from the manager's global list
+ * before the next allocation attempt. It barely doubles on
+ * each iteration.
+ *
+ */
+ error = cache->clazz.node_new( &node, query, cache );
+ if ( error )
+ goto FlushCache;
+
+ AddNode:
+ /* don't assume that the cache has the same number of buckets, since
+ * our allocation request might have triggered global cache flushing
+ */
+ ftc_cache_add( cache, hash, node );
- {
- FTC_Manager manager = cache->manager;
- FTC_Family family = (FTC_Family) lru;
- FT_UFast hash = query->hash;
- FTC_Node* bucket;
- FT_UInt idx;
+ Exit:
+ *anode = node;
+ return error;
+ FlushCache:
+ node = NULL;
+ if ( error != FT_Err_Out_Of_Memory )
+ goto Exit;
- idx = hash & cache->mask;
- if ( idx < cache->p )
- idx = hash & ( cache->mask * 2 + 1 );
+ {
+ FTC_Manager manager = cache->manager;
+ FT_UInt count, tries = 1;
- bucket = cache->buckets + idx;
+ for (;;)
+ {
+ error = cache->clazz.node_new( &node, query, cache );
+ if ( !error )
+ break;
- if ( query->family != family ||
- family->fam_index >= manager->families.size )
- {
- FT_ERROR((
- "ftc_cache_lookup: invalid query (bad 'family' field)\n" ));
- error = FTC_Err_Invalid_Argument;
+ node = NULL;
+ if ( error != FT_Err_Out_Of_Memory )
goto Exit;
- }
- if ( *bucket )
- {
- FTC_Node* pnode = bucket;
- FTC_Node_CompareFunc compare = cache->clazz->node_compare;
+ count = FTC_Manager_FlushN( manager, tries );
+ if ( count == 0 )
+ goto Exit;
+ if ( count == tries )
+ {
+ count = tries * 2;
+ if ( count < tries || count > manager->num_nodes )
+ count = manager->num_nodes;
+ }
+ tries = count;
+ }
+ }
+ goto AddNode;
+ }
- for ( ;; )
- {
- FTC_Node node;
+ FT_EXPORT_DEF( FT_Error )
+ FTC_Cache_Lookup( FTC_Cache cache,
+ FT_UInt32 hash,
+ FT_Pointer query,
+ FTC_Node *anode )
+ {
+ FT_UFast idx;
+ FTC_Node* bucket;
+ FTC_Node* pnode;
+ FTC_Node node;
+ FT_Error error = 0;
- node = *pnode;
- if ( node == NULL )
- break;
+ FTC_Node_CompareFunc compare = cache->clazz.node_compare;
- if ( node->hash == hash &&
- (FT_UInt)node->fam_index == family->fam_index &&
- compare( node, query, cache ) )
- {
- /* move to head of bucket list */
- if ( pnode != bucket )
- {
- *pnode = node->link;
- node->link = *bucket;
- *bucket = node;
- }
- /* move to head of MRU list */
- if ( node != manager->nodes_list )
- ftc_node_mru_up( node, manager );
+ if ( cache == NULL || anode == NULL )
+ return FT_Err_Invalid_Argument;
- *anode = node;
- goto Exit;
- }
+ idx = hash & cache->mask;
+ if ( idx < cache->p )
+ idx = hash & ( cache->mask * 2 + 1 );
- pnode = &node->link;
- }
- }
+ bucket = cache->buckets + idx;
+ pnode = bucket;
+ for (;;)
+ {
+ node = *pnode;
+ if ( node == NULL )
+ goto NewNode;
- /* didn't find a node, create a new one */
- {
- FTC_Cache_Class clazz = cache->clazz;
- FT_Memory memory = cache->memory;
- FTC_Node node;
+ if ( node->hash == hash && compare( node, query, cache ) )
+ break;
+ pnode = &node->link;
+ }
- if ( FT_ALLOC( node, clazz->node_size ) )
- goto Fail;
+ if ( node != *bucket )
+ {
+ *pnode = node->link;
+ node->link = *bucket;
+ *bucket = node;
+ }
- node->fam_index = (FT_UShort) family->fam_index;
- node->hash = query->hash;
- node->ref_count = 0;
+ /* move to head of MRU list */
+ {
+ FTC_Manager manager = cache->manager;
- error = clazz->node_init( node, query, cache );
- if ( error )
- {
- FT_FREE( node );
- goto Fail;
- }
- error = ftc_node_hash_link( node, cache );
- if ( error )
- {
- clazz->node_done( node, cache );
- FT_FREE( node );
- goto Fail;
- }
+ if ( node != manager->nodes_list )
+ ftc_node_mru_up( node, manager );
+ }
+ *anode = node;
+ return error;
- ftc_node_mru_link( node, cache->manager );
+ NewNode:
+ return FTC_Cache_NewNode( cache, hash, query, anode );
+ }
- cache->manager->cur_weight += clazz->node_weight( node, cache );
- /* now try to compress the node pool when necessary */
- if ( manager->cur_weight >= manager->max_weight )
- {
- node->ref_count++;
- FTC_Manager_Compress( manager );
- node->ref_count--;
- }
+ FT_EXPORT_DEF( void )
+ FTC_Cache_RemoveFaceID( FTC_Cache cache,
+ FTC_FaceID face_id )
+ {
+ FT_UFast i, count;
+ FTC_Manager manager = cache->manager;
+ FTC_Node frees = NULL;
- *anode = node;
- }
- /* all is well, exit now
- */
- goto Exit;
- }
+ count = cache->p + cache->mask;
+ for ( i = 0; i < count; i++ )
+ {
+ FTC_Node* bucket = cache->buckets + i;
+ FTC_Node* pnode = bucket;
- Fail:
- if ( error != FT_Err_Out_Of_Memory )
- goto Exit;
- /* there is not enough memory, try to release some unused nodes
- * from the cache to make room for a new one.
- */
+ for ( ;; )
{
- FT_UInt new_count;
+ FTC_Node node = *pnode;
- new_count = 1 + free_count*2;
-
- /* check overflow and bounds */
- if ( new_count < free_count || free_count > manager->num_nodes )
- goto Exit;
- free_count = new_count;
+ if ( node == NULL )
+ break;
- /* try to remove "new_count" nodes from the list */
+ if ( cache->clazz.node_remove_faceid( node, face_id, cache ) )
{
- FTC_Node first = manager->nodes_list;
- FTC_Node node;
-
- if ( first == NULL ) /* empty list ! */
- goto Exit;
+ *pnode = node->link;
+ node->link = frees;
+ frees = node;
+ }
+ else
+ pnode = &node->link;
+ }
+ }
- /* go to last node - it's a circular list */
- node = first->mru_prev;
- for ( ; node && new_count > 0; new_count-- )
- {
- FTC_Node prev = node->mru_prev;
+ /* remove all nodes in the free list */
+ while ( frees )
+ {
+ FTC_Node node;
- /* used nodes always appear before unused one in the MRU
- * list. if we find one here, we'd better stop right now
- * our iteration
- */
- if ( node->ref_count > 0 )
- {
- /* if there are no unused nodes in the list, we'd better exit */
- if ( new_count == free_count )
- goto Exit;
- break;
- }
+ node = frees;
+ frees = node->link;
- ftc_node_destroy( node, manager );
+ manager->cur_weight -= cache->clazz.node_weight( node, cache );
+ ftc_node_mru_unlink( node, manager );
- if ( node == first )
- break;
+ cache->clazz.node_free( node, cache );
- node = prev;
- }
- }
- }
+ cache->slack++;
}
- Exit:
- return error;
+ ftc_cache_resize( cache );
}
diff --git a/extras/freetype2/src/cache/ftccback.h b/extras/freetype2/src/cache/ftccback.h
new file mode 100644
index 000000000..68be91385
--- /dev/null
+++ b/extras/freetype2/src/cache/ftccback.h
@@ -0,0 +1,82 @@
+/***************************************************************************/
+/* */
+/* ftccback.h */
+/* */
+/* Callback functions of the caching sub-system (specification only). */
+/* */
+/* Copyright 2004 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+#ifndef __FTCCBACK_H__
+#define __FTCCBACK_H__
+
+#include <ft2build.h>
+#include FT_CACHE_H
+#include FT_CACHE_INTERNAL_MRU_H
+#include FT_CACHE_INTERNAL_IMAGE_H
+#include FT_CACHE_INTERNAL_MANAGER_H
+#include FT_CACHE_INTERNAL_GLYPH_H
+#include FT_CACHE_INTERNAL_SBITS_H
+
+
+ FT_LOCAL( void )
+ ftc_inode_free( FTC_INode inode,
+ FTC_Cache cache );
+
+ FT_LOCAL( FT_Error )
+ ftc_inode_new( FTC_INode *pinode,
+ FTC_GQuery gquery,
+ FTC_Cache cache );
+
+ FT_LOCAL( FT_ULong )
+ ftc_inode_weight( FTC_INode inode );
+
+
+ FT_LOCAL( void )
+ ftc_snode_free( FTC_SNode snode,
+ FTC_Cache cache );
+
+ FT_LOCAL( FT_Error )
+ ftc_snode_new( FTC_SNode *psnode,
+ FTC_GQuery gquery,
+ FTC_Cache cache );
+
+ FT_LOCAL( FT_ULong )
+ ftc_snode_weight( FTC_SNode snode );
+
+ FT_LOCAL( FT_Bool )
+ ftc_snode_compare( FTC_SNode snode,
+ FTC_GQuery gquery,
+ FTC_Cache cache );
+
+
+ FT_LOCAL( FT_Bool )
+ ftc_gnode_compare( FTC_GNode gnode,
+ FTC_GQuery gquery );
+
+
+ FT_LOCAL( FT_Error )
+ ftc_gcache_init( FTC_GCache cache );
+
+ FT_LOCAL( void )
+ ftc_gcache_done( FTC_GCache cache );
+
+
+ FT_LOCAL( FT_Error )
+ ftc_cache_init( FTC_Cache cache );
+
+ FT_LOCAL( void )
+ ftc_cache_done( FTC_Cache cache );
+
+
+#endif /* __FTCCBACK_H__ */
+
+/* END */
diff --git a/extras/freetype2/src/cache/ftccmap.c b/extras/freetype2/src/cache/ftccmap.c
index 8366ce574..dfdbb488b 100644
--- a/extras/freetype2/src/cache/ftccmap.c
+++ b/extras/freetype2/src/cache/ftccmap.c
@@ -4,7 +4,7 @@
/* */
/* FreeType CharMap cache (body) */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,17 +19,18 @@
#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_CACHE_H
-#include FT_CACHE_CHARMAP_H
-#include FT_CACHE_MANAGER_H
+#include FT_CACHE_INTERNAL_MANAGER_H
#include FT_INTERNAL_MEMORY_H
#include FT_INTERNAL_DEBUG_H
#include FT_TRUETYPE_IDS_H
+#include "ftccback.h"
#include "ftcerror.h"
#undef FT_COMPONENT
#define FT_COMPONENT trace_cache
+
/*************************************************************************/
/* */
/* Each FTC_CMapNode contains a simple array to map a range of character */
@@ -47,56 +48,44 @@
/* number of glyph indices / character code per node */
#define FTC_CMAP_INDICES_MAX 128
+ /* compute a query/node hash */
+#define FTC_CMAP_HASH( faceid, index, charcode ) \
+ ( FTC_FACE_ID_HASH( faceid ) + 211 * ( index ) + \
+ ( (char_code) / FTC_CMAP_INDICES_MAX ) )
+
+ /* the charmap query */
+ typedef struct FTC_CMapQueryRec_
+ {
+ FTC_FaceID face_id;
+ FT_UInt cmap_index;
+ FT_UInt32 char_code;
+
+ } FTC_CMapQueryRec, *FTC_CMapQuery;
+#define FTC_CMAP_QUERY( x ) ((FTC_CMapQuery)(x))
+#define FTC_CMAP_QUERY_HASH( x ) \
+ FTC_CMAP_HASH( (x)->face_id, (x)->cmap_index, (x)->char_code )
+
+ /* the cmap cache node */
typedef struct FTC_CMapNodeRec_
{
FTC_NodeRec node;
+ FTC_FaceID face_id;
+ FT_UInt cmap_index;
FT_UInt32 first; /* first character in node */
FT_UInt16 indices[FTC_CMAP_INDICES_MAX]; /* array of glyph indices */
} FTC_CMapNodeRec, *FTC_CMapNode;
-
#define FTC_CMAP_NODE( x ) ( (FTC_CMapNode)( x ) )
-
-
- /* compute node hash value from cmap family and "requested" glyph index */
-#define FTC_CMAP_HASH( cfam, cquery ) \
- ( (cfam)->hash + ( (cquery)->char_code / FTC_CMAP_INDICES_MAX ) )
+#define FTC_CMAP_NODE_HASH( x ) \
+ FTC_CMAP_HASH( (x)->face_id, (x)->cmap_index, (x)->first )
/* if (indices[n] == FTC_CMAP_UNKNOWN), we assume that the corresponding */
/* glyph indices haven't been queried through FT_Get_Glyph_Index() yet */
#define FTC_CMAP_UNKNOWN ( (FT_UInt16)-1 )
- /* the charmap query */
- typedef struct FTC_CMapQueryRec_
- {
- FTC_QueryRec query;
- FTC_CMapDesc desc;
- FT_UInt32 char_code;
-
- } FTC_CMapQueryRec, *FTC_CMapQuery;
-
-
-#define FTC_CMAP_QUERY( x ) ( (FTC_CMapQuery)( x ) )
-
-
- /* the charmap family */
- typedef struct FTC_CMapFamilyRec_
- {
- FTC_FamilyRec family;
- FT_UInt32 hash;
- FTC_CMapDescRec desc;
- FT_UInt index;
-
- } FTC_CMapFamilyRec, *FTC_CMapFamily;
-
-
-#define FTC_CMAP_FAMILY( x ) ( (FTC_CMapFamily)( x ) )
-#define FTC_CMAP_FAMILY_MEMORY( x ) FTC_FAMILY( x )->memory
-
-
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -106,27 +95,44 @@
/*************************************************************************/
- /* no need for specific finalizer; we use "ftc_node_done" directly */
+ /* no need for specific finalizer; we use `ftc_node_done' directly */
+
+ FT_CALLBACK_DEF( void )
+ ftc_cmap_node_free( FTC_CMapNode node,
+ FTC_Cache cache )
+ {
+ FT_Memory memory = cache->memory;
+
+
+ FT_FREE( node );
+ }
+
/* initialize a new cmap node */
FT_CALLBACK_DEF( FT_Error )
- ftc_cmap_node_init( FTC_CMapNode cnode,
- FTC_CMapQuery cquery,
- FTC_Cache cache )
+ ftc_cmap_node_new( FTC_CMapNode *anode,
+ FTC_CMapQuery query,
+ FTC_Cache cache )
{
- FT_UInt32 first;
- FT_UInt n;
- FT_UNUSED( cache );
+ FT_Error error;
+ FT_Memory memory = cache->memory;
+ FTC_CMapNode node;
+ FT_UInt nn;
- first = ( cquery->char_code / FTC_CMAP_INDICES_MAX ) *
- FTC_CMAP_INDICES_MAX;
+ if ( !FT_NEW( node ) )
+ {
+ node->face_id = query->face_id;
+ node->cmap_index = query->cmap_index;
+ node->first = (query->char_code / FTC_CMAP_INDICES_MAX) *
+ FTC_CMAP_INDICES_MAX;
- cnode->first = first;
- for ( n = 0; n < FTC_CMAP_INDICES_MAX; n++ )
- cnode->indices[n] = FTC_CMAP_UNKNOWN;
+ for ( nn = 0; nn < FTC_CMAP_INDICES_MAX; nn++ )
+ node->indices[nn] = FTC_CMAP_UNKNOWN;
+ }
- return 0;
+ *anode = node;
+ return error;
}
@@ -142,184 +148,27 @@
/* compare a cmap node to a given query */
FT_CALLBACK_DEF( FT_Bool )
- ftc_cmap_node_compare( FTC_CMapNode cnode,
- FTC_CMapQuery cquery )
- {
- FT_UInt32 offset = (FT_UInt32)( cquery->char_code - cnode->first );
-
-
- return FT_BOOL( offset < FTC_CMAP_INDICES_MAX );
- }
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** CHARMAP FAMILY *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- FT_CALLBACK_DEF( FT_Error )
- ftc_cmap_family_init( FTC_CMapFamily cfam,
- FTC_CMapQuery cquery,
- FTC_Cache cache )
+ ftc_cmap_node_compare( FTC_CMapNode node,
+ FTC_CMapQuery query )
{
- FTC_Manager manager = cache->manager;
- FTC_CMapDesc desc = cquery->desc;
- FT_UInt32 hash = 0;
- FT_Error error;
- FT_Face face;
-
-
- /* setup charmap descriptor */
- cfam->desc = *desc;
-
- /* let's see whether the rest is correct too */
- error = FTC_Manager_Lookup_Face( manager, desc->face_id, &face );
- if ( !error )
+ if ( node->face_id == query->face_id &&
+ node->cmap_index == query->cmap_index )
{
- FT_UInt count = face->num_charmaps;
- FT_UInt idx = count;
- FT_CharMap* cur = face->charmaps;
+ FT_UInt32 offset = (FT_UInt32)( query->char_code - node->first );
- switch ( desc->type )
- {
- case FTC_CMAP_BY_INDEX:
- idx = desc->u.index;
- hash = idx * 33;
- break;
-
- case FTC_CMAP_BY_ENCODING:
- if (desc->u.encoding == FT_ENCODING_UNICODE)
- {
- /* since the `interesting' table, with id's 3,10, is normally the
- * last one, we loop backwards. This looses with type1 fonts with
- * non-BMP characters (<.0001%), this wins with .ttf with non-BMP
- * chars (.01% ?), and this is the same about 99.99% of the time!
- */
-
- FT_UInt unicmap_idx = count; /* some UCS-2 map, if we found it */
-
- cur += count - 1;
-
- for ( idx = 0; idx < count; idx++, cur-- )
- {
- if ( cur[0]->encoding == FT_ENCODING_UNICODE )
- {
- unicmap_idx = idx; /* record we found a Unicode charmap */
-
- /* XXX If some new encodings to represent UCS-4 are added,
- * they should be added here.
- */
- if ( ( cur[0]->platform_id == TT_PLATFORM_MICROSOFT &&
- cur[0]->encoding_id == TT_MS_ID_UCS_4 ) ||
- ( cur[0]->platform_id == TT_PLATFORM_APPLE_UNICODE &&
- cur[0]->encoding_id == TT_APPLE_ID_UNICODE_32 ) )
-
- /* Hurray! We found a UCS-4 charmap. We can stop the scan! */
- {
- idx = count - 1 - idx;
- goto Found_idx_for_FTC_CMAP_BY_ENCODING;
- }
- }
- }
-
- /* We do not have any UCS-4 charmap. Sigh.
- * Let's see if we have some other kind of Unicode charmap, though.
- */
- if ( unicmap_idx < count )
- idx = count - 1 - unicmap_idx;
- }
- else
- {
- for ( idx = 0; idx < count; idx++, cur++ )
- if ( cur[0]->encoding == desc->u.encoding )
- break;
- }
-
- Found_idx_for_FTC_CMAP_BY_ENCODING:
- hash = idx * 67;
- break;
-
- case FTC_CMAP_BY_ID:
- for ( idx = 0; idx < count; idx++, cur++ )
- {
- if ( (FT_UInt)cur[0]->platform_id == desc->u.id.platform &&
- (FT_UInt)cur[0]->encoding_id == desc->u.id.encoding )
- {
- hash = ( ( desc->u.id.platform << 8 ) | desc->u.id.encoding ) * 7;
- break;
- }
- }
- break;
-
- default:
- ;
- }
-
- if ( idx >= count )
- goto Bad_Descriptor;
-
- /* compute hash value, both in family and query */
- cfam->index = idx;
- cfam->hash = hash ^ FTC_FACE_ID_HASH( desc->face_id );
- FTC_QUERY( cquery )->hash = FTC_CMAP_HASH( cfam, cquery );
-
- error = ftc_family_init( FTC_FAMILY( cfam ),
- FTC_QUERY( cquery ), cache );
+ return FT_BOOL( offset < FTC_CMAP_INDICES_MAX );
}
- return error;
-
- Bad_Descriptor:
- FT_TRACE1(( "ftp_cmap_family_init: invalid charmap descriptor\n" ));
- return FTC_Err_Invalid_Argument;
+ return 0;
}
FT_CALLBACK_DEF( FT_Bool )
- ftc_cmap_family_compare( FTC_CMapFamily cfam,
- FTC_CMapQuery cquery )
+ ftc_cmap_node_remove_faceid( FTC_CMapNode node,
+ FTC_FaceID face_id )
{
- FT_Int result = 0;
-
-
- /* first, compare face id and type */
- if ( cfam->desc.face_id != cquery->desc->face_id ||
- cfam->desc.type != cquery->desc->type )
- goto Exit;
-
- switch ( cfam->desc.type )
- {
- case FTC_CMAP_BY_INDEX:
- result = ( cfam->desc.u.index == cquery->desc->u.index );
- break;
-
- case FTC_CMAP_BY_ENCODING:
- result = ( cfam->desc.u.encoding == cquery->desc->u.encoding );
- break;
-
- case FTC_CMAP_BY_ID:
- result = ( cfam->desc.u.id.platform == cquery->desc->u.id.platform &&
- cfam->desc.u.id.encoding == cquery->desc->u.id.encoding );
- break;
-
- default:
- ;
- }
-
- if ( result )
- {
- /* when found, update the 'family' and 'hash' field of the query */
- FTC_QUERY( cquery )->family = FTC_FAMILY( cfam );
- FTC_QUERY( cquery )->hash = FTC_CMAP_HASH( cfam, cquery );
- }
-
- Exit:
- return FT_BOOL( result );
+ return FT_BOOL( node->face_id == face_id );
}
@@ -333,23 +182,17 @@
FT_CALLBACK_TABLE_DEF
- const FTC_Cache_ClassRec ftc_cmap_cache_class =
+ const FTC_CacheClassRec ftc_cmap_cache_class =
{
- sizeof ( FTC_CacheRec ),
- (FTC_Cache_InitFunc) ftc_cache_init,
- (FTC_Cache_ClearFunc)ftc_cache_clear,
- (FTC_Cache_DoneFunc) ftc_cache_done,
-
- sizeof ( FTC_CMapFamilyRec ),
- (FTC_Family_InitFunc) ftc_cmap_family_init,
- (FTC_Family_CompareFunc)ftc_cmap_family_compare,
- (FTC_Family_DoneFunc) ftc_family_done,
-
- sizeof ( FTC_CMapNodeRec ),
- (FTC_Node_InitFunc) ftc_cmap_node_init,
+ (FTC_Node_NewFunc) ftc_cmap_node_new,
(FTC_Node_WeightFunc) ftc_cmap_node_weight,
(FTC_Node_CompareFunc)ftc_cmap_node_compare,
- (FTC_Node_DoneFunc) ftc_node_done
+ (FTC_Node_CompareFunc)ftc_cmap_node_remove_faceid,
+ (FTC_Node_FreeFunc) ftc_cmap_node_free,
+
+ sizeof ( FTC_CacheRec ),
+ (FTC_Cache_InitFunc) ftc_cache_init,
+ (FTC_Cache_DoneFunc) ftc_cache_done,
};
@@ -359,99 +202,84 @@
FTC_CMapCache_New( FTC_Manager manager,
FTC_CMapCache *acache )
{
- return FTC_Manager_Register_Cache(
- manager,
- (FTC_Cache_Class)&ftc_cmap_cache_class,
- FTC_CACHE_P( acache ) );
+ return FTC_Manager_RegisterCache( manager,
+ &ftc_cmap_cache_class,
+ FTC_CACHE_P( acache ) );
}
-#ifdef FTC_CACHE_USE_INLINE
-
-#define GEN_CACHE_FAMILY_COMPARE( f, q, c ) \
- ftc_cmap_family_compare( (FTC_CMapFamily)(f), (FTC_CMapQuery)(q) )
-
-#define GEN_CACHE_NODE_COMPARE( n, q, c ) \
- ftc_cmap_node_compare( (FTC_CMapNode)(n), (FTC_CMapQuery)(q) )
-
-#define GEN_CACHE_LOOKUP ftc_cmap_cache_lookup
-
-#include "ftccache.i"
-
-#else /* !FTC_CACHE_USE_INLINE */
-
-#define ftc_cmap_cache_lookup ftc_cache_lookup
-
-#endif /* !FTC_CACHE_USE_INLINE */
-
-
/* documentation is in ftccmap.h */
FT_EXPORT_DEF( FT_UInt )
- FTC_CMapCache_Lookup( FTC_CMapCache cache,
- FTC_CMapDesc desc,
+ FTC_CMapCache_Lookup( FTC_CMapCache cmap_cache,
+ FTC_FaceID face_id,
+ FT_Int cmap_index,
FT_UInt32 char_code )
{
- FTC_CMapQueryRec cquery;
+ FTC_Cache cache = FTC_CACHE( cmap_cache );
+ FTC_CMapQueryRec query;
FTC_CMapNode node;
FT_Error error;
FT_UInt gindex = 0;
+ FT_UInt32 hash;
- if ( !cache || !desc )
+ if ( !cache )
{
FT_ERROR(( "FTC_CMapCache_Lookup: bad arguments, returning 0!\n" ));
return 0;
}
- cquery.desc = desc;
- cquery.char_code = char_code;
+ query.face_id = face_id;
+ query.cmap_index = (FT_UInt)cmap_index;
+ query.char_code = char_code;
- error = ftc_cmap_cache_lookup( FTC_CACHE( cache ),
- FTC_QUERY( &cquery ),
- (FTC_Node*)&node );
- if ( !error )
- {
- FT_UInt offset = (FT_UInt)( char_code - node->first );
+ hash = FTC_CMAP_HASH( face_id, cmap_index, char_code );
+
+#if 1
+ FTC_CACHE_LOOKUP_CMP( cache, ftc_cmap_node_compare, hash, &query,
+ node, error );
+#else
+ error = FTC_Cache_Lookup( cache, hash, &query, (FTC_Node*) &node );
+#endif
+ if ( error )
+ goto Exit;
+ FT_ASSERT( (FT_UInt)( char_code - node->first ) < FTC_CMAP_INDICES_MAX );
- FT_ASSERT( offset < FTC_CMAP_INDICES_MAX );
+ gindex = node->indices[char_code - node->first];
+ if ( gindex == FTC_CMAP_UNKNOWN )
+ {
+ FT_Face face;
- gindex = node->indices[offset];
- if ( gindex == FTC_CMAP_UNKNOWN )
- {
- FT_Face face;
+ gindex = 0;
- /* we need to use FT_Get_Char_Index */
- gindex = 0;
+ error = FTC_Manager_LookupFace( cache->manager, node->face_id, &face );
+ if ( error )
+ goto Exit;
- error = FTC_Manager_Lookup_Face( FTC_CACHE(cache)->manager,
- desc->face_id,
- &face );
- if ( !error )
- {
- FT_CharMap old, cmap = NULL;
- FT_UInt cmap_index;
+ if ( (FT_UInt)cmap_index < (FT_UInt)face->num_charmaps )
+ {
+ FT_CharMap old, cmap = NULL;
- /* save old charmap, select new one */
- old = face->charmap;
- cmap_index = FTC_CMAP_FAMILY( FTC_QUERY( &cquery )->family )->index;
- cmap = face->charmaps[cmap_index];
+ old = face->charmap;
+ cmap = face->charmaps[cmap_index];
+ if ( old != cmap )
FT_Set_Charmap( face, cmap );
- /* perform lookup */
- gindex = FT_Get_Char_Index( face, char_code );
- node->indices[offset] = (FT_UInt16)gindex;
+ gindex = FT_Get_Char_Index( face, char_code );
- /* restore old charmap */
+ if ( old != cmap )
FT_Set_Charmap( face, old );
- }
}
+
+ node->indices[char_code - node->first] = gindex;
}
+ Exit:
return gindex;
}
diff --git a/extras/freetype2/src/cache/ftcglyph.c b/extras/freetype2/src/cache/ftcglyph.c
index aa21228a7..5e6c9771a 100644
--- a/extras/freetype2/src/cache/ftcglyph.c
+++ b/extras/freetype2/src/cache/ftcglyph.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Glyph Image (FT_Glyph) cache (body). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,54 +20,64 @@
#include FT_CACHE_H
#include FT_CACHE_INTERNAL_GLYPH_H
#include FT_ERRORS_H
-#include FT_LIST_H
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DEBUG_H
+#include "ftccback.h"
#include "ftcerror.h"
/* create a new chunk node, setting its cache index and ref count */
FT_EXPORT_DEF( void )
- ftc_glyph_node_init( FTC_GlyphNode gnode,
- FT_UInt gindex,
- FTC_GlyphFamily gfam )
+ FTC_GNode_Init( FTC_GNode gnode,
+ FT_UInt gindex,
+ FTC_Family family )
{
- FT_UInt len;
- FT_UInt start = FTC_GLYPH_FAMILY_START( gfam, gindex );
+ gnode->family = family;
+ gnode->gindex = gindex;
+ family->num_nodes++;
+ }
- gnode->item_start = (FT_UShort)start;
+ FT_EXPORT_DEF( void )
+ FTC_GNode_UnselectFamily( FTC_GNode gnode,
+ FTC_Cache cache )
+ {
+ FTC_Family family = gnode->family;
- len = gfam->item_total - start;
- if ( len > gfam->item_count )
- len = gfam->item_count;
- gnode->item_count = (FT_UShort)len;
- gfam->family.num_nodes++;
+ gnode->family = NULL;
+ if ( family && --family->num_nodes <= 0 )
+ FTC_MruList_Remove( &FTC_GCACHE( cache )->families,
+ (FTC_MruNode)family );
}
FT_EXPORT_DEF( void )
- ftc_glyph_node_done( FTC_GlyphNode gnode,
- FTC_Cache cache )
+ FTC_GNode_Done( FTC_GNode gnode,
+ FTC_Cache cache )
{
/* finalize the node */
- gnode->item_count = 0;
- gnode->item_start = 0;
+ gnode->gindex = 0;
- ftc_node_done( FTC_NODE( gnode ), cache );
+ FTC_GNode_UnselectFamily( gnode, cache );
}
FT_EXPORT_DEF( FT_Bool )
- ftc_glyph_node_compare( FTC_GlyphNode gnode,
- FTC_GlyphQuery gquery )
+ FTC_GNode_Compare( FTC_GNode gnode,
+ FTC_GQuery gquery )
{
- FT_UInt start = (FT_UInt)gnode->item_start;
- FT_UInt count = (FT_UInt)gnode->item_count;
+ return FT_BOOL( gnode->family == gquery->family &&
+ gnode->gindex == gquery->gindex );
+ }
+
- return FT_BOOL( (FT_UInt)( gquery->gindex - start ) < count );
+ FT_LOCAL_DEF( FT_Bool )
+ ftc_gnode_compare( FTC_GNode gnode,
+ FTC_GQuery gquery )
+ {
+ return FTC_GNode_Compare( gnode, gquery );
}
@@ -79,36 +89,89 @@
/*************************************************************************/
/*************************************************************************/
+ FT_EXPORT_DEF( void )
+ FTC_Family_Init( FTC_Family family,
+ FTC_Cache cache )
+ {
+ FTC_GCacheClass clazz = FTC_CACHE__GCACHE_CLASS( cache );
+
+
+ family->clazz = clazz->family_class;
+ family->num_nodes = 0;
+ family->cache = cache;
+ }
+
FT_EXPORT_DEF( FT_Error )
- ftc_glyph_family_init( FTC_GlyphFamily gfam,
- FT_UInt32 hash,
- FT_UInt item_count,
- FT_UInt item_total,
- FTC_GlyphQuery gquery,
- FTC_Cache cache )
+ FTC_GCache_Init( FTC_GCache cache )
{
- FT_Error error;
+ FT_Error error;
-
- error = ftc_family_init( FTC_FAMILY( gfam ), FTC_QUERY( gquery ), cache );
+ error = FTC_Cache_Init( FTC_CACHE( cache ) );
if ( !error )
{
- gfam->hash = hash;
- gfam->item_total = item_total;
- gfam->item_count = item_count;
-
- FTC_GLYPH_FAMILY_FOUND( gfam, gquery );
+ FTC_GCacheClass clazz = (FTC_GCacheClass)FTC_CACHE( cache )->org_class;
+
+ FTC_MruList_Init( &cache->families,
+ clazz->family_class,
+ 0, /* no maximum here! */
+ cache,
+ FTC_CACHE( cache )->memory );
}
return error;
}
+ FT_LOCAL_DEF( FT_Error )
+ ftc_gcache_init( FTC_GCache cache )
+ {
+ return FTC_GCache_Init( cache );
+ }
+
+
FT_EXPORT_DEF( void )
- ftc_glyph_family_done( FTC_GlyphFamily gfam )
+ FTC_GCache_Done( FTC_GCache cache )
+ {
+ FTC_Cache_Done( (FTC_Cache)cache );
+ FTC_MruList_Done( &cache->families );
+ }
+
+
+ FT_LOCAL_DEF( void )
+ ftc_gcache_done( FTC_GCache cache )
+ {
+ FTC_GCache_Done( cache );
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FTC_GCache_New( FTC_Manager manager,
+ FTC_GCacheClass clazz,
+ FTC_GCache *acache )
+ {
+ return FTC_Manager_RegisterCache( manager, (FTC_CacheClass)clazz,
+ (FTC_Cache*)acache );
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FTC_GCache_Lookup( FTC_GCache cache,
+ FT_UInt32 hash,
+ FT_UInt gindex,
+ FTC_GQuery query,
+ FTC_Node *anode )
{
- ftc_family_done( FTC_FAMILY( gfam ) );
+ FT_Error error;
+
+
+ query->gindex = gindex;
+
+ FTC_MRULIST_LOOKUP( &cache->families, query, query->family, error );
+ if ( !error )
+ error = FTC_Cache_Lookup( FTC_CACHE( cache ), hash, query, anode );
+
+ return error;
}
diff --git a/extras/freetype2/src/cache/ftcimage.c b/extras/freetype2/src/cache/ftcimage.c
index fa1b6ac71..22a26ac47 100644
--- a/extras/freetype2/src/cache/ftcimage.c
+++ b/extras/freetype2/src/cache/ftcimage.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Image cache (body). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,133 +18,83 @@
#include <ft2build.h>
#include FT_CACHE_H
-#include FT_CACHE_IMAGE_H
-#include FT_CACHE_INTERNAL_GLYPH_H
+#include FT_CACHE_INTERNAL_IMAGE_H
#include FT_INTERNAL_MEMORY_H
+#include "ftccback.h"
#include "ftcerror.h"
- /* the FT_Glyph image node type */
- typedef struct FTC_ImageNodeRec_
+ /* finalize a given glyph image node */
+ FT_EXPORT_DEF( void )
+ FTC_INode_Free( FTC_INode inode,
+ FTC_Cache cache )
{
- FTC_GlyphNodeRec gnode;
- FT_Glyph glyph;
+ FT_Memory memory = cache->memory;
- } FTC_ImageNodeRec, *FTC_ImageNode;
+ if ( inode->glyph )
+ {
+ FT_Done_Glyph( inode->glyph );
+ inode->glyph = NULL;
+ }
-#define FTC_IMAGE_NODE( x ) ( (FTC_ImageNode)( x ) )
-#define FTC_IMAGE_NODE_GINDEX( x ) FTC_GLYPH_NODE_GINDEX( x )
+ FTC_GNode_Done( FTC_GNODE( inode ), cache );
+ FT_FREE( inode );
+ }
- /* the glyph image query */
- typedef struct FTC_ImageQueryRec_
+ FT_LOCAL_DEF( void )
+ ftc_inode_free( FTC_INode inode,
+ FTC_Cache cache )
{
- FTC_GlyphQueryRec gquery;
- FTC_ImageTypeRec type;
-
- } FTC_ImageQueryRec, *FTC_ImageQuery;
-
-
-#define FTC_IMAGE_QUERY( x ) ( (FTC_ImageQuery)( x ) )
+ FTC_INode_Free( inode, cache );
+ }
- /* the glyph image set type */
- typedef struct FTC_ImageFamilyRec_
+ /* initialize a new glyph image node */
+ FT_EXPORT_DEF( FT_Error )
+ FTC_INode_New( FTC_INode *pinode,
+ FTC_GQuery gquery,
+ FTC_Cache cache )
{
- FTC_GlyphFamilyRec gfam;
- FTC_ImageTypeRec type;
-
- } FTC_ImageFamilyRec, *FTC_ImageFamily;
+ FT_Memory memory = cache->memory;
+ FT_Error error;
+ FTC_INode inode;
-#define FTC_IMAGE_FAMILY( x ) ( (FTC_ImageFamily)( x ) )
-#define FTC_IMAGE_FAMILY_MEMORY( x ) FTC_GLYPH_FAMILY_MEMORY( &(x)->gfam )
-
+ if ( !FT_NEW( inode ) )
+ {
+ FTC_GNode gnode = FTC_GNODE( inode );
+ FTC_Family family = gquery->family;
+ FT_UInt gindex = gquery->gindex;
+ FTC_IFamilyClass clazz = FTC_CACHE__IFAMILY_CLASS( cache );
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** GLYPH IMAGE NODES *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
+ /* initialize its inner fields */
+ FTC_GNode_Init( gnode, gindex, family );
- /* finalize a given glyph image node */
- FT_CALLBACK_DEF( void )
- ftc_image_node_done( FTC_ImageNode inode,
- FTC_Cache cache )
- {
- if ( inode->glyph )
- {
- FT_Done_Glyph( inode->glyph );
- inode->glyph = NULL;
+ /* we will now load the glyph image */
+ error = clazz->family_load_glyph( family, gindex, cache,
+ &inode->glyph );
}
- ftc_glyph_node_done( FTC_GLYPH_NODE( inode ), cache );
+ *pinode = inode;
+ return error;
}
- /* initialize a new glyph image node */
- FT_CALLBACK_DEF( FT_Error )
- ftc_image_node_init( FTC_ImageNode inode,
- FTC_GlyphQuery gquery,
- FTC_Cache cache )
+ FT_LOCAL_DEF( FT_Error )
+ ftc_inode_new( FTC_INode *pinode,
+ FTC_GQuery gquery,
+ FTC_Cache cache )
{
- FTC_ImageFamily ifam = FTC_IMAGE_FAMILY( gquery->query.family );
- FT_Error error;
- FT_Face face;
- FT_Size size;
-
-
- /* initialize its inner fields */
- ftc_glyph_node_init( FTC_GLYPH_NODE( inode ),
- gquery->gindex,
- FTC_GLYPH_FAMILY( ifam ) );
-
- /* we will now load the glyph image */
- error = FTC_Manager_Lookup_Size( FTC_FAMILY( ifam )->cache->manager,
- &ifam->type.font,
- &face, &size );
- if ( !error )
- {
- FT_UInt gindex = FTC_GLYPH_NODE_GINDEX( inode );
-
-
- error = FT_Load_Glyph( face, gindex, ifam->type.flags );
- if ( !error )
- {
- if ( face->glyph->format == FT_GLYPH_FORMAT_BITMAP ||
- face->glyph->format == FT_GLYPH_FORMAT_OUTLINE )
- {
- /* ok, copy it */
- FT_Glyph glyph;
-
-
- error = FT_Get_Glyph( face->glyph, &glyph );
- if ( !error )
- {
- inode->glyph = glyph;
- goto Exit;
- }
- }
- else
- error = FTC_Err_Invalid_Argument;
- }
- }
-
- /* in case of error */
- ftc_glyph_node_done( FTC_GLYPH_NODE(inode), cache );
-
- Exit:
- return error;
+ return FTC_INode_New( pinode, gquery, cache );
}
- FT_CALLBACK_DEF( FT_ULong )
- ftc_image_node_weight( FTC_ImageNode inode )
+ FT_EXPORT_DEF( FT_ULong )
+ FTC_INode_Weight( FTC_INode inode )
{
FT_ULong size = 0;
FT_Glyph glyph = inode->glyph;
@@ -185,214 +135,10 @@
}
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** GLYPH IMAGE SETS *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- FT_CALLBACK_DEF( FT_Error )
- ftc_image_family_init( FTC_ImageFamily ifam,
- FTC_ImageQuery iquery,
- FTC_Cache cache )
- {
- FTC_Manager manager = cache->manager;
- FT_Error error;
- FT_Face face;
-
-
- ifam->type = iquery->type;
-
- /* we need to compute "iquery.item_total" now */
- error = FTC_Manager_Lookup_Face( manager,
- iquery->type.font.face_id,
- &face );
- if ( !error )
- {
- error = ftc_glyph_family_init( FTC_GLYPH_FAMILY( ifam ),
- FTC_IMAGE_TYPE_HASH( &ifam->type ),
- 1,
- face->num_glyphs,
- FTC_GLYPH_QUERY( iquery ),
- cache );
- }
-
- return error;
- }
-
-
- FT_CALLBACK_DEF( FT_Bool )
- ftc_image_family_compare( FTC_ImageFamily ifam,
- FTC_ImageQuery iquery )
- {
- FT_Bool result;
-
-
- result = FT_BOOL( FTC_IMAGE_TYPE_COMPARE( &ifam->type, &iquery->type ) );
- if ( result )
- FTC_GLYPH_FAMILY_FOUND( ifam, iquery );
-
- return result;
- }
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** GLYPH IMAGE CACHE *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
-
-
- FT_CALLBACK_TABLE_DEF
- const FTC_Cache_ClassRec ftc_image_cache_class =
- {
- sizeof ( FTC_CacheRec ),
- (FTC_Cache_InitFunc) ftc_cache_init,
- (FTC_Cache_ClearFunc)ftc_cache_clear,
- (FTC_Cache_DoneFunc) ftc_cache_done,
-
- sizeof ( FTC_ImageFamilyRec ),
- (FTC_Family_InitFunc) ftc_image_family_init,
- (FTC_Family_CompareFunc)ftc_image_family_compare,
- (FTC_Family_DoneFunc) ftc_glyph_family_done,
-
- sizeof ( FTC_ImageNodeRec ),
- (FTC_Node_InitFunc) ftc_image_node_init,
- (FTC_Node_WeightFunc) ftc_image_node_weight,
- (FTC_Node_CompareFunc)ftc_glyph_node_compare,
- (FTC_Node_DoneFunc) ftc_image_node_done
- };
-
-
- /* documentation is in ftcimage.h */
-
- FT_EXPORT_DEF( FT_Error )
- FTC_ImageCache_New( FTC_Manager manager,
- FTC_ImageCache *acache )
- {
- return FTC_Manager_Register_Cache(
- manager,
- (FTC_Cache_Class)&ftc_image_cache_class,
- FTC_CACHE_P( acache ) );
- }
-
-
- /* documentation is in ftcimage.h */
-
- FT_EXPORT_DEF( FT_Error )
- FTC_ImageCache_Lookup( FTC_ImageCache cache,
- FTC_ImageType type,
- FT_UInt gindex,
- FT_Glyph *aglyph,
- FTC_Node *anode )
- {
- FTC_ImageQueryRec iquery;
- FTC_ImageNode node;
- FT_Error error;
-
-
- /* some argument checks are delayed to ftc_cache_lookup */
- if ( !aglyph )
- return FTC_Err_Invalid_Argument;
-
- if ( anode )
- *anode = NULL;
-
- iquery.gquery.gindex = gindex;
- iquery.type = *type;
-
- error = ftc_cache_lookup( FTC_CACHE( cache ),
- FTC_QUERY( &iquery ),
- (FTC_Node*)&node );
- if ( !error )
- {
- *aglyph = node->glyph;
-
- if ( anode )
- {
- *anode = (FTC_Node)node;
- FTC_NODE( node )->ref_count++;
- }
- }
-
- return error;
- }
-
-
- /* backwards-compatibility functions */
-
- FT_EXPORT_DEF( FT_Error )
- FTC_Image_Cache_New( FTC_Manager manager,
- FTC_Image_Cache *acache )
- {
- return FTC_ImageCache_New( manager, (FTC_ImageCache*)acache );
- }
-
-
- FT_EXPORT_DEF( FT_Error )
- FTC_Image_Cache_Lookup( FTC_Image_Cache icache,
- FTC_Image_Desc* desc,
- FT_UInt gindex,
- FT_Glyph *aglyph )
+ FT_LOCAL_DEF( FT_ULong )
+ ftc_inode_weight( FTC_INode inode )
{
- FTC_ImageTypeRec type0;
-
-
- if ( !desc )
- return FTC_Err_Invalid_Argument;
-
- type0.font = desc->font;
-
- /* convert image type flags to load flags */
- {
- FT_UInt load_flags = FT_LOAD_DEFAULT;
- FT_UInt type = desc->image_type;
-
-
- /* determine load flags, depending on the font description's */
- /* image type */
-
- if ( ftc_image_format( type ) == ftc_image_format_bitmap )
- {
- if ( type & ftc_image_flag_monochrome )
- load_flags |= FT_LOAD_MONOCHROME;
-
- /* disable embedded bitmaps loading if necessary */
- if ( type & ftc_image_flag_no_sbits )
- load_flags |= FT_LOAD_NO_BITMAP;
- }
- else
- {
- /* we want an outline, don't load embedded bitmaps */
- load_flags |= FT_LOAD_NO_BITMAP;
-
- if ( type & ftc_image_flag_unscaled )
- load_flags |= FT_LOAD_NO_SCALE;
- }
-
- /* always render glyphs to bitmaps */
- load_flags |= FT_LOAD_RENDER;
-
- if ( type & ftc_image_flag_unhinted )
- load_flags |= FT_LOAD_NO_HINTING;
-
- if ( type & ftc_image_flag_autohinted )
- load_flags |= FT_LOAD_FORCE_AUTOHINT;
-
- type0.flags = load_flags;
- }
-
- return FTC_ImageCache_Lookup( (FTC_ImageCache)icache,
- &type0,
- gindex,
- aglyph,
- NULL );
+ return FTC_INode_Weight( inode );
}
diff --git a/extras/freetype2/src/cache/ftcmanag.c b/extras/freetype2/src/cache/ftcmanag.c
index 7cdb8f9da..9cc64891c 100644
--- a/extras/freetype2/src/cache/ftcmanag.c
+++ b/extras/freetype2/src/cache/ftcmanag.c
@@ -4,7 +4,7 @@
/* */
/* FreeType Cache Manager (body). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,8 +18,7 @@
#include <ft2build.h>
#include FT_CACHE_H
-#include FT_CACHE_MANAGER_H
-#include FT_CACHE_INTERNAL_LRU_H
+#include FT_CACHE_INTERNAL_MANAGER_H
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DEBUG_H
#include FT_SIZES_H
@@ -33,124 +32,151 @@
#define FTC_LRU_GET_MANAGER( lru ) ( (FTC_Manager)(lru)->user_data )
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** FACE LRU IMPLEMENTATION *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
+ static FT_Error
+ ftc_scaler_lookup_size( FTC_Manager manager,
+ FTC_Scaler scaler,
+ FT_Size *asize )
+ {
+ FT_Face face;
+ FT_Size size = NULL;
+ FT_Error error;
- typedef struct FTC_FaceNodeRec_* FTC_FaceNode;
- typedef struct FTC_SizeNodeRec_* FTC_SizeNode;
+ error = FTC_Manager_LookupFace( manager, scaler->face_id, &face );
+ if ( error )
+ goto Exit;
- typedef struct FTC_FaceNodeRec_
- {
- FT_LruNodeRec lru;
- FT_Face face;
+ error = FT_New_Size( face, &size );
+ if ( error )
+ goto Exit;
- } FTC_FaceNodeRec;
+ FT_Activate_Size( size );
+
+ if ( scaler->pixel )
+ error = FT_Set_Pixel_Sizes( face, scaler->width, scaler->height );
+ else
+ error = FT_Set_Char_Size( face, scaler->width, scaler->height,
+ scaler->x_res, scaler->y_res );
+ if ( error )
+ {
+ FT_Done_Size( size );
+ size = NULL;
+ }
+
+ Exit:
+ *asize = size;
+ return error;
+ }
typedef struct FTC_SizeNodeRec_
{
- FT_LruNodeRec lru;
- FT_Size size;
+ FTC_MruNodeRec node;
+ FT_Size size;
+ FTC_ScalerRec scaler;
- } FTC_SizeNodeRec;
+ } FTC_SizeNodeRec, *FTC_SizeNode;
- FT_CALLBACK_DEF( FT_Error )
- ftc_face_node_init( FTC_FaceNode node,
- FTC_FaceID face_id,
- FTC_Manager manager )
+ FT_CALLBACK_DEF( void )
+ ftc_size_node_done( FTC_SizeNode node )
{
- FT_Error error;
+ FT_Size size = node->size;
- error = manager->request_face( face_id,
- manager->library,
- manager->request_data,
- &node->face );
- if ( !error )
- {
- /* destroy initial size object; it will be re-created later */
- if ( node->face->size )
- FT_Done_Size( node->face->size );
- }
-
- return error;
+ if ( size )
+ FT_Done_Size( size );
}
- /* helper function for ftc_face_node_done() */
FT_CALLBACK_DEF( FT_Bool )
- ftc_size_node_select( FTC_SizeNode node,
- FT_Face face )
+ ftc_size_node_compare( FTC_SizeNode node,
+ FTC_Scaler scaler )
{
- return FT_BOOL( node->size->face == face );
+ FTC_Scaler scaler0 = &node->scaler;
+
+
+ if ( FTC_SCALER_COMPARE( scaler0, scaler ) )
+ {
+ FT_Activate_Size( node->size );
+ return 1;
+ }
+ return 0;
}
- FT_CALLBACK_DEF( void )
- ftc_face_node_done( FTC_FaceNode node,
+ FT_CALLBACK_DEF( FT_Error )
+ ftc_size_node_init( FTC_SizeNode node,
+ FTC_Scaler scaler,
FTC_Manager manager )
{
- FT_Face face = node->face;
+ node->scaler = scaler[0];
+ return ftc_scaler_lookup_size( manager, scaler, &node->size );
+ }
- /* we must begin by removing all sizes for the target face */
- /* from the manager's list */
- FT_LruList_Remove_Selection( manager->sizes_list,
- (FT_LruNode_SelectFunc)ftc_size_node_select,
- face );
- /* all right, we can discard the face now */
- FT_Done_Face( face );
- node->face = NULL;
+ FT_CALLBACK_DEF( FT_Error )
+ ftc_size_node_reset( FTC_SizeNode node,
+ FTC_Scaler scaler,
+ FTC_Manager manager )
+ {
+ FT_Done_Size( node->size );
+
+ node->scaler = scaler[0];
+
+ return ftc_scaler_lookup_size( manager, scaler, &node->size );
}
FT_CALLBACK_TABLE_DEF
- const FT_LruList_ClassRec ftc_face_list_class =
+ const FTC_MruListClassRec ftc_size_list_class =
{
- sizeof ( FT_LruListRec ),
- (FT_LruList_InitFunc)0,
- (FT_LruList_DoneFunc)0,
-
- sizeof ( FTC_FaceNodeRec ),
- (FT_LruNode_InitFunc) ftc_face_node_init,
- (FT_LruNode_DoneFunc) ftc_face_node_done,
- (FT_LruNode_FlushFunc) 0, /* no flushing needed */
- (FT_LruNode_CompareFunc)0, /* direct comparison of FTC_FaceID handles */
+ sizeof( FTC_SizeNodeRec ),
+ (FTC_MruNode_CompareFunc)ftc_size_node_compare,
+ (FTC_MruNode_InitFunc) ftc_size_node_init,
+ (FTC_MruNode_ResetFunc) ftc_size_node_reset,
+ (FTC_MruNode_DoneFunc) ftc_size_node_done
};
- /* documentation is in ftcache.h */
+ /* helper function used by ftc_face_node_done */
+ static FT_Bool
+ ftc_size_node_compare_faceid( FTC_SizeNode node,
+ FTC_FaceID face_id )
+ {
+ return FT_BOOL( node->scaler.face_id == face_id );
+ }
+
FT_EXPORT_DEF( FT_Error )
- FTC_Manager_Lookup_Face( FTC_Manager manager,
- FTC_FaceID face_id,
- FT_Face *aface )
+ FTC_Manager_LookupSize( FTC_Manager manager,
+ FTC_Scaler scaler,
+ FT_Size *asize )
{
FT_Error error;
- FTC_FaceNode node;
+ FTC_SizeNode node;
- if ( aface == NULL )
+ if ( asize == NULL )
return FTC_Err_Bad_Argument;
- *aface = NULL;
+ *asize = NULL;
if ( !manager )
return FTC_Err_Invalid_Cache_Handle;
- error = FT_LruList_Lookup( manager->faces_list,
- (FT_LruKey)face_id,
- (FT_LruNode*)&node );
+#ifdef FTC_INLINE
+
+ FTC_MRULIST_LOOKUP_CMP( &manager->sizes, scaler, ftc_size_node_compare,
+ node, error );
+
+#else
+ error = FTC_MruList_Lookup( &manager->sizes, scaler, (FTC_MruNode*)&node );
+#endif
+
if ( !error )
- *aface = node->face;
+ *asize = node->size;
return error;
}
@@ -159,280 +185,119 @@
/*************************************************************************/
/*************************************************************************/
/***** *****/
- /***** SIZES LRU IMPLEMENTATION *****/
+ /***** FACE MRU IMPLEMENTATION *****/
/***** *****/
/*************************************************************************/
/*************************************************************************/
-
- typedef struct FTC_SizeQueryRec_
+ typedef struct FTC_FaceNodeRec_
{
- FT_Face face;
- FT_UInt width;
- FT_UInt height;
+ FTC_MruNodeRec node;
+ FTC_FaceID face_id;
+ FT_Face face;
- } FTC_SizeQueryRec, *FTC_SizeQuery;
+ } FTC_FaceNodeRec, *FTC_FaceNode;
FT_CALLBACK_DEF( FT_Error )
- ftc_size_node_init( FTC_SizeNode node,
- FTC_SizeQuery query )
+ ftc_face_node_init( FTC_FaceNode node,
+ FTC_FaceID face_id,
+ FTC_Manager manager )
{
- FT_Face face = query->face;
- FT_Size size;
FT_Error error;
- node->size = NULL;
- error = FT_New_Size( face, &size );
+ node->face_id = face_id;
+
+ error = manager->request_face( face_id,
+ manager->library,
+ manager->request_data,
+ &node->face );
if ( !error )
{
- FT_Activate_Size( size );
- error = FT_Set_Pixel_Sizes( query->face,
- query->width,
- query->height );
- if ( error )
- FT_Done_Size( size );
- else
- node->size = size;
+ /* destroy initial size object; it will be re-created later */
+ if ( node->face->size )
+ FT_Done_Size( node->face->size );
}
+
return error;
}
FT_CALLBACK_DEF( void )
- ftc_size_node_done( FTC_SizeNode node )
- {
- if ( node->size )
- {
- FT_Done_Size( node->size );
- node->size = NULL;
- }
- }
-
-
- FT_CALLBACK_DEF( FT_Error )
- ftc_size_node_flush( FTC_SizeNode node,
- FTC_SizeQuery query )
+ ftc_face_node_done( FTC_FaceNode node,
+ FTC_Manager manager )
{
- FT_Size size = node->size;
- FT_Error error;
+ /* we must begin by removing all scalers for the target face */
+ /* from the manager's list */
+ FTC_MruList_RemoveSelection(
+ & manager->sizes,
+ (FTC_MruNode_CompareFunc)ftc_size_node_compare_faceid,
+ node->face_id );
-
- if ( size->face == query->face )
- {
- FT_Activate_Size( size );
- error = FT_Set_Pixel_Sizes( query->face, query->width, query->height );
- if ( error )
- {
- FT_Done_Size( size );
- node->size = NULL;
- }
- }
- else
- {
- FT_Done_Size( size );
- node->size = NULL;
-
- error = ftc_size_node_init( node, query );
- }
- return error;
+ /* all right, we can discard the face now */
+ FT_Done_Face( node->face );
+ node->face = NULL;
+ node->face_id = NULL;
}
FT_CALLBACK_DEF( FT_Bool )
- ftc_size_node_compare( FTC_SizeNode node,
- FTC_SizeQuery query )
+ ftc_face_node_compare( FTC_FaceNode node,
+ FTC_FaceID face_id )
{
- FT_Size size = node->size;
-
-
- return FT_BOOL( size->face == query->face &&
- (FT_UInt)size->metrics.x_ppem == query->width &&
- (FT_UInt)size->metrics.y_ppem == query->height );
+ return FT_BOOL( node->face_id == face_id );
}
FT_CALLBACK_TABLE_DEF
- const FT_LruList_ClassRec ftc_size_list_class =
+ const FTC_MruListClassRec ftc_face_list_class =
{
- sizeof ( FT_LruListRec ),
- (FT_LruList_InitFunc)0,
- (FT_LruList_DoneFunc)0,
-
- sizeof ( FTC_SizeNodeRec ),
- (FT_LruNode_InitFunc) ftc_size_node_init,
- (FT_LruNode_DoneFunc) ftc_size_node_done,
- (FT_LruNode_FlushFunc) ftc_size_node_flush,
- (FT_LruNode_CompareFunc)ftc_size_node_compare
+ sizeof( FTC_FaceNodeRec),
+
+ (FTC_MruNode_CompareFunc)ftc_face_node_compare,
+ (FTC_MruNode_InitFunc) ftc_face_node_init,
+ (FTC_MruNode_ResetFunc) NULL,
+ (FTC_MruNode_DoneFunc) ftc_face_node_done
};
/* documentation is in ftcache.h */
FT_EXPORT_DEF( FT_Error )
- FTC_Manager_Lookup_Size( FTC_Manager manager,
- FTC_Font font,
- FT_Face *aface,
- FT_Size *asize )
+ FTC_Manager_LookupFace( FTC_Manager manager,
+ FTC_FaceID face_id,
+ FT_Face *aface )
{
- FT_Error error;
-
-
- /* check for valid `manager' delayed to FTC_Manager_Lookup_Face() */
- if ( aface )
- *aface = 0;
-
- if ( asize )
- *asize = 0;
-
- error = FTC_Manager_Lookup_Face( manager, font->face_id, aface );
- if ( !error )
- {
- FTC_SizeQueryRec query;
- FTC_SizeNode node;
-
-
- query.face = *aface;
- query.width = font->pix_width;
- query.height = font->pix_height;
-
- error = FT_LruList_Lookup( manager->sizes_list,
- (FT_LruKey)&query,
- (FT_LruNode*)&node );
- if ( !error )
- {
- /* select the size as the current one for this face */
- FT_Activate_Size( node->size );
-
- if ( asize )
- *asize = node->size;
- }
- }
-
- return error;
- }
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** SET TABLE MANAGEMENT *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
- static void
- ftc_family_table_init( FTC_FamilyTable table )
- {
- table->count = 0;
- table->size = 0;
- table->entries = NULL;
- table->free = FTC_FAMILY_ENTRY_NONE;
- }
-
-
- static void
- ftc_family_table_done( FTC_FamilyTable table,
- FT_Memory memory )
- {
- FT_FREE( table->entries );
- table->free = 0;
- table->count = 0;
- table->size = 0;
- }
-
-
- FT_EXPORT_DEF( FT_Error )
- ftc_family_table_alloc( FTC_FamilyTable table,
- FT_Memory memory,
- FTC_FamilyEntry *aentry )
- {
- FTC_FamilyEntry entry;
- FT_Error error = 0;
-
-
- /* re-allocate table size when needed */
- if ( table->free == FTC_FAMILY_ENTRY_NONE && table->count >= table->size )
- {
- FT_UInt old_size = table->size;
- FT_UInt new_size, idx;
+ FT_Error error;
+ FTC_FaceNode node;
- if ( old_size == 0 )
- new_size = 8;
- else
- {
- new_size = old_size * 2;
+ if ( aface == NULL )
+ return FTC_Err_Bad_Argument;
- /* check for (unlikely) overflow */
- if ( new_size < old_size )
- new_size = 65534;
- }
+ *aface = NULL;
- if ( FT_RENEW_ARRAY( table->entries, old_size, new_size ) )
- return error;
+ if ( !manager )
+ return FTC_Err_Invalid_Cache_Handle;
- table->size = new_size;
+ /* we break encapsulation for the sake of speed */
+#ifdef FTC_INLINE
- entry = table->entries + old_size;
- table->free = old_size;
+ FTC_MRULIST_LOOKUP_CMP( &manager->faces, face_id, ftc_face_node_compare,
+ node, error );
- for ( idx = old_size; idx + 1 < new_size; idx++, entry++ )
- {
- entry->link = idx + 1;
- entry->index = idx;
- }
-
- entry->link = FTC_FAMILY_ENTRY_NONE;
- entry->index = idx;
- }
-
- if ( table->free != FTC_FAMILY_ENTRY_NONE )
- {
- entry = table->entries + table->free;
- table->free = entry->link;
- }
- else if ( table->count < table->size )
- {
- entry = table->entries + table->count++;
- }
- else
- {
- FT_ERROR(( "ftc_family_table_alloc: internal bug!" ));
- return FTC_Err_Invalid_Argument;
- }
+#else
+ error = FTC_MruList_Lookup( &manager->faces, face_id, (FTC_MruNode*)&node );
+#endif
- entry->link = FTC_FAMILY_ENTRY_NONE;
- table->count++;
+ if ( !error )
+ *aface = node->face;
- *aentry = entry;
return error;
}
- FT_EXPORT_DEF( void )
- ftc_family_table_free( FTC_FamilyTable table,
- FT_UInt idx )
- {
- /* simply add it to the linked list of free entries */
- if ( idx < table->count )
- {
- FTC_FamilyEntry entry = table->entries + idx;
-
-
- if ( entry->link != FTC_FAMILY_ENTRY_NONE )
- FT_ERROR(( "ftc_family_table_free: internal bug!\n" ));
- else
- {
- entry->link = table->free;
- table->free = entry->index;
- table->count--;
- }
- }
- }
-
-
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -475,41 +340,28 @@
if ( max_bytes == 0 )
max_bytes = FTC_MAX_BYTES_DEFAULT;
- error = FT_LruList_New( &ftc_face_list_class,
- max_faces,
- manager,
- memory,
- &manager->faces_list );
- if ( error )
- goto Exit;
-
- error = FT_LruList_New( &ftc_size_list_class,
- max_sizes,
- manager,
- memory,
- &manager->sizes_list );
- if ( error )
- goto Exit;
-
manager->library = library;
+ manager->memory = memory;
manager->max_weight = max_bytes;
- manager->cur_weight = 0;
manager->request_face = requester;
manager->request_data = req_data;
- ftc_family_table_init( &manager->families );
+ FTC_MruList_Init( &manager->faces,
+ &ftc_face_list_class,
+ max_faces,
+ manager,
+ memory );
+
+ FTC_MruList_Init( &manager->sizes,
+ &ftc_size_list_class,
+ max_sizes,
+ manager,
+ memory );
*amanager = manager;
Exit:
- if ( error && manager )
- {
- FT_LruList_Destroy( manager->faces_list );
- FT_LruList_Destroy( manager->sizes_list );
- FT_FREE( manager );
- }
-
return error;
}
@@ -526,31 +378,29 @@
if ( !manager || !manager->library )
return;
- memory = manager->library->memory;
+ memory = manager->memory;
/* now discard all caches */
- for (idx = 0; idx < FTC_MAX_CACHES; idx++ )
+ for (idx = manager->num_caches; idx-- > 0; )
{
FTC_Cache cache = manager->caches[idx];
if ( cache )
{
- cache->clazz->cache_done( cache );
+ cache->clazz.cache_done( cache );
FT_FREE( cache );
- manager->caches[idx] = 0;
+ manager->caches[idx] = NULL;
}
}
-
- /* discard families table */
- ftc_family_table_done( &manager->families, memory );
+ manager->num_caches = 0;
/* discard faces and sizes */
- FT_LruList_Destroy( manager->faces_list );
- manager->faces_list = 0;
+ FTC_MruList_Done( &manager->sizes );
+ FTC_MruList_Done( &manager->faces );
- FT_LruList_Destroy( manager->sizes_list );
- manager->sizes_list = 0;
+ manager->library = NULL;
+ manager->memory = NULL;
FT_FREE( manager );
}
@@ -563,8 +413,8 @@
{
if ( manager )
{
- FT_LruList_Reset( manager->sizes_list );
- FT_LruList_Reset( manager->faces_list );
+ FTC_MruList_Reset( &manager->sizes );
+ FTC_MruList_Reset( &manager->faces );
}
/* XXX: FIXME: flush the caches? */
}
@@ -576,7 +426,7 @@
FTC_Manager_Check( FTC_Manager manager )
{
FTC_Node node, first;
-
+
first = manager->nodes_list;
@@ -584,26 +434,22 @@
if ( first )
{
FT_ULong weight = 0;
-
+
node = first;
do
{
- FTC_FamilyEntry entry = manager->families.entries + node->fam_index;
- FTC_Cache cache;
+ FTC_Cache cache = manager->caches[node->cache_index];
+
- if ( (FT_UInt)node->fam_index >= manager->families.count ||
- entry->link != FTC_FAMILY_ENTRY_NONE )
- FT_ERROR(( "FTC_Manager_Check: invalid node (family index = %ld\n",
- node->fam_index ));
+ if ( (FT_UInt)node->cache_index >= manager->num_caches )
+ FT_ERROR(( "FTC_Manager_Check: invalid node (cache index = %ld\n",
+ node->cache_index ));
else
- {
- cache = entry->cache;
- weight += cache->clazz->node_weight( node, cache );
- }
+ weight += cache->clazz.node_weight( node, cache );
- node = node->mru_next;
+ node = FTC_NODE__NEXT( node );
} while ( node != first );
@@ -622,7 +468,7 @@
do
{
count++;
- node = node->mru_next;
+ node = FTC_NODE__NEXT( node );
} while ( node != first );
@@ -664,14 +510,14 @@
if ( manager->cur_weight < manager->max_weight || first == NULL )
return;
- /* go to last node - it's a circular list */
- node = first->mru_prev;
+ /* go to last node -- it's a circular list */
+ node = FTC_NODE__PREV( first );
do
{
- FTC_Node prev = node->mru_prev;
+ FTC_Node prev;
- prev = ( node == first ) ? NULL : node->mru_prev;
+ prev = ( node == first ) ? NULL : FTC_NODE__PREV( node );
if ( node->ref_count <= 0 )
ftc_node_destroy( node, manager );
@@ -685,9 +531,9 @@
/* documentation is in ftcmanag.h */
FT_EXPORT_DEF( FT_Error )
- FTC_Manager_Register_Cache( FTC_Manager manager,
- FTC_Cache_Class clazz,
- FTC_Cache *acache )
+ FTC_Manager_RegisterCache( FTC_Manager manager,
+ FTC_CacheClass clazz,
+ FTC_Cache *acache )
{
FT_Error error = FTC_Err_Invalid_Argument;
FTC_Cache cache = NULL;
@@ -695,50 +541,37 @@
if ( manager && clazz && acache )
{
- FT_Memory memory = manager->library->memory;
- FT_UInt idx = 0;
-
+ FT_Memory memory = manager->memory;
- /* check for an empty cache slot in the manager's table */
- for ( idx = 0; idx < FTC_MAX_CACHES; idx++ )
- {
- if ( manager->caches[idx] == 0 )
- break;
- }
- /* return an error if there are too many registered caches */
- if ( idx >= FTC_MAX_CACHES )
+ if ( manager->num_caches >= FTC_MAX_CACHES )
{
error = FTC_Err_Too_Many_Caches;
- FT_ERROR(( "FTC_Manager_Register_Cache:" ));
- FT_ERROR(( " too many registered caches\n" ));
+ FT_ERROR(( "%s: too many registered caches\n",
+ "FTC_Manager_Register_Cache" ));
goto Exit;
}
if ( !FT_ALLOC( cache, clazz->cache_size ) )
{
- cache->manager = manager;
- cache->memory = memory;
- cache->clazz = clazz;
+ cache->manager = manager;
+ cache->memory = memory;
+ cache->clazz = clazz[0];
+ cache->org_class = clazz;
/* THIS IS VERY IMPORTANT! IT WILL WRETCH THE MANAGER */
/* IF IT IS NOT SET CORRECTLY */
- cache->cache_index = idx;
+ cache->index = manager->num_caches;
- if ( clazz->cache_init )
+ error = clazz->cache_init( cache );
+ if ( error )
{
- error = clazz->cache_init( cache );
- if ( error )
- {
- if ( clazz->cache_done )
- clazz->cache_done( cache );
-
- FT_FREE( cache );
- goto Exit;
- }
+ clazz->cache_done( cache );
+ FT_FREE( cache );
+ goto Exit;
}
- manager->caches[idx] = cache;
+ manager->caches[manager->num_caches++] = cache;
}
}
@@ -748,17 +581,66 @@
}
+ FT_EXPORT_DEF( FT_UInt )
+ FTC_Manager_FlushN( FTC_Manager manager,
+ FT_UInt count )
+ {
+ FTC_Node first = manager->nodes_list;
+ FTC_Node node;
+ FT_UInt result;
+
+
+ /* try to remove `count' nodes from the list */
+ if ( first == NULL ) /* empty list! */
+ return 0;
+
+ /* go to last node - it's a circular list */
+ node = FTC_NODE__PREV(first);
+ for ( result = 0; result < count; )
+ {
+ FTC_Node prev = FTC_NODE__PREV( node );
+
+
+ /* don't touch locked nodes */
+ if ( node->ref_count <= 0 )
+ {
+ ftc_node_destroy( node, manager );
+ result++;
+ }
+
+ if ( prev == manager->nodes_list )
+ break;
+
+ node = prev;
+ }
+ return result;
+ }
+
+
+ FT_EXPORT_DEF( void )
+ FTC_Manager_RemoveFaceID( FTC_Manager manager,
+ FTC_FaceID face_id )
+ {
+ FT_UInt nn;
+
+ /* this will remove all FTC_SizeNode that correspond to
+ * the face_id as well
+ */
+ FTC_MruList_RemoveSelection( &manager->faces, NULL, face_id );
+
+ for ( nn = 0; nn < manager->num_caches; nn++ )
+ FTC_Cache_RemoveFaceID( manager->caches[nn], face_id );
+ }
+
+
/* documentation is in ftcmanag.h */
FT_EXPORT_DEF( void )
FTC_Node_Unref( FTC_Node node,
FTC_Manager manager )
{
- if ( node && (FT_UInt)node->fam_index < manager->families.count &&
- manager->families.entries[node->fam_index].cache )
- {
+ if ( node && (FT_UInt)node->cache_index < manager->num_caches )
node->ref_count--;
- }
}
diff --git a/extras/freetype2/src/cache/ftcmru.c b/extras/freetype2/src/cache/ftcmru.c
new file mode 100644
index 000000000..d4f733a11
--- /dev/null
+++ b/extras/freetype2/src/cache/ftcmru.c
@@ -0,0 +1,355 @@
+/***************************************************************************/
+/* */
+/* ftcmru.c */
+/* */
+/* FreeType MRU support (body). */
+/* */
+/* Copyright 2003, 2004 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#include <ft2build.h>
+#include FT_CACHE_H
+#include FT_CACHE_INTERNAL_MRU_H
+#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_DEBUG_H
+
+#include "ftcerror.h"
+
+
+ FT_EXPORT_DEF( void )
+ FTC_MruNode_Prepend( FTC_MruNode *plist,
+ FTC_MruNode node )
+ {
+ FTC_MruNode first = *plist;
+
+
+ if ( first )
+ {
+ FTC_MruNode last = first->prev;
+
+
+#ifdef FT_DEBUG_ERROR
+ {
+ FTC_MruNode cnode = first;
+
+
+ do
+ {
+ if ( cnode == node )
+ {
+ fprintf( stderr, "FTC_MruNode_Prepend: invalid action!\n" );
+ exit( 2 );
+ }
+ cnode = cnode->next;
+
+ } while ( cnode != first );
+ }
+#endif
+
+ first->prev = node;
+ last->next = node;
+ node->next = first;
+ node->prev = last;
+ }
+ else
+ {
+ node->next = node;
+ node->prev = node;
+ }
+ *plist = node;
+ }
+
+
+ FT_EXPORT_DEF( void )
+ FTC_MruNode_Up( FTC_MruNode *plist,
+ FTC_MruNode node )
+ {
+ FTC_MruNode first = *plist;
+
+
+ FT_ASSERT( first != NULL );
+
+ if ( first != node )
+ {
+ FTC_MruNode prev, next, last;
+
+
+#ifdef FT_DEBUG_ERROR
+ {
+ FTC_MruNode cnode = first;
+ do
+ {
+ if ( cnode == node )
+ goto Ok;
+ cnode = cnode->next;
+
+ } while ( cnode != first );
+
+ fprintf( stderr, "FTC_MruNode_Up: invalid action!\n" );
+ exit( 2 );
+ Ok:
+ }
+#endif
+ prev = node->prev;
+ next = node->next;
+
+ prev->next = next;
+ next->prev = prev;
+
+ last = first->prev;
+
+ last->next = node;
+ first->prev = node;
+
+ node->next = first;
+ node->prev = last;
+
+ *plist = node;
+ }
+ }
+
+
+ FT_EXPORT_DEF( void )
+ FTC_MruNode_Remove( FTC_MruNode *plist,
+ FTC_MruNode node )
+ {
+ FTC_MruNode first = *plist;
+ FTC_MruNode prev, next;
+
+
+ FT_ASSERT( first != NULL );
+
+#ifdef FT_DEBUG_ERROR
+ {
+ FTC_MruNode cnode = first;
+
+
+ do
+ {
+ if ( cnode == node )
+ goto Ok;
+ cnode = cnode->next;
+
+ } while ( cnode != first );
+
+ fprintf( stderr, "FTC_MruNode_Remove: invalid action!\n" );
+ exit( 2 );
+ Ok:
+ }
+#endif
+
+ prev = node->prev;
+ next = node->next;
+
+ prev->next = next;
+ next->prev = prev;
+
+ if ( node == next )
+ {
+ FT_ASSERT( first == node );
+ FT_ASSERT( prev == node );
+
+ *plist = NULL;
+ }
+ else if ( node == first )
+ *plist = next;
+ }
+
+
+ FT_EXPORT_DEF( void )
+ FTC_MruList_Init( FTC_MruList list,
+ FTC_MruListClass clazz,
+ FT_UInt max_nodes,
+ FT_Pointer data,
+ FT_Memory memory )
+ {
+ list->num_nodes = 0;
+ list->max_nodes = max_nodes;
+ list->nodes = NULL;
+ list->clazz = *clazz;
+ list->data = data;
+ list->memory = memory;
+ }
+
+
+ FT_EXPORT( void )
+ FTC_MruList_Reset( FTC_MruList list )
+ {
+ while ( list->nodes )
+ FTC_MruList_Remove( list, list->nodes );
+
+ FT_ASSERT( list->num_nodes == 0 );
+ }
+
+
+ FT_EXPORT( void )
+ FTC_MruList_Done( FTC_MruList list )
+ {
+ FTC_MruList_Reset( list );
+ }
+
+
+ FT_EXPORT_DEF( FTC_MruNode )
+ FTC_MruList_Find( FTC_MruList list,
+ FT_Pointer key )
+ {
+ FTC_MruNode_CompareFunc compare = list->clazz.node_compare;
+ FTC_MruNode first, node;
+
+
+ first = list->nodes;
+ node = NULL;
+
+ if ( first )
+ {
+ node = first;
+ do
+ {
+ if ( compare( node, key ) )
+ {
+ if ( node != first )
+ FTC_MruNode_Up( &list->nodes, node );
+
+ return node;
+ }
+
+ node = node->next;
+
+ } while ( node != first);
+ }
+
+ return NULL;
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FTC_MruList_New( FTC_MruList list,
+ FT_Pointer key,
+ FTC_MruNode *anode )
+ {
+ FT_Error error;
+ FTC_MruNode node;
+ FT_Memory memory = list->memory;
+
+
+ if ( list->num_nodes >= list->max_nodes && list->max_nodes > 0 )
+ {
+ node = list->nodes->prev;
+
+ FT_ASSERT( node );
+
+ if ( list->clazz.node_reset )
+ {
+ FTC_MruNode_Up( &list->nodes, node );
+
+ error = list->clazz.node_reset( node, key, list->data );
+ if ( !error )
+ goto Exit;
+ }
+
+ FTC_MruNode_Remove( &list->nodes, node );
+ list->num_nodes--;
+
+ if ( list->clazz.node_done )
+ list->clazz.node_done( node, list->data );
+ }
+ else if ( FT_ALLOC( node, list->clazz.node_size ) )
+ goto Exit;
+
+ error = list->clazz.node_init( node, key, list->data );
+ if ( error )
+ goto Fail;
+
+ FTC_MruNode_Prepend( &list->nodes, node );
+ list->num_nodes++;
+
+ Exit:
+ *anode = node;
+ return error;
+
+ Fail:
+ if ( list->clazz.node_done )
+ list->clazz.node_done( node, list->data );
+
+ FT_FREE( node );
+ goto Exit;
+ }
+
+
+ FT_EXPORT( FT_Error )
+ FTC_MruList_Lookup( FTC_MruList list,
+ FT_Pointer key,
+ FTC_MruNode *anode )
+ {
+ FTC_MruNode node;
+
+
+ node = FTC_MruList_Find( list, key );
+ if ( node == NULL )
+ return FTC_MruList_New( list, key, anode );
+
+ *anode = node;
+ return 0;
+ }
+
+
+ FT_EXPORT_DEF( void )
+ FTC_MruList_Remove( FTC_MruList list,
+ FTC_MruNode node )
+ {
+ FTC_MruNode_Remove( &list->nodes, node );
+ list->num_nodes--;
+
+ {
+ FT_Memory memory = list->memory;
+
+
+ if ( list->clazz.node_done )
+ list->clazz.node_done( node, list->data );
+
+ FT_FREE( node );
+ }
+ }
+
+
+ FT_EXPORT_DEF( void )
+ FTC_MruList_RemoveSelection( FTC_MruList list,
+ FTC_MruNode_CompareFunc selection,
+ FT_Pointer key )
+ {
+ FTC_MruNode first, node, next;
+
+
+ first = list->nodes;
+ while ( first && ( selection == NULL || selection( first, key ) ) )
+ {
+ FTC_MruList_Remove( list, first );
+ first = list->nodes;
+ }
+
+ if ( first )
+ {
+ node = first->next;
+ while ( node != first )
+ {
+ next = node->next;
+
+ if ( selection( node, key ) )
+ FTC_MruList_Remove( list, node );
+
+ node = next;
+ }
+ }
+ }
+
+
+/* END */
diff --git a/extras/freetype2/src/cache/ftcsbits.c b/extras/freetype2/src/cache/ftcsbits.c
index 584038241..6af5c7ee6 100644
--- a/extras/freetype2/src/cache/ftcsbits.c
+++ b/extras/freetype2/src/cache/ftcsbits.c
@@ -4,7 +4,7 @@
/* */
/* FreeType sbits manager (body). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,57 +18,15 @@
#include <ft2build.h>
#include FT_CACHE_H
-#include FT_CACHE_SMALL_BITMAPS_H
-#include FT_CACHE_INTERNAL_GLYPH_H
+#include FT_CACHE_INTERNAL_SBITS_H
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DEBUG_H
#include FT_ERRORS_H
+#include "ftccback.h"
#include "ftcerror.h"
-#define FTC_SBIT_ITEMS_PER_NODE 16
-
-
- typedef struct FTC_SBitNodeRec_* FTC_SBitNode;
-
- typedef struct FTC_SBitNodeRec_
- {
- FTC_GlyphNodeRec gnode;
- FTC_SBitRec sbits[FTC_SBIT_ITEMS_PER_NODE];
-
- } FTC_SBitNodeRec;
-
-
-#define FTC_SBIT_NODE( x ) ( (FTC_SBitNode)( x ) )
-
-
- typedef struct FTC_SBitQueryRec_
- {
- FTC_GlyphQueryRec gquery;
- FTC_ImageTypeRec type;
-
- } FTC_SBitQueryRec, *FTC_SBitQuery;
-
-
-#define FTC_SBIT_QUERY( x ) ( (FTC_SBitQuery)( x ) )
-
-
- typedef struct FTC_SBitFamilyRec_* FTC_SBitFamily;
-
- /* sbit family structure */
- typedef struct FTC_SBitFamilyRec_
- {
- FTC_GlyphFamilyRec gfam;
- FTC_ImageTypeRec type;
-
- } FTC_SBitFamilyRec;
-
-
-#define FTC_SBIT_FAMILY( x ) ( (FTC_SBitFamily)( x ) )
-#define FTC_SBIT_FAMILY_MEMORY( x ) FTC_GLYPH_FAMILY_MEMORY( &( x )->cset )
-
-
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -100,457 +58,275 @@
}
- FT_CALLBACK_DEF( void )
- ftc_sbit_node_done( FTC_SBitNode snode,
- FTC_Cache cache )
+ FT_EXPORT_DEF( void )
+ FTC_SNode_Free( FTC_SNode snode,
+ FTC_Cache cache )
{
FTC_SBit sbit = snode->sbits;
- FT_UInt count = FTC_GLYPH_NODE( snode )->item_count;
+ FT_UInt count = snode->count;
FT_Memory memory = cache->memory;
for ( ; count > 0; sbit++, count-- )
FT_FREE( sbit->buffer );
- ftc_glyph_node_done( FTC_GLYPH_NODE( snode ), cache );
+ FTC_GNode_Done( FTC_GNODE( snode ), cache );
+
+ FT_FREE( snode );
+ }
+
+
+ FT_LOCAL_DEF( void )
+ ftc_snode_free( FTC_SNode snode,
+ FTC_Cache cache )
+ {
+ FTC_SNode_Free( snode, cache );
}
static FT_Error
- ftc_sbit_node_load( FTC_SBitNode snode,
- FTC_Manager manager,
- FTC_SBitFamily sfam,
- FT_UInt gindex,
- FT_ULong *asize )
+ ftc_snode_load( FTC_SNode snode,
+ FTC_Manager manager,
+ FT_UInt gindex,
+ FT_ULong *asize )
{
- FT_Error error;
- FTC_GlyphNode gnode = FTC_GLYPH_NODE( snode );
- FT_Memory memory;
- FT_Face face;
- FT_Size size;
- FTC_SBit sbit;
+ FT_Error error;
+ FTC_GNode gnode = FTC_GNODE( snode );
+ FTC_Family family = gnode->family;
+ FT_Memory memory = manager->memory;
+ FT_Face face;
+ FTC_SBit sbit;
+ FTC_SFamilyClass clazz;
- if ( gindex < (FT_UInt)gnode->item_start ||
- gindex >= (FT_UInt)gnode->item_start + gnode->item_count )
+ if ( (FT_UInt)(gindex - gnode->gindex) >= snode->count )
{
- FT_ERROR(( "ftc_sbit_node_load: invalid glyph index" ));
+ FT_ERROR(( "ftc_snode_load: invalid glyph index" ));
return FTC_Err_Invalid_Argument;
}
- memory = manager->library->memory;
+ sbit = snode->sbits + ( gindex - gnode->gindex );
+ clazz = (FTC_SFamilyClass)family->clazz;
+
+ sbit->buffer = 0;
- sbit = snode->sbits + ( gindex - gnode->item_start );
+ error = clazz->family_load_glyph( family, gindex, manager, &face );
+ if ( error )
+ goto BadGlyph;
- error = FTC_Manager_Lookup_Size( manager, &sfam->type.font,
- &face, &size );
- if ( !error )
{
- /* by default, indicates a `missing' glyph */
- sbit->buffer = 0;
+ FT_Int temp;
+ FT_GlyphSlot slot = face->glyph;
+ FT_Bitmap* bitmap = &slot->bitmap;
+ FT_Int xadvance, yadvance;
- error = FT_Load_Glyph( face, gindex, sfam->type.flags | FT_LOAD_RENDER );
- if ( !error )
- {
- FT_Int temp;
- FT_GlyphSlot slot = face->glyph;
- FT_Bitmap* bitmap = &slot->bitmap;
- FT_Int xadvance, yadvance;
+ if ( slot->format != FT_GLYPH_FORMAT_BITMAP )
+ {
+ FT_ERROR(( "%s: glyph loaded didn't return a bitmap!\n",
+ "ftc_snode_load" ));
+ goto BadGlyph;
+ }
- /* check that our values fit into 8-bit containers! */
- /* If this is not the case, our bitmap is too large */
- /* and we will leave it as `missing' with sbit.buffer = 0 */
+ /* Check that our values fit into 8-bit containers! */
+ /* If this is not the case, our bitmap is too large */
+ /* and we will leave it as `missing' with sbit.buffer = 0 */
#define CHECK_CHAR( d ) ( temp = (FT_Char)d, temp == d )
#define CHECK_BYTE( d ) ( temp = (FT_Byte)d, temp == d )
- /* XXX: FIXME: add support for vertical layouts maybe */
-
- /* horizontal advance in pixels */
- xadvance = ( slot->metrics.horiAdvance + 32 ) >> 6;
- yadvance = ( slot->metrics.vertAdvance + 32 ) >> 6;
-
- if ( CHECK_BYTE( bitmap->rows ) &&
- CHECK_BYTE( bitmap->width ) &&
- CHECK_CHAR( bitmap->pitch ) &&
- CHECK_CHAR( slot->bitmap_left ) &&
- CHECK_CHAR( slot->bitmap_top ) &&
- CHECK_CHAR( xadvance ) &&
- CHECK_CHAR( yadvance ) )
- {
- sbit->width = (FT_Byte)bitmap->width;
- sbit->height = (FT_Byte)bitmap->rows;
- sbit->pitch = (FT_Char)bitmap->pitch;
- sbit->left = (FT_Char)slot->bitmap_left;
- sbit->top = (FT_Char)slot->bitmap_top;
- sbit->xadvance = (FT_Char)xadvance;
- sbit->yadvance = (FT_Char)yadvance;
- sbit->format = (FT_Byte)bitmap->pixel_mode;
- sbit->max_grays = (FT_Byte)(bitmap->num_grays - 1);
-
-#if 0 /* this doesn't work well with embedded bitmaps !! */
-
- /* grab the bitmap when possible - this is a hack! */
- if ( slot->flags & FT_GLYPH_OWN_BITMAP )
- {
- slot->flags &= ~FT_GLYPH_OWN_BITMAP;
- sbit->buffer = bitmap->buffer;
- }
- else
-#endif
- {
- /* copy the bitmap into a new buffer -- ignore error */
- error = ftc_sbit_copy_bitmap( sbit, bitmap, memory );
- }
-
- /* now, compute size */
- if ( asize )
- *asize = ABS( sbit->pitch ) * sbit->height;
-
- } /* glyph dimensions ok */
-
- } /* glyph loading successful */
-
- /* ignore the errors that might have occurred -- */
- /* we mark unloaded glyphs with `sbit.buffer == 0' */
- /* and 'width == 255', 'height == 0' */
- /* */
- if ( error && error != FT_Err_Out_Of_Memory )
- {
- sbit->width = 255;
- error = 0;
- /* sbit->buffer == NULL too! */
- }
+ /* horizontal advance in pixels */
+ xadvance = ( slot->metrics.horiAdvance + 32 ) >> 6;
+ yadvance = ( slot->metrics.vertAdvance + 32 ) >> 6;
+
+ if ( !CHECK_BYTE( bitmap->rows ) ||
+ !CHECK_BYTE( bitmap->width ) ||
+ !CHECK_CHAR( bitmap->pitch ) ||
+ !CHECK_CHAR( slot->bitmap_left ) ||
+ !CHECK_CHAR( slot->bitmap_top ) ||
+ !CHECK_CHAR( xadvance ) ||
+ !CHECK_CHAR( yadvance ) )
+ goto BadGlyph;
+
+ sbit->width = (FT_Byte)bitmap->width;
+ sbit->height = (FT_Byte)bitmap->rows;
+ sbit->pitch = (FT_Char)bitmap->pitch;
+ sbit->left = (FT_Char)slot->bitmap_left;
+ sbit->top = (FT_Char)slot->bitmap_top;
+ sbit->xadvance = (FT_Char)xadvance;
+ sbit->yadvance = (FT_Char)yadvance;
+ sbit->format = (FT_Byte)bitmap->pixel_mode;
+ sbit->max_grays = (FT_Byte)(bitmap->num_grays - 1);
+
+ /* copy the bitmap into a new buffer -- ignore error */
+ error = ftc_sbit_copy_bitmap( sbit, bitmap, memory );
+
+ /* now, compute size */
+ if ( asize )
+ *asize = FT_ABS( sbit->pitch ) * sbit->height;
+
+ } /* glyph loading successful */
+
+ /* ignore the errors that might have occurred -- */
+ /* we mark unloaded glyphs with `sbit.buffer == 0' */
+ /* and `width == 255', `height == 0' */
+ /* */
+ if ( error && error != FTC_Err_Out_Of_Memory )
+ {
+ BadGlyph:
+ sbit->width = 255;
+ sbit->height = 0;
+ sbit->buffer = NULL;
+ error = 0;
+ if ( asize )
+ *asize = 0;
}
return error;
}
- FT_CALLBACK_DEF( FT_Error )
- ftc_sbit_node_init( FTC_SBitNode snode,
- FTC_GlyphQuery gquery,
- FTC_Cache cache )
- {
- FT_Error error;
-
-
- ftc_glyph_node_init( FTC_GLYPH_NODE( snode ),
- gquery->gindex,
- FTC_GLYPH_FAMILY( gquery->query.family ) );
-
- error = ftc_sbit_node_load( snode,
- cache->manager,
- FTC_SBIT_FAMILY( FTC_QUERY( gquery )->family ),
- gquery->gindex,
- NULL );
- if ( error )
- ftc_glyph_node_done( FTC_GLYPH_NODE( snode ), cache );
-
- return error;
- }
-
-
- FT_CALLBACK_DEF( FT_ULong )
- ftc_sbit_node_weight( FTC_SBitNode snode )
+ FT_EXPORT_DEF( FT_Error )
+ FTC_SNode_New( FTC_SNode *psnode,
+ FTC_GQuery gquery,
+ FTC_Cache cache )
{
- FTC_GlyphNode gnode = FTC_GLYPH_NODE( snode );
- FT_UInt count = gnode->item_count;
- FTC_SBit sbit = snode->sbits;
- FT_Int pitch;
- FT_ULong size;
+ FT_Memory memory = cache->memory;
+ FT_Error error;
+ FTC_SNode snode = NULL;
+ FT_UInt gindex = gquery->gindex;
+ FTC_Family family = gquery->family;
+ FTC_SFamilyClass clazz = FTC_CACHE__SFAMILY_CLASS( cache );
+ FT_UInt total;
- /* the node itself */
- size = sizeof ( *snode );
- /* the sbit records */
- size += FTC_GLYPH_NODE( snode )->item_count * sizeof ( FTC_SBitRec );
-
- for ( ; count > 0; count--, sbit++ )
+ total = clazz->family_get_count( family, cache->manager );
+ if ( total == 0 || gindex >= total )
{
- if ( sbit->buffer )
- {
- pitch = sbit->pitch;
- if ( pitch < 0 )
- pitch = -pitch;
-
- /* add the size of a given glyph image */
- size += pitch * sbit->height;
- }
+ error = FT_Err_Invalid_Argument;
+ goto Exit;
}
- return size;
- }
-
-
- FT_CALLBACK_DEF( FT_Bool )
- ftc_sbit_node_compare( FTC_SBitNode snode,
- FTC_SBitQuery squery,
- FTC_Cache cache )
- {
- FTC_GlyphQuery gquery = FTC_GLYPH_QUERY( squery );
- FTC_GlyphNode gnode = FTC_GLYPH_NODE( snode );
- FT_Bool result;
-
-
- result = ftc_glyph_node_compare( gnode, gquery );
- if ( result )
+ if ( !FT_NEW( snode ) )
{
- /* check if we need to load the glyph bitmap now */
- FT_UInt gindex = gquery->gindex;
- FTC_SBit sbit = snode->sbits + ( gindex - gnode->item_start );
+ FT_UInt count, start;
- if ( sbit->buffer == NULL && sbit->width != 255 )
- {
- FT_ULong size;
+ start = gindex - ( gindex % FTC_SBIT_ITEMS_PER_NODE );
+ count = total - start;
+ if ( count > FTC_SBIT_ITEMS_PER_NODE )
+ count = FTC_SBIT_ITEMS_PER_NODE;
+ FTC_GNode_Init( FTC_GNODE( snode ), start, family );
- /* yes, it's safe to ignore errors here */
- ftc_sbit_node_load( snode,
- cache->manager,
- FTC_SBIT_FAMILY( FTC_QUERY( squery )->family ),
- gindex,
- &size );
+ snode->count = count;
- cache->manager->cur_weight += size;
+ error = ftc_snode_load( snode,
+ cache->manager,
+ gindex,
+ NULL );
+ if ( error )
+ {
+ FTC_SNode_Free( snode, cache );
+ snode = NULL;
}
}
- return result;
- }
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** SBITS FAMILIES *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- FT_CALLBACK_DEF( FT_Error )
- ftc_sbit_family_init( FTC_SBitFamily sfam,
- FTC_SBitQuery squery,
- FTC_Cache cache )
- {
- FTC_Manager manager = cache->manager;
- FT_Error error;
- FT_Face face;
-
-
- sfam->type = squery->type;
-
- /* we need to compute "cquery.item_total" now */
- error = FTC_Manager_Lookup_Face( manager,
- squery->type.font.face_id,
- &face );
- if ( !error )
- {
- error = ftc_glyph_family_init( FTC_GLYPH_FAMILY( sfam ),
- FTC_IMAGE_TYPE_HASH( &sfam->type ),
- FTC_SBIT_ITEMS_PER_NODE,
- face->num_glyphs,
- FTC_GLYPH_QUERY( squery ),
- cache );
- }
-
+ Exit:
+ *psnode = snode;
return error;
}
- FT_CALLBACK_DEF( FT_Bool )
- ftc_sbit_family_compare( FTC_SBitFamily sfam,
- FTC_SBitQuery squery )
- {
- FT_Bool result;
-
-
- /* we need to set the "cquery.cset" field or our query for */
- /* faster glyph comparisons in ftc_sbit_node_compare */
- /* */
- result = FT_BOOL( FTC_IMAGE_TYPE_COMPARE( &sfam->type, &squery->type ) );
- if ( result )
- FTC_GLYPH_FAMILY_FOUND( sfam, squery );
-
- return result;
- }
-
-
- /*************************************************************************/
- /*************************************************************************/
- /***** *****/
- /***** SBITS CACHE *****/
- /***** *****/
- /*************************************************************************/
- /*************************************************************************/
-
-
- FT_CALLBACK_TABLE_DEF
- const FTC_Cache_ClassRec ftc_sbit_cache_class =
+ FT_LOCAL_DEF( FT_Error )
+ ftc_snode_new( FTC_SNode *psnode,
+ FTC_GQuery gquery,
+ FTC_Cache cache )
{
- sizeof ( FTC_CacheRec ),
- (FTC_Cache_InitFunc) ftc_cache_init,
- (FTC_Cache_ClearFunc)ftc_cache_clear,
- (FTC_Cache_DoneFunc) ftc_cache_done,
-
- sizeof ( FTC_SBitFamilyRec ),
- (FTC_Family_InitFunc) ftc_sbit_family_init,
- (FTC_Family_CompareFunc)ftc_sbit_family_compare,
- (FTC_Family_DoneFunc) ftc_glyph_family_done,
-
- sizeof ( FTC_SBitNodeRec ),
- (FTC_Node_InitFunc) ftc_sbit_node_init,
- (FTC_Node_WeightFunc) ftc_sbit_node_weight,
- (FTC_Node_CompareFunc)ftc_sbit_node_compare,
- (FTC_Node_DoneFunc) ftc_sbit_node_done
- };
-
-
- /* documentation is in ftcsbits.h */
-
- FT_EXPORT_DEF( FT_Error )
- FTC_SBitCache_New( FTC_Manager manager,
- FTC_SBitCache *acache )
- {
- return FTC_Manager_Register_Cache( manager,
- &ftc_sbit_cache_class,
- (FTC_Cache*)acache );
+ return FTC_SNode_New( psnode, gquery, cache );
}
- /* documentation is in ftcsbits.h */
-
-#ifdef FTC_CACHE_USE_INLINE
-
-#define GEN_CACHE_FAMILY_COMPARE( f, q, c ) \
- ftc_sbit_family_compare( (FTC_SBitFamily)(f), (FTC_SBitQuery)(q) )
-
-#define GEN_CACHE_NODE_COMPARE( n, q, c ) \
- ftc_sbit_node_compare( (FTC_SBitNode)(n), (FTC_SBitQuery)(q), c )
-
-#define GEN_CACHE_LOOKUP ftc_sbit_cache_lookup
-#include "ftccache.i"
-
-#else /* !FTC_CACHE_USE_INLINE */
-
-#define ftc_sbit_cache_lookup ftc_cache_lookup
-
-#endif /* !FTC_CACHE_USE_INLINE */
-
- FT_EXPORT_DEF( FT_Error )
- FTC_SBitCache_Lookup( FTC_SBitCache cache,
- FTC_ImageType type,
- FT_UInt gindex,
- FTC_SBit *ansbit,
- FTC_Node *anode )
+ FT_EXPORT_DEF( FT_ULong )
+ FTC_SNode_Weight( FTC_SNode snode )
{
- FT_Error error;
- FTC_SBitQueryRec squery;
- FTC_SBitNode node;
-
+ FT_UInt count = snode->count;
+ FTC_SBit sbit = snode->sbits;
+ FT_Int pitch;
+ FT_ULong size;
- /* other argument checks delayed to ftc_cache_lookup */
- if ( !ansbit )
- return FTC_Err_Invalid_Argument;
- *ansbit = NULL;
+ FT_ASSERT( snode->count <= FTC_SBIT_ITEMS_PER_NODE );
- if ( anode )
- *anode = NULL;
-
- squery.gquery.gindex = gindex;
- squery.type = *type;
+ /* the node itself */
+ size = sizeof ( *snode );
- error = ftc_sbit_cache_lookup( FTC_CACHE( cache ),
- FTC_QUERY( &squery ),
- (FTC_Node*)&node );
- if ( !error )
+ for ( ; count > 0; count--, sbit++ )
{
- *ansbit = node->sbits + ( gindex - FTC_GLYPH_NODE( node )->item_start );
-
- if ( anode )
+ if ( sbit->buffer )
{
- *anode = FTC_NODE( node );
- FTC_NODE( node )->ref_count++;
+ pitch = sbit->pitch;
+ if ( pitch < 0 )
+ pitch = -pitch;
+
+ /* add the size of a given glyph image */
+ size += pitch * sbit->height;
}
}
- return error;
- }
+ return size;
+ }
- /* backwards-compatibility functions */
- FT_EXPORT_DEF( FT_Error )
- FTC_SBit_Cache_New( FTC_Manager manager,
- FTC_SBit_Cache *acache )
+ FT_LOCAL_DEF( FT_ULong )
+ ftc_snode_weight( FTC_SNode snode )
{
- return FTC_SBitCache_New( manager, (FTC_SBitCache*)acache );
+ return FTC_SNode_Weight( snode );
}
- FT_EXPORT_DEF( FT_Error )
- FTC_SBit_Cache_Lookup( FTC_SBit_Cache cache,
- FTC_Image_Desc* desc,
- FT_UInt gindex,
- FTC_SBit *ansbit )
+ FT_EXPORT_DEF( FT_Bool )
+ FTC_SNode_Compare( FTC_SNode snode,
+ FTC_GQuery gquery,
+ FTC_Cache cache )
{
- FTC_ImageTypeRec type0;
-
-
- if ( !desc )
- return FTC_Err_Invalid_Argument;
+ FTC_GNode gnode = FTC_GNODE( snode );
+ FT_UInt gindex = gquery->gindex;
+ FT_Bool result;
- type0.font = desc->font;
- type0.flags = 0;
- /* convert image type flags to load flags */
+ result = FT_BOOL( gnode->family == gquery->family &&
+ (FT_UInt)( gindex - gnode->gindex ) < snode->count );
+ if ( result )
{
- FT_UInt load_flags = FT_LOAD_DEFAULT;
- FT_UInt type = desc->image_type;
-
+ /* check if we need to load the glyph bitmap now */
+ FTC_SBit sbit = snode->sbits + ( gindex - gnode->gindex );
- /* determine load flags, depending on the font description's */
- /* image type */
- if ( ftc_image_format( type ) == ftc_image_format_bitmap )
+ if ( sbit->buffer == NULL && sbit->width != 255 )
{
- if ( type & ftc_image_flag_monochrome )
- load_flags |= FT_LOAD_MONOCHROME;
+ FT_ULong size;
- /* disable embedded bitmaps loading if necessary */
- if ( type & ftc_image_flag_no_sbits )
- load_flags |= FT_LOAD_NO_BITMAP;
- }
- else
- {
- /* we want an outline, don't load embedded bitmaps */
- load_flags |= FT_LOAD_NO_BITMAP;
- if ( type & ftc_image_flag_unscaled )
- load_flags |= FT_LOAD_NO_SCALE;
+ if ( !ftc_snode_load( snode, cache->manager,
+ gindex, &size ) )
+ {
+ cache->manager->cur_weight += size;
+ }
}
+ }
- /* always render glyphs to bitmaps */
- load_flags |= FT_LOAD_RENDER;
-
- if ( type & ftc_image_flag_unhinted )
- load_flags |= FT_LOAD_NO_HINTING;
-
- if ( type & ftc_image_flag_autohinted )
- load_flags |= FT_LOAD_FORCE_AUTOHINT;
+ return result;
+ }
- type0.flags = load_flags;
- }
- return FTC_SBitCache_Lookup( (FTC_SBitCache)cache,
- &type0,
- gindex,
- ansbit,
- NULL );
+ FT_LOCAL_DEF( FT_Bool )
+ ftc_snode_compare( FTC_SNode snode,
+ FTC_GQuery gquery,
+ FTC_Cache cache )
+ {
+ return FTC_SNode_Compare( snode, gquery, cache );
}
diff --git a/extras/freetype2/src/cache/rules.mk b/extras/freetype2/src/cache/rules.mk
index a74e7800a..381104ad6 100644
--- a/extras/freetype2/src/cache/rules.mk
+++ b/extras/freetype2/src/cache/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2000, 2001 by
+# Copyright 2000, 2001, 2003, 2004 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,66 +15,66 @@
# Cache driver directory
#
-CACHE_DIR := $(SRC_)cache
-CACHE_DIR_ := $(CACHE_DIR)$(SEP)
-
-CACHE_H_DIR := $(PUBLIC_)cache
-CACHE_H_DIR_ := $(CACHE_H_DIR)$(SEP)
+CACHE_DIR := $(SRC_DIR)/cache
+CACHE_H_DIR := $(PUBLIC_DIR)/cache
# compilation flags for the driver
#
-Cache_COMPILE := $(FT_COMPILE) $I$(CACHE_DIR)
+CACHE_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(CACHE_DIR))
# Cache driver sources (i.e., C files)
#
-Cache_DRV_SRC := $(CACHE_DIR_)ftlru.c \
- $(CACHE_DIR_)ftcmanag.c \
- $(CACHE_DIR_)ftccache.c \
- $(CACHE_DIR_)ftcglyph.c \
- $(CACHE_DIR_)ftcsbits.c \
- $(CACHE_DIR_)ftcimage.c \
- $(CACHE_DIR_)ftccmap.c
+CACHE_DRV_SRC := $(CACHE_DIR)/ftcmru.c \
+ $(CACHE_DIR)/ftcmanag.c \
+ $(CACHE_DIR)/ftcbasic.c \
+ $(CACHE_DIR)/ftccache.c \
+ $(CACHE_DIR)/ftcglyph.c \
+ $(CACHE_DIR)/ftcsbits.c \
+ $(CACHE_DIR)/ftcimage.c \
+ $(CACHE_DIR)/ftccmap.c
# Cache driver headers
#
-Cache_DRV_H := $(CACHE_H_DIR_)ftlru.h \
- $(CACHE_H_DIR_)ftcmanag.h \
- $(CACHE_H_DIR_)ftcglyph.h \
- $(CACHE_H_DIR_)ftcimage.h \
- $(CACHE_DIR_)ftcerror.h
+CACHE_DRV_H := $(CACHE_H_DIR)/ftcmru.h \
+ $(CACHE_H_DIR)/ftcmanag.h \
+ $(CACHE_H_DIR)/ftcglyph.h \
+ $(CACHE_H_DIR)/ftcimage.h \
+ $(CACHE_H_DIR)/ftccmap.h \
+ $(CACHE_DIR)/ftcerror.h \
+ $(CACHE_DIR)/ftccback.h
# Cache driver object(s)
#
-# Cache_DRV_OBJ_M is used during `multi' builds.
-# Cache_DRV_OBJ_S is used during `single' builds.
+# CACHE_DRV_OBJ_M is used during `multi' builds.
+# CACHE_DRV_OBJ_S is used during `single' builds.
#
-Cache_DRV_OBJ_M := $(Cache_DRV_SRC:$(CACHE_DIR_)%.c=$(OBJ_)%.$O)
-Cache_DRV_OBJ_S := $(OBJ_)ftcache.$O
+CACHE_DRV_OBJ_M := $(CACHE_DRV_SRC:$(CACHE_DIR)/%.c=$(OBJ_DIR)/%.$O)
+CACHE_DRV_OBJ_S := $(OBJ_DIR)/ftcache.$O
# Cache driver source file for single build
#
-Cache_DRV_SRC_S := $(CACHE_DIR_)ftcache.c
+CACHE_DRV_SRC_S := $(CACHE_DIR)/ftcache.c
# Cache driver - single object
#
-$(Cache_DRV_OBJ_S): $(Cache_DRV_SRC_S) $(Cache_DRV_SRC) \
- $(FREETYPE_H) $(Cache_DRV_H)
- $(Cache_COMPILE) $T$@ $(Cache_DRV_SRC_S)
+$(CACHE_DRV_OBJ_S): $(CACHE_DRV_SRC_S) $(CACHE_DRV_SRC) \
+ $(FREETYPE_H) $(CACHE_DRV_H)
+ $(CACHE_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(CACHE_DRV_SRC_S))
# Cache driver - multiple objects
#
-$(OBJ_)%.$O: $(CACHE_DIR_)%.c $(FREETYPE_H) $(Cache_DRV_H)
- $(Cache_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(CACHE_DIR)/%.c $(FREETYPE_H) $(CACHE_DRV_H)
+ $(CACHE_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
#
-DRV_OBJS_S += $(Cache_DRV_OBJ_S)
-DRV_OBJS_M += $(Cache_DRV_OBJ_M)
+DRV_OBJS_S += $(CACHE_DRV_OBJ_S)
+DRV_OBJS_M += $(CACHE_DRV_OBJ_M)
# EOF
diff --git a/extras/freetype2/src/cff/Jamfile b/extras/freetype2/src/cff/Jamfile
index cf7cf6313..dcf24c818 100644
--- a/extras/freetype2/src/cff/Jamfile
+++ b/extras/freetype2/src/cff/Jamfile
@@ -1,4 +1,4 @@
-# FreeType 2 src/cff Jamfile (c) 2001 David Turner
+# FreeType 2 src/cff Jamfile (c) 2001, 2002 David Turner
#
SubDir FT2_TOP $(FT2_SRC_DIR) cff ;
diff --git a/extras/freetype2/src/cff/cff.c b/extras/freetype2/src/cff/cff.c
index 013c329ca..e6d8954c9 100644
--- a/extras/freetype2/src/cff/cff.c
+++ b/extras/freetype2/src/cff/cff.c
@@ -4,7 +4,7 @@
/* */
/* FreeType OpenType driver component (body only). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/extras/freetype2/src/cff/cffcmap.c b/extras/freetype2/src/cff/cffcmap.c
index 5beb6aea5..82e04d236 100644
--- a/extras/freetype2/src/cff/cffcmap.c
+++ b/extras/freetype2/src/cff/cffcmap.c
@@ -4,7 +4,7 @@
/* */
/* CFF character mapping table (cmap) support (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,6 +19,8 @@
#include "cffcmap.h"
#include "cffload.h"
+#include "cfferrs.h"
+
/*************************************************************************/
/*************************************************************************/
@@ -36,9 +38,8 @@
CFF_Encoding encoding = &cff->encoding;
- cmap->count = encoding->count;
cmap->gids = encoding->codes;
-
+
return 0;
}
@@ -46,7 +47,6 @@
FT_CALLBACK_DEF( void )
cff_cmap_encoding_done( CFF_CMapStd cmap )
{
- cmap->count = 0;
cmap->gids = NULL;
}
@@ -58,9 +58,9 @@
FT_UInt result = 0;
- if ( char_code < cmap->count )
+ if ( char_code < 256 )
result = cmap->gids[char_code];
-
+
return result;
}
@@ -71,27 +71,27 @@
{
FT_UInt result = 0;
FT_UInt32 char_code = *pchar_code;
-
+
*pchar_code = 0;
- if ( char_code < cmap->count )
+ if ( char_code < 255 )
{
FT_UInt code = (FT_UInt)(char_code + 1);
-
+
for (;;)
{
- if ( code >= cmap->count )
+ if ( code >= 256 )
break;
-
+
result = cmap->gids[code];
if ( result != 0 )
{
*pchar_code = code;
break;
}
-
+
code++;
}
}
@@ -125,34 +125,34 @@
{
FT_UInt32 u1 = ((CFF_CMapUniPair)pair1)->unicode;
FT_UInt32 u2 = ((CFF_CMapUniPair)pair2)->unicode;
-
+
if ( u1 < u2 )
return -1;
-
+
if ( u1 > u2 )
return +1;
-
+
return 0;
- }
+ }
FT_CALLBACK_DEF( FT_Error )
cff_cmap_unicode_init( CFF_CMapUnicode cmap )
{
- FT_Error error;
- FT_UInt count;
- TT_Face face = (TT_Face)FT_CMAP_FACE( cmap );
- FT_Memory memory = FT_FACE_MEMORY( face );
- CFF_Font cff = (CFF_Font)face->extra.data;
- CFF_Charset charset = &cff->charset;
- PSNames_Service psnames = (PSNames_Service)cff->psnames;
+ FT_Error error;
+ FT_UInt count;
+ TT_Face face = (TT_Face)FT_CMAP_FACE( cmap );
+ FT_Memory memory = FT_FACE_MEMORY( face );
+ CFF_Font cff = (CFF_Font)face->extra.data;
+ CFF_Charset charset = &cff->charset;
+ FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)cff->psnames;
cmap->num_pairs = 0;
cmap->pairs = NULL;
- count = (FT_UInt)face->root.num_glyphs;
+ count = cff->num_glyphs;
if ( !FT_NEW_ARRAY( cmap->pairs, count ) )
{
@@ -164,12 +164,12 @@
pair = cmap->pairs;
for ( n = 0; n < count; n++ )
{
- FT_UInt sid = charset->sids[n];
+ FT_UInt sid = charset->sids[n];
const char* gname;
gname = cff_index_get_sid_string( &cff->string_index, sid, psnames );
-
+
/* build unsorted pair table by matching glyph names */
if ( gname )
{
@@ -181,7 +181,7 @@
pair->gindex = n;
pair++;
}
-
+
FT_FREE( gname );
}
}
@@ -191,7 +191,7 @@
{
/* there are no unicode characters in here! */
FT_FREE( cmap->pairs );
- error = FT_Err_Invalid_Argument;
+ error = CFF_Err_Invalid_Argument;
}
else
{
@@ -200,7 +200,7 @@
if ( new_count != count && new_count < count / 2 )
{
(void)FT_RENEW_ARRAY( cmap->pairs, count, new_count );
- error = 0;
+ error = CFF_Err_Ok;
}
/* sort the pairs table to allow efficient binary searches */
@@ -223,7 +223,7 @@
FT_Face face = FT_CMAP_FACE( cmap );
FT_Memory memory = FT_FACE_MEMORY( face );
-
+
FT_FREE( cmap->pairs );
cmap->num_pairs = 0;
}
diff --git a/extras/freetype2/src/cff/cffcmap.h b/extras/freetype2/src/cff/cffcmap.h
index e136d29e0..ceb32cd3c 100644
--- a/extras/freetype2/src/cff/cffcmap.h
+++ b/extras/freetype2/src/cff/cffcmap.h
@@ -4,7 +4,7 @@
/* */
/* CFF character mapping table (cmap) support (specification). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -38,7 +38,6 @@ FT_BEGIN_HEADER
typedef struct CFF_CMapStdRec_
{
FT_CMapRec cmap;
- FT_UInt count;
FT_UShort* gids; /* up to 256 elements */
} CFF_CMapStdRec;
diff --git a/extras/freetype2/src/cff/cffdrivr.c b/extras/freetype2/src/cff/cffdrivr.c
index 34ed2bf76..60ee90ae3 100644
--- a/extras/freetype2/src/cff/cffdrivr.c
+++ b/extras/freetype2/src/cff/cffdrivr.c
@@ -4,7 +4,7 @@
/* */
/* OpenType font driver implementation (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,14 +22,19 @@
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_SFNT_H
#include FT_TRUETYPE_IDS_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+#include FT_SERVICE_POSTSCRIPT_INFO_H
+#include FT_SERVICE_TT_CMAP_H
#include "cffdrivr.h"
#include "cffgload.h"
#include "cffload.h"
+#include "cffcmap.h"
#include "cfferrs.h"
+#include FT_SERVICE_XFREE86_NAME_H
+#include FT_SERVICE_GLYPH_DICT_H
/*************************************************************************/
/* */
@@ -165,7 +170,7 @@
/* glyph_index :: The index of the glyph in the font file. */
/* */
/* load_flags :: A flag indicating what to load for this glyph. The */
- /* FTLOAD_??? constants can be used to control the */
+ /* FT_LOAD_??? constants can be used to control the */
/* glyph loading process (e.g., whether the outline */
/* should be scaled, whether to load bitmaps or not, */
/* whether to hint the outline, etc). */
@@ -196,7 +201,7 @@
if ( size )
{
/* these two object must have the same parent */
- if ( size->face != slot->root.face )
+ if ( size->root.face != slot->root.face )
return CFF_Err_Invalid_Face_Handle;
}
@@ -210,17 +215,10 @@
}
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
- /**** C H A R A C T E R M A P P I N G S ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
+ /*
+ * GLYPH DICT SERVICE
+ *
+ */
static FT_Error
cff_get_glyph_name( CFF_Face face,
@@ -228,21 +226,19 @@
FT_Pointer buffer,
FT_UInt buffer_max )
{
- CFF_Font font = (CFF_Font)face->extra.data;
- FT_Memory memory = FT_FACE_MEMORY( face );
- FT_String* gname;
- FT_UShort sid;
- PSNames_Service psnames;
- FT_Error error;
-
+ CFF_Font font = (CFF_Font)face->extra.data;
+ FT_Memory memory = FT_FACE_MEMORY( face );
+ FT_String* gname;
+ FT_UShort sid;
+ FT_Service_PsCMaps psnames;
+ FT_Error error;
- psnames = (PSNames_Service)FT_Get_Module_Interface(
- face->root.driver->root.library, "psnames" );
+ FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
if ( !psnames )
{
FT_ERROR(( "cff_get_glyph_name:" ));
- FT_ERROR(( " cannot open CFF & CEF fonts\n" ));
+ FT_ERROR(( " cannot get glyph name from CFF & CEF fonts\n" ));
FT_ERROR(( " " ));
FT_ERROR(( " without the `PSNames' module\n" ));
error = CFF_Err_Unknown_File_Format;
@@ -255,7 +251,7 @@
/* now, lookup the name itself */
gname = cff_index_get_sid_string( &font->string_index, sid, psnames );
- if ( buffer_max > 0 )
+ if ( gname && buffer_max > 0 )
{
FT_UInt len = (FT_UInt)ft_strlen( gname );
@@ -267,7 +263,7 @@
((FT_Byte*)buffer)[len] = 0;
}
- FT_FREE ( gname );
+ FT_FREE( gname );
error = CFF_Err_Ok;
Exit:
@@ -275,43 +271,26 @@
}
-
- /*************************************************************************/
- /* */
- /* <Function> */
- /* cff_get_name_index */
- /* */
- /* <Description> */
- /* Uses the psnames module and the CFF font's charset to to return a */
- /* a given glyph name's glyph index. */
- /* */
- /* <Input> */
- /* face :: A handle to the source face object. */
- /* */
- /* glyph_name :: The glyph name. */
- /* */
- /* <Return> */
- /* Glyph index. 0 means `undefined character code'. */
- /* */
static FT_UInt
cff_get_name_index( CFF_Face face,
FT_String* glyph_name )
{
- CFF_Font cff;
- CFF_Charset charset;
- PSNames_Service psnames;
- FT_Memory memory = FT_FACE_MEMORY( face );
- FT_String* name;
- FT_UShort sid;
- FT_UInt i;
- FT_Int result;
+ CFF_Font cff;
+ CFF_Charset charset;
+ FT_Service_PsCMaps psnames;
+ FT_Memory memory = FT_FACE_MEMORY( face );
+ FT_String* name;
+ FT_UShort sid;
+ FT_UInt i;
+ FT_Int result;
cff = (CFF_FontRec *)face->extra.data;
charset = &cff->charset;
- psnames = (PSNames_Service)FT_Get_Module_Interface(
- face->root.driver->root.library, "psnames" );
+ FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
+ if ( !psnames )
+ return 0;
for ( i = 0; i < cff->num_glyphs; i++ )
{
@@ -335,6 +314,77 @@
}
+ static const FT_Service_GlyphDictRec cff_service_glyph_dict =
+ {
+ (FT_GlyphDict_GetNameFunc) cff_get_glyph_name,
+ (FT_GlyphDict_NameIndexFunc)cff_get_name_index,
+ };
+
+
+ /*
+ * POSTSCRIPT INFO SERVICE
+ *
+ */
+
+ static FT_Int
+ cff_ps_has_glyph_names( FT_Face face )
+ {
+ return ( face->face_flags & FT_FACE_FLAG_GLYPH_NAMES ) > 0;
+ }
+
+
+ static const FT_Service_PsInfoRec cff_service_ps_info =
+ {
+ (PS_GetFontInfoFunc) NULL, /* unsupported with CFF fonts */
+ (PS_HasGlyphNamesFunc)cff_ps_has_glyph_names
+ };
+
+
+ /*
+ * TT CMAP INFO
+ *
+ * If the charmap is a synthetic Unicode encoding cmap or
+ * a Type 1 standard (or expert) encoding cmap, hide TT CMAP INFO
+ * service defined in SFNT module.
+ *
+ * Otherwise call the service function in the sfnt module.
+ *
+ */
+ static FT_Error
+ cff_get_cmap_info( FT_CharMap charmap,
+ TT_CMapInfo *cmap_info )
+ {
+ FT_CMap cmap = FT_CMAP( charmap );
+ FT_Error error = CFF_Err_Ok;
+
+
+ cmap_info->language = 0;
+
+ if ( cmap->clazz != &cff_cmap_encoding_class_rec &&
+ cmap->clazz != &cff_cmap_unicode_class_rec )
+ {
+ FT_Face face = FT_CMAP_FACE( cmap );
+ FT_Library library = FT_FACE_LIBRARY( face );
+ FT_Module sfnt = FT_Get_Module( library, "sfnt" );
+ FT_Service_TTCMaps service =
+ (FT_Service_TTCMaps)ft_module_get_service( sfnt,
+ FT_SERVICE_ID_TT_CMAP );
+
+
+ if ( service && service->get_cmap_info )
+ error = service->get_cmap_info( charmap, cmap_info );
+ }
+
+ return error;
+ }
+
+
+ static const FT_Service_TTCMapsRec cff_service_get_cmap_info =
+ {
+ (TT_CMap_Info_GetFunc)cff_get_cmap_info
+ };
+
+
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
@@ -347,24 +397,31 @@
/*************************************************************************/
/*************************************************************************/
+ static const FT_ServiceDescRec cff_services[] =
+ {
+ { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_CFF },
+ { FT_SERVICE_ID_POSTSCRIPT_INFO, &cff_service_ps_info },
+#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
+ { FT_SERVICE_ID_GLYPH_DICT, &cff_service_glyph_dict },
+#endif
+ { FT_SERVICE_ID_TT_CMAP, &cff_service_get_cmap_info },
+ { NULL, NULL }
+ };
+
+
static FT_Module_Interface
cff_get_interface( CFF_Driver driver,
const char* module_interface )
{
- FT_Module sfnt;
-
+ FT_Module sfnt;
+ FT_Module_Interface result;
-#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
-
- if ( ft_strcmp( (const char*)module_interface, "glyph_name" ) == 0 )
- return (FT_Module_Interface)cff_get_glyph_name;
- if ( ft_strcmp( (const char*)module_interface, "name_index" ) == 0 )
- return (FT_Module_Interface)cff_get_name_index;
-
-#endif
+ result = ft_service_list_lookup( cff_services, module_interface );
+ if ( result != NULL )
+ return result;
- /* we simply pass our request to the `sfnt' module */
+ /* we pass our request to the `sfnt' module */
sfnt = FT_Get_Module( driver->root.root.library, "sfnt" );
return sfnt ? sfnt->clazz->get_interface( sfnt, module_interface ) : 0;
@@ -378,9 +435,9 @@
{
/* begin with the FT_Module_Class fields */
{
- ft_module_font_driver |
- ft_module_driver_scalable |
- ft_module_driver_has_hinter,
+ FT_MODULE_FONT_DRIVER |
+ FT_MODULE_DRIVER_SCALABLE |
+ FT_MODULE_DRIVER_HAS_HINTER,
sizeof( CFF_DriverRec ),
"cff",
@@ -396,7 +453,7 @@
/* now the specific driver fields */
sizeof( TT_FaceRec ),
- sizeof( FT_SizeRec ),
+ sizeof( CFF_SizeRec ),
sizeof( CFF_GlyphSlotRec ),
(FT_Face_InitFunc) cff_face_init,
diff --git a/extras/freetype2/src/cff/cffgload.c b/extras/freetype2/src/cff/cffgload.c
index 0432aa021..c1339d82e 100644
--- a/extras/freetype2/src/cff/cffgload.c
+++ b/extras/freetype2/src/cff/cffgload.c
@@ -4,7 +4,7 @@
/* */
/* OpenType Glyph Loader (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -246,21 +246,20 @@
builder->current = &loader->current.outline;
FT_GlyphLoader_Rewind( loader );
- builder->hint_flags = FT_FACE(face)->internal->hint_flags;
builder->hints_globals = 0;
builder->hints_funcs = 0;
if ( hinting && size )
{
- builder->hints_globals = size->internal;
+ builder->hints_globals = size->root.internal;
builder->hints_funcs = glyph->root.internal->glyph_hints;
}
}
if ( size )
{
- builder->scale_x = size->metrics.x_scale;
- builder->scale_y = size->metrics.y_scale;
+ builder->scale_x = size->root.metrics.x_scale;
+ builder->scale_y = size->root.metrics.y_scale;
}
builder->pos_x = 0;
@@ -367,7 +366,7 @@
decoder->num_globals = cff->num_global_subrs;
decoder->globals = cff->global_subrs;
decoder->globals_bias = cff_compute_bias( decoder->num_globals );
-
+
decoder->hint_mode = hint_mode;
}
@@ -399,7 +398,7 @@
}
- /* check that there is enough room for `count' more points */
+ /* check that there is enough space for `count' more points */
static FT_Error
check_points( CFF_Builder* builder,
FT_Int count )
@@ -452,7 +451,7 @@
}
- /* check room for a new contour, then add it */
+ /* check space for a new contour, then add it */
static FT_Error
cff_builder_add_contour( CFF_Builder* builder )
{
@@ -486,7 +485,7 @@
FT_Pos x,
FT_Pos y )
{
- FT_Error error = 0;
+ FT_Error error = CFF_Err_Ok;
/* test whether we are building a new contour */
@@ -546,6 +545,10 @@
FT_UShort glyph_sid;
+ /* CID-keyed fonts don't have glyph names */
+ if ( !cff->charset.sids )
+ return -1;
+
/* check range of standard char code */
if ( charcode < 0 || charcode > 255 )
return -1;
@@ -641,13 +644,13 @@
FT_Int bchar,
FT_Int achar )
{
- FT_Error error;
- FT_Int bchar_index, achar_index, n_base_points;
- FT_Outline* base = decoder->builder.base;
- TT_Face face = decoder->builder.face;
- FT_Vector left_bearing, advance;
- FT_Byte* charstring;
- FT_ULong charstring_len;
+ FT_Error error;
+ CFF_Builder* builder = &decoder->builder;
+ FT_Int bchar_index, achar_index;
+ TT_Face face = decoder->builder.face;
+ FT_Vector left_bearing, advance;
+ FT_Byte* charstring;
+ FT_ULong charstring_len;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
@@ -677,9 +680,9 @@
/* If we are trying to load a composite glyph, do not load the */
/* accent character and return the array of subglyphs. */
- if ( decoder->builder.no_recurse )
+ if ( builder->no_recurse )
{
- FT_GlyphSlot glyph = (FT_GlyphSlot)decoder->builder.glyph;
+ FT_GlyphSlot glyph = (FT_GlyphSlot)builder->glyph;
FT_GlyphLoader loader = glyph->internal->loader;
FT_SubGlyph subg;
@@ -702,8 +705,8 @@
/* subglyph 1 = accent character */
subg->index = achar_index;
subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES;
- subg->arg1 = (FT_Int)adx;
- subg->arg2 = (FT_Int)ady;
+ subg->arg1 = (FT_Int)( adx >> 16 );
+ subg->arg2 = (FT_Int)( ady >> 16 );
/* set up remaining glyph fields */
glyph->num_subglyphs = 2;
@@ -713,6 +716,8 @@
loader->current.num_subglyphs = 2;
}
+ FT_GlyphLoader_Prepare( builder->loader );
+
/* First load `bchar' in builder */
error = cff_get_glyph_data( face, bchar_index,
&charstring, &charstring_len );
@@ -727,16 +732,17 @@
cff_free_glyph_data( face, &charstring, charstring_len );
}
- n_base_points = base->n_points;
-
/* Save the left bearing and width of the base character */
/* as they will be erased by the next load. */
- left_bearing = decoder->builder.left_bearing;
- advance = decoder->builder.advance;
+ left_bearing = builder->left_bearing;
+ advance = builder->advance;
+
+ builder->left_bearing.x = 0;
+ builder->left_bearing.y = 0;
- decoder->builder.left_bearing.x = 0;
- decoder->builder.left_bearing.y = 0;
+ builder->pos_x = adx;
+ builder->pos_y = ady;
/* Now load `achar' on top of the base outline. */
error = cff_get_glyph_data( face, achar_index,
@@ -754,20 +760,11 @@
/* Restore the left side bearing and advance width */
/* of the base character. */
- decoder->builder.left_bearing = left_bearing;
- decoder->builder.advance = advance;
-
- /* Finally, move the accent. */
- if ( decoder->builder.load_points )
- {
- FT_Outline dummy;
-
+ builder->left_bearing = left_bearing;
+ builder->advance = advance;
- dummy.n_points = (short)( base->n_points - n_base_points );
- dummy.points = base->points + n_base_points;
-
- FT_Outline_Translate( &dummy, adx, ady );
- }
+ builder->pos_x = 0;
+ builder->pos_y = 0;
Exit:
return error;
@@ -818,7 +815,7 @@
seed = (FT_Fixed)(char*)&seed ^
(FT_Fixed)(char*)&decoder ^
(FT_Fixed)(char*)&charstring_base;
- seed = ( seed ^ ( seed >> 10 ) ^ ( seed >> 20 ) ) & 0xFFFF;
+ seed = ( seed ^ ( seed >> 10 ) ^ ( seed >> 20 ) ) & 0xFFFFL;
if ( seed == 0 )
seed = 0x7384;
@@ -903,8 +900,8 @@
*decoder->top++ = val;
#ifdef FT_DEBUG_LEVEL_TRACE
- if ( !( val & 0xFFFF ) )
- FT_TRACE4(( " %d", (FT_Int32)( val >> 16 ) ));
+ if ( !( val & 0xFFFFL ) )
+ FT_TRACE4(( " %ld", (FT_Int32)( val >> 16 ) ));
else
FT_TRACE4(( " %.2f", val / 65536.0 ));
#endif
@@ -1111,7 +1108,7 @@
/* `glyph_width' to `nominal_width' plus number on the stack */
/* -- for either case. */
- FT_Int set_width_ok;
+ FT_Int set_width_ok;
switch ( op )
@@ -1126,6 +1123,8 @@
case cff_op_hstemhm:
case cff_op_vstemhm:
case cff_op_rmoveto:
+ case cff_op_hintmask:
+ case cff_op_cntrmask:
set_width_ok = num_args & 1;
break;
@@ -1224,7 +1223,7 @@
for ( maskbyte = 0;
maskbyte < (FT_UInt)(( decoder->num_hints + 7 ) >> 3);
maskbyte++, ip++ )
- FT_TRACE4(( "%02X", *ip ));
+ FT_TRACE4(( "0x%02X", *ip ));
}
#else
ip += ( decoder->num_hints + 7 ) >> 3;
@@ -1650,11 +1649,11 @@
case cff_op_flex1:
{
- FT_Pos start_x, start_y; /* record start x, y values for alter */
- /* use */
- FT_Int dx = 0, dy = 0; /* used in horizontal/vertical */
- /* algorithm below */
- FT_Int horizontal, count;
+ FT_Pos start_x, start_y; /* record start x, y values for */
+ /* alter use */
+ FT_Fixed dx = 0, dy = 0; /* used in horizontal/vertical */
+ /* algorithm below */
+ FT_Int horizontal, count;
FT_TRACE4(( " flex1" ));
@@ -1676,8 +1675,8 @@
/* grab up to the last argument */
for ( count = 5; count > 0; count-- )
{
- dx += (FT_Int)args[0];
- dy += (FT_Int)args[1];
+ dx += args[0];
+ dy += args[1];
args += 2;
}
@@ -1733,7 +1732,7 @@
x += args[0];
y += args[1];
cff_builder_add_point( builder, x, y,
- (FT_Bool)( count == 3 || count == 0 ) );
+ (FT_Bool)( count == 4 || count == 1 ) );
args += 2;
}
@@ -1747,35 +1746,43 @@
/* We are going to emulate the seac operator. */
if ( num_args == 4 )
{
+ /* Save glyph width so that the subglyphs don't overwrite it. */
+ FT_Pos glyph_width = decoder->glyph_width;
+
+
error = cff_operator_seac( decoder,
- args[0] >> 16,
- args[1] >> 16,
+ args[0],
+ args[1],
(FT_Int)( args[2] >> 16 ),
(FT_Int)( args[3] >> 16 ) );
args += 4;
- }
- if ( !error )
- error = CFF_Err_Ok;
+ decoder->glyph_width = glyph_width;
+ }
+ else
+ {
+ if ( !error )
+ error = CFF_Err_Ok;
- cff_builder_close_contour( builder );
+ cff_builder_close_contour( builder );
- /* close hints recording session */
- if ( hinter )
- {
- if (hinter->close( hinter->hints, builder->current->n_points ) )
- goto Syntax_Error;
+ /* close hints recording session */
+ if ( hinter )
+ {
+ if (hinter->close( hinter->hints, builder->current->n_points ) )
+ goto Syntax_Error;
+
+ /* apply hints to the loaded glyph outline now */
+ hinter->apply( hinter->hints,
+ builder->current,
+ (PSH_Globals)builder->hints_globals,
+ decoder->hint_mode );
+ }
- /* apply hints to the loaded glyph outline now */
- hinter->apply( hinter->hints,
- builder->current,
- (PSH_Globals)builder->hints_globals,
- builder->hint_flags );
+ /* add current outline to the glyph slot */
+ FT_GlyphLoader_Add( builder->loader );
}
- /* add current outline to the glyph slot */
- FT_GlyphLoader_Add( builder->loader );
-
/* return now! */
FT_TRACE4(( "\n\n" ));
return error;
@@ -1824,7 +1831,7 @@
FT_TRACE4(( " rand" ));
Rand = seed;
- if ( Rand >= 0x8000 )
+ if ( Rand >= 0x8000L )
Rand++;
args[0] = Rand;
@@ -2212,7 +2219,7 @@
cff_compute_max_advance( TT_Face face,
FT_Int* max_advance )
{
- FT_Error error = 0;
+ FT_Error error = CFF_Err_Ok;
CFF_Decoder decoder;
FT_Int glyph_index;
CFF_Font cff = (CFF_Font)face->other;
@@ -2248,7 +2255,7 @@
}
/* ignore the error if one has occurred -- skip to next glyph */
- error = 0;
+ error = CFF_Err_Ok;
}
*max_advance = decoder.builder.advance.x;
@@ -2282,14 +2289,14 @@
FT_Int glyph_index,
FT_Int32 load_flags )
{
- FT_Error error;
- CFF_Decoder decoder;
- TT_Face face = (TT_Face)glyph->root.face;
- FT_Bool hinting;
- CFF_Font cff = (CFF_Font)face->extra.data;
+ FT_Error error;
+ CFF_Decoder decoder;
+ TT_Face face = (TT_Face)glyph->root.face;
+ FT_Bool hinting;
+ CFF_Font cff = (CFF_Font)face->extra.data;
- FT_Matrix font_matrix;
- FT_Vector font_offset;
+ FT_Matrix font_matrix;
+ FT_Vector font_offset;
if ( load_flags & FT_LOAD_NO_RECURSE )
@@ -2299,10 +2306,77 @@
glyph->y_scale = 0x10000L;
if ( size )
{
- glyph->x_scale = size->metrics.x_scale;
- glyph->y_scale = size->metrics.y_scale;
+ glyph->x_scale = size->root.metrics.x_scale;
+ glyph->y_scale = size->root.metrics.y_scale;
}
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+
+ /* try to load embedded bitmap if any */
+ /* */
+ /* XXX: The convention should be emphasized in */
+ /* the documents because it can be confusing. */
+ if ( size )
+ {
+ CFF_Face cff_face = (CFF_Face)size->root.face;
+ SFNT_Service sfnt = (SFNT_Service)cff_face->sfnt;
+ FT_Stream stream = cff_face->root.stream;
+
+
+ if ( size->strike_index != 0xFFFFU &&
+ sfnt->load_sbits &&
+ ( load_flags & FT_LOAD_NO_BITMAP ) == 0 )
+ {
+ TT_SBit_MetricsRec metrics;
+
+
+ error = sfnt->load_sbit_image( face,
+ (FT_ULong)size->strike_index,
+ (FT_UInt)glyph_index,
+ (FT_Int)load_flags,
+ stream,
+ &glyph->root.bitmap,
+ &metrics );
+
+ if ( !error )
+ {
+ glyph->root.outline.n_points = 0;
+ glyph->root.outline.n_contours = 0;
+
+ glyph->root.metrics.width = (FT_Pos)metrics.width << 6;
+ glyph->root.metrics.height = (FT_Pos)metrics.height << 6;
+
+ glyph->root.metrics.horiBearingX = (FT_Pos)metrics.horiBearingX << 6;
+ glyph->root.metrics.horiBearingY = (FT_Pos)metrics.horiBearingY << 6;
+ glyph->root.metrics.horiAdvance = (FT_Pos)metrics.horiAdvance << 6;
+
+ glyph->root.metrics.vertBearingX = (FT_Pos)metrics.vertBearingX << 6;
+ glyph->root.metrics.vertBearingY = (FT_Pos)metrics.vertBearingY << 6;
+ glyph->root.metrics.vertAdvance = (FT_Pos)metrics.vertAdvance << 6;
+
+ glyph->root.format = FT_GLYPH_FORMAT_BITMAP;
+
+ if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
+ {
+ glyph->root.bitmap_left = metrics.vertBearingX;
+ glyph->root.bitmap_top = metrics.vertBearingY;
+ }
+ else
+ {
+ glyph->root.bitmap_left = metrics.horiBearingX;
+ glyph->root.bitmap_top = metrics.horiBearingY;
+ }
+ return error;
+ }
+ }
+ }
+
+#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
+
+ /* return immediately if we only want the embedded bitmaps */
+ if ( load_flags & FT_LOAD_SBITS_ONLY )
+ return CFF_Err_Invalid_Argument;
+
glyph->root.outline.n_points = 0;
glyph->root.outline.n_contours = 0;
@@ -2316,8 +2390,15 @@
FT_ULong charstring_len;
+ /* in a CID-keyed font, consider `glyph_index' as a CID and map */
+ /* it immediately to the real glyph_index -- if it isn't a */
+ /* subsetted font, glyph_indices and CIDs are identical, though */
+ if ( cff->top_font.font_dict.cid_registry != 0xFFFFU &&
+ cff->charset.cids )
+ glyph_index = cff->charset.cids[glyph_index];
+
cff_decoder_init( &decoder, face, size, glyph, hinting,
- FT_LOAD_TARGET_MODE(load_flags) );
+ FT_LOAD_TARGET_MODE( load_flags ) );
decoder.builder.no_recurse =
(FT_Bool)( ( load_flags & FT_LOAD_NO_RECURSE ) != 0 );
@@ -2363,18 +2444,19 @@
cff_builder_done( &decoder.builder );
}
- #ifdef FT_CONFIG_OPTION_INCREMENTAL
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
/* Incremental fonts can optionally override the metrics. */
- if ( !error &&
- face->root.internal->incremental_interface &&
+ if ( !error &&
+ face->root.internal->incremental_interface &&
face->root.internal->incremental_interface->funcs->get_glyph_metrics )
{
FT_Incremental_MetricsRec metrics;
+
metrics.bearing_x = decoder.builder.left_bearing.x;
- metrics.bearing_y = decoder.builder.left_bearing.y;
- metrics.advance = decoder.builder.advance.x;
+ metrics.bearing_y = decoder.builder.left_bearing.y;
+ metrics.advance = decoder.builder.advance.x;
error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
face->root.internal->incremental_interface->object,
glyph_index, FALSE, &metrics );
@@ -2411,6 +2493,7 @@
{
FT_BBox cbox;
FT_Glyph_Metrics* metrics = &glyph->root.metrics;
+ FT_Vector advance;
/* copy the _unscaled_ advance width */
@@ -2428,7 +2511,7 @@
glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
glyph->root.outline.flags = 0;
- if ( size && size->metrics.y_ppem < 24 )
+ if ( size && size->root.metrics.y_ppem < 24 )
glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION;
glyph->root.outline.flags |= FT_OUTLINE_REVERSE_FILL;
@@ -2440,6 +2523,15 @@
font_offset.x,
font_offset.y );
+ advance.x = metrics->horiAdvance;
+ advance.y = 0;
+ FT_Vector_Transform( &advance, &font_matrix );
+ metrics->horiAdvance = advance.x + font_offset.x;
+ advance.x = 0;
+ advance.y = metrics->vertAdvance;
+ FT_Vector_Transform( &advance, &font_matrix );
+ metrics->vertAdvance = advance.y + font_offset.y;
+
if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
/* scale the outline and the metrics */
@@ -2469,11 +2561,11 @@
if ( hinting )
{
- metrics->horiAdvance = ( metrics->horiAdvance + 32 ) & -64;
- metrics->vertAdvance = ( metrics->vertAdvance + 32 ) & -64;
+ metrics->horiAdvance = FT_PIX_ROUND( metrics->horiAdvance );
+ metrics->vertAdvance = FT_PIX_ROUND( metrics->vertAdvance );
- metrics->vertBearingX = ( metrics->vertBearingX + 32 ) & -64;
- metrics->vertBearingY = ( metrics->vertBearingY + 32 ) & -64;
+ metrics->vertBearingX = FT_PIX_ROUND( metrics->vertBearingX );
+ metrics->vertBearingY = FT_PIX_ROUND( metrics->vertBearingY );
}
}
diff --git a/extras/freetype2/src/cff/cffgload.h b/extras/freetype2/src/cff/cffgload.h
index a1be92cb0..3adfe7cc6 100644
--- a/extras/freetype2/src/cff/cffgload.h
+++ b/extras/freetype2/src/cff/cffgload.h
@@ -4,7 +4,7 @@
/* */
/* OpenType Glyph Loader (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -114,8 +114,6 @@ FT_BEGIN_HEADER
FT_Error error; /* only used for memory errors */
FT_Bool metrics_only;
- FT_UInt32 hint_flags;
-
void* hints_funcs; /* hinter-specific */
void* hints_globals; /* hinter-specific */
diff --git a/extras/freetype2/src/cff/cffload.c b/extras/freetype2/src/cff/cffload.c
index 66af469b8..44f3254bd 100644
--- a/extras/freetype2/src/cff/cffload.c
+++ b/extras/freetype2/src/cff/cffload.c
@@ -4,7 +4,7 @@
/* */
/* OpenType and CFF data/program tables loader (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,7 +20,7 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include FT_TRUETYPE_TAGS_H
#include "cffload.h"
@@ -1172,12 +1172,12 @@
}
- /* allocate a table containing pointers to an index's elements */
+ /* allocate a table containing pointers to an index's elements */
static FT_Error
cff_index_get_pointers( CFF_Index idx,
FT_Byte*** table )
{
- FT_Error error = 0;
+ FT_Error error = CFF_Err_Ok;
FT_Memory memory = idx->stream->memory;
FT_ULong n, offset, old_offset;
FT_Byte** t;
@@ -1211,7 +1211,7 @@
FT_Byte** pbytes,
FT_ULong* pbyte_len )
{
- FT_Error error = 0;
+ FT_Error error = CFF_Err_Ok;
if ( idx && idx->count > element )
@@ -1312,18 +1312,26 @@
FT_LOCAL_DEF( FT_String* )
- cff_index_get_sid_string( CFF_Index idx,
- FT_UInt sid,
- PSNames_Service psnames_service )
+ cff_index_get_sid_string( CFF_Index idx,
+ FT_UInt sid,
+ FT_Service_PsCMaps psnames )
{
+ /* value 0xFFFFU indicates a missing dictionary entry */
+ if ( sid == 0xFFFFU )
+ return 0;
+
/* if it is not a standard string, return it */
if ( sid > 390 )
return cff_index_get_name( idx, sid - 391 );
+ /* CID-keyed CFF fonts don't have glyph names */
+ if ( !psnames )
+ return 0;
+
/* that's a standard string, fetch a copy from the PSName module */
{
FT_String* name = 0;
- const char* adobe_name = psnames_service->adobe_std_strings( sid );
+ const char* adobe_name = psnames->adobe_std_strings( sid );
FT_UInt len;
@@ -1493,6 +1501,7 @@
FT_FREE( charset->sids );
+ FT_FREE( charset->cids );
charset->format = 0;
charset->offset = 0;
}
@@ -1503,10 +1512,11 @@
FT_UInt num_glyphs,
FT_Stream stream,
FT_ULong base_offset,
- FT_ULong offset )
+ FT_ULong offset,
+ FT_Bool invert )
{
- FT_Memory memory = stream->memory;
- FT_Error error = 0;
+ FT_Memory memory = stream->memory;
+ FT_Error error = CFF_Err_Ok;
FT_UShort glyph_sid;
@@ -1557,7 +1567,6 @@
while ( j < num_glyphs )
{
-
/* Read the first glyph sid of the range. */
if ( FT_READ_USHORT( glyph_sid ) )
goto Exit;
@@ -1595,7 +1604,7 @@
/* In order to use a predefined charset, the following must be */
/* true: The charset constructed for the glyphs in the font's */
/* charstrings dictionary must match the predefined charset in */
- /* the first num_glyphs */
+ /* the first num_glyphs. */
charset->offset = offset; /* record charset type */
@@ -1604,8 +1613,8 @@
case 0:
if ( num_glyphs > 229 )
{
- FT_ERROR(("cff_charset_load: implicit charset larger than\n"
- "predefined charset (Adobe ISO-Latin)!\n" ));
+ FT_ERROR(( "cff_charset_load: implicit charset larger than\n"
+ "predefined charset (Adobe ISO-Latin)!\n" ));
error = CFF_Err_Invalid_File_Format;
goto Exit;
}
@@ -1615,8 +1624,7 @@
goto Exit;
/* Copy the predefined charset into the allocated memory. */
- FT_MEM_COPY( charset->sids, cff_isoadobe_charset,
- num_glyphs * sizeof ( FT_UShort ) );
+ FT_ARRAY_COPY( charset->sids, cff_isoadobe_charset, num_glyphs );
break;
@@ -1634,8 +1642,7 @@
goto Exit;
/* Copy the predefined charset into the allocated memory. */
- FT_MEM_COPY( charset->sids, cff_expert_charset,
- num_glyphs * sizeof ( FT_UShort ) );
+ FT_ARRAY_COPY( charset->sids, cff_expert_charset, num_glyphs );
break;
@@ -1653,8 +1660,7 @@
goto Exit;
/* Copy the predefined charset into the allocated memory. */
- FT_MEM_COPY( charset->sids, cff_expertsubset_charset,
- num_glyphs * sizeof ( FT_UShort ) );
+ FT_ARRAY_COPY( charset->sids, cff_expertsubset_charset, num_glyphs );
break;
@@ -1664,23 +1670,41 @@
}
}
- Exit:
+ /* we have to invert the `sids' array for subsetted CID-keyed fonts */
+ if ( invert )
+ {
+ FT_UInt i;
+ FT_UShort max_cid = 0;
+
+
+ for ( i = 0; i < num_glyphs; i++ )
+ if ( charset->sids[i] > max_cid )
+ max_cid = charset->sids[i];
+ max_cid++;
+
+ if ( FT_NEW_ARRAY( charset->cids, max_cid ) )
+ goto Exit;
+ FT_MEM_ZERO( charset->cids, sizeof ( FT_UShort ) * max_cid );
+
+ for ( i = 0; i < num_glyphs; i++ )
+ charset->cids[charset->sids[i]] = i;
+ }
+ Exit:
/* Clean up if there was an error. */
if ( error )
- if ( charset->sids )
- {
- FT_FREE( charset->sids );
- charset->format = 0;
- charset->offset = 0;
- charset->sids = 0;
- }
+ {
+ FT_FREE( charset->sids );
+ FT_FREE( charset->cids );
+ charset->format = 0;
+ charset->offset = 0;
+ charset->sids = 0;
+ }
return error;
}
-
static void
cff_encoding_done( CFF_Encoding encoding )
{
@@ -1690,7 +1714,6 @@
}
-
static FT_Error
cff_encoding_load( CFF_Encoding encoding,
CFF_Charset charset,
@@ -1699,11 +1722,11 @@
FT_ULong base_offset,
FT_ULong offset )
{
- FT_Error error = 0;
- FT_UInt count;
- FT_UInt j;
- FT_UShort glyph_sid;
- FT_UInt glyph_code;
+ FT_Error error = CFF_Err_Ok;
+ FT_UInt count;
+ FT_UInt j;
+ FT_UShort glyph_sid;
+ FT_UInt glyph_code;
/* Check for charset->sids. If we do not have this, we fail. */
@@ -1720,8 +1743,8 @@
encoding->codes[j] = 0;
}
- /* Note: The encoding table in a CFF font is indexed by glyph index, */
- /* where the first encoded glyph index is 1. Hence, we read the char */
+ /* Note: The encoding table in a CFF font is indexed by glyph index; */
+ /* the first encoded glyph index is 1. Hence, we read the character */
/* code (`glyph_code') at index j and make the assignment: */
/* */
/* encoding->codes[glyph_code] = j + 1 */
@@ -1734,7 +1757,6 @@
if ( offset > 1 )
{
-
encoding->offset = base_offset + offset;
/* we need to parse the table to determine its size */
@@ -1749,9 +1771,10 @@
{
FT_Byte* p;
- /* by convention, GID 0 is always ".notdef" and is never */
- /* coded in the font. Hence, the number of codes found */
- /* in the table is 'count+1' */
+
+ /* By convention, GID 0 is always ".notdef" and is never */
+ /* coded in the font. Hence, the number of codes found */
+ /* in the table is `count+1'. */
/* */
encoding->count = count + 1;
@@ -1781,7 +1804,7 @@
case 1:
{
- FT_Byte nleft;
+ FT_UInt nleft;
FT_UInt i = 1;
FT_UInt k;
@@ -1821,7 +1844,7 @@
}
}
- /* simple check, one never knows what can be found in a font */
+ /* simple check; one never knows what can be found in a font */
if ( encoding->count > 256 )
encoding->count = 256;
}
@@ -1856,13 +1879,13 @@
/* Assign code to SID mapping. */
encoding->sids[glyph_code] = glyph_sid;
- /* First, lookup GID which has been assigned to */
- /* SID glyph_sid. */
+ /* First, look up GID which has been assigned to */
+ /* SID glyph_sid. */
for ( gindex = 0; gindex < num_glyphs; gindex++ )
{
if ( charset->sids[gindex] == glyph_sid )
{
- encoding->codes[glyph_code] = (FT_UShort) gindex;
+ encoding->codes[glyph_code] = (FT_UShort)gindex;
break;
}
}
@@ -1874,24 +1897,21 @@
FT_UInt i;
- /* We take into account the fact a CFF font can use a predefined */
- /* encoding without containing all of the glyphs encoded by this */
- /* encoding (see the note at the end of section 12 in the CFF */
- /* specification). */
+ /* We take into account the fact a CFF font can use a predefined */
+ /* encoding without containing all of the glyphs encoded by this */
+ /* encoding (see the note at the end of section 12 in the CFF */
+ /* specification). */
switch ( (FT_UInt)offset )
{
case 0:
/* First, copy the code to SID mapping. */
- FT_MEM_COPY( encoding->sids, cff_standard_encoding,
- 256 * sizeof ( FT_UShort ) );
-
+ FT_ARRAY_COPY( encoding->sids, cff_standard_encoding, 256 );
goto Populate;
case 1:
/* First, copy the code to SID mapping. */
- FT_MEM_COPY( encoding->sids, cff_expert_encoding,
- 256 * sizeof ( FT_UShort ) );
+ FT_ARRAY_COPY( encoding->sids, cff_expert_encoding, 256 );
Populate:
/* Construct code to GID mapping from code to SID mapping */
@@ -1899,7 +1919,6 @@
encoding->count = 0;
-
for ( j = 0; j < 256; j++ )
{
/* If j is encoded, find the GID for it. */
@@ -1923,8 +1942,8 @@
encoding->codes[j] = (FT_UShort)i;
/* update encoding count */
- if ( encoding->count < j+1 )
- encoding->count = j+1;
+ if ( encoding->count < j + 1 )
+ encoding->count = j + 1;
}
}
}
@@ -1953,7 +1972,7 @@
{
FT_Error error;
CFF_ParserRec parser;
- FT_Byte* dict;
+ FT_Byte* dict = NULL;
FT_ULong dict_len;
CFF_FontRecDict top = &font->font_dict;
CFF_Private priv = &font->private_dict;
@@ -1964,13 +1983,27 @@
/* set defaults */
FT_MEM_ZERO( top, sizeof ( *top ) );
- top->underline_position = -100;
- top->underline_thickness = 50;
+ top->underline_position = -100L << 16;
+ top->underline_thickness = 50L << 16;
top->charstring_type = 2;
top->font_matrix.xx = 0x10000L;
top->font_matrix.yy = 0x10000L;
top->cid_count = 8720;
+ /* we use the implementation specific SID value 0xFFFF to indicate */
+ /* missing entries */
+ top->version = 0xFFFFU;
+ top->notice = 0xFFFFU;
+ top->copyright = 0xFFFFU;
+ top->full_name = 0xFFFFU;
+ top->family_name = 0xFFFFU;
+ top->weight = 0xFFFFU;
+ top->embedded_postscript = 0xFFFFU;
+
+ top->cid_registry = 0xFFFFU;
+ top->cid_ordering = 0xFFFFU;
+ top->cid_font_name = 0xFFFFU;
+
error = cff_index_access_element( idx, font_index, &dict, &dict_len ) ||
cff_parser_run( &parser, dict, dict + dict_len );
@@ -1980,7 +2013,7 @@
goto Exit;
/* if it is a CID font, we stop there */
- if ( top->cid_registry )
+ if ( top->cid_registry != 0xFFFFU )
goto Exit;
/* parse the private dictionary, if any */
@@ -1992,8 +2025,8 @@
priv->blue_shift = 7;
priv->blue_fuzz = 1;
priv->lenIV = -1;
- priv->expansion_factor = (FT_Fixed)0.06 * 0x10000L;
- priv->blue_scale = (FT_Fixed)0.039625 * 0x10000L;
+ priv->expansion_factor = (FT_Fixed)( 0.06 * 0x10000L );
+ priv->blue_scale = (FT_Fixed)( 0.039625 * 0x10000L * 1000 );
cff_parser_init( &parser, CFF_CODE_PRIVATE, priv );
@@ -2121,8 +2154,15 @@
if ( error )
goto Exit;
+ if ( FT_STREAM_SEEK( base_offset + dict->charstrings_offset ) )
+ goto Exit;
+
+ error = cff_new_index( &font->charstrings_index, stream, 0 );
+ if ( error )
+ goto Exit;
+
/* now, check for a CID font */
- if ( dict->cid_registry )
+ if ( dict->cid_registry != 0xFFFFU )
{
CFF_IndexRec fd_index;
CFF_SubFont sub;
@@ -2165,7 +2205,7 @@
/* now load the FD Select array */
error = CFF_Load_FD_Select( &font->fd_select,
- (FT_UInt)dict->cid_count,
+ font->charstrings_index.count,
stream,
base_offset + dict->cid_fd_select_offset );
@@ -2186,13 +2226,6 @@
goto Exit;
}
- if ( FT_STREAM_SEEK( base_offset + dict->charstrings_offset ) )
- goto Exit;
-
- error = cff_new_index( &font->charstrings_index, stream, 0 );
- if ( error )
- goto Exit;
-
/* explicit the global subrs */
font->num_global_subrs = font->global_subrs_index.count;
font->num_glyphs = font->charstrings_index.count;
@@ -2203,25 +2236,38 @@
if ( error )
goto Exit;
- /* read the Charset and Encoding tables when available */
+ /* read the Charset and Encoding tables if available */
if ( font->num_glyphs > 0 )
{
+ FT_Bool invert;
+
+
+ invert = dict->cid_registry != 0xFFFFU &&
+ font->charstrings_index.count != dict->cid_count;
error = cff_charset_load( &font->charset, font->num_glyphs, stream,
- base_offset, dict->charset_offset );
+ base_offset, dict->charset_offset, invert );
if ( error )
goto Exit;
- error = cff_encoding_load( &font->encoding,
- &font->charset,
- font->num_glyphs,
- stream,
- base_offset,
- dict->encoding_offset );
- if ( error )
- goto Exit;
+ /* CID-keyed CFFs don't have an encoding */
+ if ( dict->cid_registry == 0xFFFFU )
+ {
+ error = cff_encoding_load( &font->encoding,
+ &font->charset,
+ font->num_glyphs,
+ stream,
+ base_offset,
+ dict->encoding_offset );
+ if ( error )
+ goto Exit;
+ }
+ else
+ /* CID-keyed fonts only need CIDs */
+ FT_FREE( font->charset.sids );
}
- /* get the font name */
+ /* get the font name (/CIDFontName for CID-keyed fonts, */
+ /* /FontName otherwise) */
font->font_name = cff_index_get_name( &font->name_index, face_index );
Exit:
diff --git a/extras/freetype2/src/cff/cffload.h b/extras/freetype2/src/cff/cffload.h
index 4cadfe6bb..ccf8ada1c 100644
--- a/extras/freetype2/src/cff/cffload.h
+++ b/extras/freetype2/src/cff/cffload.h
@@ -4,7 +4,7 @@
/* */
/* OpenType & CFF data/program tables loader (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,8 +21,8 @@
#include <ft2build.h>
-#include FT_INTERNAL_CFF_TYPES_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
+#include "cfftypes.h"
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
FT_BEGIN_HEADER
@@ -36,9 +36,9 @@ FT_BEGIN_HEADER
FT_UInt element );
FT_LOCAL( FT_String* )
- cff_index_get_sid_string( CFF_Index idx,
- FT_UInt sid,
- PSNames_Service psnames_interface );
+ cff_index_get_sid_string( CFF_Index idx,
+ FT_UInt sid,
+ FT_Service_PsCMaps psnames );
FT_LOCAL( FT_Error )
@@ -62,7 +62,7 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Byte )
- cff_fd_select_get( CFF_FDSelect select,
+ cff_fd_select_get( CFF_FDSelect fdselect,
FT_UInt glyph_index );
diff --git a/extras/freetype2/src/cff/cffobjs.c b/extras/freetype2/src/cff/cffobjs.c
index 830f46269..bbe1654ee 100644
--- a/extras/freetype2/src/cff/cffobjs.c
+++ b/extras/freetype2/src/cff/cffobjs.c
@@ -4,7 +4,7 @@
/* */
/* OpenType objects manager (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -24,7 +24,7 @@
#include FT_TRUETYPE_IDS_H
#include FT_TRUETYPE_TAGS_H
#include FT_INTERNAL_SFNT_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
#include "cffobjs.h"
#include "cffload.h"
@@ -52,16 +52,81 @@
/*************************************************************************/
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+
+ static FT_Error
+ sbit_size_reset( CFF_Size size )
+ {
+ CFF_Face face;
+ FT_Error error = CFF_Err_Ok;
+
+ FT_ULong strike_index;
+ FT_Size_Metrics* metrics;
+ FT_Size_Metrics* sbit_metrics;
+ SFNT_Service sfnt;
+
+
+ metrics = &size->root.metrics;
+
+ face = (CFF_Face)size->root.face;
+ sfnt = (SFNT_Service)face->sfnt;
+
+ sbit_metrics = &size->strike_metrics;
+
+ error = sfnt->set_sbit_strike( face,
+ metrics->x_ppem, metrics->y_ppem,
+ &strike_index );
+
+ if ( !error )
+ {
+ TT_SBit_Strike strike = face->sbit_strikes + strike_index;
+
+
+ sbit_metrics->x_ppem = metrics->x_ppem;
+ sbit_metrics->y_ppem = metrics->y_ppem;
+
+ sbit_metrics->ascender = strike->hori.ascender << 6;
+ sbit_metrics->descender = strike->hori.descender << 6;
+
+ /* XXX: Is this correct? */
+ sbit_metrics->height = sbit_metrics->ascender -
+ sbit_metrics->descender;
+
+ /* XXX: Is this correct? */
+ sbit_metrics->max_advance = ( strike->hori.min_origin_SB +
+ strike->hori.max_width +
+ strike->hori.min_advance_SB ) << 6;
+
+ size->strike_index = (FT_UInt)strike_index;
+ }
+ else
+ {
+ size->strike_index = 0xFFFFU;
+
+ sbit_metrics->x_ppem = 0;
+ sbit_metrics->y_ppem = 0;
+ sbit_metrics->ascender = 0;
+ sbit_metrics->descender = 0;
+ sbit_metrics->height = 0;
+ sbit_metrics->max_advance = 0;
+ }
+
+ return error;
+ }
+
+#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
+
+
static PSH_Globals_Funcs
cff_size_get_globals_funcs( CFF_Size size )
{
- CFF_Face face = (CFF_Face)size->face;
+ CFF_Face face = (CFF_Face)size->root.face;
CFF_Font font = (CFF_FontRec *)face->extra.data;
PSHinter_Service pshinter = (PSHinter_Service)font->pshinter;
FT_Module module;
- module = FT_Get_Module( size->face->driver->root.library,
+ module = FT_Get_Module( size->root.face->driver->root.library,
"pshinter" );
return ( module && pshinter && pshinter->get_globals_funcs )
? pshinter->get_globals_funcs( module )
@@ -72,16 +137,16 @@
FT_LOCAL_DEF( void )
cff_size_done( CFF_Size size )
{
- if ( size->internal )
+ if ( size->root.internal )
{
PSH_Globals_Funcs funcs;
funcs = cff_size_get_globals_funcs( size );
if ( funcs )
- funcs->destroy( (PSH_Globals)size->internal );
+ funcs->destroy( (PSH_Globals)size->root.internal );
- size->internal = 0;
+ size->root.internal = 0;
}
}
@@ -89,14 +154,14 @@
FT_LOCAL_DEF( FT_Error )
cff_size_init( CFF_Size size )
{
- FT_Error error = 0;
+ FT_Error error = CFF_Err_Ok;
PSH_Globals_Funcs funcs = cff_size_get_globals_funcs( size );
if ( funcs )
{
PSH_Globals globals;
- CFF_Face face = (CFF_Face)size->face;
+ CFF_Face face = (CFF_Face)size->root.face;
CFF_Font font = (CFF_FontRec *)face->extra.data;
CFF_SubFont subfont = &font->top_font;
@@ -150,9 +215,9 @@
priv.lenIV = cpriv->lenIV;
}
- error = funcs->create( size->face->memory, &priv, &globals );
+ error = funcs->create( size->root.face->memory, &priv, &globals );
if ( !error )
- size->internal = (FT_Size_Internal)(void*)globals;
+ size->root.internal = (FT_Size_Internal)(void*)globals;
}
return error;
@@ -163,15 +228,32 @@
cff_size_reset( CFF_Size size )
{
PSH_Globals_Funcs funcs = cff_size_get_globals_funcs( size );
- FT_Error error = 0;
+ FT_Error error = CFF_Err_Ok;
+ FT_Face face = size->root.face;
if ( funcs )
- error = funcs->set_scale( (PSH_Globals)size->internal,
- size->metrics.x_scale,
- size->metrics.y_scale,
+ error = funcs->set_scale( (PSH_Globals)size->root.internal,
+ size->root.metrics.x_scale,
+ size->root.metrics.y_scale,
0, 0 );
- return error;
+
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+
+ if ( face->face_flags & FT_FACE_FLAG_FIXED_SIZES )
+ {
+ error = sbit_size_reset( size );
+
+ if ( !error && !( face->face_flags & FT_FACE_FLAG_SCALABLE ) )
+ size->root.metrics = size->strike_metrics;
+ }
+
+#endif
+
+ if ( face->face_flags & FT_FACE_FLAG_SCALABLE )
+ return CFF_Err_Ok;
+ else
+ return error;
}
@@ -244,8 +326,6 @@
}
-
-
FT_LOCAL_DEF( FT_Error )
cff_face_init( FT_Stream stream,
CFF_Face face,
@@ -253,30 +333,37 @@
FT_Int num_params,
FT_Parameter* params )
{
- FT_Error error;
- SFNT_Service sfnt;
- PSNames_Service psnames;
- PSHinter_Service pshinter;
- FT_Bool pure_cff = 1;
- FT_Bool sfnt_format = 0;
+ FT_Error error;
+ SFNT_Service sfnt;
+ FT_Service_PsCMaps psnames;
+ PSHinter_Service pshinter;
+ FT_Bool pure_cff = 1;
+ FT_Bool sfnt_format = 0;
+#if 0
+ FT_FACE_FIND_GLOBAL_SERVICE( face, sfnt, SFNT );
+ FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_NAMES );
+ FT_FACE_FIND_GLOBAL_SERVICE( face, pshinter, POSTSCRIPT_HINTER );
+ if ( !sfnt )
+ goto Bad_Format;
+#else
sfnt = (SFNT_Service)FT_Get_Module_Interface(
face->root.driver->root.library, "sfnt" );
if ( !sfnt )
goto Bad_Format;
- psnames = (PSNames_Service)FT_Get_Module_Interface(
- face->root.driver->root.library, "psnames" );
+ FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
pshinter = (PSHinter_Service)FT_Get_Module_Interface(
face->root.driver->root.library, "pshinter" );
+#endif
/* create input stream from resource */
if ( FT_STREAM_SEEK( 0 ) )
goto Exit;
- /* check that we have a valid OpenType file */
+ /* check whether we have a valid OpenType file */
error = sfnt->init_face( stream, face, face_index, num_params, params );
if ( !error )
{
@@ -293,7 +380,7 @@
sfnt_format = 1;
/* now, the font can be either an OpenType/CFF font, or an SVG CEF */
- /* font in the later case; it doesn't have a `head' table */
+ /* font; in the latter case it doesn't have a `head' table */
error = face->goto_table( face, TTAG_head, stream, 0 );
if ( !error )
{
@@ -307,7 +394,7 @@
}
else
{
- /* load the `cmap' table by hand */
+ /* load the `cmap' table explicitly */
error = sfnt->load_charmaps( face, stream );
if ( error )
goto Exit;
@@ -317,7 +404,7 @@
/* FreeType 2 */
}
- /* now, load the CFF part of the file */
+ /* now load the CFF part of the file */
error = face->goto_table( face, TTAG_CFF, stream, 0 );
if ( error )
goto Exit;
@@ -332,10 +419,11 @@
/* now load and parse the CFF table in the file */
{
- CFF_Font cff;
- FT_Memory memory = face->root.memory;
- FT_Face root;
- FT_Int32 flags;
+ CFF_Font cff;
+ CFF_FontRecDict dict;
+ FT_Memory memory = face->root.memory;
+ FT_Face root;
+ FT_Int32 flags;
if ( FT_NEW( cff ) )
@@ -347,7 +435,7 @@
goto Exit;
cff->pshinter = pshinter;
- cff->psnames = psnames;
+ cff->psnames = (void*)psnames;
/* Complement the root flags with some interesting information. */
/* Note that this is only necessary for pure CFF and CEF fonts. */
@@ -355,26 +443,29 @@
root = &face->root;
root->num_glyphs = cff->num_glyphs;
- if ( pure_cff )
+ dict = &cff->top_font.font_dict;
+
+ /* we need the `PSNames' module for CFF and CEF formats */
+ /* which aren't CID-keyed */
+ if ( dict->cid_registry == 0xFFFFU && !psnames )
{
- CFF_FontRecDict dict = &cff->top_font.font_dict;
+ FT_ERROR(( "cff_face_init:" ));
+ FT_ERROR(( " cannot open CFF & CEF fonts\n" ));
+ FT_ERROR(( " " ));
+ FT_ERROR(( " without the `PSNames' module\n" ));
+ goto Bad_Format;
+ }
+ if ( pure_cff )
+ {
+ char* style_name = NULL;
- /* we need the `PSNames' module for pure-CFF and CEF formats */
- if ( !psnames )
- {
- FT_ERROR(( "cff_face_init:" ));
- FT_ERROR(( " cannot open CFF & CEF fonts\n" ));
- FT_ERROR(( " " ));
- FT_ERROR(( " without the `PSNames' module\n" ));
- goto Bad_Format;
- }
/* Set up num_faces. */
root->num_faces = cff->num_faces;
/* compute number of glyphs */
- if ( dict->cid_registry )
+ if ( dict->cid_registry != 0xFFFFU )
root->num_glyphs = dict->cid_count;
else
root->num_glyphs = cff->charstrings_index.count;
@@ -385,7 +476,6 @@
root->bbox.xMax = ( dict->font_bbox.xMax + 0xFFFFU ) >> 16;
root->bbox.yMax = ( dict->font_bbox.yMax + 0xFFFFU ) >> 16;
-
root->ascender = (FT_Short)( root->bbox.yMax );
root->descender = (FT_Short)( root->bbox.yMin );
root->height = (FT_Short)(
@@ -396,14 +486,87 @@
else
root->units_per_EM = 1000;
+ root->underline_position =
+ (FT_Short)( dict->underline_position >> 16 );
+ root->underline_thickness =
+ (FT_Short)( dict->underline_thickness >> 16 );
+
/* retrieve font family & style name */
- root->family_name = cff_index_get_name( &cff->name_index, face_index );
- if ( dict->cid_registry )
- root->style_name = cff_strcpy( memory, "Regular" ); /* XXXX */
+ root->family_name = cff_index_get_name( &cff->name_index,
+ face_index );
+
+ if ( root->family_name )
+ {
+ char* full = cff_index_get_sid_string( &cff->string_index,
+ dict->full_name,
+ psnames );
+ char* fullp = full;
+ char* family = root->family_name;
+
+ /* we're going to try to extract the style name from the
+ * full name. We need to ignore spaces and dashes during
+ * the search.
+ */
+ if ( full )
+ {
+ while ( *fullp )
+ {
+ /* skip common characters at the start of both strings
+ */
+ if ( *fullp == *family )
+ {
+ family++;
+ fullp++;
+ continue;
+ }
+
+ /* ignore spaces or dashes in full name during comparison
+ */
+ if ( *fullp == ' ' || *fullp == '-' )
+ {
+ fullp++;
+ continue;
+ }
+ /* ignore spaces and dashes in family name during comparison
+ */
+ if ( *family == ' ' || *family == '-' )
+ {
+ family++;
+ continue;
+ }
+
+ if ( !*family && *fullp )
+ {
+ /* the full name begins with the same characters than the
+ * family name, with spaces and dashes removed. In this
+ * case, the remaining string in "fullp" will be used
+ * as the style name
+ */
+ style_name = cff_strcpy( memory, fullp );
+ }
+ break;
+ }
+ FT_FREE( full );
+ }
+ }
else
- root->style_name = cff_index_get_sid_string( &cff->string_index,
- dict->weight,
- psnames );
+ {
+ char *cid_font_name =
+ cff_index_get_sid_string( &cff->string_index,
+ dict->cid_font_name,
+ psnames );
+
+
+ /* do we have a `/FontName' for a CID-keyed font? */
+ if ( cid_font_name )
+ root->family_name = cid_font_name;
+ }
+
+ if ( style_name )
+ root->style_name = style_name;
+ else
+ /* assume "Regular" style if we don't know better */
+ root->style_name = cff_strcpy( memory, (char *)"Regular" );
/*******************************************************************/
/* */
@@ -426,10 +589,6 @@
flags |= FT_FACE_FLAG_KERNING;
#endif
-#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
- flags |= FT_FACE_FLAG_GLYPH_NAMES;
-#endif
-
root->face_flags = flags;
/*******************************************************************/
@@ -441,13 +600,29 @@
if ( dict->italic_angle )
flags |= FT_STYLE_FLAG_ITALIC;
- /* XXX: may not be correct */
- if ( cff->top_font.private_dict.force_bold )
- flags |= FT_STYLE_FLAG_BOLD;
+ {
+ char *weight = cff_index_get_sid_string( &cff->string_index,
+ dict->weight,
+ psnames );
+
+
+ if ( weight )
+ if ( !ft_strcmp( weight, "Bold" ) ||
+ !ft_strcmp( weight, "Black" ) )
+ flags |= FT_STYLE_FLAG_BOLD;
+ FT_FREE( weight );
+ }
root->style_flags = flags;
}
+#ifndef FT_CONFIG_OPTION_NO_GLYPH_NAMES
+ /* CID-keyed CFF fonts don't have glyph names -- the SFNT loader */
+ /* has unset this flag because of the 3.0 `post' table */
+ if ( dict->cid_registry == 0xFFFFU )
+ root->face_flags |= FT_FACE_FLAG_GLYPH_NAMES;
+#endif
+
/*******************************************************************/
/* */
/* Compute char maps. */
@@ -463,7 +638,7 @@
CFF_Encoding encoding = &cff->encoding;
- for ( nn = 0; nn < (FT_UInt) root->num_charmaps; nn++ )
+ for ( nn = 0; nn < (FT_UInt)root->num_charmaps; nn++ )
{
cmap = root->charmaps[nn];
@@ -476,18 +651,23 @@
goto Skip_Unicode; /* Standard Unicode (deprecated) */
}
- /* we didn't find a Unicode charmap, synthetize one */
+ /* since CID-keyed fonts don't contain glyph names, we can't */
+ /* construct a cmap */
+ if ( pure_cff && cff->top_font.font_dict.cid_registry != 0xFFFFU )
+ goto Exit;
+
+ /* we didn't find a Unicode charmap -- synthetize one */
cmaprec.face = root;
cmaprec.platform_id = 3;
cmaprec.encoding_id = 1;
cmaprec.encoding = FT_ENCODING_UNICODE;
- nn = (FT_UInt) root->num_charmaps;
+ nn = (FT_UInt)root->num_charmaps;
FT_CMap_New( &cff_cmap_unicode_class_rec, NULL, &cmaprec, NULL );
/* if no Unicode charmap was previously selected, select this one */
- if ( root->charmap == NULL && nn != (FT_UInt) root->num_charmaps )
+ if ( root->charmap == NULL && nn != (FT_UInt)root->num_charmaps )
root->charmap = root->charmaps[nn];
Skip_Unicode:
@@ -501,26 +681,25 @@
if ( encoding->offset == 0 )
{
- cmaprec.encoding_id = 0;
+ cmaprec.encoding_id = TT_ADOBE_ID_STANDARD;
cmaprec.encoding = FT_ENCODING_ADOBE_STANDARD;
clazz = &cff_cmap_encoding_class_rec;
}
else if ( encoding->offset == 1 )
{
- cmaprec.encoding_id = 1;
+ cmaprec.encoding_id = TT_ADOBE_ID_EXPERT;
cmaprec.encoding = FT_ENCODING_ADOBE_EXPERT;
clazz = &cff_cmap_encoding_class_rec;
}
else
{
- cmaprec.encoding_id = 3;
+ cmaprec.encoding_id = TT_ADOBE_ID_CUSTOM;
cmaprec.encoding = FT_ENCODING_ADOBE_CUSTOM;
clazz = &cff_cmap_encoding_class_rec;
}
FT_CMap_New( clazz, NULL, &cmaprec, NULL );
}
-
}
}
diff --git a/extras/freetype2/src/cff/cffobjs.h b/extras/freetype2/src/cff/cffobjs.h
index cf60ecfb2..f02a5d748 100644
--- a/extras/freetype2/src/cff/cffobjs.h
+++ b/extras/freetype2/src/cff/cffobjs.h
@@ -4,7 +4,7 @@
/* */
/* OpenType objects manager (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,9 +22,9 @@
#include <ft2build.h>
#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_CFF_TYPES_H
+#include "cfftypes.h"
#include FT_INTERNAL_TRUETYPE_TYPES_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
FT_BEGIN_HEADER
@@ -51,7 +51,18 @@ FT_BEGIN_HEADER
/* <Description> */
/* A handle to an OpenType size object. */
/* */
- typedef FT_Size CFF_Size;
+ typedef struct CFF_SizeRec_
+ {
+ FT_SizeRec root;
+
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+
+ FT_UInt strike_index; /* 0xFFFF to indicate invalid */
+ FT_Size_Metrics strike_metrics; /* current strike's metrics */
+
+#endif
+
+ } CFF_SizeRec, *CFF_Size;
/*************************************************************************/
@@ -89,15 +100,6 @@ FT_BEGIN_HEADER
} CFF_Transform;
- /* this is only used in the case of a pure CFF font with no charmap */
- typedef struct CFF_CharMapRec_
- {
- TT_CharMapRec root;
- PS_Unicodes unicodes;
-
- } CFF_CharMapRec, *CFF_CharMap;
-
-
/***********************************************************************/
/* */
/* TrueType driver class. */
diff --git a/extras/freetype2/src/cff/cffparse.c b/extras/freetype2/src/cff/cffparse.c
index 3e1f8408e..c4e5a6c59 100644
--- a/extras/freetype2/src/cff/cffparse.c
+++ b/extras/freetype2/src/cff/cffparse.c
@@ -4,7 +4,7 @@
/* */
/* CFF token stream parser (body) */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -38,6 +38,7 @@
cff_kind_none = 0,
cff_kind_num,
cff_kind_fixed,
+ cff_kind_fixed_thousand,
cff_kind_string,
cff_kind_bool,
cff_kind_delta,
@@ -333,7 +334,7 @@
offset->x = cff_parse_fixed_thousand( data++ );
offset->y = cff_parse_fixed_thousand( data );
- temp = ABS( matrix->yy );
+ temp = FT_ABS( matrix->yy );
*upm = (FT_UShort)FT_DivFix( 0x10000L, FT_DivFix( temp, 1000 ) );
@@ -429,6 +430,8 @@
CFF_FIELD( code, name, cff_kind_num )
#define CFF_FIELD_FIXED( code, name ) \
CFF_FIELD( code, name, cff_kind_fixed )
+#define CFF_FIELD_FIXED_1000( code, name ) \
+ CFF_FIELD( code, name, cff_kind_fixed_thousand )
#define CFF_FIELD_STRING( code, name ) \
CFF_FIELD( code, name, cff_kind_string )
#define CFF_FIELD_BOOL( code, name ) \
@@ -579,6 +582,10 @@
case cff_kind_fixed:
val = cff_parse_fixed( parser->stack );
+ goto Store_Number;
+
+ case cff_kind_fixed_thousand:
+ val = cff_parse_fixed_thousand( parser->stack );
Store_Number:
switch ( field->size )
diff --git a/extras/freetype2/src/cff/cffparse.h b/extras/freetype2/src/cff/cffparse.h
index 2de95a2c5..8f3fa5885 100644
--- a/extras/freetype2/src/cff/cffparse.h
+++ b/extras/freetype2/src/cff/cffparse.h
@@ -4,7 +4,7 @@
/* */
/* CFF token stream parser (specification) */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,7 +21,7 @@
#include <ft2build.h>
-#include FT_INTERNAL_CFF_TYPES_H
+#include "cfftypes.h"
#include FT_INTERNAL_OBJECTS_H
diff --git a/extras/freetype2/src/cff/cfftoken.h b/extras/freetype2/src/cff/cfftoken.h
index 2cbb837b4..659d1576a 100644
--- a/extras/freetype2/src/cff/cfftoken.h
+++ b/extras/freetype2/src/cff/cfftoken.h
@@ -4,7 +4,7 @@
/* */
/* CFF token definitions (specification only). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -30,8 +30,8 @@
CFF_FIELD_STRING ( 4, weight )
CFF_FIELD_BOOL ( 0x101, is_fixed_pitch )
CFF_FIELD_FIXED ( 0x102, italic_angle )
- CFF_FIELD_NUM ( 0x103, underline_position )
- CFF_FIELD_NUM ( 0x104, underline_thickness )
+ CFF_FIELD_FIXED ( 0x103, underline_position )
+ CFF_FIELD_FIXED ( 0x104, underline_thickness )
CFF_FIELD_NUM ( 0x105, paint_type )
CFF_FIELD_NUM ( 0x106, charstring_type )
CFF_FIELD_CALLBACK( 0x107, font_matrix )
@@ -43,10 +43,10 @@
CFF_FIELD_NUM ( 17, charstrings_offset )
CFF_FIELD_CALLBACK( 18, private_dict )
CFF_FIELD_NUM ( 0x114, synthetic_base )
- CFF_FIELD_STRING ( 0x115, postscript )
- CFF_FIELD_STRING ( 0x116, base_font_name )
+ CFF_FIELD_STRING ( 0x115, embedded_postscript )
#if 0
+ CFF_FIELD_STRING ( 0x116, base_font_name )
CFF_FIELD_DELTA ( 0x117, base_font_blend, 16 )
CFF_FIELD_CALLBACK( 0x118, multiple_master )
CFF_FIELD_CALLBACK( 0x119, blend_axit_types )
@@ -72,26 +72,26 @@
#undef CFFCODE
#define CFFCODE CFFCODE_PRIVATE
- CFF_FIELD_DELTA( 6, blue_values, 14 )
- CFF_FIELD_DELTA( 7, other_blues, 10 )
- CFF_FIELD_DELTA( 8, family_blues, 14 )
- CFF_FIELD_DELTA( 9, family_other_blues, 10 )
- CFF_FIELD_FIXED( 0x109, blue_scale )
- CFF_FIELD_NUM ( 0x10A, blue_shift )
- CFF_FIELD_NUM ( 0x10B, blue_fuzz )
- CFF_FIELD_NUM ( 10, standard_width )
- CFF_FIELD_NUM ( 11, standard_height )
- CFF_FIELD_DELTA( 0x10C, snap_widths, 13 )
- CFF_FIELD_DELTA( 0x10D, snap_heights, 13 )
- CFF_FIELD_BOOL ( 0x10E, force_bold )
- CFF_FIELD_FIXED( 0x10F, force_bold_threshold )
- CFF_FIELD_NUM ( 0x110, lenIV )
- CFF_FIELD_NUM ( 0x111, language_group )
- CFF_FIELD_FIXED( 0x112, expansion_factor )
- CFF_FIELD_NUM ( 0x113, initial_random_seed )
- CFF_FIELD_NUM ( 19, local_subrs_offset )
- CFF_FIELD_NUM ( 20, default_width )
- CFF_FIELD_NUM ( 21, nominal_width )
+ CFF_FIELD_DELTA ( 6, blue_values, 14 )
+ CFF_FIELD_DELTA ( 7, other_blues, 10 )
+ CFF_FIELD_DELTA ( 8, family_blues, 14 )
+ CFF_FIELD_DELTA ( 9, family_other_blues, 10 )
+ CFF_FIELD_FIXED_1000( 0x109, blue_scale )
+ CFF_FIELD_NUM ( 0x10A, blue_shift )
+ CFF_FIELD_NUM ( 0x10B, blue_fuzz )
+ CFF_FIELD_NUM ( 10, standard_width )
+ CFF_FIELD_NUM ( 11, standard_height )
+ CFF_FIELD_DELTA ( 0x10C, snap_widths, 13 )
+ CFF_FIELD_DELTA ( 0x10D, snap_heights, 13 )
+ CFF_FIELD_BOOL ( 0x10E, force_bold )
+ CFF_FIELD_FIXED ( 0x10F, force_bold_threshold )
+ CFF_FIELD_NUM ( 0x110, lenIV )
+ CFF_FIELD_NUM ( 0x111, language_group )
+ CFF_FIELD_FIXED ( 0x112, expansion_factor )
+ CFF_FIELD_NUM ( 0x113, initial_random_seed )
+ CFF_FIELD_NUM ( 19, local_subrs_offset )
+ CFF_FIELD_NUM ( 20, default_width )
+ CFF_FIELD_NUM ( 21, nominal_width )
/* END */
diff --git a/extras/freetype2/src/cff/cfftypes.h b/extras/freetype2/src/cff/cfftypes.h
new file mode 100644
index 000000000..9ddc663de
--- /dev/null
+++ b/extras/freetype2/src/cff/cfftypes.h
@@ -0,0 +1,255 @@
+/***************************************************************************/
+/* */
+/* cfftypes.h */
+/* */
+/* Basic OpenType/CFF type definitions and interface (specification */
+/* only). */
+/* */
+/* Copyright 1996-2001, 2002, 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __CFFTYPES_H__
+#define __CFFTYPES_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
+FT_BEGIN_HEADER
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* CFF_IndexRec */
+ /* */
+ /* <Description> */
+ /* A structure used to model a CFF Index table. */
+ /* */
+ /* <Fields> */
+ /* stream :: The source input stream. */
+ /* */
+ /* count :: The number of elements in the index. */
+ /* */
+ /* off_size :: The size in bytes of object offsets in index. */
+ /* */
+ /* data_offset :: The position of first data byte in the index's */
+ /* bytes. */
+ /* */
+ /* offsets :: A table of element offsets in the index. */
+ /* */
+ /* bytes :: If the index is loaded in memory, its bytes. */
+ /* */
+ typedef struct CFF_IndexRec_
+ {
+ FT_Stream stream;
+ FT_UInt count;
+ FT_Byte off_size;
+ FT_ULong data_offset;
+
+ FT_ULong* offsets;
+ FT_Byte* bytes;
+
+ } CFF_IndexRec, *CFF_Index;
+
+
+ typedef struct CFF_EncodingRec_
+ {
+ FT_UInt format;
+ FT_ULong offset;
+
+ FT_UInt count;
+ FT_UShort sids [256]; /* avoid dynamic allocations */
+ FT_UShort codes[256];
+
+ } CFF_EncodingRec, *CFF_Encoding;
+
+
+ typedef struct CFF_CharsetRec_
+ {
+
+ FT_UInt format;
+ FT_ULong offset;
+
+ FT_UShort* sids;
+ FT_UShort* cids; /* the inverse mapping of `sids'; only needed */
+ /* for CID-keyed fonts */
+ } CFF_CharsetRec, *CFF_Charset;
+
+
+ typedef struct CFF_FontRecDictRec_
+ {
+ FT_UInt version;
+ FT_UInt notice;
+ FT_UInt copyright;
+ FT_UInt full_name;
+ FT_UInt family_name;
+ FT_UInt weight;
+ FT_Bool is_fixed_pitch;
+ FT_Fixed italic_angle;
+ FT_Fixed underline_position;
+ FT_Fixed underline_thickness;
+ FT_Int paint_type;
+ FT_Int charstring_type;
+ FT_Matrix font_matrix;
+ FT_UShort units_per_em;
+ FT_Vector font_offset;
+ FT_ULong unique_id;
+ FT_BBox font_bbox;
+ FT_Pos stroke_width;
+ FT_ULong charset_offset;
+ FT_ULong encoding_offset;
+ FT_ULong charstrings_offset;
+ FT_ULong private_offset;
+ FT_ULong private_size;
+ FT_Long synthetic_base;
+ FT_UInt embedded_postscript;
+
+ /* these should only be used for the top-level font dictionary */
+ FT_UInt cid_registry;
+ FT_UInt cid_ordering;
+ FT_ULong cid_supplement;
+
+ FT_Long cid_font_version;
+ FT_Long cid_font_revision;
+ FT_Long cid_font_type;
+ FT_ULong cid_count;
+ FT_ULong cid_uid_base;
+ FT_ULong cid_fd_array_offset;
+ FT_ULong cid_fd_select_offset;
+ FT_UInt cid_font_name;
+
+ } CFF_FontRecDictRec, *CFF_FontRecDict;
+
+
+ typedef struct CFF_PrivateRec_
+ {
+ FT_Byte num_blue_values;
+ FT_Byte num_other_blues;
+ FT_Byte num_family_blues;
+ FT_Byte num_family_other_blues;
+
+ FT_Pos blue_values[14];
+ FT_Pos other_blues[10];
+ FT_Pos family_blues[14];
+ FT_Pos family_other_blues[10];
+
+ FT_Fixed blue_scale;
+ FT_Pos blue_shift;
+ FT_Pos blue_fuzz;
+ FT_Pos standard_width;
+ FT_Pos standard_height;
+
+ FT_Byte num_snap_widths;
+ FT_Byte num_snap_heights;
+ FT_Pos snap_widths[13];
+ FT_Pos snap_heights[13];
+ FT_Bool force_bold;
+ FT_Fixed force_bold_threshold;
+ FT_Int lenIV;
+ FT_Int language_group;
+ FT_Fixed expansion_factor;
+ FT_Long initial_random_seed;
+ FT_ULong local_subrs_offset;
+ FT_Pos default_width;
+ FT_Pos nominal_width;
+
+ } CFF_PrivateRec, *CFF_Private;
+
+
+ typedef struct CFF_FDSelectRec_
+ {
+ FT_Byte format;
+ FT_UInt range_count;
+
+ /* that's the table, taken from the file `as is' */
+ FT_Byte* data;
+ FT_UInt data_size;
+
+ /* small cache for format 3 only */
+ FT_UInt cache_first;
+ FT_UInt cache_count;
+ FT_Byte cache_fd;
+
+ } CFF_FDSelectRec, *CFF_FDSelect;
+
+
+ /* A SubFont packs a font dict and a private dict together. They are */
+ /* needed to support CID-keyed CFF fonts. */
+ typedef struct CFF_SubFontRec_
+ {
+ CFF_FontRecDictRec font_dict;
+ CFF_PrivateRec private_dict;
+
+ CFF_IndexRec local_subrs_index;
+ FT_UInt num_local_subrs;
+ FT_Byte** local_subrs;
+
+ } CFF_SubFontRec, *CFF_SubFont;
+
+
+ /* maximum number of sub-fonts in a CID-keyed file */
+#define CFF_MAX_CID_FONTS 32
+
+
+ typedef struct CFF_FontRec_
+ {
+ FT_Stream stream;
+ FT_Memory memory;
+ FT_UInt num_faces;
+ FT_UInt num_glyphs;
+
+ FT_Byte version_major;
+ FT_Byte version_minor;
+ FT_Byte header_size;
+ FT_Byte absolute_offsize;
+
+
+ CFF_IndexRec name_index;
+ CFF_IndexRec top_dict_index;
+ CFF_IndexRec string_index;
+ CFF_IndexRec global_subrs_index;
+
+ CFF_EncodingRec encoding;
+ CFF_CharsetRec charset;
+
+ CFF_IndexRec charstrings_index;
+ CFF_IndexRec font_dict_index;
+ CFF_IndexRec private_index;
+ CFF_IndexRec local_subrs_index;
+
+ FT_String* font_name;
+ FT_UInt num_global_subrs;
+ FT_Byte** global_subrs;
+
+ CFF_SubFontRec top_font;
+ FT_UInt num_subfonts;
+ CFF_SubFont subfonts[CFF_MAX_CID_FONTS];
+
+ CFF_FDSelectRec fd_select;
+
+ /* interface to PostScript hinter */
+ void* pshinter;
+
+ /* interface to Postscript Names service */
+ void* psnames;
+
+ } CFF_FontRec, *CFF_Font;
+
+
+FT_END_HEADER
+
+#endif /* __CFFTYPES_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/src/cff/rules.mk b/extras/freetype2/src/cff/rules.mk
index b53fdd83a..4100c8068 100644
--- a/extras/freetype2/src/cff/rules.mk
+++ b/extras/freetype2/src/cff/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001 by
+# Copyright 1996-2000, 2001, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,27 +15,27 @@
# OpenType driver directory
#
-CFF_DIR := $(SRC_)cff
-CFF_DIR_ := $(CFF_DIR)$(SEP)
+CFF_DIR := $(SRC_DIR)/cff
-CFF_COMPILE := $(FT_COMPILE) $I$(CFF_DIR)
+CFF_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(CFF_DIR))
# CFF driver sources (i.e., C files)
#
-CFF_DRV_SRC := $(CFF_DIR_)cffobjs.c \
- $(CFF_DIR_)cffload.c \
- $(CFF_DIR_)cffgload.c \
- $(CFF_DIR_)cffparse.c \
- $(CFF_DIR_)cffcmap.c \
- $(CFF_DIR_)cffdrivr.c
+CFF_DRV_SRC := $(CFF_DIR)/cffobjs.c \
+ $(CFF_DIR)/cffload.c \
+ $(CFF_DIR)/cffgload.c \
+ $(CFF_DIR)/cffparse.c \
+ $(CFF_DIR)/cffcmap.c \
+ $(CFF_DIR)/cffdrivr.c
# CFF driver headers
#
CFF_DRV_H := $(CFF_DRV_SRC:%.c=%.h) \
- $(CFF_DIR_)cfftoken.h \
- $(CFF_DIR_)cfferrs.h
+ $(CFF_DIR)/cfftoken.h \
+ $(CFF_DIR)/cfftypes.h \
+ $(CFF_DIR)/cfferrs.h
# CFF driver object(s)
@@ -43,24 +43,24 @@ CFF_DRV_H := $(CFF_DRV_SRC:%.c=%.h) \
# CFF_DRV_OBJ_M is used during `multi' builds
# CFF_DRV_OBJ_S is used during `single' builds
#
-CFF_DRV_OBJ_M := $(CFF_DRV_SRC:$(CFF_DIR_)%.c=$(OBJ_)%.$O)
-CFF_DRV_OBJ_S := $(OBJ_)cff.$O
+CFF_DRV_OBJ_M := $(CFF_DRV_SRC:$(CFF_DIR)/%.c=$(OBJ_DIR)/%.$O)
+CFF_DRV_OBJ_S := $(OBJ_DIR)/cff.$O
# CFF driver source file for single build
#
-CFF_DRV_SRC_S := $(CFF_DIR_)cff.c
+CFF_DRV_SRC_S := $(CFF_DIR)/cff.c
# CFF driver - single object
#
$(CFF_DRV_OBJ_S): $(CFF_DRV_SRC_S) $(CFF_DRV_SRC) $(FREETYPE_H) $(CFF_DRV_H)
- $(CFF_COMPILE) $T$@ $(CFF_DRV_SRC_S)
+ $(CFF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(CFF_DRV_SRC_S))
# CFF driver - multiple objects
#
-$(OBJ_)%.$O: $(CFF_DIR_)%.c $(FREETYPE_H) $(CFF_DRV_H)
- $(CFF_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(CFF_DIR)/%.c $(FREETYPE_H) $(CFF_DRV_H)
+ $(CFF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
@@ -68,4 +68,5 @@ $(OBJ_)%.$O: $(CFF_DIR_)%.c $(FREETYPE_H) $(CFF_DRV_H)
DRV_OBJS_S += $(CFF_DRV_OBJ_S)
DRV_OBJS_M += $(CFF_DRV_OBJ_M)
+
# EOF
diff --git a/extras/freetype2/src/cid/cidgload.c b/extras/freetype2/src/cid/cidgload.c
index 15231f86c..3717eeb9e 100644
--- a/extras/freetype2/src/cid/cidgload.c
+++ b/extras/freetype2/src/cid/cidgload.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 Glyph Loader (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -40,15 +40,16 @@
cid_load_glyph( T1_Decoder decoder,
FT_UInt glyph_index )
{
- CID_Face face = (CID_Face)decoder->builder.face;
- CID_FaceInfo cid = &face->cid;
- FT_Byte* p;
- FT_UInt fd_select;
- FT_Stream stream = face->root.stream;
- FT_Error error = 0;
- FT_Byte* charstring = 0;
- FT_Memory memory = face->root.memory;
- FT_UInt glyph_length = 0;
+ CID_Face face = (CID_Face)decoder->builder.face;
+ CID_FaceInfo cid = &face->cid;
+ FT_Byte* p;
+ FT_UInt fd_select;
+ FT_Stream stream = face->cid_stream;
+ FT_Error error = 0;
+ FT_Byte* charstring = 0;
+ FT_Memory memory = face->root.memory;
+ FT_ULong glyph_length = 0;
+ PSAux_Service psaux = (PSAux_Service)face->psaux;
#ifdef FT_CONFIG_OPTION_INCREMENTAL
@@ -107,8 +108,7 @@
fd_select = (FT_UInt) cid_get_offset( &p, (FT_Byte)cid->fd_bytes );
off1 = (FT_ULong)cid_get_offset( &p, (FT_Byte)cid->gd_bytes );
p += cid->fd_bytes;
- glyph_length = (FT_UInt) cid_get_offset(
- &p, (FT_Byte)cid->gd_bytes ) - off1;
+ glyph_length = cid_get_offset( &p, (FT_Byte)cid->gd_bytes ) - off1;
FT_FRAME_EXIT();
if ( glyph_length == 0 )
@@ -146,11 +146,11 @@
/* Decrypt only if lenIV >= 0. */
if ( decoder->lenIV >= 0 )
- cid_decrypt( charstring, glyph_length, 4330 );
+ psaux->t1_decrypt( charstring, glyph_length, 4330 );
- error = decoder->funcs.parse_charstrings( decoder,
- charstring + cs_offset,
- glyph_length - cs_offset );
+ error = decoder->funcs.parse_charstrings(
+ decoder, charstring + cs_offset,
+ (FT_Int)glyph_length - cs_offset );
}
FT_FREE( charstring );
@@ -158,15 +158,16 @@
#ifdef FT_CONFIG_OPTION_INCREMENTAL
/* Incremental fonts can optionally override the metrics. */
- if ( !error &&
- face->root.internal->incremental_interface &&
+ if ( !error &&
+ face->root.internal->incremental_interface &&
face->root.internal->incremental_interface->funcs->get_glyph_metrics )
{
FT_Incremental_MetricsRec metrics;
+
metrics.bearing_x = decoder->builder.left_bearing.x;
- metrics.bearing_y = decoder->builder.left_bearing.y;
- metrics.advance = decoder->builder.advance.x;
+ metrics.bearing_y = decoder->builder.left_bearing.y;
+ metrics.advance = decoder->builder.advance.x;
error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
face->root.internal->incremental_interface->object,
glyph_index, FALSE, &metrics );
@@ -305,7 +306,7 @@
0, /* glyph names -- XXX */
0, /* blend == 0 */
hinting,
- FT_LOAD_TARGET_MODE(load_flags),
+ FT_LOAD_TARGET_MODE( load_flags ),
cid_load_glyph );
/* set up the decoder */
@@ -347,6 +348,7 @@
{
FT_BBox cbox;
FT_Glyph_Metrics* metrics = &glyph->root.metrics;
+ FT_Vector advance;
/* copy the _unscaled_ advance width */
@@ -372,6 +374,15 @@
font_offset.x,
font_offset.y );
+ advance.x = metrics->horiAdvance;
+ advance.y = 0;
+ FT_Vector_Transform( &advance, &font_matrix );
+ metrics->horiAdvance = advance.x + font_offset.x;
+ advance.x = 0;
+ advance.y = metrics->vertAdvance;
+ FT_Vector_Transform( &advance, &font_matrix );
+ metrics->vertAdvance = advance.y + font_offset.y;
+
if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
/* scale the outline and the metrics */
@@ -401,11 +412,11 @@
if ( hinting )
{
- metrics->horiAdvance = ( metrics->horiAdvance + 32 ) & -64;
- metrics->vertAdvance = ( metrics->vertAdvance + 32 ) & -64;
+ metrics->horiAdvance = FT_PIX_ROUND( metrics->horiAdvance );
+ metrics->vertAdvance = FT_PIX_ROUND( metrics->vertAdvance );
- metrics->vertBearingX = ( metrics->vertBearingX + 32 ) & -64;
- metrics->vertBearingY = ( metrics->vertBearingY + 32 ) & -64;
+ metrics->vertBearingX = FT_PIX_ROUND( metrics->vertBearingX );
+ metrics->vertBearingY = FT_PIX_ROUND( metrics->vertBearingY );
}
}
@@ -415,10 +426,10 @@
/* grid fit the bounding box if necessary */
if ( hinting )
{
- cbox.xMin &= -64;
- cbox.yMin &= -64;
- cbox.xMax = ( cbox.xMax + 63 ) & -64;
- cbox.yMax = ( cbox.yMax + 63 ) & -64;
+ cbox.xMin = FT_PIX_FLOOR( cbox.xMin );
+ cbox.yMin = FT_PIX_FLOOR( cbox.yMin );
+ cbox.xMax = FT_PIX_CEIL( cbox.xMax );
+ cbox.yMax = FT_PIX_CEIL( cbox.yMax );
}
metrics->width = cbox.xMax - cbox.xMin;
diff --git a/extras/freetype2/src/cid/cidload.c b/extras/freetype2/src/cid/cidload.c
index 19cfab50f..ad29dd52d 100644
--- a/extras/freetype2/src/cid/cidload.c
+++ b/extras/freetype2/src/cid/cidload.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 font loader (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -39,7 +39,7 @@
/* read a single offset */
FT_LOCAL_DEF( FT_Long )
- cid_get_offset( FT_Byte** start,
+ cid_get_offset( FT_Byte* *start,
FT_Byte offsize )
{
FT_Long result;
@@ -57,24 +57,6 @@
}
- FT_LOCAL_DEF( void )
- cid_decrypt( FT_Byte* buffer,
- FT_Offset length,
- FT_UShort seed )
- {
- while ( length > 0 )
- {
- FT_Byte plain;
-
-
- plain = (FT_Byte)( *buffer ^ ( seed >> 8 ) );
- seed = (FT_UShort)( ( *buffer + seed ) * 52845U + 22719 );
- *buffer++ = plain;
- length--;
- }
- }
-
-
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -115,6 +97,10 @@
object = (FT_Byte*)&cid->font_info;
break;
+ case T1_FIELD_LOCATION_BBOX:
+ object = (FT_Byte*)&cid->font_bbox;
+ break;
+
default:
{
CID_FaceDict dict;
@@ -147,34 +133,16 @@
if ( keyword->type == T1_FIELD_TYPE_INTEGER_ARRAY ||
keyword->type == T1_FIELD_TYPE_FIXED_ARRAY )
error = cid_parser_load_field_table( &loader->parser, keyword,
- &dummy_object );
+ &dummy_object );
else
- error = cid_parser_load_field( &loader->parser, keyword, &dummy_object );
+ error = cid_parser_load_field( &loader->parser,
+ keyword, &dummy_object );
Exit:
return error;
}
FT_CALLBACK_DEF( FT_Error )
- parse_font_bbox( CID_Face face,
- CID_Parser* parser )
- {
- FT_Fixed temp[4];
- FT_BBox* bbox = &face->cid.font_bbox;
-
-
- (void)cid_parser_to_fixed_array( parser, 4, temp, 0 );
- bbox->xMin = FT_RoundFix( temp[0] );
- bbox->yMin = FT_RoundFix( temp[1] );
- bbox->xMax = FT_RoundFix( temp[2] );
- bbox->yMax = FT_RoundFix( temp[3] );
-
- return CID_Err_Ok; /* this is a callback function; */
- /* we must return an error code */
- }
-
-
- FT_CALLBACK_DEF( FT_Error )
parse_font_matrix( CID_Face face,
CID_Parser* parser )
{
@@ -194,11 +162,11 @@
(void)cid_parser_to_fixed_array( parser, 6, temp, 3 );
- temp_scale = ABS( temp[3] );
+ temp_scale = FT_ABS( temp[3] );
- /* Set Units per EM based on FontMatrix values. We set the value to */
+ /* Set units per EM based on FontMatrix values. We set the value to */
/* `1000/temp_scale', because temp_scale was already multiplied by */
- /* 1000 (in t1_tofixed(), from psobjs.c). */
+ /* 1000 (in `t1_tofixed', from psobjs.c). */
root->units_per_EM = (FT_UShort)( FT_DivFix( 0x10000L,
FT_DivFix( temp_scale, 1000 ) ) );
@@ -223,7 +191,7 @@
offset->y = temp[5] >> 16;
}
- return CID_Err_Ok; /* this is a callback function; */
+ return CID_Err_Ok; /* this is a callback function; */
/* we must return an error code */
}
@@ -272,22 +240,13 @@
#include "cidtoken.h"
- T1_FIELD_CALLBACK( "FontBBox", parse_font_bbox )
- T1_FIELD_CALLBACK( "FDArray", parse_fd_array )
+ T1_FIELD_CALLBACK( "FDArray", parse_fd_array )
T1_FIELD_CALLBACK( "FontMatrix", parse_font_matrix )
+
{ 0, T1_FIELD_LOCATION_CID_INFO, T1_FIELD_TYPE_NONE, 0, 0, 0, 0, 0 }
};
- static int
- is_alpha( char c )
- {
- return ( ft_isalnum( (int)c ) ||
- c == '.' ||
- c == '_' );
- }
-
-
static FT_Error
cid_parse_dict( CID_Face face,
CID_Loader* loader,
@@ -299,44 +258,61 @@
parser->root.cursor = base;
parser->root.limit = base + size;
- parser->root.error = 0;
+ parser->root.error = CID_Err_Ok;
{
FT_Byte* cur = base;
FT_Byte* limit = cur + size;
- for ( ;cur < limit; cur++ )
+ for (;;)
{
+ FT_Byte* newlimit;
+
+
+ parser->root.cursor = cur;
+ cid_parser_skip_spaces( parser );
+
+ if ( parser->root.cursor >= limit )
+ newlimit = limit - 1 - 17;
+ else
+ newlimit = parser->root.cursor - 17;
+
/* look for `%ADOBeginFontDict' */
- if ( *cur == '%' && cur + 20 < limit &&
- ft_strncmp( (char*)cur, "%ADOBeginFontDict", 17 ) == 0 )
+ for ( ; cur < newlimit; cur++ )
{
- cur += 17;
-
- /* if /FDArray was found, then cid->num_dicts is > 0, and */
- /* we can start increasing parser->num_dict */
- if ( face->cid.num_dicts > 0 )
- parser->num_dict++;
+ if ( *cur == '%' &&
+ ft_strncmp( (char*)cur, "%ADOBeginFontDict", 17 ) == 0 )
+ {
+ /* if /FDArray was found, then cid->num_dicts is > 0, and */
+ /* we can start increasing parser->num_dict */
+ if ( face->cid.num_dicts > 0 )
+ parser->num_dict++;
+ }
}
+
+ cur = parser->root.cursor;
+ /* no error can occur in cid_parser_skip_spaces */
+ if ( cur >= limit )
+ break;
+
+ cid_parser_skip_PS_token( parser );
+ if ( parser->root.cursor >= limit || parser->root.error )
+ break;
+
/* look for immediates */
- else if ( *cur == '/' && cur + 2 < limit )
+ if ( *cur == '/' && cur + 2 < limit )
{
- FT_Byte* cur2;
- FT_Int len;
+ FT_PtrDist len;
cur++;
+ len = parser->root.cursor - cur;
- cur2 = cur;
- while ( cur2 < limit && is_alpha( *cur2 ) )
- cur2++;
-
- len = (FT_Int)( cur2 - cur );
if ( len > 0 && len < 22 )
{
/* now compare the immediate name to the keyword table */
- T1_Field keyword = (T1_Field) cid_field_records;
+ T1_Field keyword = (T1_Field)cid_field_records;
for (;;)
@@ -348,10 +324,10 @@
if ( !name )
break;
- if ( cur[0] == name[0] &&
- len == (FT_Int)ft_strlen( (const char*)name ) )
+ if ( cur[0] == name[0] &&
+ len == ft_strlen( (const char*)name ) )
{
- FT_Int n;
+ FT_PtrDist n;
for ( n = 1; n < len; n++ )
@@ -361,15 +337,11 @@
if ( n >= len )
{
/* we found it - run the parsing callback */
- parser->root.cursor = cur2;
- cid_parser_skip_spaces( parser );
parser->root.error = cid_load_keyword( face,
loader,
keyword );
if ( parser->root.error )
return parser->root.error;
-
- cur = parser->root.cursor;
break;
}
}
@@ -377,6 +349,8 @@
}
}
}
+
+ cur = parser->root.cursor;
}
}
return parser->root.error;
@@ -387,14 +361,15 @@
static FT_Error
cid_read_subrs( CID_Face face )
{
- CID_FaceInfo cid = &face->cid;
- FT_Memory memory = face->root.memory;
- FT_Stream stream = face->root.stream;
- FT_Error error;
- FT_Int n;
- CID_Subrs subr;
- FT_UInt max_offsets = 0;
- FT_ULong* offsets = 0;
+ CID_FaceInfo cid = &face->cid;
+ FT_Memory memory = face->root.memory;
+ FT_Stream stream = face->cid_stream;
+ FT_Error error;
+ FT_Int n;
+ CID_Subrs subr;
+ FT_UInt max_offsets = 0;
+ FT_ULong* offsets = 0;
+ PSAux_Service psaux = (PSAux_Service)face->psaux;
if ( FT_NEW_ARRAY( face->subrs, cid->num_dicts ) )
@@ -413,7 +388,7 @@
/* reallocate offsets array if needed */
if ( num_subrs + 1 > max_offsets )
{
- FT_UInt new_max = ( num_subrs + 1 + 3 ) & -4;
+ FT_UInt new_max = FT_PAD_CEIL( num_subrs + 1, 4 );
if ( FT_RENEW_ARRAY( offsets, max_offsets, new_max ) )
@@ -424,7 +399,7 @@
/* read the subrmap's offsets */
if ( FT_STREAM_SEEK( cid->data_offset + dict->subrmap_offset ) ||
- FT_FRAME_ENTER( ( num_subrs + 1 ) * dict->sd_bytes ) )
+ FT_FRAME_ENTER( ( num_subrs + 1 ) * dict->sd_bytes ) )
goto Fail;
p = (FT_Byte*)stream->cursor;
@@ -464,7 +439,7 @@
len = offsets[count + 1] - offsets[count];
- cid_decrypt( subr->code[count], len, 4330 );
+ psaux->t1_decrypt( subr->code[count], len, 4330 );
}
}
@@ -512,11 +487,111 @@
}
+ static FT_Error
+ cid_hex_to_binary( FT_Byte* data,
+ FT_Long data_len,
+ FT_ULong offset,
+ CID_Face face )
+ {
+ FT_Stream stream = face->root.stream;
+ FT_Error error;
+
+ FT_Byte buffer[256];
+ FT_Byte *p, *plimit;
+ FT_Byte *d, *dlimit;
+ FT_Byte val;
+
+ FT_Bool upper_nibble, done;
+
+
+ if ( FT_STREAM_SEEK( offset ) )
+ goto Exit;
+
+ d = data;
+ dlimit = d + data_len;
+ p = buffer;
+ plimit = p;
+
+ upper_nibble = 1;
+ done = 0;
+
+ while ( d < dlimit )
+ {
+ if ( p >= plimit )
+ {
+ FT_ULong oldpos = FT_STREAM_POS();
+ FT_ULong size = stream->size - oldpos;
+
+
+ if ( size == 0 )
+ {
+ error = CID_Err_Syntax_Error;
+ goto Exit;
+ }
+
+ if ( FT_STREAM_READ( buffer, 256 > size ? size : 256 ) )
+ goto Exit;
+ p = buffer;
+ plimit = p + FT_STREAM_POS() - oldpos;
+ }
+
+ if ( ft_isdigit( *p ) )
+ val = *p - '0';
+ else if ( *p >= 'a' && *p <= 'f' )
+ val = *p - 'a';
+ else if ( *p >= 'A' && *p <= 'F' )
+ val = *p - 'A' + 10;
+ else if ( *p == ' ' ||
+ *p == '\t' ||
+ *p == '\r' ||
+ *p == '\n' ||
+ *p == '\f' ||
+ *p == '\0' )
+ {
+ p++;
+ continue;
+ }
+ else if ( *p == '>' )
+ {
+ val = 0;
+ done = 1;
+ }
+ else
+ {
+ error = CID_Err_Syntax_Error;
+ goto Exit;
+ }
+
+ if ( upper_nibble )
+ *d = val << 4;
+ else
+ {
+ *d += val;
+ d++;
+ }
+
+ upper_nibble = 1 - upper_nibble;
+
+ if ( done )
+ break;
+
+ p++;
+ }
+
+ error = CID_Err_Ok;
+
+ Exit:
+ return error;
+ }
+
+
FT_LOCAL_DEF( FT_Error )
- cid_face_open( CID_Face face )
+ cid_face_open( CID_Face face,
+ FT_Int face_index )
{
CID_Loader loader;
CID_Parser* parser;
+ FT_Memory memory = face->root.memory;
FT_Error error;
@@ -534,7 +609,30 @@
if ( error )
goto Exit;
- face->cid.data_offset = loader.parser.data_offset;
+ if ( face_index < 0 )
+ goto Exit;
+
+ if ( FT_NEW( face->cid_stream ) )
+ goto Exit;
+
+ if ( parser->binary_length )
+ {
+ /* we must convert the data section from hexadecimal to binary */
+ if ( FT_ALLOC( face->binary_data, parser->binary_length ) ||
+ cid_hex_to_binary( face->binary_data, parser->binary_length,
+ parser->data_offset, face ) )
+ goto Exit;
+
+ FT_Stream_OpenMemory( face->cid_stream,
+ face->binary_data, parser->binary_length );
+ face->cid.data_offset = 0;
+ }
+ else
+ {
+ *face->cid_stream = *face->root.stream;
+ face->cid.data_offset = loader.parser.data_offset;
+ }
+
error = cid_read_subrs( face );
Exit:
diff --git a/extras/freetype2/src/cid/cidload.h b/extras/freetype2/src/cid/cidload.h
index 8fc577db5..8c172ffee 100644
--- a/extras/freetype2/src/cid/cidload.h
+++ b/extras/freetype2/src/cid/cidload.h
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 font loader (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -40,13 +40,9 @@ FT_BEGIN_HEADER
cid_get_offset( FT_Byte** start,
FT_Byte offsize );
- FT_LOCAL( void )
- cid_decrypt( FT_Byte* buffer,
- FT_Offset length,
- FT_UShort seed );
-
FT_LOCAL( FT_Error )
- cid_face_open( CID_Face face );
+ cid_face_open( CID_Face face,
+ FT_Int face_index );
FT_END_HEADER
diff --git a/extras/freetype2/src/cid/cidobjs.c b/extras/freetype2/src/cid/cidobjs.c
index ac5f16e4a..356d01805 100644
--- a/extras/freetype2/src/cid/cidobjs.c
+++ b/extras/freetype2/src/cid/cidobjs.c
@@ -4,7 +4,7 @@
/* */
/* CID objects manager (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,9 +19,11 @@
#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
+
#include "cidgload.h"
#include "cidload.h"
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
+
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include FT_INTERNAL_POSTSCRIPT_AUX_H
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
@@ -197,12 +199,12 @@
if ( face->subrs )
{
FT_Int n;
-
+
for ( n = 0; n < cid->num_dicts; n++ )
{
CID_Subrs subr = face->subrs + n;
-
+
if ( subr->code )
{
@@ -232,6 +234,9 @@
face->root.family_name = 0;
face->root.style_name = 0;
+
+ FT_FREE( face->binary_data );
+ FT_FREE( face->cid_stream );
}
}
@@ -266,27 +271,19 @@
FT_Int num_params,
FT_Parameter* params )
{
- FT_Error error;
- PSNames_Service psnames;
- PSAux_Service psaux;
- PSHinter_Service pshinter;
+ FT_Error error;
+ FT_Service_PsCMaps psnames;
+ PSAux_Service psaux;
+ PSHinter_Service pshinter;
FT_UNUSED( num_params );
FT_UNUSED( params );
- FT_UNUSED( face_index );
FT_UNUSED( stream );
face->root.num_faces = 1;
- psnames = (PSNames_Service)face->psnames;
- if ( !psnames )
- {
- psnames = (PSNames_Service)FT_Get_Module_Interface(
- FT_FACE_LIBRARY( face ), "psnames" );
-
- face->psnames = psnames;
- }
+ FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
psaux = (PSAux_Service)face->psaux;
if ( !psaux )
@@ -310,7 +307,7 @@
if ( FT_STREAM_SEEK( 0 ) )
goto Exit;
- error = cid_face_open( face );
+ error = cid_face_open( face, face_index );
if ( error )
goto Exit;
@@ -326,77 +323,106 @@
goto Exit;
}
- /* Now, load the font program into the face object */
+ /* now load the font program into the face object */
+
+ /* initialize the face object fields */
+
+ /* set up root face fields */
{
- /* Init the face object fields */
- /* Now set up root face fields */
- {
- FT_Face root = (FT_Face)&face->root;
+ FT_Face root = (FT_Face)&face->root;
+ CID_FaceInfo cid = &face->cid;
+ PS_FontInfo info = &cid->font_info;
- root->num_glyphs = face->cid.cid_count;
- root->num_charmaps = 0;
+ root->num_glyphs = cid->cid_count;
+ root->num_charmaps = 0;
- root->face_index = face_index;
- root->face_flags = FT_FACE_FLAG_SCALABLE;
+ root->face_index = face_index;
+ root->face_flags = FT_FACE_FLAG_SCALABLE;
- root->face_flags |= FT_FACE_FLAG_HORIZONTAL;
+ root->face_flags |= FT_FACE_FLAG_HORIZONTAL;
- if ( face->cid.font_info.is_fixed_pitch )
- root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
+ if ( info->is_fixed_pitch )
+ root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
- /* XXX: TODO: add kerning with .afm support */
+ /* XXX: TODO: add kerning with .afm support */
- /* get style name -- be careful, some broken fonts only */
- /* have a /FontName dictionary entry! */
- root->family_name = face->cid.font_info.family_name;
- if ( root->family_name )
- {
- char* full = face->cid.font_info.full_name;
- char* family = root->family_name;
+ /* get style name -- be careful, some broken fonts only */
+ /* have a /FontName dictionary entry! */
+ root->family_name = info->family_name;
+ /* assume "Regular" style if we don't know better */
+ root->style_name = (char *)"Regular";
+ if ( root->family_name )
+ {
+ char* full = info->full_name;
+ char* family = root->family_name;
- while ( *family && *full == *family )
- {
- family++;
- full++;
- }
- root->style_name = ( *full == ' ' ) ? full + 1
- : (char *)"Regular";
- }
- else
+ if ( full )
{
- /* do we have a `/FontName'? */
- if ( face->cid.cid_font_name )
+ while ( *full )
{
- root->family_name = face->cid.cid_font_name;
- root->style_name = (char *)"Regular";
+ if ( *full == *family )
+ {
+ family++;
+ full++;
+ }
+ else
+ {
+ if ( *full == ' ' || *full == '-' )
+ full++;
+ else if ( *family == ' ' || *family == '-' )
+ family++;
+ else
+ {
+ if ( !*family )
+ root->style_name = full;
+ break;
+ }
+ }
}
}
+ }
+ else
+ {
+ /* do we have a `/FontName'? */
+ if ( cid->cid_font_name )
+ root->family_name = cid->cid_font_name;
+ }
+
+ /* compute style flags */
+ root->style_flags = 0;
+ if ( info->italic_angle )
+ root->style_flags |= FT_STYLE_FLAG_ITALIC;
+ if ( info->weight )
+ {
+ if ( !ft_strcmp( info->weight, "Bold" ) ||
+ !ft_strcmp( info->weight, "Black" ) )
+ root->style_flags |= FT_STYLE_FLAG_BOLD;
+ }
- /* no embedded bitmap support */
- root->num_fixed_sizes = 0;
- root->available_sizes = 0;
+ /* no embedded bitmap support */
+ root->num_fixed_sizes = 0;
+ root->available_sizes = 0;
- root->bbox.xMin = face->cid.font_bbox.xMin >> 16;
- root->bbox.yMin = face->cid.font_bbox.yMin >> 16;
- root->bbox.xMax = ( face->cid.font_bbox.xMax + 0xFFFFU ) >> 16;
- root->bbox.yMax = ( face->cid.font_bbox.yMax + 0xFFFFU ) >> 16;
+ root->bbox.xMin = cid->font_bbox.xMin >> 16;
+ root->bbox.yMin = cid->font_bbox.yMin >> 16;
+ root->bbox.xMax = ( cid->font_bbox.xMax + 0xFFFFU ) >> 16;
+ root->bbox.yMax = ( cid->font_bbox.yMax + 0xFFFFU ) >> 16;
- if ( !root->units_per_EM )
- root->units_per_EM = 1000;
+ if ( !root->units_per_EM )
+ root->units_per_EM = 1000;
- root->ascender = (FT_Short)( root->bbox.yMax );
- root->descender = (FT_Short)( root->bbox.yMin );
- root->height = (FT_Short)(
- ( ( root->ascender + root->descender ) * 12 ) / 10 );
+ root->ascender = (FT_Short)( root->bbox.yMax );
+ root->descender = (FT_Short)( root->bbox.yMin );
+ root->height = (FT_Short)(
+ ( ( root->ascender - root->descender ) * 12 ) / 10 );
- root->underline_position = face->cid.font_info.underline_position;
- root->underline_thickness = face->cid.font_info.underline_thickness;
+ root->underline_position = (FT_Short)info->underline_position;
+ root->underline_thickness = (FT_Short)info->underline_thickness;
- root->internal->max_points = 0;
- root->internal->max_contours = 0;
- }
+ root->internal->max_points = 0;
+ root->internal->max_contours = 0;
}
Exit:
diff --git a/extras/freetype2/src/cid/cidparse.c b/extras/freetype2/src/cid/cidparse.c
index 397a66ff8..3f18749f6 100644
--- a/extras/freetype2/src/cid/cidparse.c
+++ b/extras/freetype2/src/cid/cidparse.c
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 parser (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -58,6 +58,8 @@
FT_ULong base_offset, offset, ps_len;
FT_Byte buffer[256 + 10];
FT_Int buff_len;
+ FT_Byte *cur, *limit;
+ FT_Byte *arg1, *arg2;
FT_MEM_ZERO( parser, sizeof ( *parser ) );
@@ -67,7 +69,7 @@
base_offset = FT_STREAM_POS();
- /* first of all, check the font format in the header */
+ /* first of all, check the font format in the header */
if ( FT_FRAME_ENTER( 31 ) )
goto Exit;
@@ -82,15 +84,17 @@
if ( error )
goto Exit;
- /* now, read the rest of the file, until we find a `StartData' */
+ Again:
+ /* now, read the rest of the file until we find a `StartData' */
buff_len = 256;
for (;;)
{
- FT_Byte *p, *limit = buffer + 256;
+ FT_Byte* p;
FT_ULong top_position;
/* fill input buffer */
+ limit = buffer + 256;
buff_len -= 256;
if ( buff_len > 0 )
FT_MEM_MOVE( buffer, limit, buff_len );
@@ -101,7 +105,7 @@
goto Exit;
top_position = FT_STREAM_POS() - buff_len;
- buff_len = 256 + 10;
+ buff_len = 256 + 10;
/* look for `StartData' */
for ( p = buffer; p < limit; p++ )
@@ -116,12 +120,12 @@
}
Found:
- /* we have found the start of the binary data. We will now */
- /* rewind and extract the frame of corresponding to the Postscript */
- /* section */
+ /* we have found the start of the binary data. We will now */
+ /* rewind and extract the frame corresponding to the PostScript */
+ /* section */
ps_len = offset - base_offset;
- if ( FT_STREAM_SEEK( base_offset ) ||
+ if ( FT_STREAM_SEEK( base_offset ) ||
FT_FRAME_EXTRACT( ps_len, parser->postscript ) )
goto Exit;
@@ -132,6 +136,45 @@
parser->root.limit = parser->root.cursor + ps_len;
parser->num_dict = -1;
+ /* Finally, we check whether `StartData' was real -- it could be */
+ /* in a comment or string. We also get its arguments to find out */
+ /* whether the data is represented in binary or hex format. */
+
+ arg1 = parser->root.cursor;
+ cid_parser_skip_PS_token( parser );
+ cid_parser_skip_spaces ( parser );
+ arg2 = parser->root.cursor;
+ cid_parser_skip_PS_token( parser );
+ cid_parser_skip_spaces ( parser );
+
+ limit = parser->root.limit;
+ cur = parser->root.cursor;
+
+ while ( cur < limit )
+ {
+ if ( *cur == 'S' && ft_strncmp( (char*)cur, "StartData", 9 ) == 0 )
+ {
+ if ( ft_strncmp( (char*)arg1, "(Hex)", 5 ) == 0 )
+ parser->binary_length = ft_atol( (const char *)arg2 );
+
+ limit = parser->root.limit;
+ cur = parser->root.cursor;
+ goto Exit;
+ }
+
+ cid_parser_skip_PS_token( parser );
+ cid_parser_skip_spaces ( parser );
+ arg1 = arg2;
+ arg2 = cur;
+ cur = parser->root.cursor;
+ }
+
+ /* we haven't found the correct `StartData'; go back and continue */
+ /* searching */
+ FT_FRAME_RELEASE( parser->postscript );
+ if ( !FT_STREAM_SEEK( offset ) )
+ goto Again;
+
Exit:
return error;
}
diff --git a/extras/freetype2/src/cid/cidparse.h b/extras/freetype2/src/cid/cidparse.h
index 1b3e0b967..ca37deab9 100644
--- a/extras/freetype2/src/cid/cidparse.h
+++ b/extras/freetype2/src/cid/cidparse.h
@@ -4,7 +4,7 @@
/* */
/* CID-keyed Type1 parser (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -50,6 +50,9 @@ FT_BEGIN_HEADER
/* data_offset :: The start position of the binary data (i.e., the */
/* end of the data to be parsed. */
/* */
+ /* binary_length :: The length of the data after the `StartData' */
+ /* command if the data format is hexadecimal. */
+ /* */
/* cid :: A structure which holds the information about */
/* the current font. */
/* */
@@ -65,6 +68,8 @@ FT_BEGIN_HEADER
FT_ULong data_offset;
+ FT_Long binary_length;
+
CID_FaceInfo cid;
FT_Int num_dict;
@@ -87,8 +92,10 @@ FT_BEGIN_HEADER
/* */
/*************************************************************************/
-#define cid_parser_skip_spaces( p ) (p)->root.funcs.skip_spaces( &(p)->root )
-#define cid_parser_skip_alpha( p ) (p)->root.funcs.skip_alpha ( &(p)->root )
+#define cid_parser_skip_spaces( p ) \
+ (p)->root.funcs.skip_spaces( &(p)->root )
+#define cid_parser_skip_PS_token( p ) \
+ (p)->root.funcs.skip_PS_token( &(p)->root )
#define cid_parser_to_int( p ) (p)->root.funcs.to_int( &(p)->root )
#define cid_parser_to_fixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
diff --git a/extras/freetype2/src/cid/cidriver.c b/extras/freetype2/src/cid/cidriver.c
index 4d6f442c0..f5639b9f7 100644
--- a/extras/freetype2/src/cid/cidriver.c
+++ b/extras/freetype2/src/cid/cidriver.c
@@ -4,7 +4,7 @@
/* */
/* CID driver interface (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,10 +21,12 @@
#include "cidgload.h"
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
#include "ciderrs.h"
+#include FT_SERVICE_POSTSCRIPT_NAME_H
+#include FT_SERVICE_XFREE86_NAME_H
+#include FT_SERVICE_POSTSCRIPT_INFO_H
/*************************************************************************/
/* */
@@ -36,6 +38,11 @@
#define FT_COMPONENT trace_ciddriver
+ /*
+ * POSTSCRIPT NAME SERVICE
+ *
+ */
+
static const char*
cid_get_postscript_name( CID_Face face )
{
@@ -49,6 +56,47 @@
}
+ static const FT_Service_PsFontNameRec cid_service_ps_name =
+ {
+ (FT_PsName_GetFunc) cid_get_postscript_name
+ };
+
+
+ /*
+ * POSTSCRIPT INFO SERVICE
+ *
+ */
+
+ static FT_Error
+ cid_ps_get_font_info( FT_Face face,
+ PS_FontInfoRec* afont_info )
+ {
+ *afont_info = ((CID_Face)face)->cid.font_info;
+ return 0;
+ }
+
+
+ static const FT_Service_PsInfoRec cid_service_ps_info =
+ {
+ (PS_GetFontInfoFunc) cid_ps_get_font_info,
+ (PS_HasGlyphNamesFunc)NULL /* unsupported with CID fonts */
+ };
+
+
+ /*
+ * SERVICE LIST
+ *
+ */
+
+ static const FT_ServiceDescRec cid_services[] =
+ {
+ { FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &cid_service_ps_name },
+ { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_CID },
+ { FT_SERVICE_ID_POSTSCRIPT_INFO, &cid_service_ps_info },
+ { NULL, NULL }
+ };
+
+
static FT_Module_Interface
cid_get_interface( FT_Driver driver,
const FT_String* cid_interface )
@@ -56,10 +104,7 @@
FT_UNUSED( driver );
FT_UNUSED( cid_interface );
- if ( ft_strcmp( (const char*)cid_interface, "postscript_name" ) == 0 )
- return (FT_Module_Interface)cid_get_postscript_name;
-
- return 0;
+ return ft_service_list_lookup( cid_services, cid_interface );
}
@@ -69,9 +114,9 @@
{
/* first of all, the FT_Module_Class fields */
{
- ft_module_font_driver |
- ft_module_driver_scalable |
- ft_module_driver_has_hinter ,
+ FT_MODULE_FONT_DRIVER |
+ FT_MODULE_DRIVER_SCALABLE |
+ FT_MODULE_DRIVER_HAS_HINTER,
sizeof( FT_DriverRec ),
"t1cid", /* module name */
diff --git a/extras/freetype2/src/cid/cidtoken.h b/extras/freetype2/src/cid/cidtoken.h
index f0dac9252..2070aa91b 100644
--- a/extras/freetype2/src/cid/cidtoken.h
+++ b/extras/freetype2/src/cid/cidtoken.h
@@ -4,7 +4,7 @@
/* */
/* CID token definitions (specification only). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,7 +21,7 @@
#undef T1CODE
#define T1CODE T1_FIELD_LOCATION_CID_INFO
- T1_FIELD_STRING( "CIDFontName", cid_font_name )
+ T1_FIELD_KEY ( "CIDFontName", cid_font_name )
T1_FIELD_NUM ( "CIDFontVersion", cid_version )
T1_FIELD_NUM ( "CIDFontType", cid_font_type )
T1_FIELD_STRING( "Registry", registry )
@@ -39,15 +39,15 @@
#undef T1CODE
#define T1CODE T1_FIELD_LOCATION_FONT_INFO
- T1_FIELD_STRING ( "version", version )
- T1_FIELD_STRING ( "Notice", notice )
- T1_FIELD_STRING ( "FullName", full_name )
- T1_FIELD_STRING ( "FamilyName", family_name )
- T1_FIELD_STRING ( "Weight", weight )
- T1_FIELD_FIXED ( "ItalicAngle", italic_angle )
- T1_FIELD_TYPE_BOOL( "isFixedPitch", is_fixed_pitch )
- T1_FIELD_NUM ( "UnderlinePosition", underline_position )
- T1_FIELD_NUM ( "UnderlineThickness", underline_thickness )
+ T1_FIELD_STRING( "version", version )
+ T1_FIELD_STRING( "Notice", notice )
+ T1_FIELD_STRING( "FullName", full_name )
+ T1_FIELD_STRING( "FamilyName", family_name )
+ T1_FIELD_STRING( "Weight", weight )
+ T1_FIELD_NUM ( "ItalicAngle", italic_angle )
+ T1_FIELD_BOOL ( "isFixedPitch", is_fixed_pitch )
+ T1_FIELD_NUM ( "UnderlinePosition", underline_position )
+ T1_FIELD_NUM ( "UnderlineThickness", underline_thickness )
#undef FT_STRUCTURE
@@ -63,7 +63,7 @@
T1_FIELD_NUM ( "lenBuildCharArray", len_buildchar )
T1_FIELD_FIXED( "ForceBoldThreshold", forcebold_threshold )
T1_FIELD_FIXED( "ExpansionFactor", expansion_factor )
- T1_FIELD_NUM ( "StrokeWidth", stroke_width )
+ T1_FIELD_FIXED( "StrokeWidth", stroke_width )
#undef FT_STRUCTURE
@@ -76,7 +76,7 @@
T1_FIELD_NUM ( "LanguageGroup", language_group )
T1_FIELD_NUM ( "password", password )
- T1_FIELD_FIXED ( "BlueScale", blue_scale )
+ T1_FIELD_FIXED_1000( "BlueScale", blue_scale )
T1_FIELD_NUM ( "BlueShift", blue_shift )
T1_FIELD_NUM ( "BlueFuzz", blue_fuzz )
@@ -92,5 +92,12 @@
T1_FIELD_NUM_TABLE ( "StemSnapH", snap_widths, 12 )
T1_FIELD_NUM_TABLE ( "StemSnapV", snap_heights, 12 )
+#undef FT_STRUCTURE
+#define FT_STRUCTURE FT_BBox
+#undef T1CODE
+#define T1CODE T1_FIELD_LOCATION_BBOX
+
+ T1_FIELD_BBOX( "FontBBox", xMin )
+
/* END */
diff --git a/extras/freetype2/src/cid/rules.mk b/extras/freetype2/src/cid/rules.mk
index 809b20aeb..f36274461 100644
--- a/extras/freetype2/src/cid/rules.mk
+++ b/extras/freetype2/src/cid/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001 by
+# Copyright 1996-2000, 2001, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,26 +15,25 @@
# CID driver directory
#
-CID_DIR := $(SRC_)cid
-CID_DIR_ := $(CID_DIR)$(SEP)
+CID_DIR := $(SRC_DIR)/cid
-CID_COMPILE := $(FT_COMPILE) $I$(CID_DIR)
+CID_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(CID_DIR))
# CID driver sources (i.e., C files)
#
-CID_DRV_SRC := $(CID_DIR_)cidparse.c \
- $(CID_DIR_)cidload.c \
- $(CID_DIR_)cidriver.c \
- $(CID_DIR_)cidgload.c \
- $(CID_DIR_)cidobjs.c
+CID_DRV_SRC := $(CID_DIR)/cidparse.c \
+ $(CID_DIR)/cidload.c \
+ $(CID_DIR)/cidriver.c \
+ $(CID_DIR)/cidgload.c \
+ $(CID_DIR)/cidobjs.c
# CID driver headers
#
CID_DRV_H := $(CID_DRV_SRC:%.c=%.h) \
- $(CID_DIR_)cidtoken.h \
- $(CID_DIR_)ciderrs.h
+ $(CID_DIR)/cidtoken.h \
+ $(CID_DIR)/ciderrs.h
# CID driver object(s)
@@ -42,24 +41,24 @@ CID_DRV_H := $(CID_DRV_SRC:%.c=%.h) \
# CID_DRV_OBJ_M is used during `multi' builds
# CID_DRV_OBJ_S is used during `single' builds
#
-CID_DRV_OBJ_M := $(CID_DRV_SRC:$(CID_DIR_)%.c=$(OBJ_)%.$O)
-CID_DRV_OBJ_S := $(OBJ_)type1cid.$O
+CID_DRV_OBJ_M := $(CID_DRV_SRC:$(CID_DIR)/%.c=$(OBJ_DIR)/%.$O)
+CID_DRV_OBJ_S := $(OBJ_DIR)/type1cid.$O
# CID driver source file for single build
#
-CID_DRV_SRC_S := $(CID_DIR_)type1cid.c
+CID_DRV_SRC_S := $(CID_DIR)/type1cid.c
# CID driver - single object
#
$(CID_DRV_OBJ_S): $(CID_DRV_SRC_S) $(CID_DRV_SRC) $(FREETYPE_H) $(CID_DRV_H)
- $(CID_COMPILE) $T$@ $(CID_DRV_SRC_S)
+ $(CID_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(CID_DRV_SRC_S))
# CID driver - multiple objects
#
-$(OBJ_)%.$O: $(CID_DIR_)%.c $(FREETYPE_H) $(CID_DRV_H)
- $(CID_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(CID_DIR)/%.c $(FREETYPE_H) $(CID_DRV_H)
+ $(CID_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
@@ -67,4 +66,5 @@ $(OBJ_)%.$O: $(CID_DIR_)%.c $(FREETYPE_H) $(CID_DRV_H)
DRV_OBJS_S += $(CID_DRV_OBJ_S)
DRV_OBJS_M += $(CID_DRV_OBJ_M)
+
# EOF
diff --git a/extras/freetype2/src/gzip/ftgzip.c b/extras/freetype2/src/gzip/ftgzip.c
index 45f934b19..e35c07385 100644
--- a/extras/freetype2/src/gzip/ftgzip.c
+++ b/extras/freetype2/src/gzip/ftgzip.c
@@ -2,13 +2,13 @@
/* */
/* ftgzip.c */
/* */
-/* FreeType support for .gz compressed fileds */
+/* FreeType support for .gz compressed files. */
/* */
-/* this optional component relies on zlib. It should mainly be used to */
+/* This optional component relies on zlib. It should mainly be used to */
/* parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,45 +19,67 @@
/* */
/***************************************************************************/
+
#include <ft2build.h>
#include FT_INTERNAL_MEMORY_H
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_DEBUG_H
#include <string.h>
+
+#include FT_MODULE_ERRORS_H
+
+#undef __FTERRORS_H__
+
+#define FT_ERR_PREFIX Gzip_Err_
+#define FT_ERR_BASE FT_Mod_Err_Gzip
+
+#include FT_ERRORS_H
+
+
#ifdef FT_CONFIG_OPTION_USE_ZLIB
#ifdef FT_CONFIG_OPTION_SYSTEM_ZLIB
-# include <zlib.h>
+#include <zlib.h>
-#else /* !SYSTEM_ZLIB */
+#else /* !FT_CONFIG_OPTION_SYSTEM_ZLIB */
- /* in this case, we include our own modified sources of the ZLib */
- /* within the "ftgzip" component. The modifications were necessary */
- /* to #include all files without conflicts, as well as preventing */
- /* the definition of "extern" functions that may cause linking */
- /* conflicts when a program is linked with both FreeType and the */
- /* original ZLib */
+ /* In this case, we include our own modified sources of the ZLib */
+ /* within the "ftgzip" component. The modifications were necessary */
+ /* to #include all files without conflicts, as well as preventing */
+ /* the definition of "extern" functions that may cause linking */
+ /* conflicts when a program is linked with both FreeType and the */
+ /* original ZLib. */
-# define NO_DUMMY_DECL
-# define BUILDFIXED /* save code size */
-# define MY_ZCALLOC
+#define NO_DUMMY_DECL
+#define MY_ZCALLOC
-# include "zlib.h"
+#include "zlib.h"
-# undef SLOW
-# define SLOW 1 /* we can't use asm-optimized sources here !! */
+#undef SLOW
+#define SLOW 1 /* we can't use asm-optimized sources here! */
-# include "zutil.c"
-# include "inftrees.c"
-# include "infcodes.c"
-# include "infutil.c"
-# include "infblock.c"
-# include "inflate.c"
-# include "adler32.c"
+ /* Urgh. `inflate_mask' must not be declared twice -- C++ doesn't like
+ this. We temporarily disable it and load all necessary header files. */
+#define NO_INFLATE_MASK
+#include "zutil.h"
+#include "inftrees.h"
+#include "infblock.h"
+#include "infcodes.h"
+#include "infutil.h"
+#undef NO_INFLATE_MASK
-#endif /* !SYSTEM_ZLIB */
+ /* infutil.c must be included before infcodes.c */
+#include "zutil.c"
+#include "inftrees.c"
+#include "infutil.c"
+#include "infcodes.c"
+#include "infblock.c"
+#include "inflate.c"
+#include "adler32.c"
+
+#endif /* !FT_CONFIG_OPTION_SYSTEM_ZLIB */
/***************************************************************************/
@@ -68,48 +90,48 @@
/***************************************************************************/
/***************************************************************************/
- /* it's better to use FreeType memory routines instead of raw 'malloc/free' */
+ /* it is better to use FreeType memory routines instead of raw
+ 'malloc/free' */
+ static voidpf
+ ft_gzip_alloc( FT_Memory memory,
+ uInt items,
+ uInt size )
+ {
+ FT_ULong sz = (FT_ULong)size * items;
+ FT_Pointer p;
- static voidpf
- ft_gzip_alloc( FT_Memory memory,
- uInt items,
- uInt size )
- {
- FT_ULong sz = (FT_ULong)size * items;
- FT_Pointer p;
- FT_MEM_ALLOC( p, sz );
+ FT_MEM_ALLOC( p, sz );
- return (voidpf) p;
- }
+ return (voidpf) p;
+ }
- static void
- ft_gzip_free( FT_Memory memory,
- voidpf address )
- {
- FT_MEM_FREE( address );
- }
+ static void
+ ft_gzip_free( FT_Memory memory,
+ voidpf address )
+ {
+ FT_MEM_FREE( address );
+ }
#ifndef FT_CONFIG_OPTION_SYSTEM_ZLIB
- local voidpf
- zcalloc ( /* opaque, items, size) */
- voidpf opaque,
- unsigned items,
- unsigned size )
- {
- return ft_gzip_alloc( opaque, items, size );
- }
-
- local void
- zcfree( voidpf opaque,
- voidpf ptr )
- {
- ft_gzip_free( opaque, ptr );
- }
+ local voidpf
+ zcalloc ( voidpf opaque,
+ unsigned items,
+ unsigned size )
+ {
+ return ft_gzip_alloc( (FT_Memory)opaque, items, size );
+ }
+
+ local void
+ zcfree( voidpf opaque,
+ voidpf ptr )
+ {
+ ft_gzip_free( (FT_Memory)opaque, ptr );
+ }
#endif /* !SYSTEM_ZLIB */
@@ -122,27 +144,27 @@
/***************************************************************************/
/***************************************************************************/
-#define FT_GZIP_BUFFER_SIZE 4096
+#define FT_GZIP_BUFFER_SIZE 4096
- typedef struct FT_GZipFileRec_
+ typedef struct FT_GZipFileRec_
{
- FT_Stream source; /* parent/source stream */
- FT_Stream stream; /* embedding stream */
- FT_Memory memory; /* memory allocator */
- z_stream zstream; /* zlib input stream */
+ FT_Stream source; /* parent/source stream */
+ FT_Stream stream; /* embedding stream */
+ FT_Memory memory; /* memory allocator */
+ z_stream zstream; /* zlib input stream */
- FT_ULong start; /* starting position, after .gz header */
- FT_Byte input[ FT_GZIP_BUFFER_SIZE ]; /* input read buffer */
+ FT_ULong start; /* starting position, after .gz header */
+ FT_Byte input[FT_GZIP_BUFFER_SIZE]; /* input read buffer */
- FT_Byte buffer[ FT_GZIP_BUFFER_SIZE ]; /* output buffer */
- FT_ULong pos; /* position in output */
- FT_Byte* cursor;
- FT_Byte* limit;
+ FT_Byte buffer[FT_GZIP_BUFFER_SIZE]; /* output buffer */
+ FT_ULong pos; /* position in output */
+ FT_Byte* cursor;
+ FT_Byte* limit;
} FT_GZipFileRec, *FT_GZipFile;
-/* gzip flag byte */
+ /* gzip flag byte */
#define FT_GZIP_ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
#define FT_GZIP_HEAD_CRC 0x02 /* bit 1 set: header CRC present */
#define FT_GZIP_EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
@@ -151,25 +173,26 @@
#define FT_GZIP_RESERVED 0xE0 /* bits 5..7: reserved */
- /* check and skip .gz header - we don't support "transparent" compression */
+ /* check and skip .gz header - we don't support `transparent' compression */
static FT_Error
ft_gzip_check_header( FT_Stream stream )
{
FT_Error error;
FT_Byte head[4];
+
if ( FT_STREAM_SEEK( 0 ) ||
FT_STREAM_READ( head, 4 ) )
goto Exit;
- /* head[0] && head[1] are the magic numbers */
+ /* head[0] && head[1] are the magic numbers; */
/* head[2] is the method, and head[3] the flags */
if ( head[0] != 0x1f ||
head[1] != 0x8b ||
head[2] != Z_DEFLATED ||
(head[3] & FT_GZIP_RESERVED) )
{
- error = FT_Err_Invalid_File_Format;
+ error = Gzip_Err_Invalid_File_Format;
goto Exit;
}
@@ -181,6 +204,7 @@
{
FT_UInt len;
+
if ( FT_READ_USHORT_LE( len ) ||
FT_STREAM_SKIP( len ) )
goto Exit;
@@ -192,7 +216,8 @@
{
FT_UInt c;
- if ( FT_READ_BYTE( c) )
+
+ if ( FT_READ_BYTE( c ) )
goto Exit;
if ( c == 0 )
@@ -205,7 +230,8 @@
{
FT_UInt c;
- if ( FT_READ_BYTE( c) )
+
+ if ( FT_READ_BYTE( c ) )
goto Exit;
if ( c == 0 )
@@ -222,14 +248,14 @@
}
-
static FT_Error
- ft_gzip_file_init( FT_GZipFile zip,
- FT_Stream stream,
- FT_Stream source )
+ ft_gzip_file_init( FT_GZipFile zip,
+ FT_Stream stream,
+ FT_Stream source )
{
z_stream* zstream = &zip->zstream;
- FT_Error error = 0;
+ FT_Error error = Gzip_Err_Ok;
+
zip->stream = stream;
zip->source = source;
@@ -244,15 +270,15 @@
stream = source;
error = ft_gzip_check_header( stream );
- if (error)
+ if ( error )
goto Exit;
zip->start = FT_STREAM_POS();
}
- /* initialize zlib - there is no zlib header in the compressed stream */
- zstream->zalloc = (alloc_func) ft_gzip_alloc;
- zstream->zfree = (free_func) ft_gzip_free;
+ /* initialize zlib -- there is no zlib header in the compressed stream */
+ zstream->zalloc = (alloc_func)ft_gzip_alloc;
+ zstream->zfree = (free_func) ft_gzip_free;
zstream->opaque = stream->memory;
zstream->avail_in = 0;
@@ -260,22 +286,19 @@
if ( inflateInit2( zstream, -MAX_WBITS ) != Z_OK ||
zstream->next_in == NULL )
- {
- error = FT_Err_Invalid_File_Format;
- goto Exit;
- }
+ error = Gzip_Err_Invalid_File_Format;
Exit:
return error;
}
-
static void
ft_gzip_file_done( FT_GZipFile zip )
{
z_stream* zstream = &zip->zstream;
+
inflateEnd( zstream );
/* clear the rest */
@@ -299,10 +322,12 @@
FT_Stream stream = zip->source;
FT_Error error;
+
if ( !FT_STREAM_SEEK( zip->start ) )
{
z_stream* zstream = &zip->zstream;
+
inflateReset( zstream );
zstream->avail_in = 0;
@@ -314,7 +339,8 @@
zip->cursor = zip->limit;
zip->pos = 0;
}
- return error;
+
+ return error;
}
@@ -325,11 +351,13 @@
FT_Stream stream = zip->source;
FT_ULong size;
+
if ( stream->read )
{
- size = stream->read( stream, stream->pos, zip->input, FT_GZIP_BUFFER_SIZE );
+ size = stream->read( stream, stream->pos, zip->input,
+ FT_GZIP_BUFFER_SIZE );
if ( size == 0 )
- return FT_Err_Invalid_Stream_Operation;
+ return Gzip_Err_Invalid_Stream_Operation;
}
else
{
@@ -338,7 +366,7 @@
size = FT_GZIP_BUFFER_SIZE;
if ( size == 0 )
- return FT_Err_Invalid_Stream_Operation;
+ return Gzip_Err_Invalid_Stream_Operation;
FT_MEM_COPY( zip->input, stream->base + stream->pos, size );
}
@@ -347,17 +375,17 @@
zstream->next_in = zip->input;
zstream->avail_in = size;
- return 0;
+ return Gzip_Err_Ok;
}
-
static FT_Error
ft_gzip_file_fill_output( FT_GZipFile zip )
{
z_stream* zstream = &zip->zstream;
FT_Error error = 0;
+
zip->cursor = zip->buffer;
zstream->next_out = zip->cursor;
zstream->avail_out = FT_GZIP_BUFFER_SIZE;
@@ -366,6 +394,7 @@
{
int err;
+
if ( zstream->avail_in == 0 )
{
error = ft_gzip_file_fill_input( zip );
@@ -378,26 +407,29 @@
if ( err == Z_STREAM_END )
{
zip->limit = zstream->next_out;
- error = FT_Err_Invalid_Stream_Operation;
+ if ( zip->limit == zip->cursor )
+ error = Gzip_Err_Invalid_Stream_Operation;
break;
}
else if ( err != Z_OK )
{
- error = FT_Err_Invalid_Stream_Operation;
+ error = Gzip_Err_Invalid_Stream_Operation;
break;
}
}
+
return error;
}
- /* fill output buffer, 'count' must be <= FT_GZIP_BUFFER_SIZE */
+ /* fill output buffer; `count' must be <= FT_GZIP_BUFFER_SIZE */
static FT_Error
ft_gzip_file_skip_output( FT_GZipFile zip,
FT_ULong count )
{
- FT_Error error = 0;
- FT_ULong delta;
+ FT_Error error = Gzip_Err_Ok;
+ FT_ULong delta;
+
for (;;)
{
@@ -422,27 +454,29 @@
static FT_ULong
- ft_gzip_file_io( FT_GZipFile zip,
- FT_ULong pos,
- FT_Byte* buffer,
- FT_ULong count )
+ ft_gzip_file_io( FT_GZipFile zip,
+ FT_ULong pos,
+ FT_Byte* buffer,
+ FT_ULong count )
{
- FT_ULong result = 0;
- FT_Error error;
+ FT_ULong result = 0;
+ FT_Error error;
+
- /* reset inflate stream if we're seeking backwards */
- /* yes, that's not too efficient, but it saves memory :-) */
+ /* Reset inflate stream if we're seeking backwards. */
+ /* Yes, that is not too efficient, but it saves memory :-) */
if ( pos < zip->pos )
{
error = ft_gzip_file_reset( zip );
- if ( error ) goto Exit;
+ if ( error )
+ goto Exit;
}
/* skip unwanted bytes */
if ( pos > zip->pos )
{
error = ft_gzip_file_skip_output( zip, (FT_ULong)( pos - zip->pos ) );
- if (error)
+ if ( error )
goto Exit;
}
@@ -452,7 +486,8 @@
/* now read the data */
for (;;)
{
- FT_ULong delta;
+ FT_ULong delta;
+
delta = (FT_ULong)( zip->limit - zip->cursor );
if ( delta >= count )
@@ -469,7 +504,7 @@
break;
error = ft_gzip_file_fill_output( zip );
- if (error)
+ if ( error )
break;
}
@@ -489,9 +524,10 @@
static void
ft_gzip_stream_close( FT_Stream stream )
{
- FT_GZipFile zip = stream->descriptor.pointer;
+ FT_GZipFile zip = (FT_GZipFile)stream->descriptor.pointer;
FT_Memory memory = stream->memory;
+
if ( zip )
{
/* finalize gzip file descriptor */
@@ -505,25 +541,27 @@
static FT_ULong
- ft_gzip_stream_io( FT_Stream stream,
- FT_ULong pos,
- FT_Byte* buffer,
- FT_ULong count )
+ ft_gzip_stream_io( FT_Stream stream,
+ FT_ULong pos,
+ FT_Byte* buffer,
+ FT_ULong count )
{
- FT_GZipFile zip = stream->descriptor.pointer;
+ FT_GZipFile zip = (FT_GZipFile)stream->descriptor.pointer;
+
return ft_gzip_file_io( zip, pos, buffer, count );
}
FT_EXPORT_DEF( FT_Error )
- FT_Stream_OpenGzip( FT_Stream stream,
- FT_Stream source )
+ FT_Stream_OpenGzip( FT_Stream stream,
+ FT_Stream source )
{
FT_Error error;
FT_Memory memory = source->memory;
FT_GZipFile zip;
+
FT_ZERO( stream );
stream->memory = memory;
@@ -539,7 +577,7 @@
stream->descriptor.pointer = zip;
}
- stream->size = 0x7FFFFFFF; /* don't know the real size !! */
+ stream->size = 0x7FFFFFFFL; /* don't know the real size! */
stream->pos = 0;
stream->base = 0;
stream->read = ft_gzip_stream_io;
@@ -552,13 +590,16 @@
#else /* !FT_CONFIG_OPTION_USE_ZLIB */
FT_EXPORT_DEF( FT_Error )
- FT_Stream_OpenGzip( FT_Stream stream,
- FT_Stream source )
+ FT_Stream_OpenGzip( FT_Stream stream,
+ FT_Stream source )
{
FT_UNUSED( stream );
FT_UNUSED( source );
- return FT_Err_Unimplemented_Feature;
+ return Gzip_Err_Unimplemented_Feature;
}
#endif /* !FT_CONFIG_OPTION_USE_ZLIB */
+
+
+/* END */
diff --git a/extras/freetype2/src/gzip/infblock.c b/extras/freetype2/src/gzip/infblock.c
index 8d3e21042..d6e2dc297 100644
--- a/extras/freetype2/src/gzip/infblock.c
+++ b/extras/freetype2/src/gzip/infblock.c
@@ -156,7 +156,8 @@ int r )
uInt bl, bd;
inflate_huft *tl, *td;
- inflate_trees_fixed(&bl, &bd, &tl, &td, z);
+ inflate_trees_fixed(&bl, &bd, (const inflate_huft**)&tl,
+ (const inflate_huft**)&td, z);
s->sub.decode.codes = inflate_codes_new(bl, bd, tl, td, z);
if (s->sub.decode.codes == Z_NULL)
{
diff --git a/extras/freetype2/src/gzip/inffixed.h b/extras/freetype2/src/gzip/inffixed.h
index 77f7e7631..4d4760ea0 100644
--- a/extras/freetype2/src/gzip/inffixed.h
+++ b/extras/freetype2/src/gzip/inffixed.h
@@ -7,9 +7,9 @@
subject to change. Applications should only use zlib.h.
*/
-local uInt fixed_bl = 9;
-local uInt fixed_bd = 5;
-local inflate_huft fixed_tl[] = {
+local const uInt fixed_bl = 9;
+local const uInt fixed_bd = 5;
+local const inflate_huft fixed_tl[] = {
{{{96,7}},256}, {{{0,8}},80}, {{{0,8}},16}, {{{84,8}},115},
{{{82,7}},31}, {{{0,8}},112}, {{{0,8}},48}, {{{0,9}},192},
{{{80,7}},10}, {{{0,8}},96}, {{{0,8}},32}, {{{0,9}},160},
@@ -139,7 +139,7 @@ local inflate_huft fixed_tl[] = {
{{{82,7}},27}, {{{0,8}},111}, {{{0,8}},47}, {{{0,9}},191},
{{{0,8}},15}, {{{0,8}},143}, {{{0,8}},79}, {{{0,9}},255}
};
-local inflate_huft fixed_td[] = {
+local const inflate_huft fixed_td[] = {
{{{80,5}},1}, {{{87,5}},257}, {{{83,5}},17}, {{{91,5}},4097},
{{{81,5}},5}, {{{89,5}},1025}, {{{85,5}},65}, {{{93,5}},16385},
{{{80,5}},3}, {{{88,5}},513}, {{{84,5}},33}, {{{92,5}},8193},
diff --git a/extras/freetype2/src/gzip/inftrees.c b/extras/freetype2/src/gzip/inftrees.c
index c3fdc2759..9002bf5b8 100644
--- a/extras/freetype2/src/gzip/inftrees.c
+++ b/extras/freetype2/src/gzip/inftrees.c
@@ -401,11 +401,11 @@ local inflate_huft *fixed_td;
local int inflate_trees_fixed( /* bl, bd, tl, td, z) */
-uIntf *bl, /* literal desired/actual bit depth */
-uIntf *bd, /* distance desired/actual bit depth */
-inflate_huft * FAR *tl, /* literal/length tree result */
-inflate_huft * FAR *td, /* distance tree result */
-z_streamp z /* for memory allocation */
+uIntf *bl, /* literal desired/actual bit depth */
+uIntf *bd, /* distance desired/actual bit depth */
+const inflate_huft * FAR *tl, /* literal/length tree result */
+const inflate_huft * FAR *td, /* distance tree result */
+z_streamp z /* for memory allocation */
)
{
#ifdef BUILDFIXED
@@ -451,6 +451,8 @@ z_streamp z /* for memory allocation */
ZFREE(z, c);
fixed_built = 1;
}
+#else
+ FT_UNUSED(z);
#endif
*bl = fixed_bl;
*bd = fixed_bd;
diff --git a/extras/freetype2/src/gzip/inftrees.h b/extras/freetype2/src/gzip/inftrees.h
index 92d2f284e..07bf2aa0b 100644
--- a/extras/freetype2/src/gzip/inftrees.h
+++ b/extras/freetype2/src/gzip/inftrees.h
@@ -56,8 +56,8 @@ local int inflate_trees_dynamic OF((
local int inflate_trees_fixed OF((
uIntf *, /* literal desired/actual bit depth */
uIntf *, /* distance desired/actual bit depth */
- inflate_huft * FAR *, /* literal/length tree result */
- inflate_huft * FAR *, /* distance tree result */
+ const inflate_huft * FAR *, /* literal/length tree result */
+ const inflate_huft * FAR *, /* distance tree result */
z_streamp)); /* for memory allocation */
#endif /* _INFTREES_H */
diff --git a/extras/freetype2/src/gzip/infutil.c b/extras/freetype2/src/gzip/infutil.c
index 87358d714..6087b4064 100644
--- a/extras/freetype2/src/gzip/infutil.c
+++ b/extras/freetype2/src/gzip/infutil.c
@@ -11,7 +11,7 @@
/* And'ing with mask[n] masks the lower n bits */
-local uInt inflate_mask[17] = {
+local const uInt inflate_mask[17] = {
0x0000,
0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
diff --git a/extras/freetype2/src/gzip/infutil.h b/extras/freetype2/src/gzip/infutil.h
index 820dcd327..7174b6dd0 100644
--- a/extras/freetype2/src/gzip/infutil.h
+++ b/extras/freetype2/src/gzip/infutil.h
@@ -85,7 +85,9 @@ struct inflate_blocks_state {
#define LOAD {LOADIN LOADOUT}
/* masks for lower bits (size given to avoid silly warnings with Visual C++) */
+#ifndef NO_INFLATE_MASK
local uInt inflate_mask[17];
+#endif
/* copy as much as possible from the sliding window to the output area */
local int inflate_flush OF((
diff --git a/extras/freetype2/src/gzip/rules.mk b/extras/freetype2/src/gzip/rules.mk
index 1332fb206..d2a43a6a8 100644
--- a/extras/freetype2/src/gzip/rules.mk
+++ b/extras/freetype2/src/gzip/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2002 by
+# Copyright 2002, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,14 +15,13 @@
# gzip driver directory
#
-GZIP_DIR := $(SRC_)gzip
-GZIP_DIR_ := $(GZIP_DIR)$(SEP)
+GZIP_DIR := $(SRC_DIR)/gzip
# compilation flags for the driver
#
ifeq ($(SYSTEM_ZLIB),)
- GZIP_COMPILE := $(FT_COMPILE) $I$(GZIP_DIR)
+ GZIP_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(GZIP_DIR))
else
GZIP_COMPILE := $(FT_COMPILE)
endif
@@ -30,7 +29,7 @@ endif
# gzip support sources (i.e., C files)
#
-GZIP_DRV_SRC := $(GZIP_DIR_)ftgzip.c
+GZIP_DRV_SRC := $(GZIP_DIR)/ftgzip.c
# gzip support headers
#
@@ -43,27 +42,28 @@ GZIP_DRV_H :=
# GZIP_DRV_OBJ_S is used during `single' builds
#
ifeq ($(SYSTEM_ZLIB),)
- GZIP_DRV_OBJ_M := $(GZIP_DRV_SRC:$(GZIP_DIR_)%.c=$(OBJ_)%.$O)
+ GZIP_DRV_OBJ_M := $(GZIP_DRV_SRC:$(GZIP_DIR)/%.c=$(OBJ_DIR)/%.$O)
else
- GZIP_DRV_OBJ_M := $(OBJ_)ftgzip.$O
+ GZIP_DRV_OBJ_M := $(OBJ_DIR)/ftgzip.$O
endif
-GZIP_DRV_OBJ_S := $(OBJ_)ftgzip.$O
+GZIP_DRV_OBJ_S := $(OBJ_DIR)/ftgzip.$O
# gzip support source file for single build
#
-GZIP_DRV_SRC_S := $(GZIP_DIR_)ftgzip.c
+GZIP_DRV_SRC_S := $(GZIP_DIR)/ftgzip.c
# gzip support - single object
#
-$(GZIP_DRV_OBJ_S): $(GZIP_DRV_SRC_S) $(GZIP_DRV_SRC) $(FREETYPE_H) $(GZIP_DRV_H)
- $(GZIP_COMPILE) $T$@ $(GZIP_DRV_SRC_S)
+$(GZIP_DRV_OBJ_S): $(GZIP_DRV_SRC_S) $(GZIP_DRV_SRC) $(FREETYPE_H) \
+ $(GZIP_DRV_H)
+ $(GZIP_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(GZIP_DRV_SRC_S))
# gzip support - multiple objects
#
-$(OBJ_)%.$O: $(GZIP_DIR_)%.c $(FREETYPE_H) $(GZIP_DRV_H)
- $(GZIP_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(GZIP_DIR)/%.c $(FREETYPE_H) $(GZIP_DRV_H)
+ $(GZIP_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
@@ -71,4 +71,5 @@ $(OBJ_)%.$O: $(GZIP_DIR_)%.c $(FREETYPE_H) $(GZIP_DRV_H)
DRV_OBJS_S += $(GZIP_DRV_OBJ_S)
DRV_OBJS_M += $(GZIP_DRV_OBJ_M)
+
# EOF
diff --git a/extras/freetype2/src/gzip/zutil.h b/extras/freetype2/src/gzip/zutil.h
index 2b26c5ce2..ce02022aa 100644
--- a/extras/freetype2/src/gzip/zutil.h
+++ b/extras/freetype2/src/gzip/zutil.h
@@ -173,8 +173,8 @@ typedef unsigned long ulg;
# define zmemzero(dest, len) _fmemset(dest, 0, len)
# else
# define zmemcpy ft_memcpy
-# define zmemcmp memcmp
-# define zmemzero(dest, len) memset(dest, 0, len)
+# define zmemcmp ft_memcmp
+# define zmemzero(dest, len) ft_memset(dest, 0, len)
# endif
#else
extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
diff --git a/extras/freetype2/src/lzw/Jamfile b/extras/freetype2/src/lzw/Jamfile
new file mode 100644
index 000000000..995cbb98c
--- /dev/null
+++ b/extras/freetype2/src/lzw/Jamfile
@@ -0,0 +1,9 @@
+# FreeType 2 src/lzw Jamfile (C) 2004 David Turner
+#
+
+SubDir FT2_TOP $(FT2_SRC_DIR) lzw ;
+
+Library $(FT2_LIB) : ftlzw.c ;
+
+# end of src/lzw Jamfile
+
diff --git a/extras/freetype2/src/lzw/ftlzw.c b/extras/freetype2/src/lzw/ftlzw.c
new file mode 100644
index 000000000..a0e4cc576
--- /dev/null
+++ b/extras/freetype2/src/lzw/ftlzw.c
@@ -0,0 +1,463 @@
+/***************************************************************************/
+/* */
+/* ftlzw.c */
+/* */
+/* FreeType support for .Z compressed files. */
+/* */
+/* This optional component relies on NetBSD's zopen(). It should mainly */
+/* be used to parse compressed PCF fonts, as found with many X11 server */
+/* distributions. */
+/* */
+/* Copyright 2004 by */
+/* Albert Chin-A-Young. */
+/* */
+/* Based on code in src/gzip/ftgzip.c, Copyright 2004 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+#include <ft2build.h>
+#include FT_INTERNAL_MEMORY_H
+#include FT_INTERNAL_STREAM_H
+#include FT_INTERNAL_DEBUG_H
+#include <string.h>
+#include <stdio.h>
+
+
+#include FT_MODULE_ERRORS_H
+
+#undef __FTERRORS_H__
+
+#define FT_ERR_PREFIX LZW_Err_
+#define FT_ERR_BASE FT_Mod_Err_LZW
+
+#include FT_ERRORS_H
+
+
+#ifdef FT_CONFIG_OPTION_USE_LZW
+
+#include "zopen.h"
+
+
+/***************************************************************************/
+/***************************************************************************/
+/***** *****/
+/***** M E M O R Y M A N A G E M E N T *****/
+/***** *****/
+/***************************************************************************/
+/***************************************************************************/
+
+/***************************************************************************/
+/***************************************************************************/
+/***** *****/
+/***** F I L E D E S C R I P T O R *****/
+/***** *****/
+/***************************************************************************/
+/***************************************************************************/
+
+#define FT_LZW_BUFFER_SIZE 4096
+
+ typedef struct FT_LZWFileRec_
+ {
+ FT_Stream source; /* parent/source stream */
+ FT_Stream stream; /* embedding stream */
+ FT_Memory memory; /* memory allocator */
+ s_zstate_t zstream; /* lzw input stream */
+
+ FT_ULong start; /* starting position, after .Z header */
+ FT_Byte input[FT_LZW_BUFFER_SIZE]; /* input buffer */
+
+ FT_Byte buffer[FT_LZW_BUFFER_SIZE]; /* output buffer */
+ FT_ULong pos; /* position in output */
+ FT_Byte* cursor;
+ FT_Byte* limit;
+
+ } FT_LZWFileRec, *FT_LZWFile;
+
+
+ /* check and skip .Z header */
+ static FT_Error
+ ft_lzw_check_header( FT_Stream stream )
+ {
+ FT_Error error;
+ FT_Byte head[2];
+
+
+ if ( FT_STREAM_SEEK( 0 ) ||
+ FT_STREAM_READ( head, 2 ) )
+ goto Exit;
+
+ /* head[0] && head[1] are the magic numbers */
+ if ( head[0] != 0x1f ||
+ head[1] != 0x9d )
+ error = LZW_Err_Invalid_File_Format;
+
+ Exit:
+ return error;
+ }
+
+
+ static FT_Error
+ ft_lzw_file_init( FT_LZWFile zip,
+ FT_Stream stream,
+ FT_Stream source )
+ {
+ s_zstate_t* zstream = &zip->zstream;
+ FT_Error error = LZW_Err_Ok;
+
+
+ zip->stream = stream;
+ zip->source = source;
+ zip->memory = stream->memory;
+
+ zip->limit = zip->buffer + FT_LZW_BUFFER_SIZE;
+ zip->cursor = zip->limit;
+ zip->pos = 0;
+
+ /* check and skip .Z header */
+ {
+ stream = source;
+
+ error = ft_lzw_check_header( source );
+ if ( error )
+ goto Exit;
+
+ zip->start = FT_STREAM_POS();
+ }
+
+ /* initialize internal lzw variable */
+ zinit( zstream );
+
+ zstream->avail_in = 0;
+ zstream->next_in = zip->buffer;
+ zstream->zs_in_count = source->size - 2;
+
+ if ( zstream->next_in == NULL )
+ error = LZW_Err_Invalid_File_Format;
+
+ Exit:
+ return error;
+ }
+
+
+ static void
+ ft_lzw_file_done( FT_LZWFile zip )
+ {
+ s_zstate_t* zstream = &zip->zstream;
+
+
+ /* clear the rest */
+ zstream->next_in = NULL;
+ zstream->next_out = NULL;
+ zstream->avail_in = 0;
+ zstream->avail_out = 0;
+ zstream->total_in = 0;
+ zstream->total_out = 0;
+
+ zip->memory = NULL;
+ zip->source = NULL;
+ zip->stream = NULL;
+ }
+
+
+ static FT_Error
+ ft_lzw_file_reset( FT_LZWFile zip )
+ {
+ FT_Stream stream = zip->source;
+ FT_Error error;
+
+
+ if ( !FT_STREAM_SEEK( zip->start ) )
+ {
+ s_zstate_t* zstream = &zip->zstream;
+
+
+ zinit( zstream );
+
+ zstream->avail_in = 0;
+ zstream->next_in = zip->input;
+ zstream->total_in = 0;
+ zstream->avail_out = 0;
+ zstream->next_out = zip->buffer;
+ zstream->total_out = 0;
+ zstream->zs_in_count = zip->source->size - 2;
+
+ zip->limit = zip->buffer + FT_LZW_BUFFER_SIZE;
+ zip->cursor = zip->limit;
+ zip->pos = 0;
+ }
+
+ return error;
+ }
+
+
+ static FT_Error
+ ft_lzw_file_fill_input( FT_LZWFile zip )
+ {
+ s_zstate_t* zstream = &zip->zstream;
+ FT_Stream stream = zip->source;
+ FT_ULong size;
+
+
+ if ( stream->read )
+ {
+ size = stream->read( stream, stream->pos, zip->input,
+ FT_LZW_BUFFER_SIZE );
+ if ( size == 0 )
+ return LZW_Err_Invalid_Stream_Operation;
+ }
+ else
+ {
+ size = stream->size - stream->pos;
+ if ( size > FT_LZW_BUFFER_SIZE )
+ size = FT_LZW_BUFFER_SIZE;
+
+ if ( size == 0 )
+ return LZW_Err_Invalid_Stream_Operation;
+
+ FT_MEM_COPY( zip->input, stream->base + stream->pos, size );
+ }
+ stream->pos += size;
+
+ zstream->next_in = zip->input;
+ zstream->avail_in = size;
+
+ return LZW_Err_Ok;
+ }
+
+
+
+ static FT_Error
+ ft_lzw_file_fill_output( FT_LZWFile zip )
+ {
+ s_zstate_t* zstream = &zip->zstream;
+ FT_Error error = 0;
+
+
+ zip->cursor = zip->buffer;
+ zstream->next_out = zip->cursor;
+ zstream->avail_out = FT_LZW_BUFFER_SIZE;
+
+ while ( zstream->avail_out > 0 )
+ {
+ int num_read = 0;
+
+
+ if ( zstream->avail_in == 0 )
+ {
+ error = ft_lzw_file_fill_input( zip );
+ if ( error )
+ break;
+ }
+
+ num_read = zread( zstream );
+
+ if ( num_read == -1 && zstream->zs_in_count == 0 )
+ {
+ zip->limit = zstream->next_out;
+ if ( zip->limit == zip->cursor )
+ error = LZW_Err_Invalid_Stream_Operation;
+ break;
+ }
+ else if ( num_read == -1 )
+ break;
+ else
+ zstream->avail_out -= num_read;
+ }
+
+ return error;
+ }
+
+
+ /* fill output buffer; `count' must be <= FT_LZW_BUFFER_SIZE */
+ static FT_Error
+ ft_lzw_file_skip_output( FT_LZWFile zip,
+ FT_ULong count )
+ {
+ FT_Error error = LZW_Err_Ok;
+ FT_ULong delta;
+
+
+ for (;;)
+ {
+ delta = (FT_ULong)( zip->limit - zip->cursor );
+ if ( delta >= count )
+ delta = count;
+
+ zip->cursor += delta;
+ zip->pos += delta;
+
+ count -= delta;
+ if ( count == 0 )
+ break;
+
+ error = ft_lzw_file_fill_output( zip );
+ if ( error )
+ break;
+ }
+
+ return error;
+ }
+
+
+ static FT_ULong
+ ft_lzw_file_io( FT_LZWFile zip,
+ FT_ULong pos,
+ FT_Byte* buffer,
+ FT_ULong count )
+ {
+ FT_ULong result = 0;
+ FT_Error error;
+
+
+ /* Teset inflate stream if we're seeking backwards. */
+ /* Yes, that is not too efficient, but it saves memory :-) */
+ if ( pos < zip->pos )
+ {
+ error = ft_lzw_file_reset( zip );
+ if ( error )
+ goto Exit;
+ }
+
+ /* skip unwanted bytes */
+ if ( pos > zip->pos )
+ {
+ error = ft_lzw_file_skip_output( zip, (FT_ULong)( pos - zip->pos ) );
+ if ( error )
+ goto Exit;
+ }
+
+ if ( count == 0 )
+ goto Exit;
+
+ /* now read the data */
+ for (;;)
+ {
+ FT_ULong delta;
+
+
+ delta = (FT_ULong)( zip->limit - zip->cursor );
+ if ( delta >= count )
+ delta = count;
+
+ FT_MEM_COPY( buffer, zip->cursor, delta );
+ buffer += delta;
+ result += delta;
+ zip->cursor += delta;
+ zip->pos += delta;
+
+ count -= delta;
+ if ( count == 0 )
+ break;
+
+ error = ft_lzw_file_fill_output( zip );
+ if ( error )
+ break;
+ }
+
+ Exit:
+ return result;
+ }
+
+
+/***************************************************************************/
+/***************************************************************************/
+/***** *****/
+/***** L Z W E M B E D D I N G S T R E A M *****/
+/***** *****/
+/***************************************************************************/
+/***************************************************************************/
+
+ static void
+ ft_lzw_stream_close( FT_Stream stream )
+ {
+ FT_LZWFile zip = (FT_LZWFile)stream->descriptor.pointer;
+ FT_Memory memory = stream->memory;
+
+
+ if ( zip )
+ {
+ /* finalize lzw file descriptor */
+ ft_lzw_file_done( zip );
+
+ FT_FREE( zip );
+
+ stream->descriptor.pointer = NULL;
+ }
+ }
+
+
+ static FT_ULong
+ ft_lzw_stream_io( FT_Stream stream,
+ FT_ULong pos,
+ FT_Byte* buffer,
+ FT_ULong count )
+ {
+ FT_LZWFile zip = (FT_LZWFile)stream->descriptor.pointer;
+
+
+ return ft_lzw_file_io( zip, pos, buffer, count );
+ }
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Stream_OpenLZW( FT_Stream stream,
+ FT_Stream source )
+ {
+ FT_Error error;
+ FT_Memory memory = source->memory;
+ FT_LZWFile zip;
+
+
+ FT_ZERO( stream );
+ stream->memory = memory;
+
+ if ( !FT_NEW( zip ) )
+ {
+ error = ft_lzw_file_init( zip, stream, source );
+ if ( error )
+ {
+ FT_FREE( zip );
+ goto Exit;
+ }
+
+ stream->descriptor.pointer = zip;
+ }
+
+ stream->size = 0x7FFFFFFFL; /* don't know the real size! */
+ stream->pos = 0;
+ stream->base = 0;
+ stream->read = ft_lzw_stream_io;
+ stream->close = ft_lzw_stream_close;
+
+ Exit:
+ return error;
+ }
+
+#include "zopen.c"
+
+
+#else /* !FT_CONFIG_OPTION_USE_LZW */
+
+
+ FT_EXPORT_DEF( FT_Error )
+ FT_Stream_OpenLZW( FT_Stream stream,
+ FT_Stream source )
+ {
+ FT_UNUSED( stream );
+ FT_UNUSED( source );
+
+ return LZW_Err_Unimplemented_Feature;
+ }
+
+
+#endif /* !FT_CONFIG_OPTION_USE_LZW */
+
+
+/* END */
diff --git a/extras/freetype2/src/lzw/rules.mk b/extras/freetype2/src/lzw/rules.mk
new file mode 100644
index 000000000..73ce71804
--- /dev/null
+++ b/extras/freetype2/src/lzw/rules.mk
@@ -0,0 +1,70 @@
+#
+# FreeType 2 LZW support configuration rules
+#
+
+
+# Copyright 2004 by
+# Albert Chin-A-Young.
+#
+# Based on src/lzw/rules.mk, Copyright 2002 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+
+# LZW driver directory
+#
+LZW_DIR := $(SRC_DIR)/lzw
+
+
+# compilation flags for the driver
+#
+LZW_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(LZW_DIR))
+
+
+# LZW support sources (i.e., C files)
+#
+LZW_DRV_SRC := $(LZW_DIR)/ftlzw.c \
+ $(LZW_DIR)/zopen.c
+
+# LZW support headers
+#
+LZW_DRV_H := $(LZW_DIR)/zopen.h
+
+
+# LZW driver object(s)
+#
+# LZW_DRV_OBJ_M is used during `multi' builds
+# LZW_DRV_OBJ_S is used during `single' builds
+#
+LZW_DRV_OBJ_M := $(OBJ_DIR)/ftlzw.$O
+LZW_DRV_OBJ_S := $(OBJ_DIR)/ftlzw.$O
+
+# LZW support source file for single build
+#
+LZW_DRV_SRC_S := $(LZW_DIR)/ftlzw.c
+
+
+# LZW support - single object
+#
+$(LZW_DRV_OBJ_S): $(LZW_DRV_SRC_S) $(LZW_DRV_SRC) $(FREETYPE_H) $(LZW_DRV_H)
+ $(LZW_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(LZW_DRV_SRC_S))
+
+
+# LZW support - multiple objects
+#
+$(OBJ_DIR)/%.$O: $(LZW_DIR)/%.c $(FREETYPE_H) $(LZW_DRV_H)
+ $(LZW_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
+
+
+# update main driver object lists
+#
+DRV_OBJS_S += $(LZW_DRV_OBJ_S)
+DRV_OBJS_M += $(LZW_DRV_OBJ_M)
+
+
+# EOF
diff --git a/extras/freetype2/src/lzw/zopen.c b/extras/freetype2/src/lzw/zopen.c
new file mode 100644
index 000000000..5267f1622
--- /dev/null
+++ b/extras/freetype2/src/lzw/zopen.c
@@ -0,0 +1,396 @@
+/* $NetBSD: zopen.c,v 1.8 2003/08/07 11:13:29 agc Exp $ */
+
+/*-
+ * Copyright (c) 1985, 1986, 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Diomidis Spinellis and James A. Woods, derived from original
+ * work by Spencer Thomas and Joseph Orost.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*-
+ *
+ * Copyright (c) 2004
+ * Albert Chin-A-Young.
+ *
+ * Modified to work with FreeType's PCF driver.
+ *
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+#if 0
+static char sccsid[] = "@(#)zopen.c 8.1 (Berkeley) 6/27/93";
+#else
+static char rcsid[] = "$NetBSD: zopen.c,v 1.8 2003/08/07 11:13:29 agc Exp $";
+#endif
+#endif /* LIBC_SCCS and not lint */
+
+/*-
+ * fcompress.c - File compression ala IEEE Computer, June 1984.
+ *
+ * Compress authors:
+ * Spencer W. Thomas (decvax!utah-cs!thomas)
+ * Jim McKie (decvax!mcvax!jim)
+ * Steve Davies (decvax!vax135!petsd!peora!srd)
+ * Ken Turkowski (decvax!decwrl!turtlevax!ken)
+ * James A. Woods (decvax!ihnp4!ames!jaw)
+ * Joe Orost (decvax!vax135!petsd!joe)
+ *
+ * Cleaned up and converted to library returning I/O streams by
+ * Diomidis Spinellis <dds@doc.ic.ac.uk>.
+ */
+
+#include <ctype.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#if 0
+static char_type magic_header[] =
+ { 0x1f, 0x9d }; /* 1F 9D */
+#endif
+
+#define BIT_MASK 0x1f /* Defines for third byte of header. */
+#define BLOCK_MASK 0x80
+
+/*
+ * Masks 0x40 and 0x20 are free. I think 0x20 should mean that there is
+ * a fourth header byte (for expansion).
+ */
+#define INIT_BITS 9 /* Initial number of bits/code. */
+
+#define MAXCODE(n_bits) ((1 << (n_bits)) - 1)
+
+/* Definitions to retain old variable names */
+#define fp zs->zs_fp
+#define state zs->zs_state
+#define n_bits zs->zs_n_bits
+#define maxbits zs->zs_maxbits
+#define maxcode zs->zs_maxcode
+#define maxmaxcode zs->zs_maxmaxcode
+#define htab zs->zs_htab
+#define codetab zs->zs_codetab
+#define hsize zs->zs_hsize
+#define free_ent zs->zs_free_ent
+#define block_compress zs->zs_block_compress
+#define clear_flg zs->zs_clear_flg
+#define offset zs->zs_offset
+#define in_count zs->zs_in_count
+#define buf_len zs->zs_buf_len
+#define buf zs->zs_buf
+#define stackp zs->u.r.zs_stackp
+#define finchar zs->u.r.zs_finchar
+#define code zs->u.r.zs_code
+#define oldcode zs->u.r.zs_oldcode
+#define incode zs->u.r.zs_incode
+#define roffset zs->u.r.zs_roffset
+#define size zs->u.r.zs_size
+#define gbuf zs->u.r.zs_gbuf
+
+/*
+ * To save much memory, we overlay the table used by compress() with those
+ * used by decompress(). The tab_prefix table is the same size and type as
+ * the codetab. The tab_suffix table needs 2**BITS characters. We get this
+ * from the beginning of htab. The output stack uses the rest of htab, and
+ * contains characters. There is plenty of room for any possible stack
+ * (stack used to be 8000 characters).
+ */
+
+#define htabof(i) htab[i]
+#define codetabof(i) codetab[i]
+
+#define tab_prefixof(i) codetabof(i)
+#define tab_suffixof(i) ((char_type *)(htab))[i]
+#define de_stack ((char_type *)&tab_suffixof(1 << BITS))
+
+#define CHECK_GAP 10000 /* Ratio check interval. */
+
+/*
+ * the next two codes should not be changed lightly, as they must not
+ * lie within the contiguous general code space.
+ */
+#define FIRST 257 /* First free entry. */
+#define CLEAR 256 /* Table clear output code. */
+
+/*-
+ * Algorithm from "A Technique for High Performance Data Compression",
+ * Terry A. Welch, IEEE Computer Vol 17, No 6 (June 1984), pp 8-19.
+ *
+ * Algorithm:
+ * Modified Lempel-Ziv method (LZW). Basically finds common
+ * substrings and replaces them with a variable size code. This is
+ * deterministic, and can be done on the fly. Thus, the decompression
+ * procedure needs no input table, but tracks the way the table was built.
+ */
+
+#if 0
+static int
+zclose(s_zstate_t *zs)
+{
+ free(zs);
+ return (0);
+}
+#endif
+
+/*-
+ * Output the given code.
+ * Inputs:
+ * code: A n_bits-bit integer. If == -1, then EOF. This assumes
+ * that n_bits =< (long)wordsize - 1.
+ * Outputs:
+ * Outputs code to the file.
+ * Assumptions:
+ * Chars are 8 bits long.
+ * Algorithm:
+ * Maintain a BITS character long buffer (so that 8 codes will
+ * fit in it exactly). Use the VAX insv instruction to insert each
+ * code in turn. When the buffer fills up empty it and start over.
+ */
+
+static const char_type rmask[9] =
+ {0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f, 0xff};
+
+/*
+ * Decompress read. This routine adapts to the codes in the file building
+ * the "string" table on-the-fly; requiring no table to be stored in the
+ * compressed file. The tables used herein are shared with those of the
+ * compress() routine. See the definitions above.
+ */
+static int
+zread(s_zstate_t *zs)
+{
+ unsigned int count;
+
+ if (in_count == 0)
+ return -1;
+ if (zs->avail_out == 0)
+ return 0;
+
+ count = zs->avail_out;
+ switch (state) {
+ case S_START:
+ state = S_MIDDLE;
+ break;
+ case S_MIDDLE:
+ goto middle;
+ case S_EOF:
+ goto eof;
+ }
+
+ maxbits = *(zs->next_in); /* Set -b from file. */
+ zs->avail_in--;
+ zs->next_in++;
+ zs->total_in++;
+ in_count--;
+ block_compress = maxbits & BLOCK_MASK;
+ maxbits &= BIT_MASK;
+ maxmaxcode = 1L << maxbits;
+ if (maxbits > BITS) {
+ return -1;
+ }
+ /* As above, initialize the first 256 entries in the table. */
+ maxcode = MAXCODE(n_bits = INIT_BITS);
+ for (code = 255; code >= 0; code--) {
+ tab_prefixof(code) = 0;
+ tab_suffixof(code) = (char_type) code;
+ }
+ free_ent = block_compress ? FIRST : 256;
+
+ finchar = oldcode = getcode(zs);
+ if (oldcode == -1) /* EOF already? */
+ return 0; /* Get out of here */
+
+ /* First code must be 8 bits = char. */
+ *(zs->next_out)++ = (unsigned char)finchar;
+ zs->total_out++;
+ count--;
+ stackp = de_stack;
+
+ while ((code = getcode(zs)) > -1) {
+ if ((code == CLEAR) && block_compress) {
+ for (code = 255; code >= 0; code--)
+ tab_prefixof(code) = 0;
+ clear_flg = 1;
+ free_ent = FIRST - 1;
+ if ((code = getcode(zs)) == -1)
+ /* O, untimely death! */
+ break;
+ }
+ incode = code;
+
+ /* Special case for KwKwK string. */
+ if (code >= free_ent) {
+ *stackp++ = finchar;
+ code = oldcode;
+ }
+
+ /* Generate output characters in reverse order. */
+ while (code >= 256) {
+ *stackp++ = tab_suffixof(code);
+ code = tab_prefixof(code);
+ }
+ *stackp++ = finchar = tab_suffixof(code);
+
+ /* And put them out in forward order. */
+middle:
+ if (stackp == de_stack)
+ continue;
+
+ do {
+ if (count-- == 0) {
+ return zs->avail_out;
+ }
+ *(zs->next_out)++ = *--stackp;
+ zs->total_out++;
+ } while (stackp > de_stack);
+
+ /* Generate the new entry. */
+ if ((code = free_ent) < maxmaxcode) {
+ tab_prefixof(code) = (unsigned short) oldcode;
+ tab_suffixof(code) = finchar;
+ free_ent = code + 1;
+ }
+
+ /* Remember previous code. */
+ oldcode = incode;
+ }
+ /* state = S_EOF; */
+eof: return (zs->avail_out - count);
+}
+
+/*-
+ * Read one code from the standard input. If EOF, return -1.
+ * Inputs:
+ * stdin
+ * Outputs:
+ * code or -1 is returned.
+ */
+static code_int
+getcode(s_zstate_t *zs)
+{
+ code_int gcode;
+ int r_off, bits;
+ char_type *bp;
+
+ bp = gbuf;
+ if (clear_flg > 0 || roffset >= size || free_ent > maxcode) {
+ /*
+ * If the next entry will be too big for the current gcode
+ * size, then we must increase the size. This implies reading
+ * a new buffer full, too.
+ */
+ if (free_ent > maxcode) {
+ n_bits++;
+ if (n_bits == maxbits) /* Won't get any bigger now. */
+ maxcode = maxmaxcode;
+ else
+ maxcode = MAXCODE(n_bits);
+ }
+ if (clear_flg > 0) {
+ maxcode = MAXCODE(n_bits = INIT_BITS);
+ clear_flg = 0;
+ }
+ if ( zs->avail_in < (unsigned int)n_bits && in_count > (long)n_bits ) {
+ memcpy (buf, zs->next_in, zs->avail_in);
+ buf_len = zs->avail_in;
+ zs->avail_in = 0;
+ return -1;
+ }
+ if (buf_len) {
+ memcpy (gbuf, buf, buf_len);
+ memcpy (gbuf + buf_len, zs->next_in,
+ n_bits - buf_len);
+ zs->next_in += n_bits - buf_len;
+ zs->avail_in -= n_bits - buf_len;
+ buf_len = 0;
+ zs->total_in += n_bits;
+ size = n_bits;
+ in_count -= n_bits;
+ } else {
+ if (in_count > n_bits) {
+ memcpy (gbuf, zs->next_in, n_bits);
+ zs->next_in += n_bits;
+ zs->avail_in -= n_bits;
+ zs->total_in += n_bits;
+ size = n_bits;
+ in_count -= n_bits;
+ } else {
+ memcpy (gbuf, zs->next_in, in_count);
+ zs->next_in += in_count;
+ zs->avail_in -= in_count;
+ zs->total_in += in_count;
+ size = in_count;
+ in_count = 0;
+ }
+ }
+ roffset = 0;
+ /* Round size down to integral number of codes. */
+ size = (size << 3) - (n_bits - 1);
+ }
+ r_off = roffset;
+ bits = n_bits;
+
+ /* Get to the first byte. */
+ bp += (r_off >> 3);
+ r_off &= 7;
+
+ /* Get first part (low order bits). */
+ gcode = (*bp++ >> r_off);
+ bits -= (8 - r_off);
+ r_off = 8 - r_off; /* Now, roffset into gcode word. */
+
+ /* Get any 8 bit parts in the middle (<=1 for up to 16 bits). */
+ if (bits >= 8) {
+ gcode |= *bp++ << r_off;
+ r_off += 8;
+ bits -= 8;
+ }
+
+ /* High order bits. */
+ gcode |= (*bp & rmask[bits]) << r_off;
+ roffset += n_bits;
+
+ return (gcode);
+}
+
+static void
+zinit(s_zstate_t *zs)
+{
+ memset(zs, 0, sizeof (s_zstate_t));
+
+ maxbits = BITS; /* User settable max # bits/code. */
+ maxmaxcode = 1 << maxbits; /* Should NEVER generate this code. */
+ hsize = HSIZE; /* For dynamic table sizing. */
+ free_ent = 0; /* First unused entry. */
+ block_compress = BLOCK_MASK;
+ clear_flg = 0;
+ state = S_START;
+ roffset = 0;
+ size = 0;
+}
diff --git a/extras/freetype2/src/lzw/zopen.h b/extras/freetype2/src/lzw/zopen.h
new file mode 100644
index 000000000..483b47e5c
--- /dev/null
+++ b/extras/freetype2/src/lzw/zopen.h
@@ -0,0 +1,114 @@
+/* $NetBSD: zopen.c,v 1.8 2003/08/07 11:13:29 agc Exp $ */
+
+/*-
+ * Copyright (c) 1985, 1986, 1992, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Diomidis Spinellis and James A. Woods, derived from original
+ * work by Spencer Thomas and Joseph Orost.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*-
+ *
+ * Copyright (c) 2004
+ * Albert Chin-A-Young.
+ *
+ * Modified to work with FreeType's PCF driver.
+ *
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+#if 0
+static char sccsid[] = "@(#)zopen.c 8.1 (Berkeley) 6/27/93";
+#else
+static char rcsid[] = "$NetBSD: zopen.c,v 1.8 2003/08/07 11:13:29 agc Exp $";
+#endif
+#endif /* LIBC_SCCS and not lint */
+
+#include <stdio.h>
+
+#define BITS 16 /* Default bits. */
+#define HSIZE 69001 /* 95% occupancy */
+
+/* A code_int must be able to hold 2**BITS values of type int, and also -1. */
+typedef long code_int;
+typedef long count_int;
+
+typedef unsigned char char_type;
+
+typedef enum {
+ S_START, S_MIDDLE, S_EOF
+} zs_enum;
+
+typedef struct {
+ unsigned char *next_in;
+ unsigned int avail_in;
+ unsigned long total_in;
+
+ unsigned char *next_out;
+ unsigned int avail_out;
+ unsigned long total_out;
+
+ zs_enum zs_state; /* State of computation */
+ int zs_n_bits; /* Number of bits/code. */
+ int zs_maxbits; /* User settable max # bits/code. */
+ code_int zs_maxcode; /* Maximum code, given n_bits. */
+ code_int zs_maxmaxcode; /* Should NEVER generate this code. */
+ count_int zs_htab [HSIZE];
+ unsigned short zs_codetab [HSIZE];
+ code_int zs_hsize; /* For dynamic table sizing. */
+ code_int zs_free_ent; /* First unused entry. */
+ /*
+ * Block compression parameters -- after all codes are used up,
+ * and compression rate changes, start over.
+ */
+ int zs_block_compress;
+ int zs_clear_flg;
+ int zs_offset;
+ long zs_in_count; /* Remaining uncompressed bytes. */
+ char_type zs_buf_len;
+ char_type zs_buf[BITS]; /* Temporary buffer if we need
+ to read more to accumulate
+ n_bits. */
+ union {
+ struct {
+ char_type *zs_stackp;
+ int zs_finchar;
+ code_int zs_code, zs_oldcode, zs_incode;
+ int zs_roffset, zs_size;
+ char_type zs_gbuf[BITS];
+ } r; /* Read parameters */
+ } u;
+} s_zstate_t;
+
+static code_int getcode(s_zstate_t *);
+#if 0
+static int zclose(s_zstate_t *);
+#endif
+static void zinit(s_zstate_t *);
+static int zread(s_zstate_t *);
diff --git a/extras/freetype2/src/otlayout/otlgsub.c b/extras/freetype2/src/otlayout/otlgsub.c
index 817760a7c..13a8eae98 100644
--- a/extras/freetype2/src/otlayout/otlgsub.c
+++ b/extras/freetype2/src/otlayout/otlgsub.c
@@ -87,7 +87,7 @@
OTL_Int index;
OTL_Bool subst = 0;
- if ( parser->context_len != 0xFFFF && parser->context_len < 1 )
+ if ( parser->context_len != 0xFFFFU && parser->context_len < 1 )
goto Exit;
gindex = otl_parser_get_gindex( parser );
@@ -107,7 +107,7 @@
{
OTL_Int delta = OTL_NEXT_SHORT(p);
- gindex = ( gindex + delta ) & 0xFFFF;
+ gindex = ( gindex + delta ) & 0xFFFFU;
otl_parser_replace_1( parser, gindex );
subst = 1;
}
@@ -223,7 +223,7 @@
OTL_Int index;
OTL_Bool subst = 0;
- if ( context_len != 0xFFFF && context_len < 1 )
+ if ( context_len != 0xFFFFU && context_len < 1 )
goto Exit;
gindex = otl_parser_get_gindex( parser );
@@ -341,7 +341,7 @@
OTL_GSUB_Alternate alternate = parser->alternate;
- if ( context_len != 0xFFFF && context_len < 1 )
+ if ( context_len != 0xFFFFU && context_len < 1 )
goto Exit;
if ( alternate == NULL )
diff --git a/extras/freetype2/src/pcf/Jamfile b/extras/freetype2/src/pcf/Jamfile
index fd7762585..3a884f534 100644
--- a/extras/freetype2/src/pcf/Jamfile
+++ b/extras/freetype2/src/pcf/Jamfile
@@ -1,4 +1,4 @@
-# FreeType 2 src/pcf Jamfile (c) 2001 David Turner
+# FreeType 2 src/pcf Jamfile (c) 2001, 2003 David Turner
#
SubDir FT2_TOP $(FT2_SRC_DIR) pcf ;
@@ -8,7 +8,7 @@ SubDir FT2_TOP $(FT2_SRC_DIR) pcf ;
if $(FT2_MULTI)
{
- _sources = pcfdriver pcfread pcfutil ;
+ _sources = pcfdrivr pcfread pcfutil ;
}
else
{
diff --git a/extras/freetype2/src/pcf/pcf.c b/extras/freetype2/src/pcf/pcf.c
index 315655e56..11d5b7b2a 100644
--- a/extras/freetype2/src/pcf/pcf.c
+++ b/extras/freetype2/src/pcf/pcf.c
@@ -2,7 +2,7 @@
FreeType font driver for pcf fonts
- Copyright 2000-2001 by
+ Copyright 2000-2001, 2003 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -31,6 +31,6 @@ THE SOFTWARE.
#include <ft2build.h>
#include "pcfutil.c"
#include "pcfread.c"
-#include "pcfdriver.c"
+#include "pcfdrivr.c"
/* END */
diff --git a/extras/freetype2/src/pcf/pcf.h b/extras/freetype2/src/pcf/pcf.h
index 1b7b585ef..64acefc4e 100644
--- a/extras/freetype2/src/pcf/pcf.h
+++ b/extras/freetype2/src/pcf/pcf.h
@@ -2,7 +2,7 @@
FreeType font driver for pcf fonts
- Copyright (C) 2000-2001, 2002 by
+ Copyright (C) 2000, 2001, 2002, 2003 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -124,10 +124,10 @@ FT_BEGIN_HEADER
} PCF_AccelRec, *PCF_Accel;
- typedef struct PCD_EncodingRec_
+ typedef struct PCF_EncodingRec_
{
- FT_Long enc;
- FT_Short glyph;
+ FT_Long enc;
+ FT_UShort glyph;
} PCF_EncodingRec, *PCF_Encoding;
diff --git a/extras/freetype2/src/pcf/pcfdrivr.c b/extras/freetype2/src/pcf/pcfdrivr.c
new file mode 100644
index 000000000..80f043f9e
--- /dev/null
+++ b/extras/freetype2/src/pcf/pcfdrivr.c
@@ -0,0 +1,621 @@
+/* pcfdrivr.c
+
+ FreeType font driver for pcf files
+
+ Copyright (C) 2000, 2001, 2002, 2003, 2004 by
+ Francesco Zappa Nardelli
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+
+#include <ft2build.h>
+
+#include FT_INTERNAL_DEBUG_H
+#include FT_INTERNAL_STREAM_H
+#include FT_INTERNAL_OBJECTS_H
+#include FT_GZIP_H
+#include FT_LZW_H
+#include FT_ERRORS_H
+#include FT_BDF_H
+
+#include "pcf.h"
+#include "pcfdrivr.h"
+#include "pcfread.h"
+
+#include "pcferror.h"
+
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_pcfread
+
+#include FT_SERVICE_BDF_H
+#include FT_SERVICE_XFREE86_NAME_H
+
+ typedef struct PCF_CMapRec_
+ {
+ FT_CMapRec cmap;
+ FT_UInt num_encodings;
+ PCF_Encoding encodings;
+
+ } PCF_CMapRec, *PCF_CMap;
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ pcf_cmap_init( PCF_CMap cmap )
+ {
+ PCF_Face face = (PCF_Face)FT_CMAP_FACE( cmap );
+
+
+ cmap->num_encodings = (FT_UInt)face->nencodings;
+ cmap->encodings = face->encodings;
+
+ return PCF_Err_Ok;
+ }
+
+
+ FT_CALLBACK_DEF( void )
+ pcf_cmap_done( PCF_CMap cmap )
+ {
+ cmap->encodings = NULL;
+ cmap->num_encodings = 0;
+ }
+
+
+ FT_CALLBACK_DEF( FT_UInt )
+ pcf_cmap_char_index( PCF_CMap cmap,
+ FT_UInt32 charcode )
+ {
+ PCF_Encoding encodings = cmap->encodings;
+ FT_UInt min, max, mid;
+ FT_UInt result = 0;
+
+
+ min = 0;
+ max = cmap->num_encodings;
+
+ while ( min < max )
+ {
+ FT_UInt32 code;
+
+
+ mid = ( min + max ) >> 1;
+ code = encodings[mid].enc;
+
+ if ( charcode == code )
+ {
+ result = encodings[mid].glyph + 1;
+ break;
+ }
+
+ if ( charcode < code )
+ max = mid;
+ else
+ min = mid + 1;
+ }
+
+ return result;
+ }
+
+
+ FT_CALLBACK_DEF( FT_UInt )
+ pcf_cmap_char_next( PCF_CMap cmap,
+ FT_UInt32 *acharcode )
+ {
+ PCF_Encoding encodings = cmap->encodings;
+ FT_UInt min, max, mid;
+ FT_UInt32 charcode = *acharcode + 1;
+ FT_UInt result = 0;
+
+
+ min = 0;
+ max = cmap->num_encodings;
+
+ while ( min < max )
+ {
+ FT_UInt32 code;
+
+
+ mid = ( min + max ) >> 1;
+ code = encodings[mid].enc;
+
+ if ( charcode == code )
+ {
+ result = encodings[mid].glyph + 1;
+ goto Exit;
+ }
+
+ if ( charcode < code )
+ max = mid;
+ else
+ min = mid + 1;
+ }
+
+ charcode = 0;
+ if ( min < cmap->num_encodings )
+ {
+ charcode = encodings[min].enc;
+ result = encodings[min].glyph + 1;
+ }
+
+ Exit:
+ *acharcode = charcode;
+ return result;
+ }
+
+
+ FT_CALLBACK_TABLE_DEF const FT_CMap_ClassRec pcf_cmap_class =
+ {
+ sizeof( PCF_CMapRec ),
+ (FT_CMap_InitFunc) pcf_cmap_init,
+ (FT_CMap_DoneFunc) pcf_cmap_done,
+ (FT_CMap_CharIndexFunc)pcf_cmap_char_index,
+ (FT_CMap_CharNextFunc) pcf_cmap_char_next
+ };
+
+
+ /*************************************************************************/
+ /* */
+ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */
+ /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */
+ /* messages during execution. */
+ /* */
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_pcfdriver
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ PCF_Face_Done( PCF_Face face )
+ {
+ FT_Memory memory = FT_FACE_MEMORY( face );
+
+
+ FT_FREE( face->encodings );
+ FT_FREE( face->metrics );
+
+ /* free properties */
+ {
+ PCF_Property prop = face->properties;
+ FT_Int i;
+
+
+ for ( i = 0; i < face->nprops; i++ )
+ {
+ prop = &face->properties[i];
+
+ FT_FREE( prop->name );
+ if ( prop->isString )
+ FT_FREE( prop->value );
+ }
+
+ FT_FREE( face->properties );
+ }
+
+ FT_FREE( face->toc.tables );
+ FT_FREE( face->root.family_name );
+ FT_FREE( face->root.available_sizes );
+ FT_FREE( face->charset_encoding );
+ FT_FREE( face->charset_registry );
+
+ FT_TRACE4(( "PCF_Face_Done: done face\n" ));
+
+ /* close gzip/LZW stream if any */
+ if ( face->root.stream == &face->gzip_stream )
+ {
+ FT_Stream_Close( &face->gzip_stream );
+ face->root.stream = face->gzip_source;
+ }
+
+ return PCF_Err_Ok;
+ }
+
+
+ FT_CALLBACK_DEF( FT_Error )
+ PCF_Face_Init( FT_Stream stream,
+ PCF_Face face,
+ FT_Int face_index,
+ FT_Int num_params,
+ FT_Parameter* params )
+ {
+ FT_Error error = PCF_Err_Ok;
+
+ FT_UNUSED( num_params );
+ FT_UNUSED( params );
+ FT_UNUSED( face_index );
+
+
+ error = pcf_load_font( stream, face );
+ if ( error )
+ {
+ FT_Error error2;
+
+
+ /* this didn't work, try gzip support! */
+ error2 = FT_Stream_OpenGzip( &face->gzip_stream, stream );
+ if ( FT_ERROR_BASE( error2 ) == FT_Err_Unimplemented_Feature )
+ goto Fail;
+
+ error = error2;
+ if ( error )
+ {
+ FT_Error error3;
+
+
+ /* this didn't work, try LZW support! */
+ error3 = FT_Stream_OpenLZW( &face->gzip_stream, stream );
+ if ( FT_ERROR_BASE( error3 ) == FT_Err_Unimplemented_Feature )
+ goto Fail;
+
+ error = error3;
+ if ( error )
+ goto Fail;
+
+ face->gzip_source = stream;
+ face->root.stream = &face->gzip_stream;
+
+ stream = face->root.stream;
+
+ error = pcf_load_font( stream, face );
+ if ( error )
+ goto Fail;
+ }
+ else
+ {
+ face->gzip_source = stream;
+ face->root.stream = &face->gzip_stream;
+
+ stream = face->root.stream;
+
+ error = pcf_load_font( stream, face );
+ if ( error )
+ goto Fail;
+ }
+ }
+
+ /* set-up charmap */
+ {
+ FT_String *charset_registry, *charset_encoding;
+ FT_Bool unicode_charmap = 0;
+
+
+ charset_registry = face->charset_registry;
+ charset_encoding = face->charset_encoding;
+
+ if ( ( charset_registry != NULL ) &&
+ ( charset_encoding != NULL ) )
+ {
+ char* s = face->charset_registry;
+
+
+ /* Uh, oh, compare first letters manually to avoid dependency
+ on locales. */
+ if ( ( s[0] == 'i' || s[0] == 'I' ) &&
+ ( s[1] == 's' || s[1] == 'S' ) &&
+ ( s[2] == 'o' || s[2] == 'O' ) )
+ {
+ s += 3;
+ if ( !ft_strcmp( s, "10646" ) ||
+ ( !ft_strcmp( s, "8859" ) &&
+ !ft_strcmp( face->charset_encoding, "1" ) ) )
+ unicode_charmap = 1;
+ }
+ }
+
+ {
+ FT_CharMapRec charmap;
+
+
+ charmap.face = FT_FACE( face );
+ charmap.encoding = FT_ENCODING_NONE;
+ charmap.platform_id = 0;
+ charmap.encoding_id = 0;
+
+ if ( unicode_charmap )
+ {
+ charmap.encoding = FT_ENCODING_UNICODE;
+ charmap.platform_id = 3;
+ charmap.encoding_id = 1;
+ }
+
+ error = FT_CMap_New( &pcf_cmap_class, NULL, &charmap, NULL );
+
+#if 0
+ /* Select default charmap */
+ if (face->root.num_charmaps)
+ face->root.charmap = face->root.charmaps[0];
+#endif
+ }
+ }
+
+ Exit:
+ return error;
+
+ Fail:
+ FT_TRACE2(( "[not a valid PCF file]\n" ));
+ error = PCF_Err_Unknown_File_Format; /* error */
+ goto Exit;
+ }
+
+
+ static FT_Error
+ PCF_Set_Pixel_Size( FT_Size size )
+ {
+ PCF_Face face = (PCF_Face)FT_SIZE_FACE( size );
+
+
+ FT_TRACE4(( "rec %d - pres %d\n", size->metrics.y_ppem,
+ face->root.available_sizes->y_ppem >> 6 ));
+
+ if ( size->metrics.y_ppem == face->root.available_sizes->y_ppem >> 6 )
+ {
+ size->metrics.ascender = face->accel.fontAscent << 6;
+ size->metrics.descender = face->accel.fontDescent * (-64);
+#if 0
+ size->metrics.height = face->accel.maxbounds.ascent << 6;
+#endif
+ size->metrics.height = size->metrics.ascender -
+ size->metrics.descender;
+
+ size->metrics.max_advance = face->accel.maxbounds.characterWidth << 6;
+
+ return PCF_Err_Ok;
+ }
+ else
+ {
+ FT_TRACE4(( "size WRONG\n" ));
+ return PCF_Err_Invalid_Pixel_Size;
+ }
+ }
+
+
+ static FT_Error
+ PCF_Glyph_Load( FT_GlyphSlot slot,
+ FT_Size size,
+ FT_UInt glyph_index,
+ FT_Int32 load_flags )
+ {
+ PCF_Face face = (PCF_Face)FT_SIZE_FACE( size );
+ FT_Stream stream = face->root.stream;
+ FT_Error error = PCF_Err_Ok;
+ FT_Bitmap* bitmap = &slot->bitmap;
+ PCF_Metric metric;
+ int bytes;
+
+ FT_UNUSED( load_flags );
+
+
+ FT_TRACE4(( "load_glyph %d ---", glyph_index ));
+
+ if ( !face )
+ {
+ error = PCF_Err_Invalid_Argument;
+ goto Exit;
+ }
+
+ if ( glyph_index > 0 )
+ glyph_index--;
+
+ metric = face->metrics + glyph_index;
+
+ bitmap->rows = metric->ascent + metric->descent;
+ bitmap->width = metric->rightSideBearing - metric->leftSideBearing;
+ bitmap->num_grays = 1;
+ bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
+
+ FT_TRACE6(( "BIT_ORDER %d ; BYTE_ORDER %d ; GLYPH_PAD %d\n",
+ PCF_BIT_ORDER( face->bitmapsFormat ),
+ PCF_BYTE_ORDER( face->bitmapsFormat ),
+ PCF_GLYPH_PAD( face->bitmapsFormat ) ));
+
+ switch ( PCF_GLYPH_PAD( face->bitmapsFormat ) )
+ {
+ case 1:
+ bitmap->pitch = ( bitmap->width + 7 ) >> 3;
+ break;
+
+ case 2:
+ bitmap->pitch = ( ( bitmap->width + 15 ) >> 4 ) << 1;
+ break;
+
+ case 4:
+ bitmap->pitch = ( ( bitmap->width + 31 ) >> 5 ) << 2;
+ break;
+
+ case 8:
+ bitmap->pitch = ( ( bitmap->width + 63 ) >> 6 ) << 3;
+ break;
+
+ default:
+ return PCF_Err_Invalid_File_Format;
+ }
+
+ /* XXX: to do: are there cases that need repadding the bitmap? */
+ bytes = bitmap->pitch * bitmap->rows;
+
+ error = ft_glyphslot_alloc_bitmap( slot, bytes );
+ if ( error )
+ goto Exit;
+
+ if ( FT_STREAM_SEEK( metric->bits ) ||
+ FT_STREAM_READ( bitmap->buffer, bytes ) )
+ goto Exit;
+
+ if ( PCF_BIT_ORDER( face->bitmapsFormat ) != MSBFirst )
+ BitOrderInvert( bitmap->buffer, bytes );
+
+ if ( ( PCF_BYTE_ORDER( face->bitmapsFormat ) !=
+ PCF_BIT_ORDER( face->bitmapsFormat ) ) )
+ {
+ switch ( PCF_SCAN_UNIT( face->bitmapsFormat ) )
+ {
+ case 1:
+ break;
+
+ case 2:
+ TwoByteSwap( bitmap->buffer, bytes );
+ break;
+
+ case 4:
+ FourByteSwap( bitmap->buffer, bytes );
+ break;
+ }
+ }
+
+ slot->bitmap_left = metric->leftSideBearing;
+ slot->bitmap_top = metric->ascent;
+
+ slot->metrics.horiAdvance = metric->characterWidth << 6;
+ slot->metrics.horiBearingX = metric->leftSideBearing << 6;
+ slot->metrics.horiBearingY = metric->ascent << 6;
+ slot->metrics.width = ( metric->rightSideBearing -
+ metric->leftSideBearing ) << 6;
+ slot->metrics.height = bitmap->rows << 6;
+
+ slot->linearHoriAdvance = (FT_Fixed)bitmap->width << 16;
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
+
+ FT_TRACE4(( " --- ok\n" ));
+
+ Exit:
+ return error;
+ }
+
+
+ /*
+ *
+ * BDF SERVICE
+ *
+ */
+
+ static FT_Error
+ pcf_get_bdf_property( PCF_Face face,
+ const char* prop_name,
+ BDF_PropertyRec *aproperty )
+ {
+ PCF_Property prop;
+
+
+ prop = pcf_find_property( face, prop_name );
+ if ( prop != NULL )
+ {
+ if ( prop->isString )
+ {
+ aproperty->type = BDF_PROPERTY_TYPE_ATOM;
+ aproperty->u.atom = prop->value.atom;
+ }
+ else
+ {
+ /* Apparently, the PCF driver loads all properties as signed integers!
+ * This really doesn't seem to be a problem, because this is
+ * sufficient for any meaningful values.
+ */
+ aproperty->type = BDF_PROPERTY_TYPE_INTEGER;
+ aproperty->u.integer = prop->value.integer;
+ }
+ return 0;
+ }
+
+ return PCF_Err_Invalid_Argument;
+ }
+
+
+ static FT_Error
+ pcf_get_charset_id( PCF_Face face,
+ const char* *acharset_encoding,
+ const char* *acharset_registry )
+ {
+ *acharset_encoding = face->charset_encoding;
+ *acharset_registry = face->charset_registry;
+
+ return 0;
+ }
+
+
+ static const FT_Service_BDFRec pcf_service_bdf =
+ {
+ (FT_BDF_GetCharsetIdFunc)pcf_get_charset_id,
+ (FT_BDF_GetPropertyFunc) pcf_get_bdf_property
+ };
+
+
+ /*
+ *
+ * SERVICE LIST
+ *
+ */
+
+ static const FT_ServiceDescRec pcf_services[] =
+ {
+ { FT_SERVICE_ID_BDF, &pcf_service_bdf },
+ { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_PCF },
+ { NULL, NULL }
+ };
+
+
+ static FT_Module_Interface
+ pcf_driver_requester( FT_Module module,
+ const char* name )
+ {
+ FT_UNUSED( module );
+
+ return ft_service_list_lookup( pcf_services, name );
+ }
+
+
+ FT_CALLBACK_TABLE_DEF
+ const FT_Driver_ClassRec pcf_driver_class =
+ {
+ {
+ FT_MODULE_FONT_DRIVER |
+ FT_MODULE_DRIVER_NO_OUTLINES,
+ sizeof ( FT_DriverRec ),
+
+ "pcf",
+ 0x10000L,
+ 0x20000L,
+
+ 0,
+
+ (FT_Module_Constructor)0,
+ (FT_Module_Destructor) 0,
+ (FT_Module_Requester) pcf_driver_requester
+ },
+
+ sizeof( PCF_FaceRec ),
+ sizeof( FT_SizeRec ),
+ sizeof( FT_GlyphSlotRec ),
+
+ (FT_Face_InitFunc) PCF_Face_Init,
+ (FT_Face_DoneFunc) PCF_Face_Done,
+ (FT_Size_InitFunc) 0,
+ (FT_Size_DoneFunc) 0,
+ (FT_Slot_InitFunc) 0,
+ (FT_Slot_DoneFunc) 0,
+
+ (FT_Size_ResetPointsFunc) PCF_Set_Pixel_Size,
+ (FT_Size_ResetPixelsFunc) PCF_Set_Pixel_Size,
+
+ (FT_Slot_LoadFunc) PCF_Glyph_Load,
+
+ (FT_Face_GetKerningFunc) 0,
+ (FT_Face_AttachFunc) 0,
+ (FT_Face_GetAdvancesFunc) 0
+ };
+
+
+/* END */
diff --git a/extras/freetype2/src/pcf/pcfdrivr.h b/extras/freetype2/src/pcf/pcfdrivr.h
new file mode 100644
index 000000000..7ddf697e1
--- /dev/null
+++ b/extras/freetype2/src/pcf/pcfdrivr.h
@@ -0,0 +1,44 @@
+/* pcfdrivr.h
+
+ FreeType font driver for pcf fonts
+
+ Copyright 2000-2001, 2002 by
+ Francesco Zappa Nardelli
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+
+#ifndef __PCFDRIVR_H__
+#define __PCFDRIVR_H__
+
+#include <ft2build.h>
+#include FT_INTERNAL_DRIVER_H
+
+FT_BEGIN_HEADER
+
+ FT_EXPORT_VAR( const FT_Driver_ClassRec ) pcf_driver_class;
+
+FT_END_HEADER
+
+
+#endif /* __PCFDRIVR_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/src/pcf/pcfread.c b/extras/freetype2/src/pcf/pcfread.c
index e3bbf0606..3beabbfb2 100644
--- a/extras/freetype2/src/pcf/pcfread.c
+++ b/extras/freetype2/src/pcf/pcfread.c
@@ -2,7 +2,7 @@
FreeType font driver for pcf fonts
- Copyright 2000-2001, 2002 by
+ Copyright 2000, 2001, 2002, 2003, 2004 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -32,7 +32,7 @@ THE SOFTWARE.
#include FT_INTERNAL_OBJECTS_H
#include "pcf.h"
-#include "pcfdriver.h"
+#include "pcfdrivr.h"
#include "pcfread.h"
#include "pcferror.h"
@@ -49,7 +49,7 @@ THE SOFTWARE.
#if defined( FT_DEBUG_LEVEL_TRACE )
- static const char* tableNames[] =
+ static const char* const tableNames[] =
{
"prop", "accl", "mtrcs", "bmps", "imtrcs",
"enc", "swidth", "names", "accel"
@@ -250,18 +250,22 @@ THE SOFTWARE.
FT_ULong *aformat,
FT_ULong *asize )
{
- FT_Error error = 0;
+ FT_Error error = PCF_Err_Invalid_File_Format;
FT_Int i;
for ( i = 0; i < ntables; i++ )
if ( tables[i].type == type )
{
- if ( stream->pos > tables[i].offset )
- return PCF_Err_Invalid_Stream_Skip;
+ if ( stream->pos > tables[i].offset ) {
+ error = PCF_Err_Invalid_Stream_Skip;
+ goto Fail;
+ }
- if ( FT_STREAM_SKIP( tables[i].offset - stream->pos ) )
- return PCF_Err_Invalid_Stream_Skip;
+ if ( FT_STREAM_SKIP( tables[i].offset - stream->pos ) ) {
+ error = PCF_Err_Invalid_Stream_Skip;
+ goto Fail;
+ }
*asize = tables[i].size; /* unused - to be removed */
*aformat = tables[i].format;
@@ -269,7 +273,8 @@ THE SOFTWARE.
return PCF_Err_Ok;
}
- return PCF_Err_Invalid_File_Format;
+ Fail:
+ return error;
}
@@ -857,6 +862,116 @@ THE SOFTWARE.
}
+ static FT_Error
+ pcf_interpret_style( PCF_Face pcf )
+ {
+ FT_Error error = PCF_Err_Ok;
+ FT_Face face = FT_FACE( pcf );
+ FT_Memory memory = face->memory;
+
+ PCF_Property prop;
+
+ char *istr = NULL, *bstr = NULL;
+ char *sstr = NULL, *astr = NULL;
+
+ int parts = 0, len = 0;
+
+
+ face->style_flags = 0;
+
+ prop = pcf_find_property( pcf, "SLANT" );
+ if ( prop && prop->isString &&
+ ( *(prop->value.atom) == 'O' || *(prop->value.atom) == 'o' ||
+ *(prop->value.atom) == 'I' || *(prop->value.atom) == 'i' ) )
+ {
+ face->style_flags |= FT_STYLE_FLAG_ITALIC;
+ istr = ( *(prop->value.atom) == 'O' || *(prop->value.atom) == 'o' )
+ ? (char *)"Oblique"
+ : (char *)"Italic";
+ len += ft_strlen( istr );
+ parts++;
+ }
+
+ prop = pcf_find_property( pcf, "WEIGHT_NAME" );
+ if ( prop && prop->isString &&
+ ( *(prop->value.atom) == 'B' || *(prop->value.atom) == 'b' ) )
+ {
+ face->style_flags |= FT_STYLE_FLAG_BOLD;
+ bstr = (char *)"Bold";
+ len += ft_strlen( bstr );
+ parts++;
+ }
+
+ prop = pcf_find_property( pcf, "SETWIDTH_NAME" );
+ if ( prop && prop->isString &&
+ *(prop->value.atom) &&
+ !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )
+ {
+ sstr = (char *)(prop->value.atom);
+ len += ft_strlen( sstr );
+ parts++;
+ }
+
+ prop = pcf_find_property( pcf, "ADD_STYLE_NAME" );
+ if ( prop && prop->isString &&
+ *(prop->value.atom) &&
+ !( *(prop->value.atom) == 'N' || *(prop->value.atom) == 'n' ) )
+ {
+ astr = (char *)(prop->value.atom);
+ len += ft_strlen( astr );
+ parts++;
+ }
+
+ if ( !parts || !len )
+ face->style_name = (char *)"Regular";
+ else
+ {
+ char *style, *s;
+ unsigned int i;
+
+
+ if ( FT_ALLOC( style, len + parts ) )
+ return error;
+
+ s = style;
+
+ if ( astr )
+ {
+ ft_strcpy( s, astr );
+ for ( i = 0; i < ft_strlen( astr ); i++, s++ )
+ if ( *s == ' ' )
+ *s = '-'; /* replace spaces with dashes */
+ *(s++) = ' ';
+ }
+ if ( bstr )
+ {
+ ft_strcpy( s, bstr );
+ s += ft_strlen( bstr );
+ *(s++) = ' ';
+ }
+ if ( istr )
+ {
+ ft_strcpy( s, istr );
+ s += ft_strlen( istr );
+ *(s++) = ' ';
+ }
+ if ( sstr )
+ {
+ ft_strcpy( s, sstr );
+ for ( i = 0; i < ft_strlen( sstr ); i++, s++ )
+ if ( *s == ' ' )
+ *s = '-'; /* replace spaces with dashes */
+ *(s++) = ' ';
+ }
+ *(--s) = '\0'; /* overwrite last ' ', terminate the string */
+
+ face->style_name = style; /* allocated string */
+ }
+
+ return error;
+ }
+
+
FT_LOCAL_DEF( FT_Error )
pcf_load_font( FT_Stream stream,
PCF_Face face )
@@ -914,10 +1029,9 @@ THE SOFTWARE.
{
FT_Face root = FT_FACE( face );
PCF_Property prop;
- int size_set = 0;
- root->num_faces = 1;
+ root->num_faces = 1;
root->face_index = 0;
root->face_flags = FT_FACE_FLAG_FIXED_SIZES |
FT_FACE_FLAG_HORIZONTAL |
@@ -926,95 +1040,80 @@ THE SOFTWARE.
if ( face->accel.constantWidth )
root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
- root->style_flags = 0;
- prop = pcf_find_property( face, "SLANT" );
- if ( prop != NULL )
- if ( prop->isString )
- if ( ( *(prop->value.atom) == 'O' ) ||
- ( *(prop->value.atom) == 'I' ) )
- root->style_flags |= FT_STYLE_FLAG_ITALIC;
-
- prop = pcf_find_property( face, "WEIGHT_NAME" );
- if ( prop != NULL )
- if ( prop->isString )
- if ( *(prop->value.atom) == 'B' )
- root->style_flags |= FT_STYLE_FLAG_BOLD;
-
- root->style_name = (char *)"Regular";
-
- if ( root->style_flags & FT_STYLE_FLAG_BOLD ) {
- if ( root->style_flags & FT_STYLE_FLAG_ITALIC )
- root->style_name = (char *)"Bold Italic";
- else
- root->style_name = (char *)"Bold";
- }
- else if ( root->style_flags & FT_STYLE_FLAG_ITALIC )
- root->style_name = (char *)"Italic";
+ if ( ( error = pcf_interpret_style( face ) ) != 0 )
+ goto Exit;
prop = pcf_find_property( face, "FAMILY_NAME" );
- if ( prop != NULL )
+ if ( prop && prop->isString )
{
- if ( prop->isString )
- {
- int l = ft_strlen( prop->value.atom ) + 1;
+ int l = ft_strlen( prop->value.atom ) + 1;
- if ( FT_NEW_ARRAY( root->family_name, l ) )
- goto Exit;
- ft_strcpy( root->family_name, prop->value.atom );
- }
+ if ( FT_NEW_ARRAY( root->family_name, l ) )
+ goto Exit;
+ ft_strcpy( root->family_name, prop->value.atom );
}
else
- root->family_name = 0;
+ root->family_name = NULL;
- root->num_glyphs = face->nmetrics;
+ /* Note: We shift all glyph indices by +1 since we must
+ * respect the convention that glyph 0 always corresponds
+ * to the "missing glyph".
+ *
+ * This implies bumping the number of "available" glyphs by 1.
+ */
+ root->num_glyphs = face->nmetrics + 1;
root->num_fixed_sizes = 1;
if ( FT_NEW_ARRAY( root->available_sizes, 1 ) )
goto Exit;
- prop = pcf_find_property( face, "PIXEL_SIZE" );
- if ( prop != NULL )
{
- root->available_sizes->height =
- root->available_sizes->width = (FT_Short)( prop->value.integer );
+ FT_Bitmap_Size* bsize = root->available_sizes;
+ FT_Short resolution_x = 0, resolution_y = 0;
- size_set = 1;
- }
- else
- {
- prop = pcf_find_property( face, "POINT_SIZE" );
- if ( prop != NULL )
- {
- PCF_Property xres, yres, avgw;
+ FT_MEM_ZERO( bsize, sizeof ( FT_Bitmap_Size ) );
- xres = pcf_find_property( face, "RESOLUTION_X" );
- yres = pcf_find_property( face, "RESOLUTION_Y" );
- avgw = pcf_find_property( face, "AVERAGE_WIDTH" );
+ bsize->height = face->accel.fontAscent + face->accel.fontDescent;
- if ( ( yres != NULL ) && ( xres != NULL ) )
- {
- root->available_sizes->height =
- (FT_Short)( prop->value.integer *
- yres->value.integer / 720 );
+ prop = pcf_find_property( face, "AVERAGE_WIDTH" );
+ if ( prop )
+ bsize->width = (FT_Short)( ( prop->value.integer + 5 ) / 10 );
+ else
+ bsize->width = bsize->height * 2/3;
- root->available_sizes->width =
- (FT_Short)( prop->value.integer *
- xres->value.integer / 720 );
+ prop = pcf_find_property( face, "POINT_SIZE" );
+ if ( prop )
+ /* convert from 722.7 decipoints to 72 points per inch */
+ bsize->size =
+ (FT_Pos)( ( prop->value.integer * 64 * 7200 + 36135L ) / 72270L );
- size_set = 1;
- }
- }
- }
+ prop = pcf_find_property( face, "PIXEL_SIZE" );
+ if ( prop )
+ bsize->y_ppem = (FT_Short)prop->value.integer << 6;
- if (size_set == 0 )
- {
- root->available_sizes->width = 12;
- root->available_sizes->height = 12;
+ prop = pcf_find_property( face, "RESOLUTION_X" );
+ if ( prop )
+ resolution_x = (FT_Short)prop->value.integer;
+
+ prop = pcf_find_property( face, "RESOLUTION_Y" );
+ if ( prop )
+ resolution_y = (FT_Short)prop->value.integer;
+
+ if ( bsize->y_ppem == 0 )
+ {
+ bsize->y_ppem = bsize->size;
+ if ( resolution_y )
+ bsize->y_ppem = bsize->y_ppem * resolution_y / 72;
+ }
+ if ( resolution_x && resolution_y )
+ bsize->x_ppem = bsize->y_ppem * resolution_x / resolution_y;
+ else
+ bsize->x_ppem = bsize->y_ppem;
}
- /* set-up charset */
+ /* set up charset */
{
PCF_Property charset_registry = 0, charset_encoding = 0;
@@ -1022,23 +1121,19 @@ THE SOFTWARE.
charset_registry = pcf_find_property( face, "CHARSET_REGISTRY" );
charset_encoding = pcf_find_property( face, "CHARSET_ENCODING" );
- if ( ( charset_registry != NULL ) &&
- ( charset_encoding != NULL ) )
+ if ( charset_registry && charset_registry->isString &&
+ charset_encoding && charset_encoding->isString )
{
- if ( ( charset_registry->isString ) &&
- ( charset_encoding->isString ) )
- {
- if ( FT_NEW_ARRAY( face->charset_encoding,
- ft_strlen( charset_encoding->value.atom ) + 1 ) )
- goto Exit;
-
- if ( FT_NEW_ARRAY( face->charset_registry,
- ft_strlen( charset_registry->value.atom ) + 1 ) )
- goto Exit;
-
- ft_strcpy( face->charset_registry, charset_registry->value.atom );
- ft_strcpy( face->charset_encoding, charset_encoding->value.atom );
- }
+ if ( FT_NEW_ARRAY( face->charset_encoding,
+ ft_strlen( charset_encoding->value.atom ) + 1 ) )
+ goto Exit;
+
+ if ( FT_NEW_ARRAY( face->charset_registry,
+ ft_strlen( charset_registry->value.atom ) + 1 ) )
+ goto Exit;
+
+ ft_strcpy( face->charset_registry, charset_registry->value.atom );
+ ft_strcpy( face->charset_encoding, charset_encoding->value.atom );
}
}
}
diff --git a/extras/freetype2/src/pcf/pcfread.h b/extras/freetype2/src/pcf/pcfread.h
index 5f54ba6eb..c9524f134 100644
--- a/extras/freetype2/src/pcf/pcfread.h
+++ b/extras/freetype2/src/pcf/pcfread.h
@@ -2,7 +2,7 @@
FreeType font driver for pcf fonts
- Copyright 2000-2001 by
+ Copyright 2003 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -39,7 +39,7 @@ FT_BEGIN_HEADER
FT_END_HEADER
-#endif /* __PCFUTIL_H__ */
+#endif /* __PCFREAD_H__ */
/* END */
diff --git a/extras/freetype2/src/pcf/pcfutil.c b/extras/freetype2/src/pcf/pcfutil.c
index eb911bbd2..ddaca35fd 100644
--- a/extras/freetype2/src/pcf/pcfutil.c
+++ b/extras/freetype2/src/pcf/pcfutil.c
@@ -25,6 +25,8 @@ in this Software without prior written authorization from The Open Group.
* Author: Keith Packard, MIT X Consortium
*/
+/* Modified for use with FreeType */
+
#include <ft2build.h>
#include "pcfutil.h"
@@ -72,7 +74,7 @@ in this Software without prior written authorization from The Open Group.
* Invert bit order within each BYTE of an array.
*/
- void
+ static void
BitOrderInvert( unsigned char* buf,
int nbytes )
{
@@ -88,7 +90,7 @@ in this Software without prior written authorization from The Open Group.
* Invert byte order within each 16-bits of an array.
*/
- void
+ static void
TwoByteSwap( unsigned char* buf,
int nbytes )
{
@@ -107,7 +109,7 @@ in this Software without prior written authorization from The Open Group.
* Invert byte order within each 32-bits of an array.
*/
- void
+ static void
FourByteSwap( unsigned char* buf,
int nbytes )
{
@@ -127,89 +129,4 @@ in this Software without prior written authorization from The Open Group.
}
- /*
- * Repad a bitmap.
- */
-
- int
- RepadBitmap( char* pSrc,
- char* pDst,
- unsigned int srcPad,
- unsigned int dstPad,
- int width,
- int height )
- {
- int srcWidthBytes, dstWidthBytes;
- int row, col;
- char *pTmpSrc, *pTmpDst;
-
-
- switch ( srcPad )
- {
- case 1:
- srcWidthBytes = ( width + 7 ) >> 3;
- break;
-
- case 2:
- srcWidthBytes = ( ( width + 15 ) >> 4 ) << 1;
- break;
-
- case 4:
- srcWidthBytes = ( ( width + 31 ) >> 5 ) << 2;
- break;
-
- case 8:
- srcWidthBytes = ( ( width + 63 ) >> 6 ) << 3;
- break;
-
- default:
- return 0;
- }
-
- switch ( dstPad )
- {
- case 1:
- dstWidthBytes = ( width + 7 ) >> 3;
- break;
-
- case 2:
- dstWidthBytes = ( ( width + 15 ) >> 4 ) << 1;
- break;
-
- case 4:
- dstWidthBytes = ( ( width + 31 ) >> 5 ) << 2;
- break;
-
- case 8:
- dstWidthBytes = ( ( width + 63 ) >> 6 ) << 3;
- break;
-
- default:
- return 0;
- }
-
- width = srcWidthBytes;
- if ( width > dstWidthBytes )
- width = dstWidthBytes;
-
- pTmpSrc= pSrc;
- pTmpDst= pDst;
-
- for ( row = 0; row < height; row++ )
- {
- for ( col = 0; col < width; col++ )
- *pTmpDst++ = *pTmpSrc++;
-
- while ( col < dstWidthBytes )
- {
- *pTmpDst++ = '\0';
- col++;
- }
- pTmpSrc += srcWidthBytes - width;
- }
-
- return dstWidthBytes * height;
- }
-
-
/* END */
diff --git a/extras/freetype2/src/pcf/pcfutil.h b/extras/freetype2/src/pcf/pcfutil.h
index 32dd1eab7..017c515ba 100644
--- a/extras/freetype2/src/pcf/pcfutil.h
+++ b/extras/freetype2/src/pcf/pcfutil.h
@@ -2,7 +2,7 @@
FreeType font driver for pcf fonts
- Copyright 2000-2001 by
+ Copyright 2000, 2001, 2004 by
Francesco Zappa Nardelli
Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -32,25 +32,18 @@ THE SOFTWARE.
#include <ft2build.h>
- void
+ static void
BitOrderInvert( unsigned char* buf,
int nbytes);
- void
+ static void
TwoByteSwap( unsigned char* buf,
int nbytes);
- void
+ static void
FourByteSwap( unsigned char* buf,
int nbytes);
- int
- RepadBitmap( char* pSrc,
- char* pDst,
- unsigned int srcPad,
- unsigned int dstPad,
- int width,
- int height);
#endif /* __PCFUTIL_H__ */
diff --git a/extras/freetype2/src/pcf/rules.mk b/extras/freetype2/src/pcf/rules.mk
index 141f1b744..1ad4ba897 100644
--- a/extras/freetype2/src/pcf/rules.mk
+++ b/extras/freetype2/src/pcf/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright (C) 2000, 2001 by
+# Copyright (C) 2000, 2001, 2003 by
# Francesco Zappa Nardelli
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -27,49 +27,48 @@
# pcf driver directory
#
-PCF_DIR := $(SRC_)pcf
-PCF_DIR_ := $(PCF_DIR)$(SEP)
+PCF_DIR := $(SRC_DIR)/pcf
-PCF_COMPILE := $(FT_COMPILE) $I$(PCF_DIR)
+PCF_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PCF_DIR))
# pcf driver sources (i.e., C files)
#
-PCF_DRV_SRC := $(PCF_DIR_)pcfread.c \
- $(PCF_DIR_)pcfdriver.c \
- $(PCF_DIR_)pcfutil.c
+PCF_DRV_SRC := $(PCF_DIR)/pcfread.c \
+ $(PCF_DIR)/pcfdrivr.c \
+ $(PCF_DIR)/pcfutil.c
# pcf driver headers
#
-PCF_DRV_H := $(PCF_DIR_)pcf.h \
- $(PCF_DIR_)pcfdriver.h \
- $(PCF_DIR_)pcfutil.h \
- $(PCF_DIR_)pcferror.h
+PCF_DRV_H := $(PCF_DIR)/pcf.h \
+ $(PCF_DIR)/pcfdrivr.h \
+ $(PCF_DIR)/pcfutil.h \
+ $(PCF_DIR)/pcferror.h
# pcf driver object(s)
#
# PCF_DRV_OBJ_M is used during `multi' builds
# PCF_DRV_OBJ_S is used during `single' builds
#
-PCF_DRV_OBJ_M := $(PCF_DRV_SRC:$(PCF_DIR_)%.c=$(OBJ_)%.$O)
-PCF_DRV_OBJ_S := $(OBJ_)pcf.$O
+PCF_DRV_OBJ_M := $(PCF_DRV_SRC:$(PCF_DIR)/%.c=$(OBJ_DIR)/%.$O)
+PCF_DRV_OBJ_S := $(OBJ_DIR)/pcf.$O
-# Windows driver source file for single build
+# pcf driver source file for single build
#
-PCF_DRV_SRC_S := $(PCF_DIR_)pcf.c
+PCF_DRV_SRC_S := $(PCF_DIR)/pcf.c
# pcf driver - single object
#
$(PCF_DRV_OBJ_S): $(PCF_DRV_SRC_S) $(PCF_DRV_SRC) $(FREETYPE_H) $(PCF_DRV_H)
- $(PCF_COMPILE) $T$@ $(PCF_DRV_SRC_S)
+ $(PCF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(PCF_DRV_SRC_S))
# pcf driver - multiple objects
#
-$(OBJ_)%.$O: $(PCF_DIR_)%.c $(FREETYPE_H) $(PCF_DRV_H)
- $(PCF_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(PCF_DIR)/%.c $(FREETYPE_H) $(PCF_DRV_H)
+ $(PCF_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
@@ -77,4 +76,5 @@ $(OBJ_)%.$O: $(PCF_DIR_)%.c $(FREETYPE_H) $(PCF_DRV_H)
DRV_OBJS_S += $(PCF_DRV_OBJ_S)
DRV_OBJS_M += $(PCF_DRV_OBJ_M)
+
# EOF
diff --git a/extras/freetype2/src/pfr/Jamfile b/extras/freetype2/src/pfr/Jamfile
index 3ba0ee9af..4c38a2de9 100644
--- a/extras/freetype2/src/pfr/Jamfile
+++ b/extras/freetype2/src/pfr/Jamfile
@@ -8,7 +8,7 @@ SubDir FT2_TOP $(FT2_SRC_DIR) pfr ;
if $(FT2_MULTI)
{
- _sources = pfrdrivr pfrgload pfrload pfrobjs pfrcmap pfrsbit ;
+ _sources = pfrdrivr pfrgload pfrload pfrobjs pfrcmap pfrsbit ;
}
else
{
diff --git a/extras/freetype2/src/pfr/pfrdrivr.c b/extras/freetype2/src/pfr/pfrdrivr.c
index 07ba9b4cd..4e0d6fdb4 100644
--- a/extras/freetype2/src/pfr/pfrdrivr.c
+++ b/extras/freetype2/src/pfr/pfrdrivr.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR driver interface (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,10 +19,13 @@
#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_PFR_H
+#include FT_SERVICE_PFR_H
+#include FT_SERVICE_XFREE86_NAME_H
#include "pfrdrivr.h"
#include "pfrobjs.h"
+#include "pfrerror.h"
+
static FT_Error
pfr_get_kerning( PFR_Face face,
@@ -30,44 +33,49 @@
FT_UInt right,
FT_Vector *avector )
{
- FT_Error error;
+ PFR_PhyFont phys = &face->phy_font;
- error = pfr_face_get_kerning( face, left, right, avector );
- if ( !error )
- {
- PFR_PhyFont phys = &face->phy_font;
- /* convert from metrics to outline units when necessary */
- if ( phys->outline_resolution != phys->metrics_resolution )
- {
- if ( avector->x != 0 )
- avector->x = FT_MulDiv( avector->x, phys->outline_resolution,
- phys->metrics_resolution );
+ pfr_face_get_kerning( face, left, right, avector );
- if ( avector->y != 0 )
- avector->y = FT_MulDiv( avector->x, phys->outline_resolution,
- phys->metrics_resolution );
- }
+ /* convert from metrics to outline units when necessary */
+ if ( phys->outline_resolution != phys->metrics_resolution )
+ {
+ if ( avector->x != 0 )
+ avector->x = FT_MulDiv( avector->x, phys->outline_resolution,
+ phys->metrics_resolution );
+
+ if ( avector->y != 0 )
+ avector->y = FT_MulDiv( avector->x, phys->outline_resolution,
+ phys->metrics_resolution );
}
- return error;
+
+ return PFR_Err_Ok;
}
+ /*
+ * PFR METRICS SERVICE
+ *
+ */
+
static FT_Error
- pfr_get_advance( PFR_Face face,
- FT_UInt gindex,
- FT_Pos *aadvance )
+ pfr_get_advance( PFR_Face face,
+ FT_UInt gindex,
+ FT_Pos *anadvance )
{
- FT_Error error = FT_Err_Bad_Argument;
+ FT_Error error = PFR_Err_Bad_Argument;
+
- *aadvance = 0;
+ *anadvance = 0;
if ( face )
{
- PFR_PhyFont phys = &face->phy_font;
+ PFR_PhyFont phys = &face->phy_font;
+
if ( gindex < phys->num_chars )
{
- *aadvance = phys->chars[ gindex ].advance;
+ *anadvance = phys->chars[gindex].advance;
error = 0;
}
}
@@ -78,17 +86,18 @@
static FT_Error
pfr_get_metrics( PFR_Face face,
- FT_UInt *aoutline_resolution,
+ FT_UInt *anoutline_resolution,
FT_UInt *ametrics_resolution,
FT_Fixed *ametrics_x_scale,
FT_Fixed *ametrics_y_scale )
{
- PFR_PhyFont phys = &face->phy_font;
+ PFR_PhyFont phys = &face->phy_font;
FT_Fixed x_scale, y_scale;
FT_Size size = face->root.size;
- if ( aoutline_resolution )
- *aoutline_resolution = phys->outline_resolution;
+
+ if ( anoutline_resolution )
+ *anoutline_resolution = phys->outline_resolution;
if ( ametrics_resolution )
*ametrics_resolution = phys->metrics_resolution;
@@ -111,25 +120,48 @@
if ( ametrics_y_scale )
*ametrics_y_scale = y_scale;
- return 0;
+ return PFR_Err_Ok;
}
FT_CALLBACK_TABLE_DEF
- const FT_PFR_ServiceRec pfr_service_rec =
+ const FT_Service_PfrMetricsRec pfr_metrics_service_rec =
+ {
+ (FT_PFR_GetMetricsFunc)pfr_get_metrics,
+ (FT_PFR_GetKerningFunc)pfr_face_get_kerning,
+ (FT_PFR_GetAdvanceFunc)pfr_get_advance
+ };
+
+
+ /*
+ * SERVICE LIST
+ *
+ */
+
+ static const FT_ServiceDescRec pfr_services[] =
{
- (FT_PFR_GetMetricsFunc) pfr_get_metrics,
- (FT_PFR_GetKerningFunc) pfr_get_kerning,
- (FT_PFR_GetAdvanceFunc) pfr_get_advance
+ { FT_SERVICE_ID_PFR_METRICS, &pfr_metrics_service_rec },
+ { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_PFR },
+ { NULL, NULL }
};
+ static FT_Module_Interface
+ pfr_get_service( FT_Driver driver,
+ const FT_String* service_id )
+ {
+ FT_UNUSED( driver );
+
+ return ft_service_list_lookup( pfr_services, service_id );
+ }
+
+
FT_CALLBACK_TABLE_DEF
const FT_Driver_ClassRec pfr_driver_class =
{
{
- ft_module_font_driver |
- ft_module_driver_scalable,
+ FT_MODULE_FONT_DRIVER |
+ FT_MODULE_DRIVER_SCALABLE,
sizeof( FT_DriverRec ),
@@ -137,31 +169,31 @@
0x10000L,
0x20000L,
- (FT_PFR_Service) &pfr_service_rec, /* format interface */
+ NULL,
(FT_Module_Constructor)NULL,
(FT_Module_Destructor) NULL,
- (FT_Module_Requester) NULL
+ (FT_Module_Requester) pfr_get_service
},
sizeof( PFR_FaceRec ),
sizeof( PFR_SizeRec ),
sizeof( PFR_SlotRec ),
- (FT_Face_InitFunc) pfr_face_init,
- (FT_Face_DoneFunc) pfr_face_done,
- (FT_Size_InitFunc) NULL,
- (FT_Size_DoneFunc) NULL,
- (FT_Slot_InitFunc) pfr_slot_init,
- (FT_Slot_DoneFunc) pfr_slot_done,
+ (FT_Face_InitFunc) pfr_face_init,
+ (FT_Face_DoneFunc) pfr_face_done,
+ (FT_Size_InitFunc) NULL,
+ (FT_Size_DoneFunc) NULL,
+ (FT_Slot_InitFunc) pfr_slot_init,
+ (FT_Slot_DoneFunc) pfr_slot_done,
- (FT_Size_ResetPointsFunc) NULL,
- (FT_Size_ResetPixelsFunc) NULL,
- (FT_Slot_LoadFunc) pfr_slot_load,
+ (FT_Size_ResetPointsFunc)NULL,
+ (FT_Size_ResetPixelsFunc)NULL,
+ (FT_Slot_LoadFunc) pfr_slot_load,
- (FT_Face_GetKerningFunc) pfr_get_kerning,
- (FT_Face_AttachFunc) 0,
- (FT_Face_GetAdvancesFunc) 0
+ (FT_Face_GetKerningFunc) pfr_get_kerning,
+ (FT_Face_AttachFunc) 0,
+ (FT_Face_GetAdvancesFunc)0
};
diff --git a/extras/freetype2/src/pfr/pfrgload.c b/extras/freetype2/src/pfr/pfrgload.c
index cb5c60b88..87ba6846e 100644
--- a/extras/freetype2/src/pfr/pfrgload.c
+++ b/extras/freetype2/src/pfr/pfrgload.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR glyph loader (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -198,7 +198,7 @@
/* indicate that a new contour has started */
glyph->path_begun = 1;
- /* check that there is room for a new contour and a new point */
+ /* check that there is space for a new contour and a new point */
error = FT_GlyphLoader_CheckPoints( loader, 1, 1 );
if ( !error )
/* add new start point */
@@ -276,7 +276,7 @@
/* re-allocate array when necessary */
if ( count > glyph->max_xy_control )
{
- FT_UInt new_max = ( count + 7 ) & -8;
+ FT_UInt new_max = FT_PAD_CEIL( count, 8 );
if ( FT_RENEW_ARRAY( glyph->x_control,
diff --git a/extras/freetype2/src/pfr/pfrload.c b/extras/freetype2/src/pfr/pfrload.c
index 87d07577a..19ced45d1 100644
--- a/extras/freetype2/src/pfr/pfrload.c
+++ b/extras/freetype2/src/pfr/pfrload.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR loader (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -153,7 +153,7 @@
pfr_header_load( PFR_Header header,
FT_Stream stream )
{
- FT_Error error;
+ FT_Error error;
/* read header directly */
@@ -201,9 +201,9 @@
FT_UInt32 section_offset,
FT_UInt *acount )
{
- FT_Error error;
- FT_UInt count;
- FT_UInt result = 0;
+ FT_Error error;
+ FT_UInt count;
+ FT_UInt result = 0;
if ( FT_STREAM_SEEK( section_offset ) || FT_READ_USHORT( count ) )
@@ -239,8 +239,8 @@
return PFR_Err_Invalid_Argument;
if ( FT_STREAM_SKIP( idx * 5 ) ||
- FT_READ_USHORT( size ) ||
- FT_READ_UOFF3 ( offset ) )
+ FT_READ_USHORT( size ) ||
+ FT_READ_UOFF3 ( offset ) )
goto Exit;
/* save logical font size and offset */
@@ -365,7 +365,8 @@
/* re-allocate when needed */
if ( phy_font->num_strikes + count > phy_font->max_strikes )
{
- FT_UInt new_max = (phy_font->num_strikes + count + 3) & -4;
+ FT_UInt new_max = FT_PAD_CEIL( phy_font->num_strikes + count, 4 );
+
if ( FT_RENEW_ARRAY( phy_font->strikes,
phy_font->num_strikes,
@@ -432,30 +433,30 @@
}
- /* load font ID, this is a so-called "unique" name that is rather
- * long and descriptive (like "Tiresias ScreenFont v7.51").
- *
- * note that a PFR font's family name is contained in an *undocumented*
- * string of the "auxiliary data" portion of a physical font record. this
- * may also contain the "real" style name !
- *
- * if no family name is present, the font id is used instead for the
- * family
- */
+ /* Load font ID. This is a so-called "unique" name that is rather
+ * long and descriptive (like "Tiresias ScreenFont v7.51").
+ *
+ * Note that a PFR font's family name is contained in an *undocumented*
+ * string of the "auxiliary data" portion of a physical font record. This
+ * may also contain the "real" style name!
+ *
+ * If no family name is present, the font ID is used instead for the
+ * family.
+ */
FT_CALLBACK_DEF( FT_Error )
pfr_extra_item_load_font_id( FT_Byte* p,
FT_Byte* limit,
PFR_PhyFont phy_font )
{
- FT_Error error = 0;
- FT_Memory memory = phy_font->memory;
- FT_UInt len = (FT_UInt)( limit - p );
+ FT_Error error = 0;
+ FT_Memory memory = phy_font->memory;
+ FT_PtrDist len = limit - p;
if ( phy_font->font_id != NULL )
goto Exit;
- if ( FT_ALLOC( phy_font->font_id, len+1 ) )
+ if ( FT_ALLOC( phy_font->font_id, len + 1 ) )
goto Exit;
/* copy font ID name, and terminate it for safety */
@@ -510,89 +511,6 @@
}
-#if 0
-
- /* load kerning pair data */
- FT_CALLBACK_DEF( FT_Error )
- pfr_extra_item_load_kerning_pairs( FT_Byte* p,
- FT_Byte* limit,
- PFR_PhyFont phy_font )
- {
- FT_Int count;
- FT_UShort base_adj;
- FT_UInt flags;
- FT_UInt num_pairs;
- PFR_KernPair pairs;
- FT_Error error = 0;
- FT_Memory memory = phy_font->memory;
-
-
- /* allocate a new kerning item */
- /* XXX: there may be multiple extra items for kerning */
- if ( phy_font->kern_pairs != NULL )
- goto Exit;
-
- FT_TRACE2(( "pfr_extra_item_load_kerning_pairs()\n" ));
-
- PFR_CHECK( 4 );
-
- num_pairs = PFR_NEXT_BYTE( p );
- base_adj = PFR_NEXT_SHORT( p );
- flags = PFR_NEXT_BYTE( p );
-
-#ifndef PFR_CONFIG_NO_CHECKS
- count = 3;
-
- if ( flags & PFR_KERN_2BYTE_CHAR )
- count += 2;
-
- if ( flags & PFR_KERN_2BYTE_ADJ )
- count += 1;
-
- PFR_CHECK( num_pairs * count );
-#endif
-
- if ( FT_NEW_ARRAY( pairs, num_pairs ) )
- goto Exit;
-
- phy_font->num_kern_pairs = num_pairs;
- phy_font->kern_pairs = pairs;
-
- for (count = num_pairs ; count > 0; count--, pairs++ )
- {
- if ( flags & PFR_KERN_2BYTE_CHAR )
- {
- pairs->glyph1 = PFR_NEXT_USHORT( p );
- pairs->glyph2 = PFR_NEXT_USHORT( p );
- }
- else
- {
- pairs->glyph1 = PFR_NEXT_BYTE( p );
- pairs->glyph2 = PFR_NEXT_BYTE( p );
- }
-
- if ( flags & PFR_KERN_2BYTE_ADJ )
- pairs->kerning.x = base_adj + PFR_NEXT_SHORT( p );
- else
- pairs->kerning.x = base_adj + PFR_NEXT_INT8( p );
-
- pairs->kerning.y = 0;
-
- FT_TRACE2(( "kerning %d <-> %d : %ld\n",
- pairs->glyph1, pairs->glyph2, pairs->kerning.x ));
- }
-
- Exit:
- return error;
-
- Too_Short:
- error = PFR_Err_Invalid_Table;
- FT_ERROR(( "pfr_extra_item_load_kerning_pairs: "
- "invalid kerning pairs table\n" ));
- goto Exit;
- }
-
-#else /* 0 */
/* load kerning pair data */
FT_CALLBACK_DEF( FT_Error )
@@ -689,22 +607,161 @@
"invalid kerning pairs table\n" ));
goto Exit;
}
-#endif /* 0 */
+
+
+ /*
+ * The kerning data embedded in a PFR font are (charcode,charcode)
+ * pairs; we need to translate them to (gindex,gindex) and sort
+ * the resulting array.
+ */
+ static FT_UInt
+ pfr_get_gindex( PFR_Char chars,
+ FT_UInt count,
+ FT_UInt charcode )
+ {
+ FT_UInt min = 0;
+ FT_UInt max = count;
+
+
+ while ( min < max )
+ {
+ FT_UInt mid = ( min + max ) >> 1;
+ PFR_Char c = chars + mid;
+
+
+ if ( c->char_code == charcode )
+ return mid + 1;
+
+ if ( c->char_code < charcode )
+ min = mid + 1;
+ else
+ max = mid;
+ }
+ return 0;
+ }
+
+
+ FT_CALLBACK_DEF( int )
+ pfr_compare_kern_pairs( const void* pair1,
+ const void* pair2 )
+ {
+ FT_UInt32 p1 = PFR_KERN_PAIR_INDEX( (PFR_KernPair)pair1 );
+ FT_UInt32 p2 = PFR_KERN_PAIR_INDEX( (PFR_KernPair)pair2 );
+
+
+ if ( p1 < p2 )
+ return -1;
+ if ( p1 > p2 )
+ return 1;
+ return 0;
+ }
+
+
+ static FT_Error
+ pfr_sort_kerning_pairs( FT_Stream stream,
+ PFR_PhyFont phy_font )
+ {
+ FT_Error error;
+ FT_Memory memory = stream->memory;
+ PFR_KernPair pairs;
+ PFR_KernItem item;
+ PFR_Char chars = phy_font->chars;
+ FT_UInt num_chars = phy_font->num_chars;
+ FT_UInt count;
+
+
+ /* create kerning pairs array
+ */
+ if ( FT_NEW_ARRAY( phy_font->kern_pairs, phy_font->num_kern_pairs ) )
+ goto Exit;
+
+ /* load all kerning items into the array,
+ * converting character codes into glyph indices
+ */
+ pairs = phy_font->kern_pairs;
+ item = phy_font->kern_items;
+ count = 0;
+
+ for ( ; item; item = item->next )
+ {
+ FT_UInt limit = count + item->pair_count;
+ FT_Byte* p;
+
+
+ if ( limit > phy_font->num_kern_pairs )
+ {
+ error = PFR_Err_Invalid_Table;
+ goto Exit;
+ }
+
+ if ( FT_STREAM_SEEK( item->offset ) ||
+ FT_FRAME_ENTER( item->pair_count * item->pair_size ) )
+ goto Exit;
+
+ p = stream->cursor;
+
+ for ( ; count < limit; count++ )
+ {
+ PFR_KernPair pair = pairs + count;
+ FT_UInt char1, char2;
+ FT_Int kerning;
+
+
+ if ( item->flags & PFR_KERN_2BYTE_CHAR )
+ {
+ char1 = FT_NEXT_USHORT( p );
+ char2 = FT_NEXT_USHORT( p );
+ }
+ else
+ {
+ char1 = FT_NEXT_BYTE( p );
+ char2 = FT_NEXT_BYTE( p );
+ }
+
+ if ( item->flags & PFR_KERN_2BYTE_ADJ )
+ kerning = item->base_adj + FT_NEXT_SHORT( p );
+ else
+ kerning = item->base_adj + FT_NEXT_CHAR( p );
+
+ pair->glyph1 = pfr_get_gindex( chars, num_chars, char1 );
+ pair->glyph2 = pfr_get_gindex( chars, num_chars, char2 );
+ pair->kerning = kerning;
+ }
+
+ FT_FRAME_EXIT();
+ }
+
+ /* sort the resulting array
+ */
+ ft_qsort( pairs, count,
+ sizeof ( PFR_KernPairRec ),
+ pfr_compare_kern_pairs );
+
+ Exit:
+ if ( error )
+ {
+ /* disable kerning data in case of error
+ */
+ phy_font->num_kern_pairs = 0;
+ }
+
+ return error;
+ }
static const PFR_ExtraItemRec pfr_phy_font_extra_items[] =
{
- { 1, (PFR_ExtraItem_ParseFunc) pfr_extra_item_load_bitmap_info },
- { 2, (PFR_ExtraItem_ParseFunc) pfr_extra_item_load_font_id },
- { 3, (PFR_ExtraItem_ParseFunc) pfr_extra_item_load_stem_snaps },
- { 4, (PFR_ExtraItem_ParseFunc) pfr_extra_item_load_kerning_pairs },
+ { 1, (PFR_ExtraItem_ParseFunc)pfr_extra_item_load_bitmap_info },
+ { 2, (PFR_ExtraItem_ParseFunc)pfr_extra_item_load_font_id },
+ { 3, (PFR_ExtraItem_ParseFunc)pfr_extra_item_load_stem_snaps },
+ { 4, (PFR_ExtraItem_ParseFunc)pfr_extra_item_load_kerning_pairs },
{ 0, NULL }
};
- /* loads a name from the auxiliary data. Since this extracts undocumented
- * strings from the font file, we need to be careful here
- */
+ /* Loads a name from the auxiliary data. Since this extracts undocumented
+ * strings from the font file, we need to be careful here.
+ */
static FT_Error
pfr_aux_name_load( FT_Byte* p,
FT_UInt len,
@@ -715,13 +772,14 @@
FT_String* result = NULL;
FT_UInt n, ok;
- if ( len > 0 && p[len-1] == 0 )
+
+ if ( len > 0 && p[len - 1] == 0 )
len--;
- /* check that each character is ASCII, that's to be sure
- * to not load garbage..
- */
- ok = (len > 0);
+ /* check that each character is ASCII for making sure not to
+ load garbage
+ */
+ ok = ( len > 0 );
for ( n = 0; n < len; n++ )
if ( p[n] < 32 || p[n] > 127 )
{
@@ -731,7 +789,7 @@
if ( ok )
{
- if ( FT_ALLOC( result, len+1 ) )
+ if ( FT_ALLOC( result, len + 1 ) )
goto Exit;
FT_MEM_COPY( result, p, len );
@@ -768,6 +826,7 @@
FT_FREE( phy_font->blue_values );
phy_font->num_blue_values = 0;
+ FT_FREE( phy_font->kern_pairs );
{
PFR_KernItem item, next;
@@ -787,7 +846,6 @@
}
-
FT_LOCAL_DEF( FT_Error )
pfr_phy_font_load( PFR_PhyFont phy_font,
FT_Stream stream,
@@ -842,9 +900,9 @@
goto Fail;
}
- /* in certain fonts, the auxiliary bytes contain interesting */
+ /* In certain fonts, the auxiliary bytes contain interesting */
/* information. These are not in the specification but can be */
- /* guessed by looking at the content of a few PFR0 fonts */
+ /* guessed by looking at the content of a few PFR0 fonts. */
PFR_CHECK( 3 );
num_aux = PFR_NEXT_ULONG( p );
@@ -853,6 +911,7 @@
FT_Byte* q = p;
FT_Byte* q2;
+
PFR_CHECK( num_aux );
p += num_aux;
@@ -860,58 +919,54 @@
{
FT_UInt length, type;
+
if ( q + 4 > p )
break;
- length = PFR_NEXT_USHORT(q);
+ length = PFR_NEXT_USHORT( q );
if ( length < 4 || length > num_aux )
break;
q2 = q + length - 2;
- type = PFR_NEXT_USHORT(q);
+ type = PFR_NEXT_USHORT( q );
switch ( type )
{
- case 1:
- {
- /* this seems to correspond to the font's family name,
- * padded to 16-bits with one zero when necessary
- */
- error = pfr_aux_name_load( q, length-4U, memory,
- &phy_font->family_name );
- if ( error )
- goto Exit;
- }
- break;
+ case 1:
+ /* this seems to correspond to the font's family name,
+ * padded to 16-bits with one zero when necessary
+ */
+ error = pfr_aux_name_load( q, length - 4U, memory,
+ &phy_font->family_name );
+ if ( error )
+ goto Exit;
+ break;
- case 2:
- {
- if ( q + 32 > q2 )
- break;
-
- q += 10;
- phy_font->ascent = PFR_NEXT_SHORT(q);
- phy_font->descent = PFR_NEXT_SHORT(q);
- phy_font->leading = PFR_NEXT_SHORT(q);
- q += 16;
- }
+ case 2:
+ if ( q + 32 > q2 )
break;
- case 3:
- {
- /* this seems to correspond to the font's style name,
- * padded to 16-bits with one zero when necessary
- */
- error = pfr_aux_name_load( q, length-4U, memory,
- &phy_font->style_name );
- if ( error )
- goto Exit;
- }
- break;
+ q += 10;
+ phy_font->ascent = PFR_NEXT_SHORT( q );
+ phy_font->descent = PFR_NEXT_SHORT( q );
+ phy_font->leading = PFR_NEXT_SHORT( q );
+ q += 16;
+ break;
+
+ case 3:
+ /* this seems to correspond to the font's style name,
+ * padded to 16-bits with one zero when necessary
+ */
+ error = pfr_aux_name_load( q, length - 4U, memory,
+ &phy_font->style_name );
+ if ( error )
+ goto Exit;
+ break;
- default:
- ;
+ default:
+ ;
}
+
q = q2;
num_aux -= length;
}
@@ -921,6 +976,7 @@
{
FT_UInt n, count;
+
PFR_CHECK( 1 );
phy_font->num_blue_values = count = PFR_NEXT_BYTE( p );
@@ -1000,7 +1056,8 @@
}
}
- /* that's it !! */
+ /* that's it! */
+
Fail:
FT_FRAME_EXIT();
@@ -1008,6 +1065,9 @@
phy_font->bct_offset = FT_STREAM_POS();
phy_font->cursor = NULL;
+ /* now sort kerning pairs */
+ error = pfr_sort_kerning_pairs( stream, phy_font );
+
Exit:
return error;
diff --git a/extras/freetype2/src/pfr/pfrobjs.c b/extras/freetype2/src/pfr/pfrobjs.c
index 867644ab0..4c6179aa5 100644
--- a/extras/freetype2/src/pfr/pfrobjs.c
+++ b/extras/freetype2/src/pfr/pfrobjs.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR object methods (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -41,7 +41,8 @@
FT_LOCAL_DEF( void )
pfr_face_done( PFR_Face face )
{
- FT_Memory memory = face->root.driver->root.memory;
+ FT_Memory memory = face->root.driver->root.memory;
+
/* we don't want dangling pointers */
face->root.family_name = NULL;
@@ -113,128 +114,127 @@
goto Exit;
/* now load the physical font descriptor */
- error = pfr_phy_font_load( &face->phy_font, stream,
- face->log_font.phys_offset,
- face->log_font.phys_size );
- if ( error )
- goto Exit;
+ error = pfr_phy_font_load( &face->phy_font, stream,
+ face->log_font.phys_offset,
+ face->log_font.phys_size );
+ if ( error )
+ goto Exit;
- /* now, set-up all root face fields */
- {
- FT_Face root = FT_FACE( face );
- PFR_PhyFont phy_font = &face->phy_font;
+ /* now, set-up all root face fields */
+ {
+ FT_Face root = FT_FACE( face );
+ PFR_PhyFont phy_font = &face->phy_font;
- root->face_index = face_index;
- root->num_glyphs = phy_font->num_chars;
- root->face_flags = FT_FACE_FLAG_SCALABLE;
+ root->face_index = face_index;
+ root->num_glyphs = phy_font->num_chars;
+ root->face_flags = FT_FACE_FLAG_SCALABLE;
- if ( (phy_font->flags & PFR_PHY_PROPORTIONAL) == 0 )
- root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
+ if ( (phy_font->flags & PFR_PHY_PROPORTIONAL) == 0 )
+ root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
- if ( phy_font->flags & PFR_PHY_VERTICAL )
- root->face_flags |= FT_FACE_FLAG_VERTICAL;
- else
- root->face_flags |= FT_FACE_FLAG_HORIZONTAL;
+ if ( phy_font->flags & PFR_PHY_VERTICAL )
+ root->face_flags |= FT_FACE_FLAG_VERTICAL;
+ else
+ root->face_flags |= FT_FACE_FLAG_HORIZONTAL;
- if ( phy_font->num_strikes > 0 )
- root->face_flags |= FT_FACE_FLAG_FIXED_SIZES;
+ if ( phy_font->num_strikes > 0 )
+ root->face_flags |= FT_FACE_FLAG_FIXED_SIZES;
- if ( phy_font->num_kern_pairs > 0 )
- root->face_flags |= FT_FACE_FLAG_KERNING;
+ if ( phy_font->num_kern_pairs > 0 )
+ root->face_flags |= FT_FACE_FLAG_KERNING;
- /* if no family name was found in the "undocumented" auxiliary
- * data, use the font ID instead. This sucks but is better than
- * nothing
+ /* If no family name was found in the "undocumented" auxiliary
+ * data, use the font ID instead. This sucks but is better than
+ * nothing.
*/
- root->family_name = phy_font->family_name;
- if ( root->family_name == NULL )
- root->family_name = phy_font->font_id;
+ root->family_name = phy_font->family_name;
+ if ( root->family_name == NULL )
+ root->family_name = phy_font->font_id;
/* note that the style name can be NULL in certain PFR fonts,
* probably meaning "Regular"
*/
- root->style_name = phy_font->style_name;
-
- root->num_fixed_sizes = 0;
- root->available_sizes = 0;
-
- root->bbox = phy_font->bbox;
- root->units_per_EM = (FT_UShort)phy_font->outline_resolution;
- root->ascender = (FT_Short) phy_font->bbox.yMax;
- root->descender = (FT_Short) phy_font->bbox.yMin;
- root->height = (FT_Short)
- ( ( ( root->ascender - root->descender ) * 12 )
- / 10 );
-
- if ( phy_font->num_strikes > 0 )
- {
- FT_UInt n, count = phy_font->num_strikes;
- FT_Bitmap_Size* size;
- PFR_Strike strike;
- FT_Memory memory = root->stream->memory;
+ root->style_name = phy_font->style_name;
+
+ root->num_fixed_sizes = 0;
+ root->available_sizes = 0;
+
+ root->bbox = phy_font->bbox;
+ root->units_per_EM = (FT_UShort)phy_font->outline_resolution;
+ root->ascender = (FT_Short) phy_font->bbox.yMax;
+ root->descender = (FT_Short) phy_font->bbox.yMin;
+ root->height = (FT_Short)(
+ ( ( root->ascender - root->descender ) * 12 ) / 10 );
+
+ if ( phy_font->num_strikes > 0 )
+ {
+ FT_UInt n, count = phy_font->num_strikes;
+ FT_Bitmap_Size* size;
+ PFR_Strike strike;
+ FT_Memory memory = root->stream->memory;
- if ( FT_NEW_ARRAY( root->available_sizes, count ) )
- goto Exit;
+ if ( FT_NEW_ARRAY( root->available_sizes, count ) )
+ goto Exit;
- size = root->available_sizes;
- strike = phy_font->strikes;
- for ( n = 0; n < count; n++, size++, strike++ )
- {
- size->height = (FT_UShort) strike->y_ppm;
- size->width = (FT_UShort) strike->x_ppm;
- }
- root->num_fixed_sizes = count;
- }
+ size = root->available_sizes;
+ strike = phy_font->strikes;
+ for ( n = 0; n < count; n++, size++, strike++ )
+ {
+ size->height = (FT_UShort)strike->y_ppm;
+ size->width = (FT_UShort)strike->x_ppm;
+ }
+ root->num_fixed_sizes = count;
+ }
- /* now compute maximum advance width */
- if ( ( phy_font->flags & PFR_PHY_PROPORTIONAL ) == 0 )
- root->max_advance_width = (FT_Short)phy_font->standard_advance;
- else
- {
- FT_Int max = 0;
- FT_UInt count = phy_font->num_chars;
- PFR_Char gchar = phy_font->chars;
+ /* now compute maximum advance width */
+ if ( ( phy_font->flags & PFR_PHY_PROPORTIONAL ) == 0 )
+ root->max_advance_width = (FT_Short)phy_font->standard_advance;
+ else
+ {
+ FT_Int max = 0;
+ FT_UInt count = phy_font->num_chars;
+ PFR_Char gchar = phy_font->chars;
- for ( ; count > 0; count--, gchar++ )
- {
- if ( max < gchar->advance )
- max = gchar->advance;
- }
+ for ( ; count > 0; count--, gchar++ )
+ {
+ if ( max < gchar->advance )
+ max = gchar->advance;
+ }
- root->max_advance_width = (FT_Short)max;
- }
+ root->max_advance_width = (FT_Short)max;
+ }
- root->max_advance_height = root->height;
+ root->max_advance_height = root->height;
- root->underline_position = (FT_Short)( - root->units_per_EM / 10 );
- root->underline_thickness = (FT_Short)( root->units_per_EM / 30 );
+ root->underline_position = (FT_Short)( - root->units_per_EM / 10 );
+ root->underline_thickness = (FT_Short)( root->units_per_EM / 30 );
- /* create charmap */
- {
- FT_CharMapRec charmap;
+ /* create charmap */
+ {
+ FT_CharMapRec charmap;
- charmap.face = root;
- charmap.platform_id = 3;
- charmap.encoding_id = 1;
- charmap.encoding = FT_ENCODING_UNICODE;
+ charmap.face = root;
+ charmap.platform_id = 3;
+ charmap.encoding_id = 1;
+ charmap.encoding = FT_ENCODING_UNICODE;
- FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
+ FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
#if 0
- /* Select default charmap */
- if (root->num_charmaps)
- root->charmap = root->charmaps[0];
+ /* Select default charmap */
+ if (root->num_charmaps)
+ root->charmap = root->charmaps[0];
#endif
- }
+ }
- /* check whether we've loaded any kerning pairs */
- if ( phy_font->num_kern_pairs )
- root->face_flags |= FT_FACE_FLAG_KERNING;
- }
+ /* check whether we've loaded any kerning pairs */
+ if ( phy_font->num_kern_pairs )
+ root->face_flags |= FT_FACE_FLAG_KERNING;
+ }
Exit:
return error;
@@ -279,7 +279,8 @@
FT_Outline* outline = &slot->root.outline;
FT_ULong gps_offset;
- if (gindex > 0)
+
+ if ( gindex > 0 )
gindex--;
/* check that the glyph index is correct */
@@ -295,7 +296,7 @@
if ( load_flags & FT_LOAD_SBITS_ONLY )
{
- error = FT_Err_Invalid_Argument;
+ error = PFR_Err_Invalid_Argument;
goto Exit;
}
@@ -352,6 +353,21 @@
metrics->vertBearingX = 0;
metrics->vertBearingY = 0;
+ /* Apply the font matrix, if any. */
+ /* TODO: Test existing fonts with unusual matrix */
+ /* whether we have to adjust Units per EM. */
+ {
+ FT_Matrix font_matrix;
+
+
+ font_matrix.xx = face->log_font.matrix[0] << 8;
+ font_matrix.yx = face->log_font.matrix[1] << 8;
+ font_matrix.xy = face->log_font.matrix[2] << 8;
+ font_matrix.yy = face->log_font.matrix[3] << 8;
+
+ FT_Outline_Transform( outline, &font_matrix );
+ }
+
/* scale when needed */
if ( scaling )
{
@@ -395,87 +411,46 @@
/*************************************************************************/
/*************************************************************************/
- FT_LOCAL_DEF( FT_Error )
+ FT_LOCAL_DEF( void )
pfr_face_get_kerning( PFR_Face face,
FT_UInt glyph1,
FT_UInt glyph2,
FT_Vector* kerning )
{
- FT_Error error;
+ FT_Error error = PFR_Err_Ok;
PFR_PhyFont phy_font = &face->phy_font;
- PFR_KernItem item = phy_font->kern_items;
+ PFR_KernPair pairs = phy_font->kern_pairs;
FT_UInt32 idx = PFR_KERN_INDEX( glyph1, glyph2 );
+ FT_UInt min, max;
+
+ FT_UNUSED( error ); /* just needed as syntactical sugar */
kerning->x = 0;
kerning->y = 0;
- /* find the kerning item containing our pair */
- while ( item )
- {
- if ( item->pair1 <= idx && idx <= item->pair2 )
- goto Found_Item;
-
- item = item->next;
- }
-
- /* not found */
- goto Exit;
-
- Found_Item:
+ min = 0;
+ max = phy_font->num_kern_pairs;
+
+ while ( min < max )
{
- /* perform simply binary search within the item */
- FT_UInt min, mid, max;
- FT_Stream stream = face->root.stream;
- FT_Byte* p;
-
-
- if ( FT_STREAM_SEEK( item->offset ) ||
- FT_FRAME_ENTER( item->pair_count * item->pair_size ) )
- goto Exit;
+ FT_UInt mid = ( min + max ) >> 1;
+ PFR_KernPair pair = pairs + mid;
+ FT_UInt32 pidx = PFR_KERN_PAIR_INDEX( pair );
+
- min = 0;
- max = item->pair_count;
- while ( min < max )
+ if ( pidx == idx )
{
- FT_UInt char1, char2, charcode;
-
-
- mid = ( min + max ) >> 1;
- p = stream->cursor + mid*item->pair_size;
-
- if ( item->flags & PFR_KERN_2BYTE_CHAR )
- {
- char1 = FT_NEXT_USHORT( p );
- char2 = FT_NEXT_USHORT( p );
- }
- else
- {
- char1 = FT_NEXT_USHORT( p );
- char2 = FT_NEXT_USHORT( p );
- }
- charcode = PFR_KERN_INDEX( char1, char2 );
-
- if ( idx == charcode )
- {
- if ( item->flags & PFR_KERN_2BYTE_ADJ )
- kerning->x = item->base_adj + FT_NEXT_SHORT( p );
- else
- kerning->x = item->base_adj + FT_NEXT_CHAR( p );
-
- break;
- }
- if ( idx > charcode )
- min = mid + 1;
- else
- max = mid;
+ kerning->x = pair->kerning;
+ break;
}
-
- FT_FRAME_EXIT();
+
+ if ( pidx < idx )
+ min = mid + 1;
+ else
+ max = mid;
}
-
- Exit:
- return 0;
}
+
/* END */
diff --git a/extras/freetype2/src/pfr/pfrobjs.h b/extras/freetype2/src/pfr/pfrobjs.h
index b29b64c6c..efd7b7c6d 100644
--- a/extras/freetype2/src/pfr/pfrobjs.h
+++ b/extras/freetype2/src/pfr/pfrobjs.h
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR object methods (specification). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -67,11 +67,11 @@ FT_BEGIN_HEADER
pfr_face_done( PFR_Face face );
- FT_LOCAL( FT_Error )
- pfr_face_get_kerning( PFR_Face face,
- FT_UInt glyph1,
- FT_UInt glyph2,
- FT_Vector* kerning );
+ FT_LOCAL( void )
+ pfr_face_get_kerning( PFR_Face face,
+ FT_UInt glyph1,
+ FT_UInt glyph2,
+ FT_Vector* kerning );
FT_LOCAL( FT_Error )
diff --git a/extras/freetype2/src/pfr/pfrsbit.c b/extras/freetype2/src/pfr/pfrsbit.c
index 408b06323..da8fdba33 100644
--- a/extras/freetype2/src/pfr/pfrsbit.c
+++ b/extras/freetype2/src/pfr/pfrsbit.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR bitmap loader (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -49,7 +49,7 @@
static void
pfr_bitwriter_init( PFR_BitWriter writer,
FT_Bitmap* target,
- FT_UInt decreasing )
+ FT_Bool decreasing )
{
writer->line = target->buffer;
writer->pitch = target->pitch;
@@ -115,7 +115,7 @@
}
if ( mask != 0x80 )
- cur[0] = (FT_Byte) c;
+ cur[0] = (FT_Byte)c;
}
@@ -185,7 +185,7 @@
}
else if ( mask == 0 )
{
- cur[0] = (FT_Byte) c;
+ cur[0] = (FT_Byte)c;
mask = 0x80;
c = 0;
cur ++;
@@ -249,7 +249,7 @@
}
else if ( mask == 0 )
{
- cur[0] = (FT_Byte) c;
+ cur[0] = (FT_Byte)c;
c = 0;
mask = 0x80;
cur ++;
@@ -274,8 +274,8 @@
static void
pfr_lookup_bitmap_data( FT_Byte* base,
FT_Byte* limit,
- FT_Int count,
- FT_Byte flags,
+ FT_UInt count,
+ FT_UInt flags,
FT_UInt char_code,
FT_ULong* found_offset,
FT_ULong* found_size )
@@ -481,7 +481,7 @@
pfr_load_bitmap_bits( FT_Byte* p,
FT_Byte* limit,
FT_UInt format,
- FT_UInt decreasing,
+ FT_Bool decreasing,
FT_Bitmap* target )
{
FT_Error error = 0;
@@ -508,7 +508,7 @@
default:
FT_ERROR(( "pfr_read_bitmap_data: invalid image type\n" ));
- error = FT_Err_Invalid_File_Format;
+ error = PFR_Err_Invalid_File_Format;
}
}
@@ -560,7 +560,7 @@
}
/* couldn't find it */
- return FT_Err_Invalid_Argument;
+ return PFR_Err_Invalid_Argument;
}
Found_Strike:
@@ -583,7 +583,7 @@
pfr_lookup_bitmap_data( stream->cursor,
stream->limit,
strike->num_bitmaps,
- (FT_Byte) strike->flags,
+ strike->flags,
character->char_code,
&gps_offset,
&gps_size );
@@ -593,7 +593,7 @@
if ( gps_size == 0 )
{
/* Could not find a bitmap program string for this glyph */
- error = FT_Err_Invalid_Argument;
+ error = PFR_Err_Invalid_Argument;
goto Exit;
}
}
@@ -635,7 +635,7 @@
glyph->root.metrics.height = (FT_Long)ysize << 6;
glyph->root.metrics.horiBearingX = xpos << 6;
glyph->root.metrics.horiBearingY = ypos << 6;
- glyph->root.metrics.horiAdvance = ( ( advance >> 2 ) + 32 ) & -64;
+ glyph->root.metrics.horiAdvance = FT_PIX_ROUND( ( advance >> 2 ) );
glyph->root.metrics.vertBearingX = - glyph->root.metrics.width >> 1;
glyph->root.metrics.vertBearingY = 0;
glyph->root.metrics.vertAdvance = size->root.metrics.height;
@@ -645,16 +645,18 @@
/* Allocate and read bitmap data */
{
- FT_ULong len = glyph->root.bitmap.pitch * ysize;
+ FT_ULong len = glyph->root.bitmap.pitch * ysize;
+
error = ft_glyphslot_alloc_bitmap( &glyph->root, len );
if ( !error )
{
- error = pfr_load_bitmap_bits( p,
- stream->limit,
- format,
- face->header.color_flags & 2,
- &glyph->root.bitmap );
+ error = pfr_load_bitmap_bits(
+ p,
+ stream->limit,
+ format,
+ FT_BOOL(face->header.color_flags & 2),
+ &glyph->root.bitmap );
}
}
}
diff --git a/extras/freetype2/src/pfr/pfrtypes.h b/extras/freetype2/src/pfr/pfrtypes.h
index 96744fc65..a10a2b26c 100644
--- a/extras/freetype2/src/pfr/pfrtypes.h
+++ b/extras/freetype2/src/pfr/pfrtypes.h
@@ -4,7 +4,7 @@
/* */
/* FreeType PFR data structures (specification only). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -209,11 +209,14 @@ FT_BEGIN_HEADER
#define PFR_KERN_INDEX( g1, g2 ) \
( ( (FT_UInt32)(g1) << 16 ) | (FT_UInt16)(g2) )
+#define PFR_KERN_PAIR_INDEX( pair ) \
+ PFR_KERN_INDEX( (pair)->glyph1, (pair)->glyph2 )
+
typedef struct PFR_KernPairRec_
{
FT_UInt glyph1;
FT_UInt glyph2;
- FT_Vector kerning;
+ FT_Int kerning;
} PFR_KernPairRec, *PFR_KernPair;
@@ -230,7 +233,7 @@ FT_BEGIN_HEADER
FT_BBox bbox;
FT_UInt flags;
FT_UInt standard_advance;
-
+
FT_Int ascent; /* optional, bbox.yMax if not present */
FT_Int descent; /* optional, bbox.yMin if not present */
FT_Int leading; /* optional, 0 if not present */
@@ -258,6 +261,7 @@ FT_BEGIN_HEADER
FT_UInt num_kern_pairs;
PFR_KernItem kern_items;
PFR_KernItem* kern_items_tail;
+ PFR_KernPair kern_pairs;
/* not part of the spec, but used during load */
FT_UInt32 bct_offset;
@@ -281,8 +285,8 @@ FT_BEGIN_HEADER
typedef enum PFR_KernFlags_
{
- PFR_KERN_2BYTE_ADJ = 0x01,
- PFR_KERN_2BYTE_CHAR = 0x02
+ PFR_KERN_2BYTE_CHAR = 0x01,
+ PFR_KERN_2BYTE_ADJ = 0x02
} PFR_KernFlags;
diff --git a/extras/freetype2/src/pfr/rules.mk b/extras/freetype2/src/pfr/rules.mk
index fe2f6eb99..60b96c741 100644
--- a/extras/freetype2/src/pfr/rules.mk
+++ b/extras/freetype2/src/pfr/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2002 by
+# Copyright 2002, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,27 +15,28 @@
# pfr driver directory
#
-PFR_DIR := $(SRC_)pfr
-PFR_DIR_ := $(PFR_DIR)$(SEP)
+PFR_DIR := $(SRC_DIR)/pfr
# compilation flags for the driver
#
-PFR_COMPILE := $(FT_COMPILE) $I$(PFR_DIR)
+PFR_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PFR_DIR))
# pfr driver sources (i.e., C files)
#
-PFR_DRV_SRC := $(PFR_DIR_)pfrload.c \
- $(PFR_DIR_)pfrgload.c \
- $(PFR_DIR_)pfrcmap.c \
- $(PFR_DIR_)pfrdrivr.c \
- $(PFR_DIR_)pfrobjs.c
+PFR_DRV_SRC := $(PFR_DIR)/pfrload.c \
+ $(PFR_DIR)/pfrgload.c \
+ $(PFR_DIR)/pfrcmap.c \
+ $(PFR_DIR)/pfrdrivr.c \
+ $(PFR_DIR)/pfrsbit.c \
+ $(PFR_DIR)/pfrobjs.c
# pfr driver headers
#
PFR_DRV_H := $(PFR_DRV_SRC:%.c=%.h) \
- $(PFR_DIR_)pfrerror.h
+ $(PFR_DIR)/pfrerror.h \
+ $(PFR_DIR)/pfrtypes.h
# Pfr driver object(s)
@@ -43,24 +44,24 @@ PFR_DRV_H := $(PFR_DRV_SRC:%.c=%.h) \
# PFR_DRV_OBJ_M is used during `multi' builds
# PFR_DRV_OBJ_S is used during `single' builds
#
-PFR_DRV_OBJ_M := $(PFR_DRV_SRC:$(PFR_DIR_)%.c=$(OBJ_)%.$O)
-PFR_DRV_OBJ_S := $(OBJ_)pfr.$O
+PFR_DRV_OBJ_M := $(PFR_DRV_SRC:$(PFR_DIR)/%.c=$(OBJ_DIR)/%.$O)
+PFR_DRV_OBJ_S := $(OBJ_DIR)/pfr.$O
# pfr driver source file for single build
#
-PFR_DRV_SRC_S := $(PFR_DIR_)pfr.c
+PFR_DRV_SRC_S := $(PFR_DIR)/pfr.c
# pfr driver - single object
#
$(PFR_DRV_OBJ_S): $(PFR_DRV_SRC_S) $(PFR_DRV_SRC) $(FREETYPE_H) $(PFR_DRV_H)
- $(PFR_COMPILE) $T$@ $(PFR_DRV_SRC_S)
+ $(PFR_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(PFR_DRV_SRC_S))
# pfr driver - multiple objects
#
-$(OBJ_)%.$O: $(PFR_DIR_)%.c $(FREETYPE_H) $(PFR_DRV_H)
- $(PFR_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(PFR_DIR)/%.c $(FREETYPE_H) $(PFR_DRV_H)
+ $(PFR_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
@@ -68,4 +69,5 @@ $(OBJ_)%.$O: $(PFR_DIR_)%.c $(FREETYPE_H) $(PFR_DRV_H)
DRV_OBJS_S += $(PFR_DRV_OBJ_S)
DRV_OBJS_M += $(PFR_DRV_OBJ_M)
+
# EOF
diff --git a/extras/freetype2/src/psaux/psauxmod.c b/extras/freetype2/src/psaux/psauxmod.c
index fa0c4aa8c..756ec1c56 100644
--- a/extras/freetype2/src/psaux/psauxmod.c
+++ b/extras/freetype2/src/psaux/psauxmod.c
@@ -4,7 +4,7 @@
/* */
/* FreeType auxiliary PostScript module implementation (body). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -39,9 +39,10 @@
ps_parser_init,
ps_parser_done,
ps_parser_skip_spaces,
- ps_parser_skip_alpha,
+ ps_parser_skip_PS_token,
ps_parser_to_int,
ps_parser_to_fixed,
+ ps_parser_to_bytes,
ps_parser_to_coord_array,
ps_parser_to_fixed_array,
ps_parser_to_token,
@@ -104,7 +105,7 @@
0,
sizeof( FT_ModuleRec ),
"psaux",
- 0x10000L,
+ 0x20000L,
0x20000L,
&psaux_interface, /* module-specific interface */
diff --git a/extras/freetype2/src/psaux/psobjs.c b/extras/freetype2/src/psaux/psobjs.c
index e930b7134..7087ca5ac 100644
--- a/extras/freetype2/src/psaux/psobjs.c
+++ b/extras/freetype2/src/psaux/psobjs.c
@@ -4,7 +4,7 @@
/* */
/* Auxiliary functions for PostScript fonts (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -142,7 +142,7 @@
/* table :: The target table. */
/* */
/* <Input> */
- /* idx :: The index of the object in the table. */
+ /* idx :: The index of the object in the table. */
/* */
/* object :: The address of the object to copy in memory. */
/* */
@@ -153,10 +153,10 @@
/* reallocation fails. */
/* */
FT_LOCAL_DEF( FT_Error )
- ps_table_add( PS_Table table,
- FT_Int idx,
- void* object,
- FT_Int length )
+ ps_table_add( PS_Table table,
+ FT_Int idx,
+ void* object,
+ FT_PtrDist length )
{
if ( idx < 0 || idx > table->max_elems )
{
@@ -178,9 +178,10 @@
while ( new_size < table->cursor + length )
{
- /* increase size by 25% and round up to the nearest multiple of 1024 */
- new_size += (new_size >> 2) + 1;
- new_size = ( new_size + 1023 ) & -1024;
+ /* increase size by 25% and round up to the nearest multiple
+ of 1024 */
+ new_size += ( new_size >> 2 ) + 1;
+ new_size = FT_PAD_CEIL( new_size, 1024 );
}
error = reallocate_t1_table( table, new_size );
@@ -265,54 +266,279 @@
/*************************************************************************/
/*************************************************************************/
-
+ /* In the PostScript Language Reference Manual (PLRM) the following */
+ /* characters are called `whitespace characters'. */
#define IS_T1_WHITESPACE( c ) ( (c) == ' ' || (c) == '\t' )
-#define IS_T1_LINESPACE( c ) ( (c) == '\r' || (c) == '\n' )
+#define IS_T1_LINESPACE( c ) ( (c) == '\r' || (c) == '\n' || (c) == '\f' )
+#define IS_T1_NULLSPACE( c ) ( (c) == '\0' )
-#define IS_T1_SPACE( c ) ( IS_T1_WHITESPACE( c ) || IS_T1_LINESPACE( c ) )
+ /* According to the PLRM all whitespace characters are equivalent, */
+ /* except in comments and strings. */
+#define IS_T1_SPACE( c ) ( IS_T1_WHITESPACE( c ) || \
+ IS_T1_LINESPACE( c ) || \
+ IS_T1_NULLSPACE( c ) )
- FT_LOCAL_DEF( void )
- ps_parser_skip_spaces( PS_Parser parser )
+ /* The following array is used by various functions to quickly convert */
+ /* digits (both decimal and non-decimal) into numbers. */
+
+#if 'A' == 65
+ /* ASCII */
+
+ static const char ft_char_table[128] =
{
- FT_Byte* cur = parser->cursor;
- FT_Byte* limit = parser->limit;
+ /* 0x00 */
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
+ -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
+ -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
+ };
+
+ /* no character >= 0x80 can represent a valid number */
+#define OP >=
+
+#endif /* 'A' == 65 */
+
+#if 'A' == 193
+ /* EBCDIC */
+
+ static const char ft_char_table[128] =
+ {
+ /* 0x80 */
+ -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, -1, -1, -1, -1, -1, -1,
+ -1, 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1,
+ -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
+ -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, -1, -1, -1, -1, -1, -1,
+ -1, 19, 20, 21, 22, 23, 24, 25, 26, 27, -1, -1, -1, -1, -1, -1,
+ -1, -1, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, -1,
+ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1,
+ }
+
+ /* no character < 0x80 can represent a valid number */
+#define OP <
+
+#endif /* 'A' == 193 */
+
+
+ /* first character must be already part of the comment */
+
+ static void
+ skip_comment( FT_Byte* *acur,
+ FT_Byte* limit )
+ {
+ FT_Byte* cur = *acur;
while ( cur < limit )
{
- FT_Byte c = *cur;
+ if ( IS_T1_LINESPACE( *cur ) )
+ break;
+ cur++;
+ }
+ *acur = cur;
+ }
- if ( !IS_T1_SPACE( c ) )
- break;
+
+ static void
+ skip_spaces( FT_Byte* *acur,
+ FT_Byte* limit )
+ {
+ FT_Byte* cur = *acur;
+
+
+ while ( cur < limit )
+ {
+ if ( !IS_T1_SPACE( *cur ) )
+ {
+ if ( *cur == '%' )
+ /* According to the PLRM, a comment is equal to a space. */
+ skip_comment( &cur, limit );
+ else
+ break;
+ }
+ cur++;
+ }
+
+ *acur = cur;
+ }
+
+
+ /* first character must be `(' */
+
+ static void
+ skip_literal_string( FT_Byte* *acur,
+ FT_Byte* limit )
+ {
+ FT_Byte* cur = *acur;
+ FT_Int embed = 0;
+
+
+ while ( cur < limit )
+ {
+ if ( *cur == '\\' )
+ cur++;
+ else if ( *cur == '(' )
+ embed++;
+ else if ( *cur == ')' )
+ {
+ embed--;
+ if ( embed == 0 )
+ {
+ cur++;
+ break;
+ }
+ }
cur++;
}
+
+ *acur = cur;
+ }
+
+
+ /* first character must be `<' */
+
+ static void
+ skip_string( PS_Parser parser )
+ {
+ FT_Byte* cur = parser->cursor;
+ FT_Byte* limit = parser->limit;
+
+
+ while ( ++cur < limit )
+ {
+ int d;
+
+
+ /* All whitespace characters are ignored. */
+ skip_spaces( &cur, limit );
+ if ( cur >= limit )
+ break;
+
+ if ( *cur OP 0x80 )
+ break;
+
+ d = ft_char_table[*cur & 0x7F];
+ if ( d < 0 || d >= 16 )
+ break;
+ }
+
+ if ( cur < limit && *cur != '>' )
+ parser->error = PSaux_Err_Invalid_File_Format;
+ else
+ cur++;
+
parser->cursor = cur;
}
+ /***********************************************************************/
+ /* */
+ /* All exported parsing routines handle leading whitespace and stop at */
+ /* the first character which isn't part of the just handled token. */
+ /* */
+ /***********************************************************************/
+
+
FT_LOCAL_DEF( void )
- ps_parser_skip_alpha( PS_Parser parser )
+ ps_parser_skip_PS_token( PS_Parser parser )
{
- FT_Byte* cur = parser->cursor;
- FT_Byte* limit = parser->limit;
+ /* Note: PostScript allows any non-delimiting, non-whitespace */
+ /* character in a name (PS Ref Manual, 3rd ed, p31). */
+ /* PostScript delimiters are (, ), <, >, [, ], {, }, /, and %. */
+ FT_Byte* cur = parser->cursor;
+ FT_Byte* limit = parser->limit;
- while ( cur < limit )
+
+ skip_spaces( &cur, limit ); /* this also skips comments */
+ if ( cur >= limit )
+ goto Exit;
+
+ /* self-delimiting, single-character tokens */
+ if ( *cur == '[' || *cur == ']' ||
+ *cur == '{' || *cur == '}' )
{
- FT_Byte c = *cur;
+ cur++;
+ goto Exit;
+ }
+ if ( *cur == '(' ) /* (...) */
+ {
+ skip_literal_string( &cur, limit );
+ goto Exit;
+ }
- if ( IS_T1_SPACE( c ) )
+ if ( *cur == '<' ) /* <...> */
+ {
+ if ( cur + 1 < limit && *(cur + 1) == '<' ) /* << */
+ {
+ cur++;
+ cur++;
+ goto Exit;
+ }
+ parser->cursor = cur;
+ skip_string( parser );
+ return;
+ }
+
+ if ( *cur == '>' )
+ {
+ cur++;
+ if ( cur >= limit || *cur != '>' ) /* >> */
+ {
+ parser->error = PSaux_Err_Invalid_File_Format;
+ goto Exit;
+ }
+ cur++;
+ goto Exit;
+ }
+
+ if ( *cur == '/' )
+ cur++;
+
+ /* anything else */
+ while ( cur < limit )
+ {
+ if ( IS_T1_SPACE( *cur ) ||
+ *cur == '(' ||
+ *cur == '/' ||
+ *cur == '%' ||
+ *cur == '[' || *cur == ']' ||
+ *cur == '{' || *cur == '}' ||
+ *cur == '<' || *cur == '>' )
break;
+
+ if ( *cur == ')' )
+ {
+ parser->error = PSaux_Err_Invalid_File_Format;
+ goto Exit;
+ }
+
cur++;
}
+
+ Exit:
parser->cursor = cur;
}
FT_LOCAL_DEF( void )
+ ps_parser_skip_spaces( PS_Parser parser )
+ {
+ skip_spaces( &parser->cursor, parser->limit );
+ }
+
+
+ /* `token' here means either something between balanced delimiters */
+ /* or the next token; the delimiters are not removed. */
+
+ FT_LOCAL_DEF( void )
ps_parser_to_token( PS_Parser parser,
T1_Token token )
{
@@ -326,72 +552,87 @@
token->start = 0;
token->limit = 0;
- /* first of all, skip space */
+ /* first of all, skip leading whitespace */
ps_parser_skip_spaces( parser );
cur = parser->cursor;
limit = parser->limit;
- if ( cur < limit )
+ if ( cur >= limit )
+ return;
+
+ switch ( *cur )
{
- switch ( *cur )
+ /************* check for literal string *****************/
+ case '(':
+ token->type = T1_TOKEN_TYPE_STRING;
+ token->start = cur;
+ skip_literal_string( &cur, limit );
+ if ( cur < limit )
+ token->limit = cur;
+ break;
+
+ /************* check for programs/array *****************/
+ case '{':
+ token->type = T1_TOKEN_TYPE_ARRAY;
+ ender = '}';
+ goto Lookup_Ender;
+
+ /************* check for table/array ********************/
+ case '[':
+ token->type = T1_TOKEN_TYPE_ARRAY;
+ ender = ']';
+ /* fall through */
+
+ Lookup_Ender:
+ embed = 1;
+ starter = *cur;
+ token->start = cur++;
+
+ /* we need this to catch `[ ]' */
+ parser->cursor = cur;
+ ps_parser_skip_spaces( parser );
+ cur = parser->cursor;
+
+ while ( cur < limit && !parser->error )
{
- /************* check for strings ***********************/
- case '(':
- token->type = T1_TOKEN_TYPE_STRING;
- ender = ')';
- goto Lookup_Ender;
-
- /************* check for programs/array ****************/
- case '{':
- token->type = T1_TOKEN_TYPE_ARRAY;
- ender = '}';
- goto Lookup_Ender;
-
- /************* check for table/array ******************/
- case '[':
- token->type = T1_TOKEN_TYPE_ARRAY;
- ender = ']';
-
- Lookup_Ender:
- embed = 1;
- starter = *cur++;
- token->start = cur;
- while ( cur < limit )
+ if ( *cur == starter )
+ embed++;
+ else if ( *cur == ender )
{
- if ( *cur == starter )
- embed++;
- else if ( *cur == ender )
+ embed--;
+ if ( embed <= 0 )
{
- embed--;
- if ( embed <= 0 )
- {
- token->limit = cur++;
- break;
- }
+ token->limit = ++cur;
+ break;
}
- cur++;
}
- break;
-
- /* **************** otherwise, it's any token **********/
- default:
- token->start = cur++;
- token->type = T1_TOKEN_TYPE_ANY;
- while ( cur < limit && !IS_T1_SPACE( *cur ) )
- cur++;
-
- token->limit = cur;
- }
- if ( !token->limit )
- {
- token->start = 0;
- token->type = T1_TOKEN_TYPE_NONE;
+ parser->cursor = cur;
+ ps_parser_skip_PS_token( parser );
+ /* we need this to catch `[XXX ]' */
+ ps_parser_skip_spaces ( parser );
+ cur = parser->cursor;
}
+ break;
+
+ /* ************ otherwise, it is any token **************/
+ default:
+ token->start = cur;
+ token->type = T1_TOKEN_TYPE_ANY;
+ ps_parser_skip_PS_token( parser );
+ cur = parser->cursor;
+ if ( !parser->error )
+ token->limit = cur;
+ }
- parser->cursor = cur;
+ if ( !token->limit )
+ {
+ token->start = 0;
+ token->type = T1_TOKEN_TYPE_NONE;
}
+
+ parser->cursor = cur;
}
@@ -406,7 +647,9 @@
*pnum_tokens = -1;
+ /* this also handles leading whitespace */
ps_parser_to_token( parser, &master );
+
if ( master.type == T1_TOKEN_TYPE_ARRAY )
{
FT_Byte* old_cursor = parser->cursor;
@@ -415,8 +658,9 @@
T1_Token limit = cur + max_tokens;
- parser->cursor = master.start;
- parser->limit = master.limit;
+ /* don't include outermost delimiters */
+ parser->cursor = master.start + 1;
+ parser->limit = master.limit - 1;
while ( parser->cursor < parser->limit )
{
@@ -441,111 +685,188 @@
}
+ /* first character must be already part of the number */
+
static FT_Long
- T1Radix( FT_Long radixBase,
- FT_Byte** cur,
- FT_Byte* limit )
+ ps_radix( FT_Long radixBase,
+ FT_Byte* *acur,
+ FT_Byte* limit )
{
- FT_Long result = 0;
- FT_Byte radixEndChar0 =
- (FT_Byte)( radixBase > 10 ? '9' + 1 : '0' + radixBase );
- FT_Byte radixEndChar1 =
- (FT_Byte)( 'A' + radixBase - 10 );
- FT_Byte radixEndChar2 =
- (FT_Byte)( 'a' + radixBase - 10 );
+ FT_Long result = 0;
+ FT_Byte* cur = *acur;
+
+ if ( radixBase < 2 || radixBase > 36 )
+ return 0;
- while( *cur < limit )
+ while ( cur < limit )
{
- if ( (*cur)[0] >= '0' && (*cur)[0] < radixEndChar0 )
- result = result * radixBase + (*cur)[0] - '0';
+ int d;
- else if ( radixBase > 10 &&
- (*cur)[0] >= 'A' && (*cur)[0] < radixEndChar1 )
- result = result * radixBase + ( (*cur)[0] - 'A' + 10 );
- else if ( radixBase > 10 &&
- (*cur)[0] >= 'a' && (*cur)[0] < radixEndChar2 )
- result = result * radixBase + ( (*cur)[0] - 'a' + 10 );
+ if ( *cur OP 0x80 )
+ break;
+
+ d = ft_char_table[*cur & 0x7F];
+ if ( d < 0 || d >= radixBase )
+ break;
- else
- return result;
+ result = result * radixBase + d;
- (*cur)++;
+ cur++;
}
+ *acur = cur;
+
return result;
}
+ /* first character must be already part of the number */
+
static FT_Long
- t1_toint( FT_Byte** cursor,
+ ps_toint( FT_Byte* *acur,
FT_Byte* limit )
{
FT_Long result = 0;
- FT_Byte* cur = *cursor;
- FT_Byte c = '\0', d;
+ FT_Byte* cur = *acur;
+ FT_Byte c;
- for ( ; cur < limit; cur++ )
+ if ( cur >= limit )
+ goto Exit;
+
+ c = *cur;
+ if ( c == '-' )
+ cur++;
+
+ while ( cur < limit )
{
- c = *cur;
- d = (FT_Byte)( c - '0' );
- if ( d < 10 )
- break;
+ int d;
+
- if ( c == '-' )
+ if ( *cur == '#' )
{
cur++;
+ result = ps_radix( result, &cur, limit );
break;
}
- }
- if ( cur < limit )
+ if ( *cur OP 0x80 )
+ break;
+
+ d = ft_char_table[*cur & 0x7F];
+ if ( d < 0 || d >= 10 )
+ break;
+ result = result * 10 + d;
+
+ cur++;
+ };
+
+ if ( c == '-' )
+ result = -result;
+
+ Exit:
+ *acur = cur;
+ return result;
+ }
+
+
+ /* first character must be `<' if `delimiters' is non-zero */
+
+ static FT_Error
+ ps_tobytes( FT_Byte* *acur,
+ FT_Byte* limit,
+ FT_Long max_bytes,
+ FT_Byte* bytes,
+ FT_Long* pnum_bytes,
+ FT_Bool delimiters )
+ {
+ FT_Error error = PSaux_Err_Ok;
+
+ FT_Byte* cur = *acur;
+ FT_Long n = 0;
+
+
+ if ( cur >= limit )
+ goto Exit;
+
+ if ( delimiters )
{
- do
+ if ( *cur != '<' )
{
- d = (FT_Byte)( cur[0] - '0' );
- if ( d >= 10 )
- {
- if ( cur[0] == '#' )
- {
- cur++;
- result = T1Radix( result, &cur, limit );
- }
- break;
- }
+ error = PSaux_Err_Invalid_File_Format;
+ goto Exit;
+ }
- result = result * 10 + d;
- cur++;
+ cur++;
+ }
- } while ( cur < limit );
+ max_bytes = max_bytes * 2;
- if ( c == '-' )
- result = -result;
+ for ( n = 0; cur < limit; n++, cur++ )
+ {
+ int d;
+
+
+ if ( n >= max_bytes )
+ /* buffer is full */
+ goto Exit;
+
+ /* All whitespace characters are ignored. */
+ skip_spaces( &cur, limit );
+ if ( cur >= limit )
+ break;
+
+ if ( *cur OP 0x80 )
+ break;
+
+ d = ft_char_table[*cur & 0x7F];
+ if ( d < 0 || d >= 16 )
+ break;
+
+ /* <f> == <f0> != <0f> */
+ bytes[n / 2] = (FT_Byte)( ( n % 2 ) ? bytes[n / 2] + d
+ : d * 16 );
}
- *cursor = cur;
- return result;
+ if ( delimiters )
+ {
+ if ( cur < limit && *cur != '>' )
+ {
+ error = PSaux_Err_Invalid_File_Format;
+ goto Exit;
+ }
+
+ cur++;
+ }
+
+ *acur = cur;
+
+ Exit:
+ *pnum_bytes = ( n + 1 ) / 2;
+
+ return error;
}
+ /* first character must be already part of the number */
+
static FT_Long
- t1_tofixed( FT_Byte** cursor,
+ ps_tofixed( FT_Byte* *acur,
FT_Byte* limit,
FT_Long power_ten )
{
- FT_Byte* cur = *cursor;
+ FT_Byte* cur = *acur;
FT_Long num, divider, result;
FT_Int sign = 0;
- FT_Byte d;
if ( cur >= limit )
return 0;
/* first of all, check the sign */
- if ( *cur == '-' )
+ if ( *cur == '-' && cur + 1 < limit )
{
sign = 1;
cur++;
@@ -553,7 +874,7 @@
/* then, read the integer part, if any */
if ( *cur != '.' )
- result = t1_toint( &cur, limit ) << 16;
+ result = ps_toint( &cur, limit ) << 16;
else
result = 0;
@@ -570,8 +891,14 @@
for (;;)
{
- d = (FT_Byte)( *cur - '0' );
- if ( d >= 10 )
+ int d;
+
+
+ if ( *cur OP 0x80 )
+ break;
+
+ d = ft_char_table[*cur & 0x7F];
+ if ( d < 0 || d >= 10 )
break;
if ( divider < 10000000L )
@@ -590,7 +917,7 @@
if ( cur + 1 < limit && ( *cur == 'e' || *cur == 'E' ) )
{
cur++;
- power_ten += t1_toint( &cur, limit );
+ power_ten += ps_toint( &cur, limit );
}
Exit:
@@ -615,18 +942,20 @@
if ( sign )
result = -result;
- *cursor = cur;
+ *acur = cur;
return result;
}
+ /* first character must be a delimiter or a part of a number */
+
static FT_Int
- t1_tocoordarray( FT_Byte** cursor,
+ ps_tocoordarray( FT_Byte* *acur,
FT_Byte* limit,
FT_Int max_coords,
FT_Short* coords )
{
- FT_Byte* cur = *cursor;
+ FT_Byte* cur = *acur;
FT_Int count = 0;
FT_Byte c, ender;
@@ -634,8 +963,8 @@
if ( cur >= limit )
goto Exit;
- /* check for the beginning of an array; if not, only one number will */
- /* be read */
+ /* check for the beginning of an array; otherwise, only one number */
+ /* will be read */
c = *cur;
ender = 0;
@@ -649,24 +978,23 @@
cur++;
/* now, read the coordinates */
- for ( ; cur < limit; )
+ while ( cur < limit )
{
/* skip whitespace in front of data */
- for (;;)
- {
- c = *cur;
- if ( c != ' ' && c != '\t' )
- break;
+ skip_spaces( &cur, limit );
+ if ( cur >= limit )
+ goto Exit;
- cur++;
- if ( cur >= limit )
- goto Exit;
- }
+ if ( count >= max_coords )
+ break;
- if ( count >= max_coords || c == ender )
+ if ( c == ender )
+ {
+ cur++;
break;
+ }
- coords[count] = (FT_Short)( t1_tofixed( &cur, limit, 0 ) >> 16 );
+ coords[count] = (FT_Short)( ps_tofixed( &cur, limit, 0 ) >> 16 );
count++;
if ( !ender )
@@ -674,27 +1002,30 @@
}
Exit:
- *cursor = cur;
+ *acur = cur;
return count;
}
+ /* first character must be a delimiter or a part of a number */
+
static FT_Int
- t1_tofixedarray( FT_Byte** cursor,
+ ps_tofixedarray( FT_Byte* *acur,
FT_Byte* limit,
FT_Int max_values,
FT_Fixed* values,
FT_Int power_ten )
{
- FT_Byte* cur = *cursor;
+ FT_Byte* cur = *acur;
FT_Int count = 0;
FT_Byte c, ender;
- if ( cur >= limit ) goto Exit;
+ if ( cur >= limit )
+ goto Exit;
- /* check for the beginning of an array. If not, only one number will */
- /* be read */
+ /* Check for the beginning of an array. Otherwise, only one number */
+ /* will be read. */
c = *cur;
ender = 0;
@@ -708,24 +1039,23 @@
cur++;
/* now, read the values */
- for ( ; cur < limit; )
+ while ( cur < limit )
{
/* skip whitespace in front of data */
- for (;;)
- {
- c = *cur;
- if ( c != ' ' && c != '\t' )
- break;
+ skip_spaces( &cur, limit );
+ if ( cur >= limit )
+ goto Exit;
- cur++;
- if ( cur >= limit )
- goto Exit;
- }
+ if ( count >= max_values )
+ break;
- if ( count >= max_values || c == ender )
+ if ( c == ender )
+ {
+ cur++;
break;
+ }
- values[count] = t1_tofixed( &cur, limit, power_ten );
+ values[count] = ps_tofixed( &cur, limit, power_ten );
count++;
if ( !ender )
@@ -733,7 +1063,7 @@
}
Exit:
- *cursor = cur;
+ *acur = cur;
return count;
}
@@ -741,7 +1071,7 @@
#if 0
static FT_String*
- t1_tostring( FT_Byte** cursor,
+ ps_tostring( FT_Byte** cursor,
FT_Byte* limit,
FT_Memory memory )
{
@@ -801,40 +1131,41 @@
static int
- t1_tobool( FT_Byte** cursor,
+ ps_tobool( FT_Byte* *acur,
FT_Byte* limit )
{
- FT_Byte* cur = *cursor;
+ FT_Byte* cur = *acur;
FT_Bool result = 0;
/* return 1 if we find `true', 0 otherwise */
if ( cur + 3 < limit &&
- cur[0] == 't' &&
- cur[1] == 'r' &&
- cur[2] == 'u' &&
- cur[3] == 'e' )
+ cur[0] == 't' &&
+ cur[1] == 'r' &&
+ cur[2] == 'u' &&
+ cur[3] == 'e' )
{
result = 1;
cur += 5;
}
else if ( cur + 4 < limit &&
- cur[0] == 'f' &&
- cur[1] == 'a' &&
- cur[2] == 'l' &&
- cur[3] == 's' &&
- cur[4] == 'e' )
+ cur[0] == 'f' &&
+ cur[1] == 'a' &&
+ cur[2] == 'l' &&
+ cur[3] == 's' &&
+ cur[4] == 'e' )
{
result = 0;
cur += 6;
}
- *cursor = cur;
+ *acur = cur;
return result;
}
- /* Load a simple field (i.e. non-table) into the current list of objects */
+ /* load a simple field (i.e. non-table) into the current list of objects */
+
FT_LOCAL_DEF( FT_Error )
ps_parser_load_field( PS_Parser parser,
const T1_Field field,
@@ -850,6 +1181,7 @@
FT_Error error;
+ /* this also skips leading whitespace */
ps_parser_to_token( parser, &token );
if ( !token.type )
goto Fail;
@@ -859,7 +1191,7 @@
cur = token.start;
limit = token.limit;
- /* we must detect arrays */
+ /* we must detect arrays in /FontBBox */
if ( field->type == T1_FIELD_TYPE_BBOX )
{
T1_TokenRec token2;
@@ -867,8 +1199,9 @@
FT_Byte* old_limit = parser->limit;
- parser->cursor = token.start;
- parser->limit = token.limit;
+ /* don't include delimiters */
+ parser->cursor = token.start + 1;
+ parser->limit = token.limit - 1;
ps_parser_to_token( parser, &token2 );
parser->cursor = old_cur;
@@ -880,12 +1213,16 @@
else if ( token.type == T1_TOKEN_TYPE_ARRAY )
{
FieldArray:
- /* if this is an array, and we have no blend, an error occurs */
+ /* if this is an array and we have no blend, an error occurs */
if ( max_objects == 0 )
goto Fail;
count = max_objects;
- idx = 1;
+ idx = 1;
+
+ /* don't include delimiters */
+ cur++;
+ limit--;
}
for ( ; count > 0; count--, idx++ )
@@ -895,18 +1232,25 @@
FT_String* string;
+ skip_spaces( &cur, limit );
+
switch ( field->type )
{
case T1_FIELD_TYPE_BOOL:
- val = t1_tobool( &cur, limit );
+ val = ps_tobool( &cur, limit );
goto Store_Integer;
case T1_FIELD_TYPE_FIXED:
- val = t1_tofixed( &cur, limit, 3 );
+ val = ps_tofixed( &cur, limit, 0 );
+ goto Store_Integer;
+
+ case T1_FIELD_TYPE_FIXED_1000:
+ val = ps_tofixed( &cur, limit, 3 );
goto Store_Integer;
case T1_FIELD_TYPE_INTEGER:
- val = t1_toint( &cur, limit );
+ val = ps_toint( &cur, limit );
+ /* fall through */
Store_Integer:
switch ( field->size )
@@ -929,15 +1273,28 @@
break;
case T1_FIELD_TYPE_STRING:
+ case T1_FIELD_TYPE_KEY:
{
FT_Memory memory = parser->memory;
FT_UInt len = (FT_UInt)( limit - cur );
- if ( *(FT_String**)q )
- /* with synthetic fonts, it's possible to find a field twice */
+ if ( cur >= limit )
break;
+ if ( field->type == T1_FIELD_TYPE_KEY )
+ {
+ /* don't include leading `/' */
+ len--;
+ cur++;
+ }
+ else
+ {
+ /* don't include delimiting parentheses */
+ cur++;
+ len -= 2;
+ }
+
if ( FT_ALLOC( string, len + 1 ) )
goto Exit;
@@ -954,10 +1311,7 @@
FT_BBox* bbox = (FT_BBox*)q;
- /* we need the '[' and ']' delimiters */
- token.start--;
- token.limit++;
- (void)t1_tofixedarray( &token.start, token.limit, 4, temp, 0 );
+ (void)ps_tofixedarray( &token.start, token.limit, 4, temp, 0 );
bbox->xMin = FT_RoundFix( temp[0] );
bbox->yMin = FT_RoundFix( temp[1] );
@@ -972,7 +1326,7 @@
}
}
-#if 0 /* obsolete - keep for reference */
+#if 0 /* obsolete -- keep for reference */
if ( pflags )
*pflags |= 1L << field->flag_bit;
#else
@@ -1003,7 +1357,7 @@
T1_TokenRec elements[T1_MAX_TABLE_ELEMENTS];
T1_Token token;
FT_Int num_elements;
- FT_Error error = 0;
+ FT_Error error = PSaux_Err_Ok;
FT_Byte* old_cursor;
FT_Byte* old_limit;
T1_FieldRec fieldrec = *(T1_Field)field;
@@ -1015,10 +1369,13 @@
fieldrec.type = T1_FIELD_TYPE_FIXED;
#endif
- ps_parser_to_token_array( parser, elements, 32, &num_elements );
+ ps_parser_to_token_array( parser, elements,
+ T1_MAX_TABLE_ELEMENTS, &num_elements );
if ( num_elements < 0 )
- goto Fail;
-
+ {
+ error = PSaux_Err_Ignore;
+ goto Exit;
+ }
if ( num_elements > T1_MAX_TABLE_ELEMENTS )
num_elements = T1_MAX_TABLE_ELEMENTS;
@@ -1051,17 +1408,31 @@
Exit:
return error;
-
- Fail:
- error = PSaux_Err_Invalid_File_Format;
- goto Exit;
}
FT_LOCAL_DEF( FT_Long )
ps_parser_to_int( PS_Parser parser )
{
- return t1_toint( &parser->cursor, parser->limit );
+ ps_parser_skip_spaces( parser );
+ return ps_toint( &parser->cursor, parser->limit );
+ }
+
+
+ FT_LOCAL_DEF( FT_Error )
+ ps_parser_to_bytes( PS_Parser parser,
+ FT_Byte* bytes,
+ FT_Long max_bytes,
+ FT_Long* pnum_bytes,
+ FT_Bool delimiters )
+ {
+ ps_parser_skip_spaces( parser );
+ return ps_tobytes( &parser->cursor,
+ parser->limit,
+ max_bytes,
+ bytes,
+ pnum_bytes,
+ delimiters );
}
@@ -1069,7 +1440,8 @@
ps_parser_to_fixed( PS_Parser parser,
FT_Int power_ten )
{
- return t1_tofixed( &parser->cursor, parser->limit, power_ten );
+ ps_parser_skip_spaces( parser );
+ return ps_tofixed( &parser->cursor, parser->limit, power_ten );
}
@@ -1078,7 +1450,8 @@
FT_Int max_coords,
FT_Short* coords )
{
- return t1_tocoordarray( &parser->cursor, parser->limit,
+ ps_parser_skip_spaces( parser );
+ return ps_tocoordarray( &parser->cursor, parser->limit,
max_coords, coords );
}
@@ -1089,7 +1462,8 @@
FT_Fixed* values,
FT_Int power_ten )
{
- return t1_tofixedarray( &parser->cursor, parser->limit,
+ ps_parser_skip_spaces( parser );
+ return ps_tofixedarray( &parser->cursor, parser->limit,
max_values, values, power_ten );
}
@@ -1099,14 +1473,14 @@
FT_LOCAL_DEF( FT_String* )
T1_ToString( PS_Parser parser )
{
- return t1_tostring( &parser->cursor, parser->limit, parser->memory );
+ return ps_tostring( &parser->cursor, parser->limit, parser->memory );
}
FT_LOCAL_DEF( FT_Bool )
T1_ToBool( PS_Parser parser )
{
- return t1_tobool( &parser->cursor, parser->limit );
+ return ps_tobool( &parser->cursor, parser->limit );
}
#endif /* 0 */
@@ -1118,7 +1492,7 @@
FT_Byte* limit,
FT_Memory memory )
{
- parser->error = 0;
+ parser->error = PSaux_Err_Ok;
parser->base = base;
parser->limit = limit;
parser->cursor = base;
@@ -1292,7 +1666,7 @@
}
- /* check room for a new contour, then add it */
+ /* check space for a new contour, then add it */
FT_LOCAL_DEF( FT_Error )
t1_builder_add_contour( T1_Builder builder )
{
diff --git a/extras/freetype2/src/psaux/psobjs.h b/extras/freetype2/src/psaux/psobjs.h
index 9e81675bb..c2cbf2c79 100644
--- a/extras/freetype2/src/psaux/psobjs.h
+++ b/extras/freetype2/src/psaux/psobjs.h
@@ -4,7 +4,7 @@
/* */
/* Auxiliary functions for PostScript fonts (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -52,10 +52,10 @@ FT_BEGIN_HEADER
FT_Memory memory );
FT_LOCAL( FT_Error )
- ps_table_add( PS_Table table,
- FT_Int idx,
- void* object,
- FT_Int length );
+ ps_table_add( PS_Table table,
+ FT_Int idx,
+ void* object,
+ FT_PtrDist length );
FT_LOCAL( void )
ps_table_done( PS_Table table );
@@ -78,7 +78,7 @@ FT_BEGIN_HEADER
ps_parser_skip_spaces( PS_Parser parser );
FT_LOCAL( void )
- ps_parser_skip_alpha( PS_Parser parser );
+ ps_parser_skip_PS_token( PS_Parser parser );
FT_LOCAL( void )
ps_parser_to_token( PS_Parser parser,
@@ -108,6 +108,14 @@ FT_BEGIN_HEADER
ps_parser_to_int( PS_Parser parser );
+ FT_LOCAL( FT_Error )
+ ps_parser_to_bytes( PS_Parser parser,
+ FT_Byte* bytes,
+ FT_Long max_bytes,
+ FT_Long* pnum_bytes,
+ FT_Bool delimiters );
+
+
FT_LOCAL( FT_Fixed )
ps_parser_to_fixed( PS_Parser parser,
FT_Int power_ten );
diff --git a/extras/freetype2/src/psaux/rules.mk b/extras/freetype2/src/psaux/rules.mk
index 04730852f..7338d3657 100644
--- a/extras/freetype2/src/psaux/rules.mk
+++ b/extras/freetype2/src/psaux/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002 by
+# Copyright 1996-2000, 2002, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,26 +15,25 @@
# PSAUX driver directory
#
-PSAUX_DIR := $(SRC_)psaux
-PSAUX_DIR_ := $(PSAUX_DIR)$(SEP)
+PSAUX_DIR := $(SRC_DIR)/psaux
# compilation flags for the driver
#
-PSAUX_COMPILE := $(FT_COMPILE) $I$(PSAUX_DIR)
+PSAUX_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PSAUX_DIR))
# PSAUX driver sources (i.e., C files)
#
-PSAUX_DRV_SRC := $(PSAUX_DIR_)psobjs.c \
- $(PSAUX_DIR_)t1decode.c \
- $(PSAUX_DIR_)t1cmap.c \
- $(PSAUX_DIR_)psauxmod.c
+PSAUX_DRV_SRC := $(PSAUX_DIR)/psobjs.c \
+ $(PSAUX_DIR)/t1decode.c \
+ $(PSAUX_DIR)/t1cmap.c \
+ $(PSAUX_DIR)/psauxmod.c
# PSAUX driver headers
#
PSAUX_DRV_H := $(PSAUX_DRV_SRC:%c=%h) \
- $(PSAUX_DIR_)psauxerr.h
+ $(PSAUX_DIR)/psauxerr.h
# PSAUX driver object(s)
@@ -42,25 +41,25 @@ PSAUX_DRV_H := $(PSAUX_DRV_SRC:%c=%h) \
# PSAUX_DRV_OBJ_M is used during `multi' builds.
# PSAUX_DRV_OBJ_S is used during `single' builds.
#
-PSAUX_DRV_OBJ_M := $(PSAUX_DRV_SRC:$(PSAUX_DIR_)%.c=$(OBJ_)%.$O)
-PSAUX_DRV_OBJ_S := $(OBJ_)psaux.$O
+PSAUX_DRV_OBJ_M := $(PSAUX_DRV_SRC:$(PSAUX_DIR)/%.c=$(OBJ_DIR)/%.$O)
+PSAUX_DRV_OBJ_S := $(OBJ_DIR)/psaux.$O
# PSAUX driver source file for single build
#
-PSAUX_DRV_SRC_S := $(PSAUX_DIR_)psaux.c
+PSAUX_DRV_SRC_S := $(PSAUX_DIR)/psaux.c
# PSAUX driver - single object
#
$(PSAUX_DRV_OBJ_S): $(PSAUX_DRV_SRC_S) $(PSAUX_DRV_SRC) \
$(FREETYPE_H) $(PSAUX_DRV_H)
- $(PSAUX_COMPILE) $T$@ $(PSAUX_DRV_SRC_S)
+ $(PSAUX_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(PSAUX_DRV_SRC_S))
# PSAUX driver - multiple objects
#
-$(OBJ_)%.$O: $(PSAUX_DIR_)%.c $(FREETYPE_H) $(PSAUX_DRV_H)
- $(PSAUX_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(PSAUX_DIR)/%.c $(FREETYPE_H) $(PSAUX_DRV_H)
+ $(PSAUX_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
diff --git a/extras/freetype2/src/psaux/t1cmap.c b/extras/freetype2/src/psaux/t1cmap.c
index 0ddd3f5da..dcd99be49 100644
--- a/extras/freetype2/src/psaux/t1cmap.c
+++ b/extras/freetype2/src/psaux/t1cmap.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 character map support (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,6 +20,8 @@
#include FT_INTERNAL_DEBUG_H
+#include "psauxerr.h"
+
/*************************************************************************/
/*************************************************************************/
@@ -33,8 +35,8 @@
t1_cmap_std_init( T1_CMapStd cmap,
FT_Int is_expert )
{
- T1_Face face = (T1_Face)FT_CMAP_FACE( cmap );
- PSNames_Service psnames = (PSNames_Service)face->psnames;
+ T1_Face face = (T1_Face)FT_CMAP_FACE( cmap );
+ FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
cmap->num_glyphs = face->type1.num_glyphs;
@@ -261,26 +263,26 @@
{
FT_UInt32 u1 = ((T1_CMapUniPair)pair1)->unicode;
FT_UInt32 u2 = ((T1_CMapUniPair)pair2)->unicode;
-
+
if ( u1 < u2 )
return -1;
-
+
if ( u1 > u2 )
return +1;
-
+
return 0;
- }
+ }
FT_CALLBACK_DEF( FT_Error )
t1_cmap_unicode_init( T1_CMapUnicode cmap )
{
- FT_Error error;
- FT_UInt count;
- T1_Face face = (T1_Face)FT_CMAP_FACE( cmap );
- FT_Memory memory = FT_FACE_MEMORY( face );
- PSNames_Service psnames = (PSNames_Service)face->psnames;
+ FT_Error error;
+ FT_UInt count;
+ T1_Face face = (T1_Face)FT_CMAP_FACE( cmap );
+ FT_Memory memory = FT_FACE_MEMORY( face );
+ FT_Service_PsCMaps psnames = (FT_Service_PsCMaps)face->psnames;
cmap->num_pairs = 0;
@@ -314,13 +316,13 @@
}
}
}
-
+
new_count = (FT_UInt)( pair - cmap->pairs );
if ( new_count == 0 )
{
/* there are no unicode characters in here! */
FT_FREE( cmap->pairs );
- error = FT_Err_Invalid_Argument;
+ error = PSaux_Err_Invalid_Argument;
}
else
{
diff --git a/extras/freetype2/src/psaux/t1cmap.h b/extras/freetype2/src/psaux/t1cmap.h
index 0d68c999c..aa93d746c 100644
--- a/extras/freetype2/src/psaux/t1cmap.h
+++ b/extras/freetype2/src/psaux/t1cmap.h
@@ -4,7 +4,7 @@
/* */
/* Type 1 character map support (specification). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,7 +22,6 @@
#include <ft2build.h>
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_TYPE1_TYPES_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
FT_BEGIN_HEADER
@@ -47,16 +46,16 @@ FT_BEGIN_HEADER
FT_UInt num_glyphs;
const char* const* glyph_names;
-
+
} T1_CMapStdRec;
FT_CALLBACK_TABLE const FT_CMap_ClassRec
t1_cmap_standard_class_rec;
-
+
FT_CALLBACK_TABLE const FT_CMap_ClassRec
t1_cmap_expert_class_rec;
-
+
/*************************************************************************/
/*************************************************************************/
@@ -67,20 +66,20 @@ FT_BEGIN_HEADER
/*************************************************************************/
typedef struct T1_CMapCustomRec_* T1_CMapCustom;
-
+
typedef struct T1_CMapCustomRec_
{
FT_CMapRec cmap;
FT_UInt first;
FT_UInt count;
FT_UShort* indices;
-
+
} T1_CMapCustomRec;
FT_CALLBACK_TABLE const FT_CMap_ClassRec
t1_cmap_custom_class_rec;
-
+
/*************************************************************************/
/*************************************************************************/
@@ -97,7 +96,7 @@ FT_BEGIN_HEADER
{
FT_UInt32 unicode;
FT_UInt gindex;
-
+
} T1_CMapUniPairRec, *T1_CMapUniPair;
@@ -115,7 +114,7 @@ FT_BEGIN_HEADER
/* */
-
+
FT_END_HEADER
#endif /* __T1CMAP_H__ */
diff --git a/extras/freetype2/src/psaux/t1decode.c b/extras/freetype2/src/psaux/t1decode.c
index 27b4e877c..db1911e7b 100644
--- a/extras/freetype2/src/psaux/t1decode.c
+++ b/extras/freetype2/src/psaux/t1decode.c
@@ -4,7 +4,7 @@
/* */
/* PostScript Type 1 decoding routines (body). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -125,9 +125,9 @@
t1_lookup_glyph_by_stdcharcode( T1_Decoder decoder,
FT_Int charcode )
{
- FT_UInt n;
- const FT_String* glyph_name;
- PSNames_Service psnames = decoder->psnames;
+ FT_UInt n;
+ const FT_String* glyph_name;
+ FT_Service_PsCMaps psnames = decoder->psnames;
/* check range of standard char code */
@@ -143,7 +143,7 @@
if ( name && name[0] == glyph_name[0] &&
- ft_strcmp( name,glyph_name ) == 0 )
+ ft_strcmp( name, glyph_name ) == 0 )
return n;
}
@@ -241,8 +241,8 @@
/* subglyph 1 = accent character */
subg->index = achar_index;
subg->flags = FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES;
- subg->arg1 = adx - asb;
- subg->arg2 = ady;
+ subg->arg1 = (FT_Int)( adx - asb );
+ subg->arg2 = (FT_Int)ady;
/* set up remaining glyph fields */
glyph->num_subglyphs = 2;
@@ -262,10 +262,6 @@
if ( error )
goto Exit;
-#if 0
- n_base_points = base->n_points;
-#endif
-
/* save the left bearing and width of the base character */
/* as they will be erased by the next load. */
@@ -290,23 +286,8 @@
decoder->builder.left_bearing = left_bearing;
decoder->builder.advance = advance;
- /* XXX: old code doesn't work with PostScript hinter */
-#if 0
- /* Finally, move the accent */
- if ( decoder->builder.load_points )
- {
- FT_Outline dummy;
-
-
- dummy.n_points = (short)( base->n_points - n_base_points );
- dummy.points = base->points + n_base_points;
-
- FT_Outline_Translate( &dummy, adx - asb, ady );
- }
-#else
decoder->builder.pos_x = 0;
decoder->builder.pos_y = 0;
-#endif
Exit:
return error;
@@ -565,7 +546,7 @@
goto Stack_Underflow;
top -= 2;
- switch ( top[1] )
+ switch ( (FT_Int)top[1] )
{
case 1: /* start flex feature */
if ( top[0] != 0 )
@@ -706,7 +687,7 @@
values = top;
for ( nn = 0; nn < num_points; nn++ )
{
- FT_Int tmp = values[0];
+ FT_Long tmp = values[0];
for ( mm = 1; mm < blend->num_designs; mm++ )
@@ -785,8 +766,8 @@
case op_seac:
/* return immediately after the processing */
- return t1operator_seac( decoder, top[0], top[1],
- top[2], top[3], top[4] );
+ return t1operator_seac( decoder, top[0], top[1], top[2],
+ (FT_Int)top[3], (FT_Int)top[4] );
case op_sbw:
FT_TRACE4(( " sbw" ));
@@ -945,7 +926,7 @@
FT_TRACE4(( " callsubr" ));
- idx = top[0];
+ idx = (FT_Int)top[0];
if ( idx < 0 || idx >= (FT_Int)decoder->num_subrs )
{
FT_ERROR(( "t1_decoder_parse_charstrings: "
@@ -1129,11 +1110,10 @@
/* retrieve PSNames interface from list of current modules */
{
- PSNames_Service psnames = 0;
+ FT_Service_PsCMaps psnames = 0;
- psnames = (PSNames_Service)FT_Get_Module_Interface(
- FT_FACE_LIBRARY(face), "psnames" );
+ FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
if ( !psnames )
{
FT_ERROR(( "t1_decoder_init: " ));
@@ -1148,7 +1128,6 @@
decoder->num_glyphs = (FT_UInt)face->num_glyphs;
decoder->glyph_names = glyph_names;
- decoder->hint_flags = face->internal->hint_flags;
decoder->hint_mode = hint_mode;
decoder->blend = blend;
decoder->parse_callback = parse_callback;
diff --git a/extras/freetype2/src/psaux/t1decode.h b/extras/freetype2/src/psaux/t1decode.h
index fcb853ce8..00728db50 100644
--- a/extras/freetype2/src/psaux/t1decode.h
+++ b/extras/freetype2/src/psaux/t1decode.h
@@ -4,7 +4,7 @@
/* */
/* PostScript Type 1 decoding routines (specification). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,7 +22,6 @@
#include <ft2build.h>
#include FT_INTERNAL_POSTSCRIPT_AUX_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
#include FT_INTERNAL_TYPE1_TYPES_H
diff --git a/extras/freetype2/src/pshinter/Jamfile b/extras/freetype2/src/pshinter/Jamfile
index 8eb3dea8b..ee02a144b 100644
--- a/extras/freetype2/src/pshinter/Jamfile
+++ b/extras/freetype2/src/pshinter/Jamfile
@@ -1,4 +1,4 @@
-# FreeType 2 src/pshinter Jamfile (c) 2001 David Turner
+# FreeType 2 src/pshinter Jamfile (c) 2001, 2003 David Turner
#
SubDir FT2_TOP $(FT2_SRC_DIR) pshinter ;
@@ -8,7 +8,7 @@ SubDir FT2_TOP $(FT2_SRC_DIR) pshinter ;
if $(FT2_MULTI)
{
- _sources = pshrec pshglob pshalgo1 pshalgo2 pshalgo3 pshmod ;
+ _sources = pshrec pshglob pshalgo pshmod ;
}
else
{
diff --git a/extras/freetype2/src/pshinter/pshalgo.c b/extras/freetype2/src/pshinter/pshalgo.c
new file mode 100644
index 000000000..5f077d54d
--- /dev/null
+++ b/extras/freetype2/src/pshinter/pshalgo.c
@@ -0,0 +1,2091 @@
+/***************************************************************************/
+/* */
+/* pshalgo.c */
+/* */
+/* PostScript hinting algorithm (body). */
+/* */
+/* Copyright 2001, 2002, 2003, 2004 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used */
+/* modified and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_DEBUG_H
+#include "pshalgo.h"
+
+#include "pshnterr.h"
+
+
+#undef FT_COMPONENT
+#define FT_COMPONENT trace_pshalgo2
+
+
+#ifdef DEBUG_HINTER
+ PSH_Hint_Table ps_debug_hint_table = 0;
+ PSH_HintFunc ps_debug_hint_func = 0;
+ PSH_Glyph ps_debug_glyph = 0;
+#endif
+
+
+#define COMPUTE_INFLEXS /* compute inflection points to optimize `S' */
+ /* and similar glyphs */
+#define STRONGER /* slightly increase the contrast of smooth */
+ /* hinting */
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** BASIC HINTS RECORDINGS *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ /* return true if two stem hints overlap */
+ static FT_Int
+ psh_hint_overlap( PSH_Hint hint1,
+ PSH_Hint hint2 )
+ {
+ return hint1->org_pos + hint1->org_len >= hint2->org_pos &&
+ hint2->org_pos + hint2->org_len >= hint1->org_pos;
+ }
+
+
+ /* destroy hints table */
+ static void
+ psh_hint_table_done( PSH_Hint_Table table,
+ FT_Memory memory )
+ {
+ FT_FREE( table->zones );
+ table->num_zones = 0;
+ table->zone = 0;
+
+ FT_FREE( table->sort );
+ FT_FREE( table->hints );
+ table->num_hints = 0;
+ table->max_hints = 0;
+ table->sort_global = 0;
+ }
+
+
+ /* deactivate all hints in a table */
+ static void
+ psh_hint_table_deactivate( PSH_Hint_Table table )
+ {
+ FT_UInt count = table->max_hints;
+ PSH_Hint hint = table->hints;
+
+
+ for ( ; count > 0; count--, hint++ )
+ {
+ psh_hint_deactivate( hint );
+ hint->order = -1;
+ }
+ }
+
+
+ /* internal function to record a new hint */
+ static void
+ psh_hint_table_record( PSH_Hint_Table table,
+ FT_UInt idx )
+ {
+ PSH_Hint hint = table->hints + idx;
+
+
+ if ( idx >= table->max_hints )
+ {
+ FT_ERROR(( "psh_hint_table_record: invalid hint index %d\n", idx ));
+ return;
+ }
+
+ /* ignore active hints */
+ if ( psh_hint_is_active( hint ) )
+ return;
+
+ psh_hint_activate( hint );
+
+ /* now scan the current active hint set to check */
+ /* whether `hint' overlaps with another hint */
+ {
+ PSH_Hint* sorted = table->sort_global;
+ FT_UInt count = table->num_hints;
+ PSH_Hint hint2;
+
+
+ hint->parent = 0;
+ for ( ; count > 0; count--, sorted++ )
+ {
+ hint2 = sorted[0];
+
+ if ( psh_hint_overlap( hint, hint2 ) )
+ {
+ hint->parent = hint2;
+ break;
+ }
+ }
+ }
+
+ if ( table->num_hints < table->max_hints )
+ table->sort_global[table->num_hints++] = hint;
+ else
+ FT_ERROR(( "psh_hint_table_record: too many sorted hints! BUG!\n" ));
+ }
+
+
+ static void
+ psh_hint_table_record_mask( PSH_Hint_Table table,
+ PS_Mask hint_mask )
+ {
+ FT_Int mask = 0, val = 0;
+ FT_Byte* cursor = hint_mask->bytes;
+ FT_UInt idx, limit;
+
+
+ limit = hint_mask->num_bits;
+
+ for ( idx = 0; idx < limit; idx++ )
+ {
+ if ( mask == 0 )
+ {
+ val = *cursor++;
+ mask = 0x80;
+ }
+
+ if ( val & mask )
+ psh_hint_table_record( table, idx );
+
+ mask >>= 1;
+ }
+ }
+
+
+ /* create hints table */
+ static FT_Error
+ psh_hint_table_init( PSH_Hint_Table table,
+ PS_Hint_Table hints,
+ PS_Mask_Table hint_masks,
+ PS_Mask_Table counter_masks,
+ FT_Memory memory )
+ {
+ FT_UInt count;
+ FT_Error error;
+
+ FT_UNUSED( counter_masks );
+
+
+ count = hints->num_hints;
+
+ /* allocate our tables */
+ if ( FT_NEW_ARRAY( table->sort, 2 * count ) ||
+ FT_NEW_ARRAY( table->hints, count ) ||
+ FT_NEW_ARRAY( table->zones, 2 * count + 1 ) )
+ goto Exit;
+
+ table->max_hints = count;
+ table->sort_global = table->sort + count;
+ table->num_hints = 0;
+ table->num_zones = 0;
+ table->zone = 0;
+
+ /* initialize the `table->hints' array */
+ {
+ PSH_Hint write = table->hints;
+ PS_Hint read = hints->hints;
+
+
+ for ( ; count > 0; count--, write++, read++ )
+ {
+ write->org_pos = read->pos;
+ write->org_len = read->len;
+ write->flags = read->flags;
+ }
+ }
+
+ /* we now need to determine the initial `parent' stems; first */
+ /* activate the hints that are given by the initial hint masks */
+ if ( hint_masks )
+ {
+ PS_Mask mask = hint_masks->masks;
+
+
+ count = hint_masks->num_masks;
+ table->hint_masks = hint_masks;
+
+ for ( ; count > 0; count--, mask++ )
+ psh_hint_table_record_mask( table, mask );
+ }
+
+ /* finally, do a linear parse in case some hints were left alone */
+ if ( table->num_hints != table->max_hints )
+ {
+ FT_UInt idx;
+
+
+ FT_ERROR(( "psh_hint_table_init: missing/incorrect hint masks!\n" ));
+
+ count = table->max_hints;
+ for ( idx = 0; idx < count; idx++ )
+ psh_hint_table_record( table, idx );
+ }
+
+ Exit:
+ return error;
+ }
+
+
+ static void
+ psh_hint_table_activate_mask( PSH_Hint_Table table,
+ PS_Mask hint_mask )
+ {
+ FT_Int mask = 0, val = 0;
+ FT_Byte* cursor = hint_mask->bytes;
+ FT_UInt idx, limit, count;
+
+
+ limit = hint_mask->num_bits;
+ count = 0;
+
+ psh_hint_table_deactivate( table );
+
+ for ( idx = 0; idx < limit; idx++ )
+ {
+ if ( mask == 0 )
+ {
+ val = *cursor++;
+ mask = 0x80;
+ }
+
+ if ( val & mask )
+ {
+ PSH_Hint hint = &table->hints[idx];
+
+
+ if ( !psh_hint_is_active( hint ) )
+ {
+ FT_UInt count2;
+
+#if 0
+ PSH_Hint* sort = table->sort;
+ PSH_Hint hint2;
+
+
+ for ( count2 = count; count2 > 0; count2--, sort++ )
+ {
+ hint2 = sort[0];
+ if ( psh_hint_overlap( hint, hint2 ) )
+ FT_ERROR(( "psh_hint_table_activate_mask:"
+ " found overlapping hints\n" ))
+ }
+#else
+ count2 = 0;
+#endif
+
+ if ( count2 == 0 )
+ {
+ psh_hint_activate( hint );
+ if ( count < table->max_hints )
+ table->sort[count++] = hint;
+ else
+ FT_ERROR(( "psh_hint_tableactivate_mask:"
+ " too many active hints\n" ));
+ }
+ }
+ }
+
+ mask >>= 1;
+ }
+ table->num_hints = count;
+
+ /* now, sort the hints; they are guaranteed to not overlap */
+ /* so we can compare their "org_pos" field directly */
+ {
+ FT_Int i1, i2;
+ PSH_Hint hint1, hint2;
+ PSH_Hint* sort = table->sort;
+
+
+ /* a simple bubble sort will do, since in 99% of cases, the hints */
+ /* will be already sorted -- and the sort will be linear */
+ for ( i1 = 1; i1 < (FT_Int)count; i1++ )
+ {
+ hint1 = sort[i1];
+ for ( i2 = i1 - 1; i2 >= 0; i2-- )
+ {
+ hint2 = sort[i2];
+
+ if ( hint2->org_pos < hint1->org_pos )
+ break;
+
+ sort[i2 + 1] = hint2;
+ sort[i2] = hint1;
+ }
+ }
+ }
+ }
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** HINTS GRID-FITTING AND OPTIMIZATION *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+#if 1
+ static FT_Pos
+ psh_dimension_quantize_len( PSH_Dimension dim,
+ FT_Pos len,
+ FT_Bool do_snapping )
+ {
+ if ( len <= 64 )
+ len = 64;
+ else
+ {
+ FT_Pos delta = len - dim->stdw.widths[0].cur;
+
+
+ if ( delta < 0 )
+ delta = -delta;
+
+ if ( delta < 40 )
+ {
+ len = dim->stdw.widths[0].cur;
+ if ( len < 48 )
+ len = 48;
+ }
+
+ if ( len < 3 * 64 )
+ {
+ delta = ( len & 63 );
+ len &= -64;
+
+ if ( delta < 10 )
+ len += delta;
+
+ else if ( delta < 32 )
+ len += 10;
+
+ else if ( delta < 54 )
+ len += 54;
+
+ else
+ len += delta;
+ }
+ else
+ len = FT_PIX_ROUND( len );
+ }
+
+ if ( do_snapping )
+ len = FT_PIX_ROUND( len );
+
+ return len;
+ }
+#endif /* 0 */
+
+
+#ifdef DEBUG_HINTER
+
+ static void
+ ps_simple_scale( PSH_Hint_Table table,
+ FT_Fixed scale,
+ FT_Fixed delta,
+ FT_Int dimension )
+ {
+ PSH_Hint hint;
+ FT_UInt count;
+
+
+ for ( count = 0; count < table->max_hints; count++ )
+ {
+ hint = table->hints + count;
+
+ hint->cur_pos = FT_MulFix( hint->org_pos, scale ) + delta;
+ hint->cur_len = FT_MulFix( hint->org_len, scale );
+
+ if ( ps_debug_hint_func )
+ ps_debug_hint_func( hint, dimension );
+ }
+ }
+
+#endif /* DEBUG_HINTER */
+
+
+ static FT_Fixed
+ psh_hint_snap_stem_side_delta( FT_Fixed pos,
+ FT_Fixed len )
+ {
+ FT_Fixed delta1 = FT_PIX_ROUND( pos ) - pos;
+ FT_Fixed delta2 = FT_PIX_ROUND( pos + len ) - pos - len;
+
+
+ if ( FT_ABS( delta1 ) <= FT_ABS( delta2 ) )
+ return delta1;
+ else
+ return delta2;
+ }
+
+
+ static void
+ psh_hint_align( PSH_Hint hint,
+ PSH_Globals globals,
+ FT_Int dimension,
+ PSH_Glyph glyph )
+ {
+ PSH_Dimension dim = &globals->dimension[dimension];
+ FT_Fixed scale = dim->scale_mult;
+ FT_Fixed delta = dim->scale_delta;
+
+
+ if ( !psh_hint_is_fitted( hint ) )
+ {
+ FT_Pos pos = FT_MulFix( hint->org_pos, scale ) + delta;
+ FT_Pos len = FT_MulFix( hint->org_len, scale );
+
+ FT_Int do_snapping;
+ FT_Pos fit_len;
+ PSH_AlignmentRec align;
+
+
+ /* ignore stem alignments when requested through the hint flags */
+ if ( ( dimension == 0 && !glyph->do_horz_hints ) ||
+ ( dimension == 1 && !glyph->do_vert_hints ) )
+ {
+ hint->cur_pos = pos;
+ hint->cur_len = len;
+
+ psh_hint_set_fitted( hint );
+ return;
+ }
+
+ /* perform stem snapping when requested - this is necessary
+ * for monochrome and LCD hinting modes only
+ */
+ do_snapping = ( dimension == 0 && glyph->do_horz_snapping ) ||
+ ( dimension == 1 && glyph->do_vert_snapping );
+
+ hint->cur_len = fit_len = len;
+
+ /* check blue zones for horizontal stems */
+ align.align = PSH_BLUE_ALIGN_NONE;
+ align.align_bot = align.align_top = 0;
+
+ if ( dimension == 1 )
+ psh_blues_snap_stem( &globals->blues,
+ hint->org_pos + hint->org_len,
+ hint->org_pos,
+ &align );
+
+ switch ( align.align )
+ {
+ case PSH_BLUE_ALIGN_TOP:
+ /* the top of the stem is aligned against a blue zone */
+ hint->cur_pos = align.align_top - fit_len;
+ break;
+
+ case PSH_BLUE_ALIGN_BOT:
+ /* the bottom of the stem is aligned against a blue zone */
+ hint->cur_pos = align.align_bot;
+ break;
+
+ case PSH_BLUE_ALIGN_TOP | PSH_BLUE_ALIGN_BOT:
+ /* both edges of the stem are aligned against blue zones */
+ hint->cur_pos = align.align_bot;
+ hint->cur_len = align.align_top - align.align_bot;
+ break;
+
+ default:
+ {
+ PSH_Hint parent = hint->parent;
+
+
+ if ( parent )
+ {
+ FT_Pos par_org_center, par_cur_center;
+ FT_Pos cur_org_center, cur_delta;
+
+
+ /* ensure that parent is already fitted */
+ if ( !psh_hint_is_fitted( parent ) )
+ psh_hint_align( parent, globals, dimension, glyph );
+
+ /* keep original relation between hints, this is, use the */
+ /* scaled distance between the centers of the hints to */
+ /* compute the new position */
+ par_org_center = parent->org_pos + ( parent->org_len >> 1 );
+ par_cur_center = parent->cur_pos + ( parent->cur_len >> 1 );
+ cur_org_center = hint->org_pos + ( hint->org_len >> 1 );
+
+ cur_delta = FT_MulFix( cur_org_center - par_org_center, scale );
+ pos = par_cur_center + cur_delta - ( len >> 1 );
+ }
+
+ hint->cur_pos = pos;
+ hint->cur_len = fit_len;
+
+ /* Stem adjustment tries to snap stem widths to standard
+ * ones. This is important to prevent unpleasant rounding
+ * artefacts.
+ */
+ if ( glyph->do_stem_adjust )
+ {
+ if ( len <= 64 )
+ {
+ /* the stem is less than one pixel; we will center it
+ * around the nearest pixel center
+ */
+#if 1
+ pos = FT_PIX_FLOOR( pos + ( len >> 1 ) );
+#else
+ /* this seems to be a bug! */
+ pos = pos + FT_PIX_FLOOR( len >> 1 );
+#endif
+ len = 64;
+ }
+ else
+ {
+ len = psh_dimension_quantize_len( dim, len, 0 );
+ }
+ }
+
+ /* now that we have a good hinted stem width, try to position */
+ /* the stem along a pixel grid integer coordinate */
+ hint->cur_pos = pos + psh_hint_snap_stem_side_delta( pos, len );
+ hint->cur_len = len;
+ }
+ }
+
+ if ( do_snapping )
+ {
+ pos = hint->cur_pos;
+ len = hint->cur_len;
+
+ if ( len < 64 )
+ len = 64;
+ else
+ len = FT_PIX_ROUND( len );
+
+ switch ( align.align )
+ {
+ case PSH_BLUE_ALIGN_TOP:
+ hint->cur_pos = align.align_top - len;
+ hint->cur_len = len;
+ break;
+
+ case PSH_BLUE_ALIGN_BOT:
+ hint->cur_len = len;
+ break;
+
+ case PSH_BLUE_ALIGN_BOT | PSH_BLUE_ALIGN_TOP:
+ /* don't touch */
+ break;
+
+
+ default:
+ hint->cur_len = len;
+ if ( len & 64 )
+ pos = FT_PIX_FLOOR( pos + ( len >> 1 ) ) + 32;
+ else
+ pos = FT_PIX_ROUND( pos + ( len >> 1 ) );
+
+ hint->cur_pos = pos - ( len >> 1 );
+ hint->cur_len = len;
+ }
+ }
+
+ psh_hint_set_fitted( hint );
+
+#ifdef DEBUG_HINTER
+ if ( ps_debug_hint_func )
+ ps_debug_hint_func( hint, dimension );
+#endif
+ }
+ }
+
+
+#if 0 /* not used for now, experimental */
+
+ /*
+ * A variant to perform "light" hinting (i.e. FT_RENDER_MODE_LIGHT)
+ * of stems
+ */
+ static void
+ psh_hint_align_light( PSH_Hint hint,
+ PSH_Globals globals,
+ FT_Int dimension,
+ PSH_Glyph glyph )
+ {
+ PSH_Dimension dim = &globals->dimension[dimension];
+ FT_Fixed scale = dim->scale_mult;
+ FT_Fixed delta = dim->scale_delta;
+
+
+ if ( !psh_hint_is_fitted( hint ) )
+ {
+ FT_Pos pos = FT_MulFix( hint->org_pos, scale ) + delta;
+ FT_Pos len = FT_MulFix( hint->org_len, scale );
+
+ FT_Pos fit_len;
+
+ PSH_AlignmentRec align;
+
+
+ /* ignore stem alignments when requested through the hint flags */
+ if ( ( dimension == 0 && !glyph->do_horz_hints ) ||
+ ( dimension == 1 && !glyph->do_vert_hints ) )
+ {
+ hint->cur_pos = pos;
+ hint->cur_len = len;
+
+ psh_hint_set_fitted( hint );
+ return;
+ }
+
+ fit_len = len;
+
+ hint->cur_len = fit_len;
+
+ /* check blue zones for horizontal stems */
+ align.align = PSH_BLUE_ALIGN_NONE;
+ align.align_bot = align.align_top = 0;
+
+ if ( dimension == 1 )
+ psh_blues_snap_stem( &globals->blues,
+ hint->org_pos + hint->org_len,
+ hint->org_pos,
+ &align );
+
+ switch ( align.align )
+ {
+ case PSH_BLUE_ALIGN_TOP:
+ /* the top of the stem is aligned against a blue zone */
+ hint->cur_pos = align.align_top - fit_len;
+ break;
+
+ case PSH_BLUE_ALIGN_BOT:
+ /* the bottom of the stem is aligned against a blue zone */
+ hint->cur_pos = align.align_bot;
+ break;
+
+ case PSH_BLUE_ALIGN_TOP | PSH_BLUE_ALIGN_BOT:
+ /* both edges of the stem are aligned against blue zones */
+ hint->cur_pos = align.align_bot;
+ hint->cur_len = align.align_top - align.align_bot;
+ break;
+
+ default:
+ {
+ PSH_Hint parent = hint->parent;
+
+
+ if ( parent )
+ {
+ FT_Pos par_org_center, par_cur_center;
+ FT_Pos cur_org_center, cur_delta;
+
+
+ /* ensure that parent is already fitted */
+ if ( !psh_hint_is_fitted( parent ) )
+ psh_hint_align_light( parent, globals, dimension, glyph );
+
+ par_org_center = parent->org_pos + ( parent->org_len / 2 );
+ par_cur_center = parent->cur_pos + ( parent->cur_len / 2 );
+ cur_org_center = hint->org_pos + ( hint->org_len / 2 );
+
+ cur_delta = FT_MulFix( cur_org_center - par_org_center, scale );
+ pos = par_cur_center + cur_delta - ( len >> 1 );
+ }
+
+ /* Stems less than one pixel wide are easy -- we want to
+ * make them as dark as possible, so they must fall within
+ * one pixel. If the stem is split between two pixels
+ * then snap the edge that is nearer to the pixel boundary
+ * to the pixel boundary.
+ */
+ if ( len <= 64 )
+ {
+ if ( ( pos + len + 63 ) / 64 != pos / 64 + 1 )
+ pos += psh_hint_snap_stem_side_delta ( pos, len );
+ }
+
+ /* Position stems other to minimize the amount of mid-grays.
+ * There are, in general, two positions that do this,
+ * illustrated as A) and B) below.
+ *
+ * + + + +
+ *
+ * A) |--------------------------------|
+ * B) |--------------------------------|
+ * C) |--------------------------------|
+ *
+ * Position A) (split the excess stem equally) should be better
+ * for stems of width N + f where f < 0.5.
+ *
+ * Position B) (split the deficiency equally) should be better
+ * for stems of width N + f where f > 0.5.
+ *
+ * It turns out though that minimizing the total number of lit
+ * pixels is also important, so position C), with one edge
+ * aligned with a pixel boundary is actually preferable
+ * to A). There are also more possibile positions for C) than
+ * for A) or B), so it involves less distortion of the overall
+ * character shape.
+ */
+ else /* len > 64 */
+ {
+ FT_Fixed frac_len = len & 63;
+ FT_Fixed center = pos + ( len >> 1 );
+ FT_Fixed delta_a, delta_b;
+
+
+ if ( ( len / 64 ) & 1 )
+ {
+ delta_a = FT_PIX_FLOOR( center ) + 32 - center;
+ delta_b = FT_PIX_ROUND( center ) - center;
+ }
+ else
+ {
+ delta_a = FT_PIX_ROUND( center ) - center;
+ delta_b = FT_PIX_FLOOR( center ) + 32 - center;
+ }
+
+ /* We choose between B) and C) above based on the amount
+ * of fractinal stem width; for small amounts, choose
+ * C) always, for large amounts, B) always, and inbetween,
+ * pick whichever one involves less stem movement.
+ */
+ if ( frac_len < 32 )
+ {
+ pos += psh_hint_snap_stem_side_delta ( pos, len );
+ }
+ else if ( frac_len < 48 )
+ {
+ FT_Fixed side_delta = psh_hint_snap_stem_side_delta ( pos,
+ len );
+
+ if ( FT_ABS( side_delta ) < FT_ABS( delta_b ) )
+ pos += side_delta;
+ else
+ pos += delta_b;
+ }
+ else
+ {
+ pos += delta_b;
+ }
+ }
+
+ hint->cur_pos = pos;
+ }
+ } /* switch */
+
+ psh_hint_set_fitted( hint );
+
+#ifdef DEBUG_HINTER
+ if ( ps_debug_hint_func )
+ ps_debug_hint_func( hint, dimension );
+#endif
+ }
+ }
+
+#endif /* 0 */
+
+
+ static void
+ psh_hint_table_align_hints( PSH_Hint_Table table,
+ PSH_Globals globals,
+ FT_Int dimension,
+ PSH_Glyph glyph )
+ {
+ PSH_Hint hint;
+ FT_UInt count;
+
+#ifdef DEBUG_HINTER
+
+ PSH_Dimension dim = &globals->dimension[dimension];
+ FT_Fixed scale = dim->scale_mult;
+ FT_Fixed delta = dim->scale_delta;
+
+
+ if ( ps_debug_no_vert_hints && dimension == 0 )
+ {
+ ps_simple_scale( table, scale, delta, dimension );
+ return;
+ }
+
+ if ( ps_debug_no_horz_hints && dimension == 1 )
+ {
+ ps_simple_scale( table, scale, delta, dimension );
+ return;
+ }
+
+#endif /* DEBUG_HINTER*/
+
+ hint = table->hints;
+ count = table->max_hints;
+
+ for ( ; count > 0; count--, hint++ )
+ psh_hint_align( hint, globals, dimension, glyph );
+ }
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** POINTS INTERPOLATION ROUTINES *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+#define PSH_ZONE_MIN -3200000L
+#define PSH_ZONE_MAX +3200000L
+
+#define xxDEBUG_ZONES
+
+
+#ifdef DEBUG_ZONES
+
+#include <stdio.h>
+
+ static void
+ psh_print_zone( PSH_Zone zone )
+ {
+ printf( "zone [scale,delta,min,max] = [%.3f,%.3f,%d,%d]\n",
+ zone->scale / 65536.0,
+ zone->delta / 64.0,
+ zone->min,
+ zone->max );
+ }
+
+#else
+
+#define psh_print_zone( x ) do { } while ( 0 )
+
+#endif /* DEBUG_ZONES */
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** HINTER GLYPH MANAGEMENT *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+#ifdef COMPUTE_INFLEXS
+
+ /* compute all inflex points in a given glyph */
+ static void
+ psh_glyph_compute_inflections( PSH_Glyph glyph )
+ {
+ FT_UInt n;
+
+
+ for ( n = 0; n < glyph->num_contours; n++ )
+ {
+ PSH_Point first, start, end, before, after;
+ FT_Angle angle_in, angle_seg, angle_out;
+ FT_Angle diff_in, diff_out;
+ FT_Int finished = 0;
+
+
+ /* we need at least 4 points to create an inflection point */
+ if ( glyph->contours[n].count < 4 )
+ continue;
+
+ /* compute first segment in contour */
+ first = glyph->contours[n].start;
+
+ start = end = first;
+ do
+ {
+ end = end->next;
+ if ( end == first )
+ goto Skip;
+
+ } while ( PSH_POINT_EQUAL_ORG( end, first ) );
+
+ angle_seg = PSH_POINT_ANGLE( start, end );
+
+ /* extend the segment start whenever possible */
+ before = start;
+ do
+ {
+ do
+ {
+ start = before;
+ before = before->prev;
+ if ( before == first )
+ goto Skip;
+
+ } while ( PSH_POINT_EQUAL_ORG( before, start ) );
+
+ angle_in = PSH_POINT_ANGLE( before, start );
+
+ } while ( angle_in == angle_seg );
+
+ first = start;
+ diff_in = FT_Angle_Diff( angle_in, angle_seg );
+
+ /* now, process all segments in the contour */
+ do
+ {
+ /* first, extend current segment's end whenever possible */
+ after = end;
+ do
+ {
+ do
+ {
+ end = after;
+ after = after->next;
+ if ( after == first )
+ finished = 1;
+
+ } while ( PSH_POINT_EQUAL_ORG( end, after ) );
+
+ angle_out = PSH_POINT_ANGLE( end, after );
+
+ } while ( angle_out == angle_seg );
+
+ diff_out = FT_Angle_Diff( angle_seg, angle_out );
+
+ if ( ( diff_in ^ diff_out ) < 0 )
+ {
+ /* diff_in and diff_out have different signs, we have */
+ /* inflection points here... */
+
+ do
+ {
+ psh_point_set_inflex( start );
+ start = start->next;
+ }
+ while ( start != end );
+
+ psh_point_set_inflex( start );
+ }
+
+ start = end;
+ end = after;
+ angle_seg = angle_out;
+ diff_in = diff_out;
+
+ } while ( !finished );
+
+ Skip:
+ ;
+ }
+ }
+
+#endif /* COMPUTE_INFLEXS */
+
+
+ static void
+ psh_glyph_done( PSH_Glyph glyph )
+ {
+ FT_Memory memory = glyph->memory;
+
+
+ psh_hint_table_done( &glyph->hint_tables[1], memory );
+ psh_hint_table_done( &glyph->hint_tables[0], memory );
+
+ FT_FREE( glyph->points );
+ FT_FREE( glyph->contours );
+
+ glyph->num_points = 0;
+ glyph->num_contours = 0;
+
+ glyph->memory = 0;
+ }
+
+
+ static int
+ psh_compute_dir( FT_Pos dx,
+ FT_Pos dy )
+ {
+ FT_Pos ax, ay;
+ int result = PSH_DIR_NONE;
+
+
+ ax = ( dx >= 0 ) ? dx : -dx;
+ ay = ( dy >= 0 ) ? dy : -dy;
+
+ if ( ay * 12 < ax )
+ {
+ /* |dy| <<< |dx| means a near-horizontal segment */
+ result = ( dx >= 0 ) ? PSH_DIR_RIGHT : PSH_DIR_LEFT;
+ }
+ else if ( ax * 12 < ay )
+ {
+ /* |dx| <<< |dy| means a near-vertical segment */
+ result = ( dy >= 0 ) ? PSH_DIR_UP : PSH_DIR_DOWN;
+ }
+
+ return result;
+ }
+
+
+ /* load outline point coordinates into hinter glyph */
+ static void
+ psh_glyph_load_points( PSH_Glyph glyph,
+ FT_Int dimension )
+ {
+ FT_Vector* vec = glyph->outline->points;
+ PSH_Point point = glyph->points;
+ FT_UInt count = glyph->num_points;
+
+
+ for ( ; count > 0; count--, point++, vec++ )
+ {
+ point->flags2 = 0;
+ point->hint = NULL;
+ if ( dimension == 0 )
+ {
+ point->org_u = vec->x;
+ point->org_v = vec->y;
+ }
+ else
+ {
+ point->org_u = vec->y;
+ point->org_v = vec->x;
+ }
+
+#ifdef DEBUG_HINTER
+ point->org_x = vec->x;
+ point->org_y = vec->y;
+#endif
+
+ }
+ }
+
+
+ /* save hinted point coordinates back to outline */
+ static void
+ psh_glyph_save_points( PSH_Glyph glyph,
+ FT_Int dimension )
+ {
+ FT_UInt n;
+ PSH_Point point = glyph->points;
+ FT_Vector* vec = glyph->outline->points;
+ char* tags = glyph->outline->tags;
+
+
+ for ( n = 0; n < glyph->num_points; n++ )
+ {
+ if ( dimension == 0 )
+ vec[n].x = point->cur_u;
+ else
+ vec[n].y = point->cur_u;
+
+ if ( psh_point_is_strong( point ) )
+ tags[n] |= (char)( ( dimension == 0 ) ? 32 : 64 );
+
+#ifdef DEBUG_HINTER
+
+ if ( dimension == 0 )
+ {
+ point->cur_x = point->cur_u;
+ point->flags_x = point->flags2 | point->flags;
+ }
+ else
+ {
+ point->cur_y = point->cur_u;
+ point->flags_y = point->flags2 | point->flags;
+ }
+
+#endif
+
+ point++;
+ }
+ }
+
+
+ static FT_Error
+ psh_glyph_init( PSH_Glyph glyph,
+ FT_Outline* outline,
+ PS_Hints ps_hints,
+ PSH_Globals globals )
+ {
+ FT_Error error;
+ FT_Memory memory;
+
+
+ /* clear all fields */
+ FT_MEM_ZERO( glyph, sizeof ( *glyph ) );
+
+ memory = glyph->memory = globals->memory;
+
+ /* allocate and setup points + contours arrays */
+ if ( FT_NEW_ARRAY( glyph->points, outline->n_points ) ||
+ FT_NEW_ARRAY( glyph->contours, outline->n_contours ) )
+ goto Exit;
+
+ glyph->num_points = outline->n_points;
+ glyph->num_contours = outline->n_contours;
+
+ {
+ FT_UInt first = 0, next, n;
+ PSH_Point points = glyph->points;
+ PSH_Contour contour = glyph->contours;
+
+
+ for ( n = 0; n < glyph->num_contours; n++ )
+ {
+ FT_Int count;
+ PSH_Point point;
+
+
+ next = outline->contours[n] + 1;
+ count = next - first;
+
+ contour->start = points + first;
+ contour->count = (FT_UInt)count;
+
+ if ( count > 0 )
+ {
+ point = points + first;
+
+ point->prev = points + next - 1;
+ point->contour = contour;
+
+ for ( ; count > 1; count-- )
+ {
+ point[0].next = point + 1;
+ point[1].prev = point;
+ point++;
+ point->contour = contour;
+ }
+ point->next = points + first;
+ }
+
+ contour++;
+ first = next;
+ }
+ }
+
+ {
+ PSH_Point points = glyph->points;
+ PSH_Point point = points;
+ FT_Vector* vec = outline->points;
+ FT_UInt n;
+
+
+ for ( n = 0; n < glyph->num_points; n++, point++ )
+ {
+ FT_Int n_prev = (FT_Int)( point->prev - points );
+ FT_Int n_next = (FT_Int)( point->next - points );
+ FT_Pos dxi, dyi, dxo, dyo;
+
+
+ if ( !( outline->tags[n] & FT_CURVE_TAG_ON ) )
+ point->flags = PSH_POINT_OFF;
+
+ dxi = vec[n].x - vec[n_prev].x;
+ dyi = vec[n].y - vec[n_prev].y;
+
+ point->dir_in = (FT_Char)psh_compute_dir( dxi, dyi );
+
+ dxo = vec[n_next].x - vec[n].x;
+ dyo = vec[n_next].y - vec[n].y;
+
+ point->dir_out = (FT_Char)psh_compute_dir( dxo, dyo );
+
+ /* detect smooth points */
+ if ( point->flags & PSH_POINT_OFF )
+ point->flags |= PSH_POINT_SMOOTH;
+ else if ( point->dir_in != PSH_DIR_NONE ||
+ point->dir_out != PSH_DIR_NONE )
+ {
+ if ( point->dir_in == point->dir_out )
+ point->flags |= PSH_POINT_SMOOTH;
+ }
+ else
+ {
+ FT_Angle angle_in, angle_out, diff;
+
+
+ angle_in = FT_Atan2( dxi, dyi );
+ angle_out = FT_Atan2( dxo, dyo );
+
+ diff = angle_in - angle_out;
+ if ( diff < 0 )
+ diff = -diff;
+
+ if ( diff > FT_ANGLE_PI )
+ diff = FT_ANGLE_2PI - diff;
+
+ if ( diff < FT_ANGLE_PI / 16 )
+ point->flags |= PSH_POINT_SMOOTH;
+ }
+ }
+ }
+
+ glyph->outline = outline;
+ glyph->globals = globals;
+
+#ifdef COMPUTE_INFLEXS
+ psh_glyph_load_points( glyph, 0 );
+ psh_glyph_compute_inflections( glyph );
+#endif /* COMPUTE_INFLEXS */
+
+ /* now deal with hints tables */
+ error = psh_hint_table_init( &glyph->hint_tables [0],
+ &ps_hints->dimension[0].hints,
+ &ps_hints->dimension[0].masks,
+ &ps_hints->dimension[0].counters,
+ memory );
+ if ( error )
+ goto Exit;
+
+ error = psh_hint_table_init( &glyph->hint_tables [1],
+ &ps_hints->dimension[1].hints,
+ &ps_hints->dimension[1].masks,
+ &ps_hints->dimension[1].counters,
+ memory );
+ if ( error )
+ goto Exit;
+
+ Exit:
+ return error;
+ }
+
+
+ /* compute all extrema in a glyph for a given dimension */
+ static void
+ psh_glyph_compute_extrema( PSH_Glyph glyph )
+ {
+ FT_UInt n;
+
+
+ /* first of all, compute all local extrema */
+ for ( n = 0; n < glyph->num_contours; n++ )
+ {
+ PSH_Point first = glyph->contours[n].start;
+ PSH_Point point, before, after;
+
+
+ if ( glyph->contours[n].count == 0 )
+ continue;
+
+ point = first;
+ before = point;
+ after = point;
+
+ do
+ {
+ before = before->prev;
+ if ( before == first )
+ goto Skip;
+
+ } while ( before->org_u == point->org_u );
+
+ first = point = before->next;
+
+ for (;;)
+ {
+ after = point;
+ do
+ {
+ after = after->next;
+ if ( after == first )
+ goto Next;
+
+ } while ( after->org_u == point->org_u );
+
+ if ( before->org_u < point->org_u )
+ {
+ if ( after->org_u < point->org_u )
+ {
+ /* local maximum */
+ goto Extremum;
+ }
+ }
+ else /* before->org_u > point->org_u */
+ {
+ if ( after->org_u > point->org_u )
+ {
+ /* local minimum */
+ Extremum:
+ do
+ {
+ psh_point_set_extremum( point );
+ point = point->next;
+
+ } while ( point != after );
+ }
+ }
+
+ before = after->prev;
+ point = after;
+
+ } /* for */
+
+ Next:
+ ;
+ }
+
+ /* for each extremum, determine its direction along the */
+ /* orthogonal axis */
+ for ( n = 0; n < glyph->num_points; n++ )
+ {
+ PSH_Point point, before, after;
+
+
+ point = &glyph->points[n];
+ before = point;
+ after = point;
+
+ if ( psh_point_is_extremum( point ) )
+ {
+ do
+ {
+ before = before->prev;
+ if ( before == point )
+ goto Skip;
+
+ } while ( before->org_v == point->org_v );
+
+ do
+ {
+ after = after->next;
+ if ( after == point )
+ goto Skip;
+
+ } while ( after->org_v == point->org_v );
+ }
+
+ if ( before->org_v < point->org_v &&
+ after->org_v > point->org_v )
+ {
+ psh_point_set_positive( point );
+ }
+ else if ( before->org_v > point->org_v &&
+ after->org_v < point->org_v )
+ {
+ psh_point_set_negative( point );
+ }
+
+ Skip:
+ ;
+ }
+ }
+
+
+ /* major_dir is the direction for points on the bottom/left of the stem; */
+ /* Points on the top/right of the stem will have a direction of */
+ /* -major_dir. */
+
+ static void
+ psh_hint_table_find_strong_point( PSH_Hint_Table table,
+ PSH_Point point,
+ FT_Int threshold,
+ FT_Int major_dir )
+ {
+ PSH_Hint* sort = table->sort;
+ FT_UInt num_hints = table->num_hints;
+ FT_Int point_dir = 0;
+
+
+ if ( PSH_DIR_COMPARE( point->dir_in, major_dir ) )
+ point_dir = point->dir_in;
+
+ else if ( PSH_DIR_COMPARE( point->dir_out, major_dir ) )
+ point_dir = point->dir_out;
+
+ if ( point_dir )
+ {
+ FT_UInt flag;
+
+
+ for ( ; num_hints > 0; num_hints--, sort++ )
+ {
+ PSH_Hint hint = sort[0];
+ FT_Pos d;
+
+
+ if ( point_dir == major_dir )
+ {
+ flag = PSH_POINT_EDGE_MIN;
+ d = point->org_u - hint->org_pos;
+
+ if ( FT_ABS( d ) < threshold )
+ {
+ Is_Strong:
+ psh_point_set_strong( point );
+ point->flags2 |= flag;
+ point->hint = hint;
+ break;
+ }
+ }
+ else if ( point_dir == -major_dir )
+ {
+ flag = PSH_POINT_EDGE_MAX;
+ d = point->org_u - hint->org_pos - hint->org_len;
+
+ if ( FT_ABS( d ) < threshold )
+ goto Is_Strong;
+ }
+ }
+ }
+
+#if 1
+ else if ( psh_point_is_extremum( point ) )
+ {
+ /* treat extrema as special cases for stem edge alignment */
+ FT_UInt min_flag, max_flag;
+
+
+ if ( major_dir == PSH_DIR_HORIZONTAL )
+ {
+ min_flag = PSH_POINT_POSITIVE;
+ max_flag = PSH_POINT_NEGATIVE;
+ }
+ else
+ {
+ min_flag = PSH_POINT_NEGATIVE;
+ max_flag = PSH_POINT_POSITIVE;
+ }
+
+ for ( ; num_hints > 0; num_hints--, sort++ )
+ {
+ PSH_Hint hint = sort[0];
+ FT_Pos d;
+ FT_Int flag;
+
+
+ if ( point->flags2 & min_flag )
+ {
+ flag = PSH_POINT_EDGE_MIN;
+ d = point->org_u - hint->org_pos;
+
+ if ( FT_ABS( d ) < threshold )
+ {
+ Is_Strong2:
+ point->flags2 |= flag;
+ point->hint = hint;
+ psh_point_set_strong( point );
+ break;
+ }
+ }
+ else if ( point->flags2 & max_flag )
+ {
+ flag = PSH_POINT_EDGE_MAX;
+ d = point->org_u - hint->org_pos - hint->org_len;
+
+ if ( FT_ABS( d ) < threshold )
+ goto Is_Strong2;
+ }
+
+ if ( point->org_u >= hint->org_pos &&
+ point->org_u <= hint->org_pos + hint->org_len )
+ {
+ point->hint = hint;
+ }
+ }
+ }
+
+#endif /* 1 */
+ }
+
+
+ /* the accepted shift for strong points in fractional pixels */
+#define PSH_STRONG_THRESHOLD 32
+
+ /* the maximum shift value in font units */
+#define PSH_STRONG_THRESHOLD_MAXIMUM 30
+
+
+ /* find strong points in a glyph */
+ static void
+ psh_glyph_find_strong_points( PSH_Glyph glyph,
+ FT_Int dimension )
+ {
+ /* a point is `strong' if it is located on a stem edge and */
+ /* has an `in' or `out' tangent parallel to the hint's direction */
+
+ PSH_Hint_Table table = &glyph->hint_tables[dimension];
+ PS_Mask mask = table->hint_masks->masks;
+ FT_UInt num_masks = table->hint_masks->num_masks;
+ FT_UInt first = 0;
+ FT_Int major_dir = dimension == 0 ? PSH_DIR_VERTICAL
+ : PSH_DIR_HORIZONTAL;
+ PSH_Dimension dim = &glyph->globals->dimension[dimension];
+ FT_Fixed scale = dim->scale_mult;
+ FT_Int threshold;
+
+
+ threshold = (FT_Int)FT_DivFix( PSH_STRONG_THRESHOLD, scale );
+ if ( threshold > PSH_STRONG_THRESHOLD_MAXIMUM )
+ threshold = PSH_STRONG_THRESHOLD_MAXIMUM;
+
+ /* process secondary hints to `selected' points */
+ if ( num_masks > 1 && glyph->num_points > 0 )
+ {
+ first = mask->end_point;
+ mask++;
+ for ( ; num_masks > 1; num_masks--, mask++ )
+ {
+ FT_UInt next;
+ FT_Int count;
+
+
+ next = mask->end_point;
+ count = next - first;
+ if ( count > 0 )
+ {
+ PSH_Point point = glyph->points + first;
+
+
+ psh_hint_table_activate_mask( table, mask );
+
+ for ( ; count > 0; count--, point++ )
+ psh_hint_table_find_strong_point( table, point,
+ threshold, major_dir );
+ }
+ first = next;
+ }
+ }
+
+ /* process primary hints for all points */
+ if ( num_masks == 1 )
+ {
+ FT_UInt count = glyph->num_points;
+ PSH_Point point = glyph->points;
+
+
+ psh_hint_table_activate_mask( table, table->hint_masks->masks );
+ for ( ; count > 0; count--, point++ )
+ {
+ if ( !psh_point_is_strong( point ) )
+ psh_hint_table_find_strong_point( table, point,
+ threshold, major_dir );
+ }
+ }
+
+ /* now, certain points may have been attached to a hint and */
+ /* not marked as strong; update their flags then */
+ {
+ FT_UInt count = glyph->num_points;
+ PSH_Point point = glyph->points;
+
+
+ for ( ; count > 0; count--, point++ )
+ if ( point->hint && !psh_point_is_strong( point ) )
+ psh_point_set_strong( point );
+ }
+ }
+
+
+ /* find points in a glyph which are in a blue zone and have `in' or */
+ /* `out' tangents parallel to the horizontal axis */
+ static void
+ psh_glyph_find_blue_points( PSH_Blues blues,
+ PSH_Glyph glyph )
+ {
+ PSH_Blue_Table table;
+ PSH_Blue_Zone zone;
+ FT_UInt glyph_count = glyph->num_points;
+ FT_UInt blue_count;
+ PSH_Point point = glyph->points;
+
+
+ for ( ; glyph_count > 0; glyph_count--, point++ )
+ {
+ FT_Pos y;
+
+
+ /* check tangents */
+ if ( !PSH_DIR_COMPARE( point->dir_in, PSH_DIR_HORIZONTAL ) &&
+ !PSH_DIR_COMPARE( point->dir_out, PSH_DIR_HORIZONTAL ) )
+ continue;
+
+ /* skip strong points */
+ if ( psh_point_is_strong( point ) )
+ continue;
+
+ y = point->org_u;
+
+ /* look up top zones */
+ table = &blues->normal_top;
+ blue_count = table->count;
+ zone = table->zones;
+
+ for ( ; blue_count > 0; blue_count--, zone++ )
+ {
+ FT_Pos delta = y - zone->org_bottom;
+
+
+ if ( delta < -blues->blue_fuzz )
+ break;
+
+ if ( y <= zone->org_top + blues->blue_fuzz )
+ if ( blues->no_overshoots || delta <= blues->blue_threshold )
+ {
+ point->cur_u = zone->cur_bottom;
+ psh_point_set_strong( point );
+ psh_point_set_fitted( point );
+ }
+ }
+
+ /* look up bottom zones */
+ table = &blues->normal_bottom;
+ blue_count = table->count;
+ zone = table->zones + blue_count - 1;
+
+ for ( ; blue_count > 0; blue_count--, zone-- )
+ {
+ FT_Pos delta = zone->org_top - y;
+
+
+ if ( delta < -blues->blue_fuzz )
+ break;
+
+ if ( y >= zone->org_bottom - blues->blue_fuzz )
+ if ( blues->no_overshoots || delta < blues->blue_threshold )
+ {
+ point->cur_u = zone->cur_top;
+ psh_point_set_strong( point );
+ psh_point_set_fitted( point );
+ }
+ }
+ }
+ }
+
+
+ /* interpolate strong points with the help of hinted coordinates */
+ static void
+ psh_glyph_interpolate_strong_points( PSH_Glyph glyph,
+ FT_Int dimension )
+ {
+ PSH_Dimension dim = &glyph->globals->dimension[dimension];
+ FT_Fixed scale = dim->scale_mult;
+
+ FT_UInt count = glyph->num_points;
+ PSH_Point point = glyph->points;
+
+
+ for ( ; count > 0; count--, point++ )
+ {
+ PSH_Hint hint = point->hint;
+
+
+ if ( hint )
+ {
+ FT_Pos delta;
+
+
+ if ( psh_point_is_edge_min( point ) )
+ point->cur_u = hint->cur_pos;
+
+ else if ( psh_point_is_edge_max( point ) )
+ point->cur_u = hint->cur_pos + hint->cur_len;
+
+ else
+ {
+ delta = point->org_u - hint->org_pos;
+
+ if ( delta <= 0 )
+ point->cur_u = hint->cur_pos + FT_MulFix( delta, scale );
+
+ else if ( delta >= hint->org_len )
+ point->cur_u = hint->cur_pos + hint->cur_len +
+ FT_MulFix( delta - hint->org_len, scale );
+
+ else if ( hint->org_len > 0 )
+ point->cur_u = hint->cur_pos +
+ FT_MulDiv( delta, hint->cur_len,
+ hint->org_len );
+ else
+ point->cur_u = hint->cur_pos;
+ }
+ psh_point_set_fitted( point );
+ }
+ }
+ }
+
+
+ static void
+ psh_glyph_interpolate_normal_points( PSH_Glyph glyph,
+ FT_Int dimension )
+ {
+
+#if 1
+ /* first technique: a point is strong if it is a local extremum */
+
+ PSH_Dimension dim = &glyph->globals->dimension[dimension];
+ FT_Fixed scale = dim->scale_mult;
+
+ FT_UInt count = glyph->num_points;
+ PSH_Point point = glyph->points;
+
+
+ for ( ; count > 0; count--, point++ )
+ {
+ if ( psh_point_is_strong( point ) )
+ continue;
+
+ /* sometimes, some local extrema are smooth points */
+ if ( psh_point_is_smooth( point ) )
+ {
+ if ( point->dir_in == PSH_DIR_NONE ||
+ point->dir_in != point->dir_out )
+ continue;
+
+ if ( !psh_point_is_extremum( point ) &&
+ !psh_point_is_inflex( point ) )
+ continue;
+
+ point->flags &= ~PSH_POINT_SMOOTH;
+ }
+
+ /* find best enclosing point coordinates */
+ {
+ PSH_Point before = 0;
+ PSH_Point after = 0;
+
+ FT_Pos diff_before = -32000;
+ FT_Pos diff_after = 32000;
+ FT_Pos u = point->org_u;
+
+ FT_Int count2 = glyph->num_points;
+ PSH_Point cur = glyph->points;
+
+
+ for ( ; count2 > 0; count2--, cur++ )
+ {
+ if ( psh_point_is_strong( cur ) )
+ {
+ FT_Pos diff = cur->org_u - u;
+
+
+ if ( diff <= 0 )
+ {
+ if ( diff > diff_before )
+ {
+ diff_before = diff;
+ before = cur;
+ }
+ }
+
+ else if ( diff >= 0 )
+ {
+ if ( diff < diff_after )
+ {
+ diff_after = diff;
+ after = cur;
+ }
+ }
+ }
+ }
+
+ if ( !before )
+ {
+ if ( !after )
+ continue;
+
+ /* we are before the first strong point coordinate; */
+ /* simply translate the point */
+ point->cur_u = after->cur_u +
+ FT_MulFix( point->org_u - after->org_u, scale );
+ }
+ else if ( !after )
+ {
+ /* we are after the last strong point coordinate; */
+ /* simply translate the point */
+ point->cur_u = before->cur_u +
+ FT_MulFix( point->org_u - before->org_u, scale );
+ }
+ else
+ {
+ if ( diff_before == 0 )
+ point->cur_u = before->cur_u;
+
+ else if ( diff_after == 0 )
+ point->cur_u = after->cur_u;
+
+ else
+ point->cur_u = before->cur_u +
+ FT_MulDiv( u - before->org_u,
+ after->cur_u - before->cur_u,
+ after->org_u - before->org_u );
+ }
+
+ psh_point_set_fitted( point );
+ }
+ }
+
+#endif /* 1 */
+
+ }
+
+
+ /* interpolate other points */
+ static void
+ psh_glyph_interpolate_other_points( PSH_Glyph glyph,
+ FT_Int dimension )
+ {
+ PSH_Dimension dim = &glyph->globals->dimension[dimension];
+ FT_Fixed scale = dim->scale_mult;
+ FT_Fixed delta = dim->scale_delta;
+ PSH_Contour contour = glyph->contours;
+ FT_UInt num_contours = glyph->num_contours;
+
+
+ for ( ; num_contours > 0; num_contours--, contour++ )
+ {
+ PSH_Point start = contour->start;
+ PSH_Point first, next, point;
+ FT_UInt fit_count;
+
+
+ /* count the number of strong points in this contour */
+ next = start + contour->count;
+ fit_count = 0;
+ first = 0;
+
+ for ( point = start; point < next; point++ )
+ if ( psh_point_is_fitted( point ) )
+ {
+ if ( !first )
+ first = point;
+
+ fit_count++;
+ }
+
+ /* if there are less than 2 fitted points in the contour, we */
+ /* simply scale and eventually translate the contour points */
+ if ( fit_count < 2 )
+ {
+ if ( fit_count == 1 )
+ delta = first->cur_u - FT_MulFix( first->org_u, scale );
+
+ for ( point = start; point < next; point++ )
+ if ( point != first )
+ point->cur_u = FT_MulFix( point->org_u, scale ) + delta;
+
+ goto Next_Contour;
+ }
+
+ /* there are more than 2 strong points in this contour; we */
+ /* need to interpolate weak points between them */
+ start = first;
+ do
+ {
+ point = first;
+
+ /* skip consecutive fitted points */
+ for (;;)
+ {
+ next = first->next;
+ if ( next == start )
+ goto Next_Contour;
+
+ if ( !psh_point_is_fitted( next ) )
+ break;
+
+ first = next;
+ }
+
+ /* find next fitted point after unfitted one */
+ for (;;)
+ {
+ next = next->next;
+ if ( psh_point_is_fitted( next ) )
+ break;
+ }
+
+ /* now interpolate between them */
+ {
+ FT_Pos org_a, org_ab, cur_a, cur_ab;
+ FT_Pos org_c, org_ac, cur_c;
+ FT_Fixed scale_ab;
+
+
+ if ( first->org_u <= next->org_u )
+ {
+ org_a = first->org_u;
+ cur_a = first->cur_u;
+ org_ab = next->org_u - org_a;
+ cur_ab = next->cur_u - cur_a;
+ }
+ else
+ {
+ org_a = next->org_u;
+ cur_a = next->cur_u;
+ org_ab = first->org_u - org_a;
+ cur_ab = first->cur_u - cur_a;
+ }
+
+ scale_ab = 0x10000L;
+ if ( org_ab > 0 )
+ scale_ab = FT_DivFix( cur_ab, org_ab );
+
+ point = first->next;
+ do
+ {
+ org_c = point->org_u;
+ org_ac = org_c - org_a;
+
+ if ( org_ac <= 0 )
+ {
+ /* on the left of the interpolation zone */
+ cur_c = cur_a + FT_MulFix( org_ac, scale );
+ }
+ else if ( org_ac >= org_ab )
+ {
+ /* on the right on the interpolation zone */
+ cur_c = cur_a + cur_ab + FT_MulFix( org_ac - org_ab, scale );
+ }
+ else
+ {
+ /* within the interpolation zone */
+ cur_c = cur_a + FT_MulFix( org_ac, scale_ab );
+ }
+
+ point->cur_u = cur_c;
+
+ point = point->next;
+
+ } while ( point != next );
+ }
+
+ /* keep going until all points in the contours have been processed */
+ first = next;
+
+ } while ( first != start );
+
+ Next_Contour:
+ ;
+ }
+ }
+
+
+ /*************************************************************************/
+ /*************************************************************************/
+ /***** *****/
+ /***** HIGH-LEVEL INTERFACE *****/
+ /***** *****/
+ /*************************************************************************/
+ /*************************************************************************/
+
+ FT_Error
+ ps_hints_apply( PS_Hints ps_hints,
+ FT_Outline* outline,
+ PSH_Globals globals,
+ FT_Render_Mode hint_mode )
+ {
+ PSH_GlyphRec glyphrec;
+ PSH_Glyph glyph = &glyphrec;
+ FT_Error error;
+#ifdef DEBUG_HINTER
+ FT_Memory memory;
+#endif
+ FT_Int dimension;
+
+
+ /* something to do? */
+ if ( outline->n_points == 0 || outline->n_contours == 0 )
+ return PSH_Err_Ok;
+
+#ifdef DEBUG_HINTER
+
+ memory = globals->memory;
+
+ if ( ps_debug_glyph )
+ {
+ psh_glyph_done( ps_debug_glyph );
+ FT_FREE( ps_debug_glyph );
+ }
+
+ if ( FT_NEW( glyph ) )
+ return error;
+
+ ps_debug_glyph = glyph;
+
+#endif /* DEBUG_HINTER */
+
+ error = psh_glyph_init( glyph, outline, ps_hints, globals );
+ if ( error )
+ goto Exit;
+
+ /* try to optimize the y_scale so that the top of non-capital letters
+ * is aligned on a pixel boundary whenever possible
+ */
+ {
+ PSH_Dimension dim_x = &glyph->globals->dimension[0];
+ PSH_Dimension dim_y = &glyph->globals->dimension[1];
+
+ FT_Fixed x_scale = dim_x->scale_mult;
+ FT_Fixed y_scale = dim_y->scale_mult;
+
+ FT_Fixed scaled;
+ FT_Fixed fitted;
+
+
+ scaled = FT_MulFix( globals->blues.normal_top.zones->org_ref, y_scale );
+ fitted = FT_PIX_ROUND( scaled );
+
+ if (scaled != fitted ) {
+ y_scale = FT_MulDiv( y_scale, fitted, scaled );
+
+ if ( fitted < scaled )
+ x_scale -= x_scale / 50;
+
+ psh_globals_set_scale( glyph->globals, x_scale, y_scale, 0, 0 );
+ }
+ }
+
+ glyph->do_horz_hints = 1;
+ glyph->do_vert_hints = 1;
+
+ glyph->do_horz_snapping = FT_BOOL( hint_mode == FT_RENDER_MODE_MONO ||
+ hint_mode == FT_RENDER_MODE_LCD );
+
+ glyph->do_vert_snapping = FT_BOOL( hint_mode == FT_RENDER_MODE_MONO ||
+ hint_mode == FT_RENDER_MODE_LCD_V );
+
+ glyph->do_stem_adjust = FT_BOOL( hint_mode != FT_RENDER_MODE_LIGHT );
+
+ for ( dimension = 0; dimension < 2; dimension++ )
+ {
+ /* load outline coordinates into glyph */
+ psh_glyph_load_points( glyph, dimension );
+
+ /* compute local extrema */
+ psh_glyph_compute_extrema( glyph );
+
+ /* compute aligned stem/hints positions */
+ psh_hint_table_align_hints( &glyph->hint_tables[dimension],
+ glyph->globals,
+ dimension,
+ glyph );
+
+ /* find strong points, align them, then interpolate others */
+ psh_glyph_find_strong_points( glyph, dimension );
+ if ( dimension == 1 )
+ psh_glyph_find_blue_points( &globals->blues, glyph );
+ psh_glyph_interpolate_strong_points( glyph, dimension );
+ psh_glyph_interpolate_normal_points( glyph, dimension );
+ psh_glyph_interpolate_other_points( glyph, dimension );
+
+ /* save hinted coordinates back to outline */
+ psh_glyph_save_points( glyph, dimension );
+ }
+
+ Exit:
+
+#ifndef DEBUG_HINTER
+ psh_glyph_done( glyph );
+#endif
+
+ return error;
+ }
+
+
+/* END */
diff --git a/extras/freetype2/src/pshinter/pshalgo.h b/extras/freetype2/src/pshinter/pshalgo.h
index e79ad0295..f68de7120 100644
--- a/extras/freetype2/src/pshinter/pshalgo.h
+++ b/extras/freetype2/src/pshinter/pshalgo.h
@@ -2,13 +2,13 @@
/* */
/* pshalgo.h */
/* */
-/* This header file defines the used hinting algorithm. */
+/* PostScript hinting algorithm (specification). */
/* */
-/* Copyright 2001 by */
+/* Copyright 2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
-/* This file is part of the FreeType project, and may only be used */
-/* modified and distributed under the terms of the FreeType project */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */
/* understand and accept it fully. */
@@ -19,34 +19,236 @@
#ifndef __PSHALGO_H__
#define __PSHALGO_H__
+
+#include "pshrec.h"
+#include "pshglob.h"
+#include FT_TRIGONOMETRY_H
+
+
FT_BEGIN_HEADER
-/* define to choose hinting algorithm */
-#define PSH_ALGORITHM_3
-#if defined(PSH_ALGORITHM_1)
+ /* handle to Hint structure */
+ typedef struct PSH_HintRec_* PSH_Hint;
+
+ /* hint bit-flags */
+ typedef enum
+ {
+ PSH_HINT_GHOST = PS_HINT_FLAG_GHOST,
+ PSH_HINT_BOTTOM = PS_HINT_FLAG_BOTTOM,
+ PSH_HINT_ACTIVE = 4,
+ PSH_HINT_FITTED = 8
+
+ } PSH_Hint_Flags;
+
+
+#define psh_hint_is_active( x ) ( ( (x)->flags & PSH_HINT_ACTIVE ) != 0 )
+#define psh_hint_is_ghost( x ) ( ( (x)->flags & PSH_HINT_GHOST ) != 0 )
+#define psh_hint_is_fitted( x ) ( ( (x)->flags & PSH_HINT_FITTED ) != 0 )
+
+#define psh_hint_activate( x ) (x)->flags |= PSH_HINT_ACTIVE
+#define psh_hint_deactivate( x ) (x)->flags &= ~PSH_HINT_ACTIVE
+#define psh_hint_set_fitted( x ) (x)->flags |= PSH_HINT_FITTED
+
+ /* hint structure */
+ typedef struct PSH_HintRec_
+ {
+ FT_Int org_pos;
+ FT_Int org_len;
+ FT_Pos cur_pos;
+ FT_Pos cur_len;
+ FT_UInt flags;
+ PSH_Hint parent;
+ FT_Int order;
+
+ } PSH_HintRec;
+
+
+ /* this is an interpolation zone used for strong points; */
+ /* weak points are interpolated according to their strong */
+ /* neighbours */
+ typedef struct PSH_ZoneRec_
+ {
+ FT_Fixed scale;
+ FT_Fixed delta;
+ FT_Pos min;
+ FT_Pos max;
+
+ } PSH_ZoneRec, *PSH_Zone;
+
+
+ typedef struct PSH_Hint_TableRec_
+ {
+ FT_UInt max_hints;
+ FT_UInt num_hints;
+ PSH_Hint hints;
+ PSH_Hint* sort;
+ PSH_Hint* sort_global;
+ FT_UInt num_zones;
+ PSH_ZoneRec* zones;
+ PSH_Zone zone;
+ PS_Mask_Table hint_masks;
+ PS_Mask_Table counter_masks;
+
+ } PSH_Hint_TableRec, *PSH_Hint_Table;
+
+
+ typedef struct PSH_PointRec_* PSH_Point;
+ typedef struct PSH_ContourRec_* PSH_Contour;
+
+ enum
+ {
+ PSH_DIR_NONE = 4,
+ PSH_DIR_UP = -1,
+ PSH_DIR_DOWN = 1,
+ PSH_DIR_LEFT = -2,
+ PSH_DIR_RIGHT = 2
+ };
+
+#define PSH_DIR_HORIZONTAL 2
+#define PSH_DIR_VERTICAL 1
+
+#define PSH_DIR_COMPARE( d1, d2 ) ( (d1) == (d2) || (d1) == -(d2) )
+#define PSH_DIR_IS_HORIZONTAL( d ) PSH_DIR_COMPARE( d, PSH_DIR_HORIZONTAL )
+#define PSH_DIR_IS_VERTICAL( d ) PSH_DIR_COMPARE( d, PSH_DIR_VERTICAL )
+
+
+ /* the following bit-flags are computed once by the glyph */
+ /* analyzer, for both dimensions */
+ enum
+ {
+ PSH_POINT_OFF = 1, /* point is off the curve */
+ PSH_POINT_SMOOTH = 2, /* point is smooth */
+ PSH_POINT_INFLEX = 4 /* point is inflection */
+ };
+
+#define psh_point_is_smooth( p ) ( (p)->flags & PSH_POINT_SMOOTH )
+#define psh_point_is_off( p ) ( (p)->flags & PSH_POINT_OFF )
+#define psh_point_is_inflex( p ) ( (p)->flags & PSH_POINT_INFLEX )
+
+#define psh_point_set_smooth( p ) (p)->flags |= PSH_POINT_SMOOTH
+#define psh_point_set_off( p ) (p)->flags |= PSH_POINT_OFF
+#define psh_point_set_inflex( p ) (p)->flags |= PSH_POINT_INFLEX
+
+ /* the following bit-flags are re-computed for each dimension */
+ enum
+ {
+ PSH_POINT_STRONG = 16, /* point is strong */
+ PSH_POINT_FITTED = 32, /* point is already fitted */
+ PSH_POINT_EXTREMUM = 64, /* point is local extremum */
+ PSH_POINT_POSITIVE = 128, /* extremum has positive contour flow */
+ PSH_POINT_NEGATIVE = 256, /* extremum has negative contour flow */
+ PSH_POINT_EDGE_MIN = 512, /* point is aligned to left/bottom stem edge */
+ PSH_POINT_EDGE_MAX = 1024 /* point is aligned to top/right stem edge */
+ };
+
+#define psh_point_is_strong( p ) ( (p)->flags2 & PSH_POINT_STRONG )
+#define psh_point_is_fitted( p ) ( (p)->flags2 & PSH_POINT_FITTED )
+#define psh_point_is_extremum( p ) ( (p)->flags2 & PSH_POINT_EXTREMUM )
+#define psh_point_is_positive( p ) ( (p)->flags2 & PSH_POINT_POSITIVE )
+#define psh_point_is_negative( p ) ( (p)->flags2 & PSH_POINT_NEGATIVE )
+#define psh_point_is_edge_min( p ) ( (p)->flags2 & PSH_POINT_EDGE_MIN )
+#define psh_point_is_edge_max( p ) ( (p)->flags2 & PSH_POINT_EDGE_MAX )
+
+#define psh_point_set_strong( p ) (p)->flags2 |= PSH_POINT_STRONG
+#define psh_point_set_fitted( p ) (p)->flags2 |= PSH_POINT_FITTED
+#define psh_point_set_extremum( p ) (p)->flags2 |= PSH_POINT_EXTREMUM
+#define psh_point_set_positive( p ) (p)->flags2 |= PSH_POINT_POSITIVE
+#define psh_point_set_negative( p ) (p)->flags2 |= PSH_POINT_NEGATIVE
+#define psh_point_set_edge_min( p ) (p)->flags2 |= PSH_POINT_EDGE_MIN
+#define psh_point_set_edge_max( p ) (p)->flags2 |= PSH_POINT_EDGE_MAX
+
+
+ typedef struct PSH_PointRec_
+ {
+ PSH_Point prev;
+ PSH_Point next;
+ PSH_Contour contour;
+ FT_UInt flags;
+ FT_UInt flags2;
+ FT_Char dir_in;
+ FT_Char dir_out;
+ FT_Angle angle_in;
+ FT_Angle angle_out;
+ PSH_Hint hint;
+ FT_Pos org_u;
+ FT_Pos org_v;
+ FT_Pos cur_u;
+#ifdef DEBUG_HINTER
+ FT_Pos org_x;
+ FT_Pos cur_x;
+ FT_Pos org_y;
+ FT_Pos cur_y;
+ FT_UInt flags_x;
+ FT_UInt flags_y;
+#endif
+
+ } PSH_PointRec;
+
+
+#define PSH_POINT_EQUAL_ORG( a, b ) ( (a)->org_u == (b)->org_u && \
+ (a)->org_v == (b)->org_v )
+
+#define PSH_POINT_ANGLE( a, b ) FT_Atan2( (b)->org_u - (a)->org_u, \
+ (b)->org_v - (a)->org_v )
+
+ typedef struct PSH_ContourRec_
+ {
+ PSH_Point start;
+ FT_UInt count;
-# include "pshalgo1.h"
-# define PS_HINTS_APPLY_FUNC ps1_hints_apply
+ } PSH_ContourRec;
-#elif defined(PSH_ALGORITHM_2)
-# include "pshalgo2.h"
-# define PS_HINTS_APPLY_FUNC ps2_hints_apply
+ typedef struct PSH_GlyphRec_
+ {
+ FT_UInt num_points;
+ FT_UInt num_contours;
-#elif defined(PSH_ALGORITHM_3)
+ PSH_Point points;
+ PSH_Contour contours;
-# include "pshalgo3.h"
-# define PS_HINTS_APPLY_FUNC ps3_hints_apply
+ FT_Memory memory;
+ FT_Outline* outline;
+ PSH_Globals globals;
+ PSH_Hint_TableRec hint_tables[2];
-#else
+ FT_Bool vertical;
+ FT_Int major_dir;
+ FT_Int minor_dir;
-# error "invalid Postscript Hinter algorithm selection"
+ FT_Bool do_horz_hints;
+ FT_Bool do_vert_hints;
+ FT_Bool do_horz_snapping;
+ FT_Bool do_vert_snapping;
+ FT_Bool do_stem_adjust;
+ } PSH_GlyphRec, *PSH_Glyph;
+
+
+#ifdef DEBUG_HINTER
+ extern PSH_Hint_Table ps_debug_hint_table;
+
+ typedef void
+ (*PSH_HintFunc)( PSH_Hint hint,
+ FT_Bool vertical );
+
+ extern PSH_HintFunc ps_debug_hint_func;
+
+ extern PSH_Glyph ps_debug_glyph;
#endif
+
+ extern FT_Error
+ ps_hints_apply( PS_Hints ps_hints,
+ FT_Outline* outline,
+ PSH_Globals globals,
+ FT_Render_Mode hint_mode );
+
+
FT_END_HEADER
+
#endif /* __PSHALGO_H__ */
diff --git a/extras/freetype2/src/pshinter/pshglob.c b/extras/freetype2/src/pshinter/pshglob.c
index e5ead5451..21d45e92f 100644
--- a/extras/freetype2/src/pshinter/pshglob.c
+++ b/extras/freetype2/src/pshinter/pshglob.c
@@ -5,7 +5,7 @@
/* PostScript hinter global hinting management (body). */
/* Inspired by the new auto-hinter module. */
/* */
-/* Copyright 2001, 2002 by */
+/* Copyright 2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used */
@@ -52,7 +52,7 @@
if ( count > 0 )
{
width->cur = FT_MulFix( width->org, scale );
- width->fit = FT_RoundFix( width->cur );
+ width->fit = FT_PIX_ROUND( width->cur );
width++;
count--;
@@ -72,12 +72,14 @@
w = stand->cur;
width->cur = w;
- width->fit = FT_RoundFix( w );
+ width->fit = FT_PIX_ROUND( w );
}
}
}
+#if 0
+
/* org_width is is font units, result in device pixels, 26.6 format */
FT_LOCAL_DEF( FT_Pos )
psh_dimension_snap_width( PSH_Dimension dimension,
@@ -122,6 +124,8 @@
return width;
}
+#endif /* 0 */
+
/*************************************************************************/
/*************************************************************************/
@@ -373,7 +377,7 @@
/* parameter to the raw bluescale value. Here is why: */
/* */
/* We need to suppress overshoots for all pointsizes. */
- /* At 300dpi that satisfy: */
+ /* At 300dpi that satisfies: */
/* */
/* pointsize < 240*bluescale + 0.49 */
/* */
@@ -392,7 +396,16 @@
/* */
/* "scale < bluescale" */
/* */
- blues->no_overshoots = FT_BOOL( scale < blues->blue_scale );
+ /* Note that `blue_scale' is stored 1000 times its real */
+ /* value, and that `scale' converts from font units to */
+ /* fractional pixels. */
+ /* */
+
+ /* 1000 / 64 = 125 / 8 */
+ if ( scale >= 0x20C49BAL )
+ blues->no_overshoots = FT_BOOL( scale < blues->blue_scale * 8 / 125 );
+ else
+ blues->no_overshoots = FT_BOOL( scale * 125 < blues->blue_scale * 8 );
/* */
/* The blue threshold is the font units distance under */
@@ -408,7 +421,7 @@
while ( threshold > 0 && FT_MulFix( threshold, scale ) > 32 )
- threshold --;
+ threshold--;
blues->blue_threshold = threshold;
}
@@ -444,7 +457,7 @@
zone->cur_delta = FT_MulFix( zone->org_delta, scale );
/* round scaled reference position */
- zone->cur_ref = ( zone->cur_ref + 32 ) & -64;
+ zone->cur_ref = FT_PIX_ROUND( zone->cur_ref );
#if 0
if ( zone->cur_ref > zone->cur_top )
@@ -526,7 +539,7 @@
no_shoots = blues->no_overshoots;
- /* lookup stem top in top zones table */
+ /* look up stem top in top zones table */
table = &blues->normal_top;
count = table->count;
zone = table->zones;
@@ -561,7 +574,7 @@
if ( stem_bot >= zone->org_bottom - blues->blue_fuzz )
{
- if ( no_shoots || delta < blues->blue_shift )
+ if ( no_shoots || delta < blues->blue_threshold )
{
alignment->align |= PSH_BLUE_ALIGN_BOT;
alignment->align_bot = zone->cur_ref;
@@ -640,7 +653,7 @@
read++;
}
- dim->stdw.count = write - dim->stdw.widths;
+ dim->stdw.count = priv->num_snap_widths + 1;
}
/* copy standard heights */
@@ -650,7 +663,7 @@
write->org = priv->standard_height[0];
- write++;
+ write++;
read = priv->snap_heights;
for ( count = priv->num_snap_heights; count > 0; count-- )
{
@@ -659,7 +672,7 @@
read++;
}
- dim->stdw.count = write - dim->stdw.widths;
+ dim->stdw.count = priv->num_snap_heights + 1;
}
/* copy blue zones */
@@ -671,15 +684,9 @@
priv->family_blues, priv->num_family_other_blues,
priv->family_other_blues, priv->blue_fuzz, 1 );
- globals->blues.blue_scale = priv->blue_scale
- ? priv->blue_scale
- : 0x28937L; /* 0.039625 * 0x400000L */
-
- globals->blues.blue_shift = priv->blue_shift
- ? priv->blue_shift
- : 7;
-
- globals->blues.blue_fuzz = priv->blue_fuzz;
+ globals->blues.blue_scale = priv->blue_scale;
+ globals->blues.blue_shift = priv->blue_shift;
+ globals->blues.blue_fuzz = priv->blue_fuzz;
globals->dimension[0].scale_mult = 0;
globals->dimension[0].scale_delta = 0;
@@ -696,7 +703,7 @@
}
- static FT_Error
+ FT_LOCAL_DEF( FT_Error )
psh_globals_set_scale( PSH_Globals globals,
FT_Fixed x_scale,
FT_Fixed y_scale,
diff --git a/extras/freetype2/src/pshinter/pshglob.h b/extras/freetype2/src/pshinter/pshglob.h
index 0a3a96ab1..c51162615 100644
--- a/extras/freetype2/src/pshinter/pshglob.h
+++ b/extras/freetype2/src/pshinter/pshglob.h
@@ -4,7 +4,7 @@
/* */
/* PostScript hinter global hinting management. */
/* */
-/* Copyright 2001, 2002 by */
+/* Copyright 2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -159,11 +159,20 @@ FT_BEGIN_HEADER
psh_globals_funcs_init( PSH_Globals_FuncsRec* funcs );
+#if 0
/* snap a stem width to fitter coordinates. `org_width' is in font */
/* units. The result is in device pixels (26.6 format). */
FT_LOCAL( FT_Pos )
psh_dimension_snap_width( PSH_Dimension dimension,
FT_Int org_width );
+#endif
+
+ FT_LOCAL( FT_Error )
+ psh_globals_set_scale( PSH_Globals globals,
+ FT_Fixed x_scale,
+ FT_Fixed y_scale,
+ FT_Fixed x_delta,
+ FT_Fixed y_delta );
/* snap a stem to one or two blue zones */
FT_LOCAL( void )
diff --git a/extras/freetype2/src/pshinter/pshinter.c b/extras/freetype2/src/pshinter/pshinter.c
index 180f6c89c..8e3f19309 100644
--- a/extras/freetype2/src/pshinter/pshinter.c
+++ b/extras/freetype2/src/pshinter/pshinter.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PostScript Hinting module */
/* */
-/* Copyright 2001 by */
+/* Copyright 2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,9 +21,7 @@
#include <ft2build.h>
#include "pshrec.c"
#include "pshglob.c"
-#include "pshalgo1.c"
-#include "pshalgo2.c"
-#include "pshalgo3.c"
+#include "pshalgo.c"
#include "pshmod.c"
diff --git a/extras/freetype2/src/pshinter/pshnterr.h b/extras/freetype2/src/pshinter/pshnterr.h
new file mode 100644
index 000000000..3c0029fbf
--- /dev/null
+++ b/extras/freetype2/src/pshinter/pshnterr.h
@@ -0,0 +1,40 @@
+/***************************************************************************/
+/* */
+/* pshnterr.h */
+/* */
+/* PS Hinter error codes (specification only). */
+/* */
+/* Copyright 2003 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* This file is used to define the PSHinter error enumeration constants. */
+ /* */
+ /*************************************************************************/
+
+#ifndef __PSHNTERR_H__
+#define __PSHNTERR_H__
+
+#include FT_MODULE_ERRORS_H
+
+#undef __FTERRORS_H__
+
+#define FT_ERR_PREFIX PSH_Err_
+#define FT_ERR_BASE FT_Mod_Err_PShinter
+
+#include FT_ERRORS_H
+
+#endif /* __PSHNTERR_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/src/pshinter/pshrec.c b/extras/freetype2/src/pshinter/pshrec.c
index 21ced1e29..648de18bc 100644
--- a/extras/freetype2/src/pshinter/pshrec.c
+++ b/extras/freetype2/src/pshinter/pshrec.c
@@ -4,7 +4,7 @@
/* */
/* FreeType PostScript hints recorder (body). */
/* */
-/* Copyright 2001, 2002 by */
+/* Copyright 2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,6 +23,8 @@
#include "pshrec.h"
#include "pshalgo.h"
+#include "pshnterr.h"
+
#undef FT_COMPONENT
#define FT_COMPONENT trace_pshrec
@@ -66,7 +68,7 @@
if ( new_max > old_max )
{
/* try to grow the table */
- new_max = ( new_max + 7 ) & -8;
+ new_max = FT_PAD_CEIL( new_max, 8 );
if ( !FT_RENEW_ARRAY( table->hints, old_max, new_max ) )
table->max_hints = new_max;
}
@@ -140,7 +142,7 @@
if ( new_max > old_max )
{
- new_max = ( new_max + 7 ) & -8;
+ new_max = FT_PAD_CEIL( new_max, 8 );
if ( !FT_RENEW_ARRAY( mask->bytes, old_max, new_max ) )
mask->max_bits = new_max * 8;
}
@@ -237,7 +239,7 @@
if ( new_max > old_max )
{
- new_max = ( new_max + 7 ) & -8;
+ new_max = FT_PAD_CEIL( new_max, 8 );
if ( !FT_RENEW_ARRAY( table->masks, old_max, new_max ) )
table->max_masks = new_max;
}
@@ -316,8 +318,7 @@
PS_Mask mask;
- /* allocate new mask, and grow it to "bit_count" bits */
- error = ps_mask_table_alloc( table, memory, &mask );
+ error = ps_mask_table_last( table, memory, &mask );
if ( error )
goto Exit;
@@ -820,7 +821,7 @@
break;
default:
- hints->error = FT_Err_Invalid_Argument;
+ hints->error = PSH_Err_Invalid_Argument;
hints->hint_type = hint_type;
FT_ERROR(( "ps_hints_open: invalid charstring type!\n" ));
@@ -861,8 +862,9 @@
FT_Memory memory = hints->memory;
- error = ps_dimension_add_t1stem( dim, stems[0], stems[1],
- memory, NULL );
+ error = ps_dimension_add_t1stem(
+ dim, (FT_Int)stems[0], (FT_Int)stems[1],
+ memory, NULL );
if ( error )
{
FT_ERROR(( "ps_hints_stem: could not add stem"
@@ -917,8 +919,9 @@
/* add the three stems to our hints/masks table */
for ( count = 0; count < 3; count++, stems += 2 )
{
- error = ps_dimension_add_t1stem( dim, stems[0], stems[1],
- memory, &idx[count] );
+ error = ps_dimension_add_t1stem(
+ dim, (FT_Int)stems[0], (FT_Int)stems[1],
+ memory, &idx[count] );
if ( error )
goto Fail;
}
@@ -932,7 +935,7 @@
else
{
FT_ERROR(( "ps_hints_t1stem3: called with invalid hint type!\n" ));
- error = FT_Err_Invalid_Argument;
+ error = PSH_Err_Invalid_Argument;
goto Fail;
}
}
@@ -973,7 +976,7 @@
else
{
/* invalid hint type */
- error = FT_Err_Invalid_Argument;
+ error = PSH_Err_Invalid_Argument;
goto Fail;
}
}
@@ -1008,18 +1011,18 @@
FT_ERROR(( "ps_hints_t2mask: "
"called with invalid bitcount %d (instead of %d)\n",
bit_count, count1 + count2 ));
-
+
/* simply ignore the operator */
return;
}
/* set-up new horizontal and vertical hint mask now */
- error = ps_dimension_set_mask_bits( &dim[0], bytes, 0, count1,
+ error = ps_dimension_set_mask_bits( &dim[0], bytes, count2, count1,
end_point, memory );
if ( error )
goto Fail;
- error = ps_dimension_set_mask_bits( &dim[1], bytes, count1, count2,
+ error = ps_dimension_set_mask_bits( &dim[1], bytes, 0, count2,
end_point, memory );
if ( error )
goto Fail;
@@ -1053,7 +1056,7 @@
FT_ERROR(( "ps_hints_t2counter: "
"called with invalid bitcount %d (instead of %d)\n",
bit_count, count1 + count2 ));
-
+
/* simply ignore the operator */
return;
}
@@ -1139,7 +1142,7 @@
funcs->stem = (T1_Hints_SetStemFunc) t1_hints_stem;
funcs->stem3 = (T1_Hints_SetStem3Func)ps_hints_t1stem3;
funcs->reset = (T1_Hints_ResetFunc) ps_hints_t1reset;
- funcs->apply = (T1_Hints_ApplyFunc) PS_HINTS_APPLY_FUNC;
+ funcs->apply = (T1_Hints_ApplyFunc) ps_hints_apply;
}
@@ -1164,7 +1167,8 @@
FT_Int count,
FT_Fixed* coords )
{
- FT_Pos stems[32], y, n, total = count;
+ FT_Pos stems[32], y, n;
+ FT_Int total = count;
y = 0;
@@ -1179,7 +1183,7 @@
for ( n = 0; n < count * 2; n++ )
{
y += coords[n];
- stems[n] = ( y + 0x8000 ) >> 16;
+ stems[n] = ( y + 0x8000L ) >> 16;
}
/* compute lengths */
@@ -1204,7 +1208,7 @@
funcs->stems = (T2_Hints_StemsFunc) t2_hints_stems;
funcs->hintmask= (T2_Hints_MaskFunc) ps_hints_t2mask;
funcs->counter = (T2_Hints_CounterFunc)ps_hints_t2counter;
- funcs->apply = (T2_Hints_ApplyFunc) PS_HINTS_APPLY_FUNC;
+ funcs->apply = (T2_Hints_ApplyFunc) ps_hints_apply;
}
diff --git a/extras/freetype2/src/pshinter/pshrec.h b/extras/freetype2/src/pshinter/pshrec.h
index 884aa5c5d..0159e9cd5 100644
--- a/extras/freetype2/src/pshinter/pshrec.h
+++ b/extras/freetype2/src/pshinter/pshrec.h
@@ -4,7 +4,7 @@
/* */
/* Postscript (Type1/Type2) hints recorder (specification). */
/* */
-/* Copyright 2001, 2002 by */
+/* Copyright 2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -125,10 +125,6 @@ FT_BEGIN_HEADER
} PS_DimensionRec, *PS_Dimension;
- /* magic value used within PS_HintsRec */
-#define PS_HINTS_MAGIC 0x68696e74 /* "hint" */
-
-
/* glyph hints descriptor */
/* dimension 0 => X coordinates + vertical hints/stems */
/* dimension 1 => Y coordinates + horizontal hints/stems */
diff --git a/extras/freetype2/src/pshinter/rules.mk b/extras/freetype2/src/pshinter/rules.mk
index 207d3494a..57773394a 100644
--- a/extras/freetype2/src/pshinter/rules.mk
+++ b/extras/freetype2/src/pshinter/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2001 by
+# Copyright 2001, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,28 +15,26 @@
# PSHINTER driver directory
#
-PSHINTER_DIR := $(SRC_)pshinter
-PSHINTER_DIR_ := $(PSHINTER_DIR)$(SEP)
+PSHINTER_DIR := $(SRC_DIR)/pshinter
# compilation flags for the driver
#
-PSHINTER_COMPILE := $(FT_COMPILE) $I$(PSHINTER_DIR)
+PSHINTER_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PSHINTER_DIR))
# PSHINTER driver sources (i.e., C files)
#
-PSHINTER_DRV_SRC := $(PSHINTER_DIR_)pshrec.c \
- $(PSHINTER_DIR_)pshglob.c \
- $(PSHINTER_DIR_)pshmod.c \
- $(PSHINTER_DIR_)pshalgo1.c \
- $(PSHINTER_DIR_)pshalgo2.c \
- $(PSHINTER_DIR_)pshalgo3.c
+PSHINTER_DRV_SRC := $(PSHINTER_DIR)/pshrec.c \
+ $(PSHINTER_DIR)/pshglob.c \
+ $(PSHINTER_DIR)/pshmod.c \
+ $(PSHINTER_DIR)/pshalgo.c
# PSHINTER driver headers
#
-PSHINTER_DRV_H := $(PSHINTER_DRV_SRC:%c=%h)
+PSHINTER_DRV_H := $(PSHINTER_DRV_SRC:%c=%h) \
+ $(PSHINTER_DIR)/pshnterr.h
# PSHINTER driver object(s)
@@ -44,25 +42,25 @@ PSHINTER_DRV_H := $(PSHINTER_DRV_SRC:%c=%h)
# PSHINTER_DRV_OBJ_M is used during `multi' builds.
# PSHINTER_DRV_OBJ_S is used during `single' builds.
#
-PSHINTER_DRV_OBJ_M := $(PSHINTER_DRV_SRC:$(PSHINTER_DIR_)%.c=$(OBJ_)%.$O)
-PSHINTER_DRV_OBJ_S := $(OBJ_)pshinter.$O
+PSHINTER_DRV_OBJ_M := $(PSHINTER_DRV_SRC:$(PSHINTER_DIR)/%.c=$(OBJ_DIR)/%.$O)
+PSHINTER_DRV_OBJ_S := $(OBJ_DIR)/pshinter.$O
# PSHINTER driver source file for single build
#
-PSHINTER_DRV_SRC_S := $(PSHINTER_DIR_)pshinter.c
+PSHINTER_DRV_SRC_S := $(PSHINTER_DIR)/pshinter.c
# PSHINTER driver - single object
#
$(PSHINTER_DRV_OBJ_S): $(PSHINTER_DRV_SRC_S) $(PSHINTER_DRV_SRC) \
$(FREETYPE_H) $(PSHINTER_DRV_H)
- $(PSHINTER_COMPILE) $T$@ $(PSHINTER_DRV_SRC_S)
+ $(PSHINTER_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(PSHINTER_DRV_SRC_S))
# PSHINTER driver - multiple objects
#
-$(OBJ_)%.$O: $(PSHINTER_DIR_)%.c $(FREETYPE_H) $(PSHINTER_DRV_H)
- $(PSHINTER_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(PSHINTER_DIR)/%.c $(FREETYPE_H) $(PSHINTER_DRV_H)
+ $(PSHINTER_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
diff --git a/extras/freetype2/src/psnames/psmodule.c b/extras/freetype2/src/psnames/psmodule.c
index b2ddcb7e4..f6d6ae328 100644
--- a/extras/freetype2/src/psnames/psmodule.c
+++ b/extras/freetype2/src/psnames/psmodule.c
@@ -4,7 +4,7 @@
/* */
/* PSNames module implementation (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -17,8 +17,8 @@
#include <ft2build.h>
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
#include FT_INTERNAL_OBJECTS_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include "psmodule.h"
#include "pstables.h"
@@ -44,7 +44,7 @@
char temp[64];
- /* if the name begins with `uni', then the glyph name may be a */
+ /* If the name begins with `uni', then the glyph name may be a */
/* hard-coded unicode character code. */
if ( glyph_name[0] == 'u' &&
glyph_name[1] == 'n' &&
@@ -83,7 +83,44 @@
value = ( value << 4 ) + d;
}
- if ( count == 0 )
+
+ /* there must be exactly four hex digits */
+ if ( ( *p == '\0' || *p == '.' ) && count == 0 )
+ return value;
+ }
+
+ /* If the name begins with `u', followed by four to six uppercase */
+ /* hexadicimal digits, it is a hard-coded unicode character code. */
+ if ( glyph_name[0] == 'u' )
+ {
+ FT_Int count;
+ FT_ULong value = 0;
+ const char* p = glyph_name + 1;
+
+
+ for ( count = 6; count > 0; count--, p++ )
+ {
+ char c = *p;
+ unsigned int d;
+
+
+ d = (unsigned char)c - '0';
+ if ( d >= 10 )
+ {
+ d = (unsigned char)c - 'A';
+ if ( d >= 6 )
+ d = 16;
+ else
+ d += 10;
+ }
+
+ if ( d >= 16 )
+ break;
+
+ value = ( value << 4 ) + d;
+ }
+
+ if ( ( *p == '\0' || *p == '.' ) && count <= 2 )
return value;
}
@@ -139,10 +176,10 @@
/* Builds a table that maps Unicode values to glyph indices */
static FT_Error
- ps_build_unicode_table( FT_Memory memory,
- FT_UInt num_glyphs,
- const char** glyph_names,
- PS_Unicodes* table )
+ ps_unicodes_init( FT_Memory memory,
+ FT_UInt num_glyphs,
+ const char** glyph_names,
+ PS_Unicodes* table )
{
FT_Error error;
@@ -170,9 +207,9 @@
{
uni_char = ps_unicode_value( gname );
- if ( uni_char != 0 && uni_char != 0xFFFF )
+ if ( uni_char != 0 && uni_char != 0xFFFFL )
{
- map->unicode = uni_char;
+ map->unicode = (FT_UInt)uni_char;
map->glyph_index = n;
map++;
}
@@ -205,8 +242,8 @@
static FT_UInt
- ps_lookup_unicode( PS_Unicodes* table,
- FT_ULong unicode )
+ ps_unicodes_char_index( PS_Unicodes* table,
+ FT_ULong unicode )
{
PS_UniMap *min, *max, *mid;
@@ -231,13 +268,13 @@
max = mid - 1;
}
- return 0xFFFF;
+ return 0xFFFFU;
}
static FT_ULong
- ps_next_unicode( PS_Unicodes* table,
- FT_ULong unicode )
+ ps_unicodes_char_next( PS_Unicodes* table,
+ FT_ULong unicode )
{
PS_UniMap *min, *max, *mid;
@@ -298,40 +335,52 @@
static
- const PSNames_Interface psnames_interface =
+ const FT_Service_PsCMapsRec pscmaps_interface =
{
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
- (PS_Unicode_Value_Func) ps_unicode_value,
- (PS_Build_Unicodes_Func) ps_build_unicode_table,
- (PS_Lookup_Unicode_Func) ps_lookup_unicode,
+ (PS_Unicode_ValueFunc) ps_unicode_value,
+ (PS_Unicodes_InitFunc) ps_unicodes_init,
+ (PS_Unicodes_CharIndexFunc)ps_unicodes_char_index,
+ (PS_Unicodes_CharNextFunc) ps_unicodes_char_next,
#else
0,
0,
0,
+ 0,
#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
- (PS_Macintosh_Name_Func) ps_get_macintosh_name,
- (PS_Adobe_Std_Strings_Func) ps_get_standard_strings,
+ (PS_Macintosh_Name_Func) ps_get_macintosh_name,
+ (PS_Adobe_Std_Strings_Func)ps_get_standard_strings,
t1_standard_encoding,
- t1_expert_encoding,
+ t1_expert_encoding
+ };
-#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
- (PS_Next_Unicode_Func) ps_next_unicode
-#else
- 0
-#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
+ static const FT_ServiceDescRec pscmaps_services[] =
+ {
+ { FT_SERVICE_ID_POSTSCRIPT_CMAPS, &pscmaps_interface },
+ { NULL, NULL }
};
+ static FT_Pointer
+ psnames_get_service( FT_Module module,
+ const char* service_id )
+ {
+ FT_UNUSED( module );
+
+ return ft_service_list_lookup( pscmaps_services, service_id );
+ }
+
#endif /* !FT_CONFIG_OPTION_NO_POSTSCRIPT_NAMES */
+
FT_CALLBACK_TABLE_DEF
const FT_Module_Class psnames_module_class =
{
@@ -344,13 +393,15 @@
#ifdef FT_CONFIG_OPTION_NO_POSTSCRIPT_NAMES
0,
-#else
- (void*)&psnames_interface, /* module specific interface */
-#endif
-
(FT_Module_Constructor)0,
(FT_Module_Destructor) 0,
(FT_Module_Requester) 0
+#else
+ (void*)&pscmaps_interface, /* module specific interface */
+ (FT_Module_Constructor)0,
+ (FT_Module_Destructor) 0,
+ (FT_Module_Requester) psnames_get_service
+#endif
};
diff --git a/extras/freetype2/src/psnames/pstables.h b/extras/freetype2/src/psnames/pstables.h
index 39c838a12..7c0739375 100644
--- a/extras/freetype2/src/psnames/pstables.h
+++ b/extras/freetype2/src/psnames/pstables.h
@@ -1,10 +1,10 @@
/***************************************************************************/
/* */
-/* pstables.h */
+/* pstables.h.new */
/* */
/* PostScript glyph names (specification only). */
/* */
-/* Copyright 2000-2001 by */
+/* Copyright 2000-2001, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,8 +23,6 @@
{
".null",
"nonmarkingreturn",
- "nonbreakingspace",
- "apple",
".notdef",
"space",
"exclam",
@@ -420,95 +418,404 @@
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
"AEacute",
+ "AEmacron",
"Abreve",
+ "Abreveacute",
+ "Abrevecyrillic",
+ "Abrevedotbelow",
+ "Abrevegrave",
+ "Abrevehookabove",
+ "Abrevetilde",
+ "Acaron",
+ "Acircle",
+ "Acircumflexacute",
+ "Acircumflexdotbelow",
+ "Acircumflexgrave",
+ "Acircumflexhookabove",
+ "Acircumflextilde",
"Acute",
+ "Acyrillic",
+ "Adblgrave",
+ "Adieresiscyrillic",
+ "Adieresismacron",
+ "Adotbelow",
+ "Adotmacron",
+ "Ahookabove",
+ "Aiecyrillic",
+ "Ainvertedbreve",
"Alpha",
"Alphatonos",
"Amacron",
+ "Amonospace",
"Aogonek",
"Aringacute",
+ "Aringbelow",
+ "Aybarmenian",
+ "Bcircle",
+ "Bdotaccent",
+ "Bdotbelow",
+ "Becyrillic",
+ "Benarmenian",
"Beta",
+ "Bhook",
+ "Blinebelow",
+ "Bmonospace",
+ "Btopbar",
+ "Caarmenian",
"Cacute",
"Caron",
"Ccaron",
+ "Ccedillaacute",
+ "Ccircle",
"Ccircumflex",
+ "Cdot",
"Cdotaccent",
+ "Chaarmenian",
+ "Cheabkhasiancyrillic",
+ "Checyrillic",
+ "Chedescenderabkhasiancyrillic",
+ "Chedescendercyrillic",
+ "Chedieresiscyrillic",
+ "Cheharmenian",
+ "Chekhakassiancyrillic",
+ "Cheverticalstrokecyrillic",
"Chi",
+ "Chook",
+ "Cmonospace",
+ "Coarmenian",
+ "DZ",
+ "DZcaron",
+ "Daarmenian",
+ "Dafrican",
"Dcaron",
+ "Dcedilla",
+ "Dcircle",
+ "Dcircumflexbelow",
"Dcroat",
+ "Ddotaccent",
+ "Ddotbelow",
+ "Decyrillic",
+ "Deicoptic",
"Delta",
- "Delta",
+ "Deltagreek",
+ "Dhook",
"Dieresis",
"DieresisAcute",
"DieresisGrave",
+ "Digammagreek",
+ "Djecyrillic",
+ "Dlinebelow",
+ "Dmonospace",
+ "Dslash",
+ "Dtopbar",
+ "Dz",
+ "Dzcaron",
+ "Dzeabkhasiancyrillic",
+ "Dzecyrillic",
+ "Dzhecyrillic",
"Ebreve",
"Ecaron",
+ "Ecedillabreve",
+ "Echarmenian",
+ "Ecircle",
+ "Ecircumflexacute",
+ "Ecircumflexbelow",
+ "Ecircumflexdotbelow",
+ "Ecircumflexgrave",
+ "Ecircumflexhookabove",
+ "Ecircumflextilde",
+ "Ecyrillic",
+ "Edblgrave",
+ "Edot",
"Edotaccent",
+ "Edotbelow",
+ "Efcyrillic",
+ "Eharmenian",
+ "Ehookabove",
+ "Eightroman",
+ "Einvertedbreve",
+ "Eiotifiedcyrillic",
+ "Elcyrillic",
+ "Elevenroman",
"Emacron",
+ "Emacronacute",
+ "Emacrongrave",
+ "Emcyrillic",
+ "Emonospace",
+ "Encyrillic",
+ "Endescendercyrillic",
"Eng",
+ "Enghecyrillic",
+ "Enhookcyrillic",
"Eogonek",
+ "Eopen",
"Epsilon",
"Epsilontonos",
+ "Ercyrillic",
+ "Ereversed",
+ "Ereversedcyrillic",
+ "Escyrillic",
+ "Esdescendercyrillic",
+ "Esh",
"Eta",
+ "Etarmenian",
"Etatonos",
+ "Etilde",
+ "Etildebelow",
"Euro",
+ "Ezh",
+ "Ezhcaron",
+ "Ezhreversed",
+ "Fcircle",
+ "Fdotaccent",
+ "Feharmenian",
+ "Feicoptic",
+ "Fhook",
+ "Fitacyrillic",
+ "Fiveroman",
+ "Fmonospace",
+ "Fourroman",
+ "GBsquare",
+ "Gacute",
"Gamma",
+ "Gammaafrican",
+ "Gangiacoptic",
"Gbreve",
"Gcaron",
+ "Gcedilla",
+ "Gcircle",
"Gcircumflex",
"Gcommaaccent",
+ "Gdot",
"Gdotaccent",
+ "Gecyrillic",
+ "Ghadarmenian",
+ "Ghemiddlehookcyrillic",
+ "Ghestrokecyrillic",
+ "Gheupturncyrillic",
+ "Ghook",
+ "Gimarmenian",
+ "Gjecyrillic",
+ "Gmacron",
+ "Gmonospace",
"Grave",
+ "Gsmallhook",
+ "Gstroke",
"H18533",
"H18543",
"H18551",
"H22073",
+ "HPsquare",
+ "Haabkhasiancyrillic",
+ "Hadescendercyrillic",
+ "Hardsigncyrillic",
"Hbar",
+ "Hbrevebelow",
+ "Hcedilla",
+ "Hcircle",
"Hcircumflex",
+ "Hdieresis",
+ "Hdotaccent",
+ "Hdotbelow",
+ "Hmonospace",
+ "Hoarmenian",
+ "Horicoptic",
"Hungarumlaut",
+ "Hzsquare",
+ "IAcyrillic",
"IJ",
+ "IUcyrillic",
"Ibreve",
+ "Icaron",
+ "Icircle",
+ "Icyrillic",
+ "Idblgrave",
+ "Idieresisacute",
+ "Idieresiscyrillic",
+ "Idot",
"Idotaccent",
+ "Idotbelow",
+ "Iebrevecyrillic",
+ "Iecyrillic",
"Ifraktur",
+ "Ihookabove",
+ "Iicyrillic",
+ "Iinvertedbreve",
+ "Iishortcyrillic",
"Imacron",
+ "Imacroncyrillic",
+ "Imonospace",
+ "Iniarmenian",
+ "Iocyrillic",
"Iogonek",
"Iota",
+ "Iotaafrican",
"Iotadieresis",
"Iotatonos",
+ "Istroke",
"Itilde",
+ "Itildebelow",
+ "Izhitsacyrillic",
+ "Izhitsadblgravecyrillic",
+ "Jaarmenian",
+ "Jcircle",
"Jcircumflex",
+ "Jecyrillic",
+ "Jheharmenian",
+ "Jmonospace",
+ "KBsquare",
+ "KKsquare",
+ "Kabashkircyrillic",
+ "Kacute",
+ "Kacyrillic",
+ "Kadescendercyrillic",
+ "Kahookcyrillic",
"Kappa",
+ "Kastrokecyrillic",
+ "Kaverticalstrokecyrillic",
+ "Kcaron",
+ "Kcedilla",
+ "Kcircle",
"Kcommaaccent",
+ "Kdotbelow",
+ "Keharmenian",
+ "Kenarmenian",
+ "Khacyrillic",
+ "Kheicoptic",
+ "Khook",
+ "Kjecyrillic",
+ "Klinebelow",
+ "Kmonospace",
+ "Koppacyrillic",
+ "Koppagreek",
+ "Ksicyrillic",
+ "LJ",
"LL",
"Lacute",
"Lambda",
"Lcaron",
+ "Lcedilla",
+ "Lcircle",
+ "Lcircumflexbelow",
"Lcommaaccent",
"Ldot",
+ "Ldotaccent",
+ "Ldotbelow",
+ "Ldotbelowmacron",
+ "Liwnarmenian",
+ "Lj",
+ "Ljecyrillic",
+ "Llinebelow",
+ "Lmonospace",
+ "MBsquare",
"Macron",
+ "Macute",
+ "Mcircle",
+ "Mdotaccent",
+ "Mdotbelow",
+ "Menarmenian",
+ "Mmonospace",
+ "Mturned",
"Mu",
+ "NJ",
"Nacute",
"Ncaron",
+ "Ncedilla",
+ "Ncircle",
+ "Ncircumflexbelow",
"Ncommaaccent",
+ "Ndotaccent",
+ "Ndotbelow",
+ "Nhookleft",
+ "Nineroman",
+ "Nj",
+ "Njecyrillic",
+ "Nlinebelow",
+ "Nmonospace",
+ "Nowarmenian",
"Nu",
+ "Obarredcyrillic",
+ "Obarreddieresiscyrillic",
"Obreve",
+ "Ocaron",
+ "Ocenteredtilde",
+ "Ocircle",
+ "Ocircumflexacute",
+ "Ocircumflexdotbelow",
+ "Ocircumflexgrave",
+ "Ocircumflexhookabove",
+ "Ocircumflextilde",
+ "Ocyrillic",
+ "Odblacute",
+ "Odblgrave",
+ "Odieresiscyrillic",
+ "Odotbelow",
+ "Oharmenian",
+ "Ohm",
+ "Ohookabove",
"Ohorn",
+ "Ohornacute",
+ "Ohorndotbelow",
+ "Ohorngrave",
+ "Ohornhookabove",
+ "Ohorntilde",
"Ohungarumlaut",
+ "Oi",
+ "Oinvertedbreve",
"Omacron",
+ "Omacronacute",
+ "Omacrongrave",
"Omega",
- "Omega",
+ "Omegacyrillic",
+ "Omegagreek",
+ "Omegaroundcyrillic",
+ "Omegatitlocyrillic",
"Omegatonos",
"Omicron",
"Omicrontonos",
+ "Omonospace",
+ "Oneroman",
+ "Oogonek",
+ "Oogonekmacron",
+ "Oopen",
"Oslashacute",
+ "Ostrokeacute",
+ "Otcyrillic",
+ "Otildeacute",
+ "Otildedieresis",
+ "Pacute",
+ "Pcircle",
+ "Pdotaccent",
+ "Pecyrillic",
+ "Peharmenian",
+ "Pemiddlehookcyrillic",
"Phi",
+ "Phook",
"Pi",
+ "Piwrarmenian",
+ "Pmonospace",
"Psi",
+ "Psicyrillic",
+ "Qcircle",
+ "Qmonospace",
+ "Raarmenian",
"Racute",
"Rcaron",
+ "Rcedilla",
+ "Rcircle",
"Rcommaaccent",
+ "Rdblgrave",
+ "Rdotaccent",
+ "Rdotbelow",
+ "Rdotbelowmacron",
+ "Reharmenian",
"Rfraktur",
"Rho",
+ "Rinvertedbreve",
+ "Rlinebelow",
+ "Rmonospace",
+ "Rsmallinverted",
+ "Rsmallinvertedsuperior",
"SF010000",
"SF020000",
"SF030000",
@@ -550,42 +857,211 @@
"SF530000",
"SF540000",
"Sacute",
+ "Sacutedotaccent",
+ "Sampigreek",
+ "Scarondotaccent",
"Scedilla",
- "Scedilla",
+ "Schwa",
+ "Schwacyrillic",
+ "Schwadieresiscyrillic",
+ "Scircle",
"Scircumflex",
"Scommaaccent",
+ "Sdotaccent",
+ "Sdotbelow",
+ "Sdotbelowdotaccent",
+ "Seharmenian",
+ "Sevenroman",
+ "Shaarmenian",
+ "Shacyrillic",
+ "Shchacyrillic",
+ "Sheicoptic",
+ "Shhacyrillic",
+ "Shimacoptic",
"Sigma",
+ "Sixroman",
+ "Smonospace",
+ "Softsigncyrillic",
+ "Stigmagreek",
"Tau",
"Tbar",
"Tcaron",
+ "Tcedilla",
+ "Tcircle",
+ "Tcircumflexbelow",
"Tcommaaccent",
- "Tcommaaccent",
+ "Tdotaccent",
+ "Tdotbelow",
+ "Tecyrillic",
+ "Tedescendercyrillic",
+ "Tenroman",
+ "Tetsecyrillic",
"Theta",
+ "Thook",
+ "Threeroman",
+ "Tiwnarmenian",
+ "Tlinebelow",
+ "Tmonospace",
+ "Toarmenian",
+ "Tonefive",
+ "Tonesix",
+ "Tonetwo",
+ "Tretroflexhook",
+ "Tsecyrillic",
+ "Tshecyrillic",
+ "Twelveroman",
+ "Tworoman",
"Ubreve",
+ "Ucaron",
+ "Ucircle",
+ "Ucircumflexbelow",
+ "Ucyrillic",
+ "Udblacute",
+ "Udblgrave",
+ "Udieresisacute",
+ "Udieresisbelow",
+ "Udieresiscaron",
+ "Udieresiscyrillic",
+ "Udieresisgrave",
+ "Udieresismacron",
+ "Udotbelow",
+ "Uhookabove",
"Uhorn",
+ "Uhornacute",
+ "Uhorndotbelow",
+ "Uhorngrave",
+ "Uhornhookabove",
+ "Uhorntilde",
"Uhungarumlaut",
+ "Uhungarumlautcyrillic",
+ "Uinvertedbreve",
+ "Ukcyrillic",
"Umacron",
+ "Umacroncyrillic",
+ "Umacrondieresis",
+ "Umonospace",
"Uogonek",
"Upsilon",
"Upsilon1",
+ "Upsilonacutehooksymbolgreek",
+ "Upsilonafrican",
"Upsilondieresis",
+ "Upsilondieresishooksymbolgreek",
+ "Upsilonhooksymbol",
"Upsilontonos",
"Uring",
+ "Ushortcyrillic",
+ "Ustraightcyrillic",
+ "Ustraightstrokecyrillic",
"Utilde",
+ "Utildeacute",
+ "Utildebelow",
+ "Vcircle",
+ "Vdotbelow",
+ "Vecyrillic",
+ "Vewarmenian",
+ "Vhook",
+ "Vmonospace",
+ "Voarmenian",
+ "Vtilde",
"Wacute",
+ "Wcircle",
"Wcircumflex",
"Wdieresis",
+ "Wdotaccent",
+ "Wdotbelow",
"Wgrave",
+ "Wmonospace",
+ "Xcircle",
+ "Xdieresis",
+ "Xdotaccent",
+ "Xeharmenian",
"Xi",
+ "Xmonospace",
+ "Yatcyrillic",
+ "Ycircle",
"Ycircumflex",
+ "Ydotaccent",
+ "Ydotbelow",
+ "Yericyrillic",
+ "Yerudieresiscyrillic",
"Ygrave",
+ "Yhook",
+ "Yhookabove",
+ "Yiarmenian",
+ "Yicyrillic",
+ "Yiwnarmenian",
+ "Ymonospace",
+ "Ytilde",
+ "Yusbigcyrillic",
+ "Yusbigiotifiedcyrillic",
+ "Yuslittlecyrillic",
+ "Yuslittleiotifiedcyrillic",
+ "Zaarmenian",
"Zacute",
+ "Zcircle",
+ "Zcircumflex",
+ "Zdot",
"Zdotaccent",
+ "Zdotbelow",
+ "Zecyrillic",
+ "Zedescendercyrillic",
+ "Zedieresiscyrillic",
"Zeta",
+ "Zhearmenian",
+ "Zhebrevecyrillic",
+ "Zhecyrillic",
+ "Zhedescendercyrillic",
+ "Zhedieresiscyrillic",
+ "Zlinebelow",
+ "Zmonospace",
+ "Zstroke",
+ "aabengali",
+ "aadeva",
+ "aagujarati",
+ "aagurmukhi",
+ "aamatragurmukhi",
+ "aarusquare",
+ "aavowelsignbengali",
+ "aavowelsigndeva",
+ "aavowelsigngujarati",
+ "abbreviationmarkarmenian",
+ "abbreviationsigndeva",
+ "abengali",
+ "abopomofo",
"abreve",
+ "abreveacute",
+ "abrevecyrillic",
+ "abrevedotbelow",
+ "abrevegrave",
+ "abrevehookabove",
+ "abrevetilde",
+ "acaron",
+ "acircle",
+ "acircumflexacute",
+ "acircumflexdotbelow",
+ "acircumflexgrave",
+ "acircumflexhookabove",
+ "acircumflextilde",
+ "acutebelowcmb",
+ "acutecmb",
"acutecomb",
+ "acutedeva",
+ "acutelowmod",
+ "acutetonecmb",
+ "acyrillic",
+ "adblgrave",
+ "addakgurmukhi",
+ "adeva",
+ "adieresiscyrillic",
+ "adieresismacron",
+ "adotbelow",
+ "adotmacron",
"aeacute",
+ "aekorean",
+ "aemacron",
"afii00208",
+ "afii08941",
"afii10017",
"afii10018",
"afii10019",
@@ -830,262 +1306,3020 @@
"afii61664",
"afii63167",
"afii64937",
+ "agujarati",
+ "agurmukhi",
+ "ahiragana",
+ "ahookabove",
+ "aibengali",
+ "aibopomofo",
+ "aideva",
+ "aiecyrillic",
+ "aigujarati",
+ "aigurmukhi",
+ "aimatragurmukhi",
+ "ainarabic",
+ "ainfinalarabic",
+ "aininitialarabic",
+ "ainmedialarabic",
+ "ainvertedbreve",
+ "aivowelsignbengali",
+ "aivowelsigndeva",
+ "aivowelsigngujarati",
+ "akatakana",
+ "akatakanahalfwidth",
+ "akorean",
+ "alef",
+ "alefarabic",
+ "alefdageshhebrew",
+ "aleffinalarabic",
+ "alefhamzaabovearabic",
+ "alefhamzaabovefinalarabic",
+ "alefhamzabelowarabic",
+ "alefhamzabelowfinalarabic",
+ "alefhebrew",
+ "aleflamedhebrew",
+ "alefmaddaabovearabic",
+ "alefmaddaabovefinalarabic",
+ "alefmaksuraarabic",
+ "alefmaksurafinalarabic",
+ "alefmaksurainitialarabic",
+ "alefmaksuramedialarabic",
+ "alefpatahhebrew",
+ "alefqamatshebrew",
"aleph",
+ "allequal",
"alpha",
"alphatonos",
"amacron",
+ "amonospace",
+ "ampersandmonospace",
+ "amsquare",
+ "anbopomofo",
+ "angbopomofo",
+ "angkhankhuthai",
"angle",
+ "anglebracketleft",
+ "anglebracketleftvertical",
+ "anglebracketright",
+ "anglebracketrightvertical",
"angleleft",
"angleright",
+ "angstrom",
"anoteleia",
+ "anudattadeva",
+ "anusvarabengali",
+ "anusvaradeva",
+ "anusvaragujarati",
"aogonek",
+ "apaatosquare",
+ "aparen",
+ "apostrophearmenian",
+ "apostrophemod",
+ "apple",
+ "approaches",
"approxequal",
+ "approxequalorimage",
+ "approximatelyequal",
+ "araeaekorean",
+ "araeakorean",
+ "arc",
+ "arighthalfring",
"aringacute",
+ "aringbelow",
"arrowboth",
+ "arrowdashdown",
+ "arrowdashleft",
+ "arrowdashright",
+ "arrowdashup",
"arrowdblboth",
"arrowdbldown",
"arrowdblleft",
"arrowdblright",
"arrowdblup",
"arrowdown",
+ "arrowdownleft",
+ "arrowdownright",
+ "arrowdownwhite",
+ "arrowheaddownmod",
+ "arrowheadleftmod",
+ "arrowheadrightmod",
+ "arrowheadupmod",
"arrowhorizex",
"arrowleft",
+ "arrowleftdbl",
+ "arrowleftdblstroke",
+ "arrowleftoverright",
+ "arrowleftwhite",
"arrowright",
+ "arrowrightdblstroke",
+ "arrowrightheavy",
+ "arrowrightoverleft",
+ "arrowrightwhite",
+ "arrowtableft",
+ "arrowtabright",
"arrowup",
"arrowupdn",
"arrowupdnbse",
+ "arrowupdownbase",
+ "arrowupleft",
+ "arrowupleftofdown",
+ "arrowupright",
+ "arrowupwhite",
"arrowvertex",
+ "asciicircummonospace",
+ "asciitildemonospace",
+ "ascript",
+ "ascriptturned",
+ "asmallhiragana",
+ "asmallkatakana",
+ "asmallkatakanahalfwidth",
+ "asteriskaltonearabic",
+ "asteriskarabic",
"asteriskmath",
+ "asteriskmonospace",
+ "asterisksmall",
+ "asterism",
+ "asymptoticallyequal",
+ "atmonospace",
+ "atsmall",
+ "aturned",
+ "aubengali",
+ "aubopomofo",
+ "audeva",
+ "augujarati",
+ "augurmukhi",
+ "aulengthmarkbengali",
+ "aumatragurmukhi",
+ "auvowelsignbengali",
+ "auvowelsigndeva",
+ "auvowelsigngujarati",
+ "avagrahadeva",
+ "aybarmenian",
+ "ayin",
+ "ayinaltonehebrew",
+ "ayinhebrew",
+ "babengali",
+ "backslashmonospace",
+ "badeva",
+ "bagujarati",
+ "bagurmukhi",
+ "bahiragana",
+ "bahtthai",
+ "bakatakana",
+ "barmonospace",
+ "bbopomofo",
+ "bcircle",
+ "bdotaccent",
+ "bdotbelow",
+ "beamedsixteenthnotes",
+ "because",
+ "becyrillic",
+ "beharabic",
+ "behfinalarabic",
+ "behinitialarabic",
+ "behiragana",
+ "behmedialarabic",
+ "behmeeminitialarabic",
+ "behmeemisolatedarabic",
+ "behnoonfinalarabic",
+ "bekatakana",
+ "benarmenian",
+ "bet",
"beta",
+ "betasymbolgreek",
+ "betdagesh",
+ "betdageshhebrew",
+ "bethebrew",
+ "betrafehebrew",
+ "bhabengali",
+ "bhadeva",
+ "bhagujarati",
+ "bhagurmukhi",
+ "bhook",
+ "bihiragana",
+ "bikatakana",
+ "bilabialclick",
+ "bindigurmukhi",
+ "birusquare",
+ "blackcircle",
+ "blackdiamond",
+ "blackdownpointingtriangle",
+ "blackleftpointingpointer",
+ "blackleftpointingtriangle",
+ "blacklenticularbracketleft",
+ "blacklenticularbracketleftvertical",
+ "blacklenticularbracketright",
+ "blacklenticularbracketrightvertical",
+ "blacklowerlefttriangle",
+ "blacklowerrighttriangle",
+ "blackrectangle",
+ "blackrightpointingpointer",
+ "blackrightpointingtriangle",
+ "blacksmallsquare",
+ "blacksmilingface",
+ "blacksquare",
+ "blackstar",
+ "blackupperlefttriangle",
+ "blackupperrighttriangle",
+ "blackuppointingsmalltriangle",
+ "blackuppointingtriangle",
+ "blank",
+ "blinebelow",
"block",
+ "bmonospace",
+ "bobaimaithai",
+ "bohiragana",
+ "bokatakana",
+ "bparen",
+ "bqsquare",
"braceex",
"braceleftbt",
"braceleftmid",
+ "braceleftmonospace",
+ "braceleftsmall",
"bracelefttp",
+ "braceleftvertical",
"bracerightbt",
"bracerightmid",
+ "bracerightmonospace",
+ "bracerightsmall",
"bracerighttp",
+ "bracerightvertical",
"bracketleftbt",
"bracketleftex",
+ "bracketleftmonospace",
"bracketlefttp",
"bracketrightbt",
"bracketrightex",
+ "bracketrightmonospace",
"bracketrighttp",
+ "brevebelowcmb",
+ "brevecmb",
+ "breveinvertedbelowcmb",
+ "breveinvertedcmb",
+ "breveinverteddoublecmb",
+ "bridgebelowcmb",
+ "bridgeinvertedbelowcmb",
+ "bstroke",
+ "btopbar",
+ "buhiragana",
+ "bukatakana",
+ "bulletinverse",
+ "bulletoperator",
+ "bullseye",
+ "caarmenian",
+ "cabengali",
"cacute",
+ "cadeva",
+ "cagujarati",
+ "cagurmukhi",
+ "calsquare",
+ "candrabindubengali",
+ "candrabinducmb",
+ "candrabindudeva",
+ "candrabindugujarati",
+ "capslock",
+ "careof",
+ "caronbelowcmb",
+ "caroncmb",
"carriagereturn",
+ "cbopomofo",
"ccaron",
+ "ccedillaacute",
+ "ccircle",
"ccircumflex",
+ "ccurl",
+ "cdot",
"cdotaccent",
+ "cdsquare",
+ "cedillacmb",
+ "centigrade",
+ "centmonospace",
+ "chaarmenian",
+ "chabengali",
+ "chadeva",
+ "chagujarati",
+ "chagurmukhi",
+ "chbopomofo",
+ "cheabkhasiancyrillic",
+ "checkmark",
+ "checyrillic",
+ "chedescenderabkhasiancyrillic",
+ "chedescendercyrillic",
+ "chedieresiscyrillic",
+ "cheharmenian",
+ "chekhakassiancyrillic",
+ "cheverticalstrokecyrillic",
"chi",
+ "chieuchacirclekorean",
+ "chieuchaparenkorean",
+ "chieuchcirclekorean",
+ "chieuchkorean",
+ "chieuchparenkorean",
+ "chochangthai",
+ "chochanthai",
+ "chochingthai",
+ "chochoethai",
+ "chook",
+ "cieucacirclekorean",
+ "cieucaparenkorean",
+ "cieuccirclekorean",
+ "cieuckorean",
+ "cieucparenkorean",
+ "cieucuparenkorean",
"circle",
"circlemultiply",
+ "circleot",
"circleplus",
+ "circlepostalmark",
+ "circlewithlefthalfblack",
+ "circlewithrighthalfblack",
+ "circumflexbelowcmb",
+ "circumflexcmb",
+ "clear",
+ "clickalveolar",
+ "clickdental",
+ "clicklateral",
+ "clickretroflex",
"club",
+ "clubsuitblack",
+ "clubsuitwhite",
+ "cmcubedsquare",
+ "cmonospace",
+ "cmsquaredsquare",
+ "coarmenian",
+ "colonmonospace",
+ "colonsign",
+ "colonsmall",
+ "colontriangularhalfmod",
+ "colontriangularmod",
+ "commaabovecmb",
+ "commaaboverightcmb",
"commaaccent",
+ "commaarabic",
+ "commaarmenian",
+ "commamonospace",
+ "commareversedabovecmb",
+ "commareversedmod",
+ "commasmall",
+ "commaturnedabovecmb",
+ "commaturnedmod",
+ "compass",
"congruent",
+ "contourintegral",
+ "control",
+ "controlACK",
+ "controlBEL",
+ "controlBS",
+ "controlCAN",
+ "controlCR",
+ "controlDC1",
+ "controlDC2",
+ "controlDC3",
+ "controlDC4",
+ "controlDEL",
+ "controlDLE",
+ "controlEM",
+ "controlENQ",
+ "controlEOT",
+ "controlESC",
+ "controlETB",
+ "controlETX",
+ "controlFF",
+ "controlFS",
+ "controlGS",
+ "controlHT",
+ "controlLF",
+ "controlNAK",
+ "controlRS",
+ "controlSI",
+ "controlSO",
+ "controlSOT",
+ "controlSTX",
+ "controlSUB",
+ "controlSYN",
+ "controlUS",
+ "controlVT",
"copyrightsans",
"copyrightserif",
+ "cornerbracketleft",
+ "cornerbracketlefthalfwidth",
+ "cornerbracketleftvertical",
+ "cornerbracketright",
+ "cornerbracketrighthalfwidth",
+ "cornerbracketrightvertical",
+ "corporationsquare",
+ "cosquare",
+ "coverkgsquare",
+ "cparen",
+ "cruzeiro",
+ "cstretched",
+ "curlyand",
+ "curlyor",
"cyrBreve",
"cyrFlex",
"cyrbreve",
"cyrflex",
+ "daarmenian",
+ "dabengali",
+ "dadarabic",
+ "dadeva",
+ "dadfinalarabic",
+ "dadinitialarabic",
+ "dadmedialarabic",
+ "dagesh",
+ "dageshhebrew",
+ "dagujarati",
+ "dagurmukhi",
+ "dahiragana",
+ "dakatakana",
+ "dalarabic",
+ "dalet",
+ "daletdagesh",
+ "daletdageshhebrew",
+ "dalethatafpatah",
+ "dalethatafpatahhebrew",
+ "dalethatafsegol",
+ "dalethatafsegolhebrew",
+ "dalethebrew",
+ "dalethiriq",
+ "dalethiriqhebrew",
+ "daletholam",
+ "daletholamhebrew",
+ "daletpatah",
+ "daletpatahhebrew",
+ "daletqamats",
+ "daletqamatshebrew",
+ "daletqubuts",
+ "daletqubutshebrew",
+ "daletsegol",
+ "daletsegolhebrew",
+ "daletsheva",
+ "daletshevahebrew",
+ "dalettsere",
+ "dalettserehebrew",
+ "dalfinalarabic",
+ "dammaarabic",
+ "dammalowarabic",
+ "dammatanaltonearabic",
+ "dammatanarabic",
+ "danda",
+ "dargahebrew",
+ "dargalefthebrew",
+ "dasiapneumatacyrilliccmb",
"dblGrave",
+ "dblanglebracketleft",
+ "dblanglebracketleftvertical",
+ "dblanglebracketright",
+ "dblanglebracketrightvertical",
+ "dblarchinvertedbelowcmb",
+ "dblarrowleft",
+ "dblarrowright",
+ "dbldanda",
"dblgrave",
+ "dblgravecmb",
+ "dblintegral",
+ "dbllowline",
+ "dbllowlinecmb",
+ "dbloverlinecmb",
+ "dblprimemod",
+ "dblverticalbar",
+ "dblverticallineabovecmb",
+ "dbopomofo",
+ "dbsquare",
"dcaron",
+ "dcedilla",
+ "dcircle",
+ "dcircumflexbelow",
"dcroat",
+ "ddabengali",
+ "ddadeva",
+ "ddagujarati",
+ "ddagurmukhi",
+ "ddalarabic",
+ "ddalfinalarabic",
+ "dddhadeva",
+ "ddhabengali",
+ "ddhadeva",
+ "ddhagujarati",
+ "ddhagurmukhi",
+ "ddotaccent",
+ "ddotbelow",
+ "decimalseparatorarabic",
+ "decimalseparatorpersian",
+ "decyrillic",
+ "dehihebrew",
+ "dehiragana",
+ "deicoptic",
+ "dekatakana",
+ "deleteleft",
+ "deleteright",
"delta",
+ "deltaturned",
+ "denominatorminusonenumeratorbengali",
+ "dezh",
+ "dhabengali",
+ "dhadeva",
+ "dhagujarati",
+ "dhagurmukhi",
+ "dhook",
+ "dialytikatonos",
+ "dialytikatonoscmb",
"diamond",
+ "diamondsuitwhite",
"dieresisacute",
+ "dieresisbelowcmb",
+ "dieresiscmb",
"dieresisgrave",
"dieresistonos",
+ "dihiragana",
+ "dikatakana",
+ "dittomark",
+ "divides",
+ "divisionslash",
+ "djecyrillic",
"dkshade",
+ "dlinebelow",
+ "dlsquare",
+ "dmacron",
+ "dmonospace",
"dnblock",
+ "dochadathai",
+ "dodekthai",
+ "dohiragana",
+ "dokatakana",
+ "dollarmonospace",
+ "dollarsmall",
"dong",
+ "dorusquare",
+ "dotaccentcmb",
+ "dotbelowcmb",
"dotbelowcomb",
+ "dotkatakana",
"dotlessj",
+ "dotlessjstrokehook",
"dotmath",
+ "dottedcircle",
+ "doubleyodpatah",
+ "doubleyodpatahhebrew",
+ "downtackbelowcmb",
+ "downtackmod",
+ "dparen",
+ "dtail",
+ "dtopbar",
+ "duhiragana",
+ "dukatakana",
+ "dz",
+ "dzaltone",
+ "dzcaron",
+ "dzcurl",
+ "dzeabkhasiancyrillic",
+ "dzecyrillic",
+ "dzhecyrillic",
+ "earth",
+ "ebengali",
+ "ebopomofo",
"ebreve",
+ "ecandradeva",
+ "ecandragujarati",
+ "ecandravowelsigndeva",
+ "ecandravowelsigngujarati",
"ecaron",
+ "ecedillabreve",
+ "echarmenian",
+ "echyiwnarmenian",
+ "ecircle",
+ "ecircumflexacute",
+ "ecircumflexbelow",
+ "ecircumflexdotbelow",
+ "ecircumflexgrave",
+ "ecircumflexhookabove",
+ "ecircumflextilde",
+ "ecyrillic",
+ "edblgrave",
+ "edeva",
+ "edot",
"edotaccent",
+ "edotbelow",
+ "eegurmukhi",
+ "eematragurmukhi",
+ "efcyrillic",
+ "egujarati",
+ "eharmenian",
+ "ehbopomofo",
+ "ehiragana",
+ "ehookabove",
+ "eibopomofo",
+ "eightarabic",
+ "eightbengali",
+ "eightcircle",
+ "eightcircleinversesansserif",
+ "eightdeva",
+ "eighteencircle",
+ "eighteenparen",
+ "eighteenperiod",
+ "eightgujarati",
+ "eightgurmukhi",
+ "eighthackarabic",
+ "eighthangzhou",
+ "eighthnotebeamed",
+ "eightideographicparen",
+ "eightmonospace",
+ "eightparen",
+ "eightperiod",
+ "eightpersian",
+ "eightroman",
+ "eightthai",
+ "einvertedbreve",
+ "eiotifiedcyrillic",
+ "ekatakana",
+ "ekatakanahalfwidth",
+ "ekonkargurmukhi",
+ "ekorean",
+ "elcyrillic",
"element",
+ "elevencircle",
+ "elevenparen",
+ "elevenperiod",
+ "elevenroman",
+ "ellipsisvertical",
"emacron",
+ "emacronacute",
+ "emacrongrave",
+ "emcyrillic",
+ "emdashvertical",
+ "emonospace",
+ "emphasismarkarmenian",
"emptyset",
+ "enbopomofo",
+ "encyrillic",
+ "endashvertical",
+ "endescendercyrillic",
"eng",
+ "engbopomofo",
+ "enghecyrillic",
+ "enhookcyrillic",
+ "enspace",
"eogonek",
+ "eokorean",
+ "eopen",
+ "eopenclosed",
+ "eopenreversed",
+ "eopenreversedclosed",
+ "eopenreversedhook",
+ "eparen",
"epsilon",
"epsilontonos",
+ "equalmonospace",
+ "equalsmall",
+ "equalsuperior",
"equivalence",
+ "erbopomofo",
+ "ercyrillic",
+ "ereversed",
+ "ereversedcyrillic",
+ "escyrillic",
+ "esdescendercyrillic",
+ "esh",
+ "eshcurl",
+ "eshortdeva",
+ "eshortvowelsigndeva",
+ "eshreversedloop",
+ "eshsquatreversed",
+ "esmallhiragana",
+ "esmallkatakana",
+ "esmallkatakanahalfwidth",
"estimated",
"eta",
+ "etarmenian",
"etatonos",
+ "etilde",
+ "etildebelow",
+ "etnahtafoukhhebrew",
+ "etnahtafoukhlefthebrew",
+ "etnahtahebrew",
+ "etnahtalefthebrew",
+ "eturned",
+ "eukorean",
+ "euro",
+ "evowelsignbengali",
+ "evowelsigndeva",
+ "evowelsigngujarati",
+ "exclamarmenian",
"exclamdbl",
+ "exclammonospace",
"existential",
+ "ezh",
+ "ezhcaron",
+ "ezhcurl",
+ "ezhreversed",
+ "ezhtail",
+ "fadeva",
+ "fagurmukhi",
+ "fahrenheit",
+ "fathaarabic",
+ "fathalowarabic",
+ "fathatanarabic",
+ "fbopomofo",
+ "fcircle",
+ "fdotaccent",
+ "feharabic",
+ "feharmenian",
+ "fehfinalarabic",
+ "fehinitialarabic",
+ "fehmedialarabic",
+ "feicoptic",
"female",
+ "fifteencircle",
+ "fifteenparen",
+ "fifteenperiod",
"filledbox",
"filledrect",
+ "finalkaf",
+ "finalkafdagesh",
+ "finalkafdageshhebrew",
+ "finalkafhebrew",
+ "finalkafqamats",
+ "finalkafqamatshebrew",
+ "finalkafsheva",
+ "finalkafshevahebrew",
+ "finalmem",
+ "finalmemhebrew",
+ "finalnun",
+ "finalnunhebrew",
+ "finalpe",
+ "finalpehebrew",
+ "finaltsadi",
+ "finaltsadihebrew",
+ "firsttonechinese",
+ "fisheye",
+ "fitacyrillic",
+ "fivearabic",
+ "fivebengali",
+ "fivecircle",
+ "fivecircleinversesansserif",
+ "fivedeva",
+ "fivegujarati",
+ "fivegurmukhi",
+ "fivehackarabic",
+ "fivehangzhou",
+ "fiveideographicparen",
+ "fivemonospace",
+ "fiveparen",
+ "fiveperiod",
+ "fivepersian",
+ "fiveroman",
+ "fivethai",
+ "fmonospace",
+ "fmsquare",
+ "fofanthai",
+ "fofathai",
+ "fongmanthai",
+ "forall",
+ "fourarabic",
+ "fourbengali",
+ "fourcircle",
+ "fourcircleinversesansserif",
+ "fourdeva",
+ "fourgujarati",
+ "fourgurmukhi",
+ "fourhackarabic",
+ "fourhangzhou",
+ "fourideographicparen",
+ "fourmonospace",
+ "fournumeratorbengali",
+ "fourparen",
+ "fourperiod",
+ "fourpersian",
+ "fourroman",
+ "fourteencircle",
+ "fourteenparen",
+ "fourteenperiod",
+ "fourthai",
+ "fourthtonechinese",
+ "fparen",
"franc",
+ "gabengali",
+ "gacute",
+ "gadeva",
+ "gafarabic",
+ "gaffinalarabic",
+ "gafinitialarabic",
+ "gafmedialarabic",
+ "gagujarati",
+ "gagurmukhi",
+ "gahiragana",
+ "gakatakana",
"gamma",
+ "gammalatinsmall",
+ "gammasuperior",
+ "gangiacoptic",
+ "gbopomofo",
"gbreve",
"gcaron",
+ "gcedilla",
+ "gcircle",
"gcircumflex",
"gcommaaccent",
+ "gdot",
"gdotaccent",
+ "gecyrillic",
+ "gehiragana",
+ "gekatakana",
+ "geometricallyequal",
+ "gereshaccenthebrew",
+ "gereshhebrew",
+ "gereshmuqdamhebrew",
+ "gershayimaccenthebrew",
+ "gershayimhebrew",
+ "getamark",
+ "ghabengali",
+ "ghadarmenian",
+ "ghadeva",
+ "ghagujarati",
+ "ghagurmukhi",
+ "ghainarabic",
+ "ghainfinalarabic",
+ "ghaininitialarabic",
+ "ghainmedialarabic",
+ "ghemiddlehookcyrillic",
+ "ghestrokecyrillic",
+ "gheupturncyrillic",
+ "ghhadeva",
+ "ghhagurmukhi",
+ "ghook",
+ "ghzsquare",
+ "gihiragana",
+ "gikatakana",
+ "gimarmenian",
+ "gimel",
+ "gimeldagesh",
+ "gimeldageshhebrew",
+ "gimelhebrew",
+ "gjecyrillic",
+ "glottalinvertedstroke",
+ "glottalstop",
+ "glottalstopinverted",
+ "glottalstopmod",
+ "glottalstopreversed",
+ "glottalstopreversedmod",
+ "glottalstopreversedsuperior",
+ "glottalstopstroke",
+ "glottalstopstrokereversed",
+ "gmacron",
+ "gmonospace",
+ "gohiragana",
+ "gokatakana",
+ "gparen",
+ "gpasquare",
"gradient",
+ "gravebelowcmb",
+ "gravecmb",
"gravecomb",
+ "gravedeva",
+ "gravelowmod",
+ "gravemonospace",
+ "gravetonecmb",
"greaterequal",
+ "greaterequalorless",
+ "greatermonospace",
+ "greaterorequivalent",
+ "greaterorless",
+ "greateroverequal",
+ "greatersmall",
+ "gscript",
+ "gstroke",
+ "guhiragana",
+ "gukatakana",
+ "guramusquare",
+ "gysquare",
+ "haabkhasiancyrillic",
+ "haaltonearabic",
+ "habengali",
+ "hadescendercyrillic",
+ "hadeva",
+ "hagujarati",
+ "hagurmukhi",
+ "haharabic",
+ "hahfinalarabic",
+ "hahinitialarabic",
+ "hahiragana",
+ "hahmedialarabic",
+ "haitusquare",
+ "hakatakana",
+ "hakatakanahalfwidth",
+ "halantgurmukhi",
+ "hamzaarabic",
+ "hamzadammaarabic",
+ "hamzadammatanarabic",
+ "hamzafathaarabic",
+ "hamzafathatanarabic",
+ "hamzalowarabic",
+ "hamzalowkasraarabic",
+ "hamzalowkasratanarabic",
+ "hamzasukunarabic",
+ "hangulfiller",
+ "hardsigncyrillic",
+ "harpoonleftbarbup",
+ "harpoonrightbarbup",
+ "hasquare",
+ "hatafpatah",
+ "hatafpatah16",
+ "hatafpatah23",
+ "hatafpatah2f",
+ "hatafpatahhebrew",
+ "hatafpatahnarrowhebrew",
+ "hatafpatahquarterhebrew",
+ "hatafpatahwidehebrew",
+ "hatafqamats",
+ "hatafqamats1b",
+ "hatafqamats28",
+ "hatafqamats34",
+ "hatafqamatshebrew",
+ "hatafqamatsnarrowhebrew",
+ "hatafqamatsquarterhebrew",
+ "hatafqamatswidehebrew",
+ "hatafsegol",
+ "hatafsegol17",
+ "hatafsegol24",
+ "hatafsegol30",
+ "hatafsegolhebrew",
+ "hatafsegolnarrowhebrew",
+ "hatafsegolquarterhebrew",
+ "hatafsegolwidehebrew",
"hbar",
+ "hbopomofo",
+ "hbrevebelow",
+ "hcedilla",
+ "hcircle",
"hcircumflex",
+ "hdieresis",
+ "hdotaccent",
+ "hdotbelow",
+ "he",
"heart",
+ "heartsuitblack",
+ "heartsuitwhite",
+ "hedagesh",
+ "hedageshhebrew",
+ "hehaltonearabic",
+ "heharabic",
+ "hehebrew",
+ "hehfinalaltonearabic",
+ "hehfinalalttwoarabic",
+ "hehfinalarabic",
+ "hehhamzaabovefinalarabic",
+ "hehhamzaaboveisolatedarabic",
+ "hehinitialaltonearabic",
+ "hehinitialarabic",
+ "hehiragana",
+ "hehmedialaltonearabic",
+ "hehmedialarabic",
+ "heiseierasquare",
+ "hekatakana",
+ "hekatakanahalfwidth",
+ "hekutaarusquare",
+ "henghook",
+ "herutusquare",
+ "het",
+ "hethebrew",
+ "hhook",
+ "hhooksuperior",
+ "hieuhacirclekorean",
+ "hieuhaparenkorean",
+ "hieuhcirclekorean",
+ "hieuhkorean",
+ "hieuhparenkorean",
+ "hihiragana",
+ "hikatakana",
+ "hikatakanahalfwidth",
+ "hiriq",
+ "hiriq14",
+ "hiriq21",
+ "hiriq2d",
+ "hiriqhebrew",
+ "hiriqnarrowhebrew",
+ "hiriqquarterhebrew",
+ "hiriqwidehebrew",
+ "hlinebelow",
+ "hmonospace",
+ "hoarmenian",
+ "hohipthai",
+ "hohiragana",
+ "hokatakana",
+ "hokatakanahalfwidth",
+ "holam",
+ "holam19",
+ "holam26",
+ "holam32",
+ "holamhebrew",
+ "holamnarrowhebrew",
+ "holamquarterhebrew",
+ "holamwidehebrew",
+ "honokhukthai",
"hookabovecomb",
+ "hookcmb",
+ "hookpalatalizedbelowcmb",
+ "hookretroflexbelowcmb",
+ "hoonsquare",
+ "horicoptic",
+ "horizontalbar",
+ "horncmb",
+ "hotsprings",
"house",
+ "hparen",
+ "hsuperior",
+ "hturned",
+ "huhiragana",
+ "huiitosquare",
+ "hukatakana",
+ "hukatakanahalfwidth",
+ "hungarumlautcmb",
+ "hv",
+ "hyphenmonospace",
+ "hyphensmall",
+ "hyphentwo",
+ "iacyrillic",
+ "ibengali",
+ "ibopomofo",
"ibreve",
+ "icaron",
+ "icircle",
+ "icyrillic",
+ "idblgrave",
+ "ideographearthcircle",
+ "ideographfirecircle",
+ "ideographicallianceparen",
+ "ideographiccallparen",
+ "ideographiccentrecircle",
+ "ideographicclose",
+ "ideographiccomma",
+ "ideographiccommaleft",
+ "ideographiccongratulationparen",
+ "ideographiccorrectcircle",
+ "ideographicearthparen",
+ "ideographicenterpriseparen",
+ "ideographicexcellentcircle",
+ "ideographicfestivalparen",
+ "ideographicfinancialcircle",
+ "ideographicfinancialparen",
+ "ideographicfireparen",
+ "ideographichaveparen",
+ "ideographichighcircle",
+ "ideographiciterationmark",
+ "ideographiclaborcircle",
+ "ideographiclaborparen",
+ "ideographicleftcircle",
+ "ideographiclowcircle",
+ "ideographicmedicinecircle",
+ "ideographicmetalparen",
+ "ideographicmoonparen",
+ "ideographicnameparen",
+ "ideographicperiod",
+ "ideographicprintcircle",
+ "ideographicreachparen",
+ "ideographicrepresentparen",
+ "ideographicresourceparen",
+ "ideographicrightcircle",
+ "ideographicsecretcircle",
+ "ideographicselfparen",
+ "ideographicsocietyparen",
+ "ideographicspace",
+ "ideographicspecialparen",
+ "ideographicstockparen",
+ "ideographicstudyparen",
+ "ideographicsunparen",
+ "ideographicsuperviseparen",
+ "ideographicwaterparen",
+ "ideographicwoodparen",
+ "ideographiczero",
+ "ideographmetalcircle",
+ "ideographmooncircle",
+ "ideographnamecircle",
+ "ideographsuncircle",
+ "ideographwatercircle",
+ "ideographwoodcircle",
+ "ideva",
+ "idieresisacute",
+ "idieresiscyrillic",
+ "idotbelow",
+ "iebrevecyrillic",
+ "iecyrillic",
+ "ieungacirclekorean",
+ "ieungaparenkorean",
+ "ieungcirclekorean",
+ "ieungkorean",
+ "ieungparenkorean",
+ "igujarati",
+ "igurmukhi",
+ "ihiragana",
+ "ihookabove",
+ "iibengali",
+ "iicyrillic",
+ "iideva",
+ "iigujarati",
+ "iigurmukhi",
+ "iimatragurmukhi",
+ "iinvertedbreve",
+ "iishortcyrillic",
+ "iivowelsignbengali",
+ "iivowelsigndeva",
+ "iivowelsigngujarati",
"ij",
+ "ikatakana",
+ "ikatakanahalfwidth",
+ "ikorean",
+ "ilde",
+ "iluyhebrew",
"imacron",
+ "imacroncyrillic",
+ "imageorapproximatelyequal",
+ "imatragurmukhi",
+ "imonospace",
+ "increment",
"infinity",
+ "iniarmenian",
"integral",
+ "integralbottom",
"integralbt",
"integralex",
+ "integraltop",
"integraltp",
"intersection",
+ "intisquare",
"invbullet",
"invcircle",
"invsmileface",
+ "iocyrillic",
"iogonek",
"iota",
"iotadieresis",
"iotadieresistonos",
+ "iotalatin",
"iotatonos",
+ "iparen",
+ "irigurmukhi",
+ "ismallhiragana",
+ "ismallkatakana",
+ "ismallkatakanahalfwidth",
+ "issharbengali",
+ "istroke",
+ "iterationhiragana",
+ "iterationkatakana",
"itilde",
+ "itildebelow",
+ "iubopomofo",
+ "iucyrillic",
+ "ivowelsignbengali",
+ "ivowelsigndeva",
+ "ivowelsigngujarati",
+ "izhitsacyrillic",
+ "izhitsadblgravecyrillic",
+ "jaarmenian",
+ "jabengali",
+ "jadeva",
+ "jagujarati",
+ "jagurmukhi",
+ "jbopomofo",
+ "jcaron",
+ "jcircle",
"jcircumflex",
+ "jcrossedtail",
+ "jdotlessstroke",
+ "jecyrillic",
+ "jeemarabic",
+ "jeemfinalarabic",
+ "jeeminitialarabic",
+ "jeemmedialarabic",
+ "jeharabic",
+ "jehfinalarabic",
+ "jhabengali",
+ "jhadeva",
+ "jhagujarati",
+ "jhagurmukhi",
+ "jheharmenian",
+ "jis",
+ "jmonospace",
+ "jparen",
+ "jsuperior",
+ "kabashkircyrillic",
+ "kabengali",
+ "kacute",
+ "kacyrillic",
+ "kadescendercyrillic",
+ "kadeva",
+ "kaf",
+ "kafarabic",
+ "kafdagesh",
+ "kafdageshhebrew",
+ "kaffinalarabic",
+ "kafhebrew",
+ "kafinitialarabic",
+ "kafmedialarabic",
+ "kafrafehebrew",
+ "kagujarati",
+ "kagurmukhi",
+ "kahiragana",
+ "kahookcyrillic",
+ "kakatakana",
+ "kakatakanahalfwidth",
"kappa",
+ "kappasymbolgreek",
+ "kapyeounmieumkorean",
+ "kapyeounphieuphkorean",
+ "kapyeounpieupkorean",
+ "kapyeounssangpieupkorean",
+ "karoriisquare",
+ "kashidaautoarabic",
+ "kashidaautonosidebearingarabic",
+ "kasmallkatakana",
+ "kasquare",
+ "kasraarabic",
+ "kasratanarabic",
+ "kastrokecyrillic",
+ "katahiraprolongmarkhalfwidth",
+ "kaverticalstrokecyrillic",
+ "kbopomofo",
+ "kcalsquare",
+ "kcaron",
+ "kcedilla",
+ "kcircle",
"kcommaaccent",
+ "kdotbelow",
+ "keharmenian",
+ "kehiragana",
+ "kekatakana",
+ "kekatakanahalfwidth",
+ "kenarmenian",
+ "kesmallkatakana",
"kgreenlandic",
+ "khabengali",
+ "khacyrillic",
+ "khadeva",
+ "khagujarati",
+ "khagurmukhi",
+ "khaharabic",
+ "khahfinalarabic",
+ "khahinitialarabic",
+ "khahmedialarabic",
+ "kheicoptic",
+ "khhadeva",
+ "khhagurmukhi",
+ "khieukhacirclekorean",
+ "khieukhaparenkorean",
+ "khieukhcirclekorean",
+ "khieukhkorean",
+ "khieukhparenkorean",
+ "khokhaithai",
+ "khokhonthai",
+ "khokhuatthai",
+ "khokhwaithai",
+ "khomutthai",
+ "khook",
+ "khorakhangthai",
+ "khzsquare",
+ "kihiragana",
+ "kikatakana",
+ "kikatakanahalfwidth",
+ "kiroguramusquare",
+ "kiromeetorusquare",
+ "kirosquare",
+ "kiyeokacirclekorean",
+ "kiyeokaparenkorean",
+ "kiyeokcirclekorean",
+ "kiyeokkorean",
+ "kiyeokparenkorean",
+ "kiyeoksioskorean",
+ "kjecyrillic",
+ "klinebelow",
+ "klsquare",
+ "kmcubedsquare",
+ "kmonospace",
+ "kmsquaredsquare",
+ "kohiragana",
+ "kohmsquare",
+ "kokaithai",
+ "kokatakana",
+ "kokatakanahalfwidth",
+ "kooposquare",
+ "koppacyrillic",
+ "koreanstandardsymbol",
+ "koroniscmb",
+ "kparen",
+ "kpasquare",
+ "ksicyrillic",
+ "ktsquare",
+ "kturned",
+ "kuhiragana",
+ "kukatakana",
+ "kukatakanahalfwidth",
+ "kvsquare",
+ "kwsquare",
+ "labengali",
"lacute",
+ "ladeva",
+ "lagujarati",
+ "lagurmukhi",
+ "lakkhangyaothai",
+ "lamaleffinalarabic",
+ "lamalefhamzaabovefinalarabic",
+ "lamalefhamzaaboveisolatedarabic",
+ "lamalefhamzabelowfinalarabic",
+ "lamalefhamzabelowisolatedarabic",
+ "lamalefisolatedarabic",
+ "lamalefmaddaabovefinalarabic",
+ "lamalefmaddaaboveisolatedarabic",
+ "lamarabic",
"lambda",
+ "lambdastroke",
+ "lamed",
+ "lameddagesh",
+ "lameddageshhebrew",
+ "lamedhebrew",
+ "lamedholam",
+ "lamedholamdagesh",
+ "lamedholamdageshhebrew",
+ "lamedholamhebrew",
+ "lamfinalarabic",
+ "lamhahinitialarabic",
+ "laminitialarabic",
+ "lamjeeminitialarabic",
+ "lamkhahinitialarabic",
+ "lamlamhehisolatedarabic",
+ "lammedialarabic",
+ "lammeemhahinitialarabic",
+ "lammeeminitialarabic",
+ "lammeemjeeminitialarabic",
+ "lammeemkhahinitialarabic",
+ "largecircle",
+ "lbar",
+ "lbelt",
+ "lbopomofo",
"lcaron",
+ "lcedilla",
+ "lcircle",
+ "lcircumflexbelow",
"lcommaaccent",
"ldot",
+ "ldotaccent",
+ "ldotbelow",
+ "ldotbelowmacron",
+ "leftangleabovecmb",
+ "lefttackbelowcmb",
"lessequal",
+ "lessequalorgreater",
+ "lessmonospace",
+ "lessorequivalent",
+ "lessorgreater",
+ "lessoverequal",
+ "lesssmall",
+ "lezh",
"lfblock",
+ "lhookretroflex",
"lira",
+ "liwnarmenian",
+ "lj",
+ "ljecyrillic",
"ll",
+ "lladeva",
+ "llagujarati",
+ "llinebelow",
+ "llladeva",
+ "llvocalicbengali",
+ "llvocalicdeva",
+ "llvocalicvowelsignbengali",
+ "llvocalicvowelsigndeva",
+ "lmiddletilde",
+ "lmonospace",
+ "lmsquare",
+ "lochulathai",
"logicaland",
+ "logicalnotreversed",
"logicalor",
+ "lolingthai",
"longs",
+ "lowlinecenterline",
+ "lowlinecmb",
+ "lowlinedashed",
"lozenge",
+ "lparen",
+ "lsquare",
"ltshade",
+ "luthai",
+ "lvocalicbengali",
+ "lvocalicdeva",
+ "lvocalicvowelsignbengali",
+ "lvocalicvowelsigndeva",
+ "lxsquare",
+ "mabengali",
+ "macronbelowcmb",
+ "macroncmb",
+ "macronlowmod",
+ "macronmonospace",
+ "macute",
+ "madeva",
+ "magujarati",
+ "magurmukhi",
+ "mahapakhhebrew",
+ "mahapakhlefthebrew",
+ "mahiragana",
+ "maichattawalowleftthai",
+ "maichattawalowrightthai",
+ "maichattawathai",
+ "maichattawaupperleftthai",
+ "maieklowleftthai",
+ "maieklowrightthai",
+ "maiekthai",
+ "maiekupperleftthai",
+ "maihanakatleftthai",
+ "maihanakatthai",
+ "maitaikhuleftthai",
+ "maitaikhuthai",
+ "maitholowleftthai",
+ "maitholowrightthai",
+ "maithothai",
+ "maithoupperleftthai",
+ "maitrilowleftthai",
+ "maitrilowrightthai",
+ "maitrithai",
+ "maitriupperleftthai",
+ "maiyamokthai",
+ "makatakana",
+ "makatakanahalfwidth",
"male",
+ "mansyonsquare",
+ "maqafhebrew",
+ "mars",
+ "masoracirclehebrew",
+ "masquare",
+ "mbopomofo",
+ "mbsquare",
+ "mcircle",
+ "mcubedsquare",
+ "mdotaccent",
+ "mdotbelow",
+ "meemarabic",
+ "meemfinalarabic",
+ "meeminitialarabic",
+ "meemmedialarabic",
+ "meemmeeminitialarabic",
+ "meemmeemisolatedarabic",
+ "meetorusquare",
+ "mehiragana",
+ "meizierasquare",
+ "mekatakana",
+ "mekatakanahalfwidth",
+ "mem",
+ "memdagesh",
+ "memdageshhebrew",
+ "memhebrew",
+ "menarmenian",
+ "merkhahebrew",
+ "merkhakefulahebrew",
+ "merkhakefulalefthebrew",
+ "merkhalefthebrew",
+ "mhook",
+ "mhzsquare",
+ "middledotkatakanahalfwidth",
+ "middot",
+ "mieumacirclekorean",
+ "mieumaparenkorean",
+ "mieumcirclekorean",
+ "mieumkorean",
+ "mieumpansioskorean",
+ "mieumparenkorean",
+ "mieumpieupkorean",
+ "mieumsioskorean",
+ "mihiragana",
+ "mikatakana",
+ "mikatakanahalfwidth",
+ "minusbelowcmb",
+ "minuscircle",
+ "minusmod",
+ "minusplus",
"minute",
+ "miribaarusquare",
+ "mirisquare",
+ "mlonglegturned",
+ "mlsquare",
+ "mmcubedsquare",
+ "mmonospace",
+ "mmsquaredsquare",
+ "mohiragana",
+ "mohmsquare",
+ "mokatakana",
+ "mokatakanahalfwidth",
+ "molsquare",
+ "momathai",
+ "moverssquare",
+ "moverssquaredsquare",
+ "mparen",
+ "mpasquare",
+ "mssquare",
+ "mturned",
+ "mu1",
+ "muasquare",
+ "muchgreater",
+ "muchless",
+ "mufsquare",
+ "mugreek",
+ "mugsquare",
+ "muhiragana",
+ "mukatakana",
+ "mukatakanahalfwidth",
+ "mulsquare",
+ "mumsquare",
+ "munahhebrew",
+ "munahlefthebrew",
"musicalnote",
"musicalnotedbl",
+ "musicflatsign",
+ "musicsharpsign",
+ "mussquare",
+ "muvsquare",
+ "muwsquare",
+ "mvmegasquare",
+ "mvsquare",
+ "mwmegasquare",
+ "mwsquare",
+ "nabengali",
+ "nabla",
"nacute",
+ "nadeva",
+ "nagujarati",
+ "nagurmukhi",
+ "nahiragana",
+ "nakatakana",
+ "nakatakanahalfwidth",
"napostrophe",
+ "nasquare",
+ "nbopomofo",
+ "nbspace",
"ncaron",
+ "ncedilla",
+ "ncircle",
+ "ncircumflexbelow",
"ncommaaccent",
+ "ndotaccent",
+ "ndotbelow",
+ "nehiragana",
+ "nekatakana",
+ "nekatakanahalfwidth",
+ "newsheqelsign",
+ "nfsquare",
+ "ngabengali",
+ "ngadeva",
+ "ngagujarati",
+ "ngagurmukhi",
+ "ngonguthai",
+ "nhiragana",
+ "nhookleft",
+ "nhookretroflex",
+ "nieunacirclekorean",
+ "nieunaparenkorean",
+ "nieuncieuckorean",
+ "nieuncirclekorean",
+ "nieunhieuhkorean",
+ "nieunkorean",
+ "nieunpansioskorean",
+ "nieunparenkorean",
+ "nieunsioskorean",
+ "nieuntikeutkorean",
+ "nihiragana",
+ "nikatakana",
+ "nikatakanahalfwidth",
+ "nikhahitleftthai",
+ "nikhahitthai",
+ "ninearabic",
+ "ninebengali",
+ "ninecircle",
+ "ninecircleinversesansserif",
+ "ninedeva",
+ "ninegujarati",
+ "ninegurmukhi",
+ "ninehackarabic",
+ "ninehangzhou",
+ "nineideographicparen",
+ "ninemonospace",
+ "nineparen",
+ "nineperiod",
+ "ninepersian",
+ "nineroman",
+ "nineteencircle",
+ "nineteenparen",
+ "nineteenperiod",
+ "ninethai",
+ "nj",
+ "njecyrillic",
+ "nkatakana",
+ "nkatakanahalfwidth",
+ "nlegrightlong",
+ "nlinebelow",
+ "nmonospace",
+ "nmsquare",
+ "nnabengali",
+ "nnadeva",
+ "nnagujarati",
+ "nnagurmukhi",
+ "nnnadeva",
+ "nohiragana",
+ "nokatakana",
+ "nokatakanahalfwidth",
+ "nonbreakingspace",
+ "nonenthai",
+ "nonuthai",
+ "noonarabic",
+ "noonfinalarabic",
+ "noonghunnaarabic",
+ "noonghunnafinalarabic",
+ "noonhehinitialarabic",
+ "nooninitialarabic",
+ "noonjeeminitialarabic",
+ "noonjeemisolatedarabic",
+ "noonmedialarabic",
+ "noonmeeminitialarabic",
+ "noonmeemisolatedarabic",
+ "noonnoonfinalarabic",
+ "notcontains",
"notelement",
+ "notelementof",
"notequal",
+ "notgreater",
+ "notgreaternorequal",
+ "notgreaternorless",
+ "notidentical",
+ "notless",
+ "notlessnorequal",
+ "notparallel",
+ "notprecedes",
"notsubset",
+ "notsucceeds",
+ "notsuperset",
+ "nowarmenian",
+ "nparen",
+ "nssquare",
"nu",
+ "nuhiragana",
+ "nukatakana",
+ "nukatakanahalfwidth",
+ "nuktabengali",
+ "nuktadeva",
+ "nuktagujarati",
+ "nuktagurmukhi",
+ "numbersignmonospace",
+ "numbersignsmall",
+ "numeralsigngreek",
+ "numeralsignlowergreek",
+ "numero",
+ "nun",
+ "nundagesh",
+ "nundageshhebrew",
+ "nunhebrew",
+ "nvsquare",
+ "nwsquare",
+ "nyabengali",
+ "nyadeva",
+ "nyagujarati",
+ "nyagurmukhi",
+ "oangthai",
+ "obarred",
+ "obarredcyrillic",
+ "obarreddieresiscyrillic",
+ "obengali",
+ "obopomofo",
"obreve",
+ "ocandradeva",
+ "ocandragujarati",
+ "ocandravowelsigndeva",
+ "ocandravowelsigngujarati",
+ "ocaron",
+ "ocircle",
+ "ocircumflexacute",
+ "ocircumflexdotbelow",
+ "ocircumflexgrave",
+ "ocircumflexhookabove",
+ "ocircumflextilde",
+ "ocyrillic",
+ "odblacute",
+ "odblgrave",
+ "odeva",
+ "odieresiscyrillic",
+ "odotbelow",
+ "oekorean",
+ "ogonekcmb",
+ "ogujarati",
+ "oharmenian",
+ "ohiragana",
+ "ohookabove",
"ohorn",
+ "ohornacute",
+ "ohorndotbelow",
+ "ohorngrave",
+ "ohornhookabove",
+ "ohorntilde",
"ohungarumlaut",
+ "oi",
+ "oinvertedbreve",
+ "okatakana",
+ "okatakanahalfwidth",
+ "okorean",
+ "olehebrew",
"omacron",
+ "omacronacute",
+ "omacrongrave",
+ "omdeva",
"omega",
"omega1",
+ "omegacyrillic",
+ "omegalatinclosed",
+ "omegaroundcyrillic",
+ "omegatitlocyrillic",
"omegatonos",
+ "omgujarati",
"omicron",
"omicrontonos",
+ "omonospace",
+ "onearabic",
+ "onebengali",
+ "onecircle",
+ "onecircleinversesansserif",
+ "onedeva",
+ "onegujarati",
+ "onegurmukhi",
+ "onehackarabic",
+ "onehangzhou",
+ "oneideographicparen",
+ "onemonospace",
+ "onenumeratorbengali",
+ "oneparen",
+ "oneperiod",
+ "onepersian",
+ "oneroman",
+ "onethai",
+ "oogonek",
+ "oogonekmacron",
+ "oogurmukhi",
+ "oomatragurmukhi",
+ "oopen",
+ "oparen",
"openbullet",
+ "option",
"orthogonal",
+ "oshortdeva",
+ "oshortvowelsigndeva",
"oslashacute",
+ "osmallhiragana",
+ "osmallkatakana",
+ "osmallkatakanahalfwidth",
+ "ostrokeacute",
+ "otcyrillic",
+ "otildeacute",
+ "otildedieresis",
+ "oubopomofo",
+ "overline",
+ "overlinecenterline",
+ "overlinecmb",
+ "overlinedashed",
+ "overlinedblwavy",
+ "overlinewavy",
+ "overscore",
+ "ovowelsignbengali",
+ "ovowelsigndeva",
+ "ovowelsigngujarati",
+ "paampssquare",
+ "paasentosquare",
+ "pabengali",
+ "pacute",
+ "padeva",
+ "pagedown",
+ "pageup",
+ "pagujarati",
+ "pagurmukhi",
+ "pahiragana",
+ "paiyannoithai",
+ "pakatakana",
+ "palatalizationcyrilliccmb",
+ "palochkacyrillic",
+ "pansioskorean",
+ "parallel",
+ "parenleftaltonearabic",
"parenleftbt",
"parenleftex",
+ "parenleftmonospace",
+ "parenleftsmall",
"parenlefttp",
+ "parenleftvertical",
+ "parenrightaltonearabic",
"parenrightbt",
"parenrightex",
+ "parenrightmonospace",
+ "parenrightsmall",
"parenrighttp",
+ "parenrightvertical",
"partialdiff",
+ "paseqhebrew",
+ "pashtahebrew",
+ "pasquare",
+ "patah",
+ "patah11",
+ "patah1d",
+ "patah2a",
+ "patahhebrew",
+ "patahnarrowhebrew",
+ "patahquarterhebrew",
+ "patahwidehebrew",
+ "pazerhebrew",
+ "pbopomofo",
+ "pcircle",
+ "pdotaccent",
+ "pe",
+ "pecyrillic",
+ "pedagesh",
+ "pedageshhebrew",
+ "peezisquare",
+ "pefinaldageshhebrew",
+ "peharabic",
+ "peharmenian",
+ "pehebrew",
+ "pehfinalarabic",
+ "pehinitialarabic",
+ "pehiragana",
+ "pehmedialarabic",
+ "pekatakana",
+ "pemiddlehookcyrillic",
+ "perafehebrew",
+ "percentarabic",
+ "percentmonospace",
+ "percentsmall",
+ "periodarmenian",
+ "periodhalfwidth",
+ "periodmonospace",
+ "periodsmall",
+ "perispomenigreekcmb",
"perpendicular",
"peseta",
+ "pfsquare",
+ "phabengali",
+ "phadeva",
+ "phagujarati",
+ "phagurmukhi",
"phi",
"phi1",
+ "phieuphacirclekorean",
+ "phieuphaparenkorean",
+ "phieuphcirclekorean",
+ "phieuphkorean",
+ "phieuphparenkorean",
+ "philatin",
+ "phinthuthai",
+ "phisymbolgreek",
+ "phook",
+ "phophanthai",
+ "phophungthai",
+ "phosamphaothai",
"pi",
+ "pieupacirclekorean",
+ "pieupaparenkorean",
+ "pieupcieuckorean",
+ "pieupcirclekorean",
+ "pieupkiyeokkorean",
+ "pieupkorean",
+ "pieupparenkorean",
+ "pieupsioskiyeokkorean",
+ "pieupsioskorean",
+ "pieupsiostikeutkorean",
+ "pieupthieuthkorean",
+ "pieuptikeutkorean",
+ "pihiragana",
+ "pikatakana",
+ "pisymbolgreek",
+ "piwrarmenian",
+ "plusbelowcmb",
+ "pluscircle",
+ "plusmod",
+ "plusmonospace",
+ "plussmall",
+ "plussuperior",
+ "pmonospace",
+ "pmsquare",
+ "pohiragana",
+ "pointingindexdownwhite",
+ "pointingindexleftwhite",
+ "pointingindexrightwhite",
+ "pointingindexupwhite",
+ "pokatakana",
+ "poplathai",
+ "postalmark",
+ "postalmarkface",
+ "pparen",
+ "precedes",
"prescription",
+ "primemod",
+ "primereversed",
"product",
+ "projective",
+ "prolongedkana",
+ "propellor",
"propersubset",
"propersuperset",
+ "proportion",
"proportional",
"psi",
+ "psicyrillic",
+ "psilipneumatacyrilliccmb",
+ "pssquare",
+ "puhiragana",
+ "pukatakana",
+ "pvsquare",
+ "pwsquare",
+ "qadeva",
+ "qadmahebrew",
+ "qafarabic",
+ "qaffinalarabic",
+ "qafinitialarabic",
+ "qafmedialarabic",
+ "qamats",
+ "qamats10",
+ "qamats1a",
+ "qamats1c",
+ "qamats27",
+ "qamats29",
+ "qamats33",
+ "qamatsde",
+ "qamatshebrew",
+ "qamatsnarrowhebrew",
+ "qamatsqatanhebrew",
+ "qamatsqatannarrowhebrew",
+ "qamatsqatanquarterhebrew",
+ "qamatsqatanwidehebrew",
+ "qamatsquarterhebrew",
+ "qamatswidehebrew",
+ "qarneyparahebrew",
+ "qbopomofo",
+ "qcircle",
+ "qhook",
+ "qmonospace",
+ "qof",
+ "qofdagesh",
+ "qofdageshhebrew",
+ "qofhatafpatah",
+ "qofhatafpatahhebrew",
+ "qofhatafsegol",
+ "qofhatafsegolhebrew",
+ "qofhebrew",
+ "qofhiriq",
+ "qofhiriqhebrew",
+ "qofholam",
+ "qofholamhebrew",
+ "qofpatah",
+ "qofpatahhebrew",
+ "qofqamats",
+ "qofqamatshebrew",
+ "qofqubuts",
+ "qofqubutshebrew",
+ "qofsegol",
+ "qofsegolhebrew",
+ "qofsheva",
+ "qofshevahebrew",
+ "qoftsere",
+ "qoftserehebrew",
+ "qparen",
+ "quarternote",
+ "qubuts",
+ "qubuts18",
+ "qubuts25",
+ "qubuts31",
+ "qubutshebrew",
+ "qubutsnarrowhebrew",
+ "qubutsquarterhebrew",
+ "qubutswidehebrew",
+ "questionarabic",
+ "questionarmenian",
+ "questiongreek",
+ "questionmonospace",
+ "quotedblmonospace",
+ "quotedblprime",
+ "quotedblprimereversed",
+ "quoteleftreversed",
"quotereversed",
+ "quoterightn",
+ "quotesinglemonospace",
+ "raarmenian",
+ "rabengali",
"racute",
+ "radeva",
"radical",
"radicalex",
+ "radoverssquare",
+ "radoverssquaredsquare",
+ "radsquare",
+ "rafe",
+ "rafehebrew",
+ "ragujarati",
+ "ragurmukhi",
+ "rahiragana",
+ "rakatakana",
+ "rakatakanahalfwidth",
+ "ralowerdiagonalbengali",
+ "ramiddlediagonalbengali",
+ "ramshorn",
+ "ratio",
+ "rbopomofo",
"rcaron",
+ "rcedilla",
+ "rcircle",
"rcommaaccent",
+ "rdblgrave",
+ "rdotaccent",
+ "rdotbelow",
+ "rdotbelowmacron",
+ "referencemark",
"reflexsubset",
"reflexsuperset",
"registersans",
"registerserif",
+ "reharabic",
+ "reharmenian",
+ "rehfinalarabic",
+ "rehiragana",
+ "rehyehaleflamarabic",
+ "rekatakana",
+ "rekatakanahalfwidth",
+ "resh",
+ "reshdageshhebrew",
+ "reshhatafpatah",
+ "reshhatafpatahhebrew",
+ "reshhatafsegol",
+ "reshhatafsegolhebrew",
+ "reshhebrew",
+ "reshhiriq",
+ "reshhiriqhebrew",
+ "reshholam",
+ "reshholamhebrew",
+ "reshpatah",
+ "reshpatahhebrew",
+ "reshqamats",
+ "reshqamatshebrew",
+ "reshqubuts",
+ "reshqubutshebrew",
+ "reshsegol",
+ "reshsegolhebrew",
+ "reshsheva",
+ "reshshevahebrew",
+ "reshtsere",
+ "reshtserehebrew",
+ "reversedtilde",
+ "reviahebrew",
+ "reviamugrashhebrew",
"revlogicalnot",
+ "rfishhook",
+ "rfishhookreversed",
+ "rhabengali",
+ "rhadeva",
"rho",
+ "rhook",
+ "rhookturned",
+ "rhookturnedsuperior",
+ "rhosymbolgreek",
+ "rhotichookmod",
+ "rieulacirclekorean",
+ "rieulaparenkorean",
+ "rieulcirclekorean",
+ "rieulhieuhkorean",
+ "rieulkiyeokkorean",
+ "rieulkiyeoksioskorean",
+ "rieulkorean",
+ "rieulmieumkorean",
+ "rieulpansioskorean",
+ "rieulparenkorean",
+ "rieulphieuphkorean",
+ "rieulpieupkorean",
+ "rieulpieupsioskorean",
+ "rieulsioskorean",
+ "rieulthieuthkorean",
+ "rieultikeutkorean",
+ "rieulyeorinhieuhkorean",
+ "rightangle",
+ "righttackbelowcmb",
+ "righttriangle",
+ "rihiragana",
+ "rikatakana",
+ "rikatakanahalfwidth",
+ "ringbelowcmb",
+ "ringcmb",
+ "ringhalfleft",
+ "ringhalfleftarmenian",
+ "ringhalfleftbelowcmb",
+ "ringhalfleftcentered",
+ "ringhalfright",
+ "ringhalfrightbelowcmb",
+ "ringhalfrightcentered",
+ "rinvertedbreve",
+ "rittorusquare",
+ "rlinebelow",
+ "rlongleg",
+ "rlonglegturned",
+ "rmonospace",
+ "rohiragana",
+ "rokatakana",
+ "rokatakanahalfwidth",
+ "roruathai",
+ "rparen",
+ "rrabengali",
+ "rradeva",
+ "rragurmukhi",
+ "rreharabic",
+ "rrehfinalarabic",
+ "rrvocalicbengali",
+ "rrvocalicdeva",
+ "rrvocalicgujarati",
+ "rrvocalicvowelsignbengali",
+ "rrvocalicvowelsigndeva",
+ "rrvocalicvowelsigngujarati",
"rtblock",
+ "rturned",
+ "rturnedsuperior",
+ "ruhiragana",
+ "rukatakana",
+ "rukatakanahalfwidth",
+ "rupeemarkbengali",
+ "rupeesignbengali",
+ "ruthai",
+ "rvocalicbengali",
+ "rvocalicdeva",
+ "rvocalicgujarati",
+ "rvocalicvowelsignbengali",
+ "rvocalicvowelsigndeva",
+ "rvocalicvowelsigngujarati",
+ "sabengali",
"sacute",
+ "sacutedotaccent",
+ "sadarabic",
+ "sadeva",
+ "sadfinalarabic",
+ "sadinitialarabic",
+ "sadmedialarabic",
+ "sagujarati",
+ "sagurmukhi",
+ "sahiragana",
+ "sakatakana",
+ "sakatakanahalfwidth",
+ "sallallahoualayhewasallamarabic",
+ "samekh",
+ "samekhdagesh",
+ "samekhdageshhebrew",
+ "samekhhebrew",
+ "saraaathai",
+ "saraaethai",
+ "saraaimaimalaithai",
+ "saraaimaimuanthai",
+ "saraamthai",
+ "saraathai",
+ "saraethai",
+ "saraiileftthai",
+ "saraiithai",
+ "saraileftthai",
+ "saraithai",
+ "saraothai",
+ "saraueeleftthai",
+ "saraueethai",
+ "saraueleftthai",
+ "sarauethai",
+ "sarauthai",
+ "sarauuthai",
+ "sbopomofo",
+ "scarondotaccent",
"scedilla",
- "scedilla",
+ "schwa",
+ "schwacyrillic",
+ "schwadieresiscyrillic",
+ "schwahook",
+ "scircle",
"scircumflex",
"scommaaccent",
+ "sdotaccent",
+ "sdotbelow",
+ "sdotbelowdotaccent",
+ "seagullbelowcmb",
"second",
+ "secondtonechinese",
+ "seenarabic",
+ "seenfinalarabic",
+ "seeninitialarabic",
+ "seenmedialarabic",
+ "segol",
+ "segol13",
+ "segol1f",
+ "segol2c",
+ "segolhebrew",
+ "segolnarrowhebrew",
+ "segolquarterhebrew",
+ "segoltahebrew",
+ "segolwidehebrew",
+ "seharmenian",
+ "sehiragana",
+ "sekatakana",
+ "sekatakanahalfwidth",
+ "semicolonarabic",
+ "semicolonmonospace",
+ "semicolonsmall",
+ "semivoicedmarkkana",
+ "semivoicedmarkkanahalfwidth",
+ "sentisquare",
+ "sentosquare",
+ "sevenarabic",
+ "sevenbengali",
+ "sevencircle",
+ "sevencircleinversesansserif",
+ "sevendeva",
+ "sevengujarati",
+ "sevengurmukhi",
+ "sevenhackarabic",
+ "sevenhangzhou",
+ "sevenideographicparen",
+ "sevenmonospace",
+ "sevenparen",
+ "sevenperiod",
+ "sevenpersian",
+ "sevenroman",
+ "seventeencircle",
+ "seventeenparen",
+ "seventeenperiod",
+ "seventhai",
+ "sfthyphen",
+ "shaarmenian",
+ "shabengali",
+ "shacyrillic",
+ "shaddaarabic",
+ "shaddadammaarabic",
+ "shaddadammatanarabic",
+ "shaddafathaarabic",
+ "shaddafathatanarabic",
+ "shaddakasraarabic",
+ "shaddakasratanarabic",
"shade",
+ "shadedark",
+ "shadelight",
+ "shademedium",
+ "shadeva",
+ "shagujarati",
+ "shagurmukhi",
+ "shalshelethebrew",
+ "shbopomofo",
+ "shchacyrillic",
+ "sheenarabic",
+ "sheenfinalarabic",
+ "sheeninitialarabic",
+ "sheenmedialarabic",
+ "sheicoptic",
+ "sheqel",
+ "sheqelhebrew",
+ "sheva",
+ "sheva115",
+ "sheva15",
+ "sheva22",
+ "sheva2e",
+ "shevahebrew",
+ "shevanarrowhebrew",
+ "shevaquarterhebrew",
+ "shevawidehebrew",
+ "shhacyrillic",
+ "shimacoptic",
+ "shin",
+ "shindagesh",
+ "shindageshhebrew",
+ "shindageshshindot",
+ "shindageshshindothebrew",
+ "shindageshsindot",
+ "shindageshsindothebrew",
+ "shindothebrew",
+ "shinhebrew",
+ "shinshindot",
+ "shinshindothebrew",
+ "shinsindot",
+ "shinsindothebrew",
+ "shook",
"sigma",
"sigma1",
+ "sigmafinal",
+ "sigmalunatesymbolgreek",
+ "sihiragana",
+ "sikatakana",
+ "sikatakanahalfwidth",
+ "siluqhebrew",
+ "siluqlefthebrew",
"similar",
+ "sindothebrew",
+ "siosacirclekorean",
+ "siosaparenkorean",
+ "sioscieuckorean",
+ "sioscirclekorean",
+ "sioskiyeokkorean",
+ "sioskorean",
+ "siosnieunkorean",
+ "siosparenkorean",
+ "siospieupkorean",
+ "siostikeutkorean",
+ "sixarabic",
+ "sixbengali",
+ "sixcircle",
+ "sixcircleinversesansserif",
+ "sixdeva",
+ "sixgujarati",
+ "sixgurmukhi",
+ "sixhackarabic",
+ "sixhangzhou",
+ "sixideographicparen",
+ "sixmonospace",
+ "sixparen",
+ "sixperiod",
+ "sixpersian",
+ "sixroman",
+ "sixteencircle",
+ "sixteencurrencydenominatorbengali",
+ "sixteenparen",
+ "sixteenperiod",
+ "sixthai",
+ "slashmonospace",
+ "slong",
+ "slongdotaccent",
"smileface",
+ "smonospace",
+ "sofpasuqhebrew",
+ "softhyphen",
+ "softsigncyrillic",
+ "sohiragana",
+ "sokatakana",
+ "sokatakanahalfwidth",
+ "soliduslongoverlaycmb",
+ "solidusshortoverlaycmb",
+ "sorusithai",
+ "sosalathai",
+ "sosothai",
+ "sosuathai",
+ "spacehackarabic",
"spade",
+ "spadesuitblack",
+ "spadesuitwhite",
+ "sparen",
+ "squarebelowcmb",
+ "squarecc",
+ "squarecm",
+ "squarediagonalcrosshatchfill",
+ "squarehorizontalfill",
+ "squarekg",
+ "squarekm",
+ "squarekmcapital",
+ "squareln",
+ "squarelog",
+ "squaremg",
+ "squaremil",
+ "squaremm",
+ "squaremsquared",
+ "squareorthogonalcrosshatchfill",
+ "squareupperlefttolowerrightfill",
+ "squareupperrighttolowerleftfill",
+ "squareverticalfill",
+ "squarewhitewithsmallblack",
+ "srsquare",
+ "ssabengali",
+ "ssadeva",
+ "ssagujarati",
+ "ssangcieuckorean",
+ "ssanghieuhkorean",
+ "ssangieungkorean",
+ "ssangkiyeokkorean",
+ "ssangnieunkorean",
+ "ssangpieupkorean",
+ "ssangsioskorean",
+ "ssangtikeutkorean",
+ "sterlingmonospace",
+ "strokelongoverlaycmb",
+ "strokeshortoverlaycmb",
+ "subset",
+ "subsetnotequal",
+ "subsetorequal",
+ "succeeds",
"suchthat",
+ "suhiragana",
+ "sukatakana",
+ "sukatakanahalfwidth",
+ "sukunarabic",
"summation",
"sun",
+ "superset",
+ "supersetnotequal",
+ "supersetorequal",
+ "svsquare",
+ "syouwaerasquare",
+ "tabengali",
+ "tackdown",
+ "tackleft",
+ "tadeva",
+ "tagujarati",
+ "tagurmukhi",
+ "taharabic",
+ "tahfinalarabic",
+ "tahinitialarabic",
+ "tahiragana",
+ "tahmedialarabic",
+ "taisyouerasquare",
+ "takatakana",
+ "takatakanahalfwidth",
+ "tatweelarabic",
"tau",
+ "tav",
+ "tavdages",
+ "tavdagesh",
+ "tavdageshhebrew",
+ "tavhebrew",
"tbar",
+ "tbopomofo",
"tcaron",
+ "tccurl",
+ "tcedilla",
+ "tcheharabic",
+ "tchehfinalarabic",
+ "tchehinitialarabic",
+ "tchehmedialarabic",
+ "tchehmeeminitialarabic",
+ "tcircle",
+ "tcircumflexbelow",
"tcommaaccent",
- "tcommaaccent",
+ "tdieresis",
+ "tdotaccent",
+ "tdotbelow",
+ "tecyrillic",
+ "tedescendercyrillic",
+ "teharabic",
+ "tehfinalarabic",
+ "tehhahinitialarabic",
+ "tehhahisolatedarabic",
+ "tehinitialarabic",
+ "tehiragana",
+ "tehjeeminitialarabic",
+ "tehjeemisolatedarabic",
+ "tehmarbutaarabic",
+ "tehmarbutafinalarabic",
+ "tehmedialarabic",
+ "tehmeeminitialarabic",
+ "tehmeemisolatedarabic",
+ "tehnoonfinalarabic",
+ "tekatakana",
+ "tekatakanahalfwidth",
+ "telephone",
+ "telephoneblack",
+ "telishagedolahebrew",
+ "telishaqetanahebrew",
+ "tencircle",
+ "tenideographicparen",
+ "tenparen",
+ "tenperiod",
+ "tenroman",
+ "tesh",
+ "tet",
+ "tetdagesh",
+ "tetdageshhebrew",
+ "tethebrew",
+ "tetsecyrillic",
+ "tevirhebrew",
+ "tevirlefthebrew",
+ "thabengali",
+ "thadeva",
+ "thagujarati",
+ "thagurmukhi",
+ "thalarabic",
+ "thalfinalarabic",
+ "thanthakhatlowleftthai",
+ "thanthakhatlowrightthai",
+ "thanthakhatthai",
+ "thanthakhatupperleftthai",
+ "theharabic",
+ "thehfinalarabic",
+ "thehinitialarabic",
+ "thehmedialarabic",
+ "thereexists",
"therefore",
"theta",
"theta1",
+ "thetasymbolgreek",
+ "thieuthacirclekorean",
+ "thieuthaparenkorean",
+ "thieuthcirclekorean",
+ "thieuthkorean",
+ "thieuthparenkorean",
+ "thirteencircle",
+ "thirteenparen",
+ "thirteenperiod",
+ "thonangmonthothai",
+ "thook",
+ "thophuthaothai",
+ "thothahanthai",
+ "thothanthai",
+ "thothongthai",
+ "thothungthai",
+ "thousandcyrillic",
+ "thousandsseparatorarabic",
+ "thousandsseparatorpersian",
+ "threearabic",
+ "threebengali",
+ "threecircle",
+ "threecircleinversesansserif",
+ "threedeva",
+ "threegujarati",
+ "threegurmukhi",
+ "threehackarabic",
+ "threehangzhou",
+ "threeideographicparen",
+ "threemonospace",
+ "threenumeratorbengali",
+ "threeparen",
+ "threeperiod",
+ "threepersian",
+ "threeroman",
+ "threethai",
+ "thzsquare",
+ "tihiragana",
+ "tikatakana",
+ "tikatakanahalfwidth",
+ "tikeutacirclekorean",
+ "tikeutaparenkorean",
+ "tikeutcirclekorean",
+ "tikeutkorean",
+ "tikeutparenkorean",
+ "tildebelowcmb",
+ "tildecmb",
"tildecomb",
+ "tildedoublecmb",
+ "tildeoperator",
+ "tildeoverlaycmb",
+ "tildeverticalcmb",
+ "timescircle",
+ "tipehahebrew",
+ "tipehalefthebrew",
+ "tippigurmukhi",
+ "titlocyrilliccmb",
+ "tiwnarmenian",
+ "tlinebelow",
+ "tmonospace",
+ "toarmenian",
+ "tohiragana",
+ "tokatakana",
+ "tokatakanahalfwidth",
+ "tonebarextrahighmod",
+ "tonebarextralowmod",
+ "tonebarhighmod",
+ "tonebarlowmod",
+ "tonebarmidmod",
+ "tonefive",
+ "tonesix",
+ "tonetwo",
"tonos",
+ "tonsquare",
+ "topatakthai",
+ "tortoiseshellbracketleft",
+ "tortoiseshellbracketleftsmall",
+ "tortoiseshellbracketleftvertical",
+ "tortoiseshellbracketright",
+ "tortoiseshellbracketrightsmall",
+ "tortoiseshellbracketrightvertical",
+ "totaothai",
+ "tpalatalhook",
+ "tparen",
"trademarksans",
"trademarkserif",
+ "tretroflexhook",
"triagdn",
"triaglf",
"triagrt",
"triagup",
+ "ts",
+ "tsadi",
+ "tsadidagesh",
+ "tsadidageshhebrew",
+ "tsadihebrew",
+ "tsecyrillic",
+ "tsere",
+ "tsere12",
+ "tsere1e",
+ "tsere2b",
+ "tserehebrew",
+ "tserenarrowhebrew",
+ "tserequarterhebrew",
+ "tserewidehebrew",
+ "tshecyrillic",
+ "ttabengali",
+ "ttadeva",
+ "ttagujarati",
+ "ttagurmukhi",
+ "tteharabic",
+ "ttehfinalarabic",
+ "ttehinitialarabic",
+ "ttehmedialarabic",
+ "tthabengali",
+ "tthadeva",
+ "tthagujarati",
+ "tthagurmukhi",
+ "tturned",
+ "tuhiragana",
+ "tukatakana",
+ "tukatakanahalfwidth",
+ "tusmallhiragana",
+ "tusmallkatakana",
+ "tusmallkatakanahalfwidth",
+ "twelvecircle",
+ "twelveparen",
+ "twelveperiod",
+ "twelveroman",
+ "twentycircle",
+ "twentyhangzhou",
+ "twentyparen",
+ "twentyperiod",
+ "twoarabic",
+ "twobengali",
+ "twocircle",
+ "twocircleinversesansserif",
+ "twodeva",
+ "twodotleader",
+ "twodotleadervertical",
+ "twogujarati",
+ "twogurmukhi",
+ "twohackarabic",
+ "twohangzhou",
+ "twoideographicparen",
+ "twomonospace",
+ "twonumeratorbengali",
+ "twoparen",
+ "twoperiod",
+ "twopersian",
+ "tworoman",
+ "twostroke",
+ "twothai",
+ "ubar",
+ "ubengali",
+ "ubopomofo",
"ubreve",
+ "ucaron",
+ "ucircle",
+ "ucircumflexbelow",
+ "ucyrillic",
+ "udattadeva",
+ "udblacute",
+ "udblgrave",
+ "udeva",
+ "udieresisacute",
+ "udieresisbelow",
+ "udieresiscaron",
+ "udieresiscyrillic",
+ "udieresisgrave",
+ "udieresismacron",
+ "udotbelow",
+ "ugujarati",
+ "ugurmukhi",
+ "uhiragana",
+ "uhookabove",
"uhorn",
+ "uhornacute",
+ "uhorndotbelow",
+ "uhorngrave",
+ "uhornhookabove",
+ "uhorntilde",
"uhungarumlaut",
+ "uhungarumlautcyrillic",
+ "uinvertedbreve",
+ "ukatakana",
+ "ukatakanahalfwidth",
+ "ukcyrillic",
+ "ukorean",
"umacron",
+ "umacroncyrillic",
+ "umacrondieresis",
+ "umatragurmukhi",
+ "umonospace",
"underscoredbl",
+ "underscoremonospace",
+ "underscorevertical",
+ "underscorewavy",
"union",
"universal",
"uogonek",
+ "uparen",
"upblock",
+ "upperdothebrew",
"upsilon",
"upsilondieresis",
"upsilondieresistonos",
+ "upsilonlatin",
"upsilontonos",
+ "uptackbelowcmb",
+ "uptackmod",
+ "uragurmukhi",
"uring",
+ "ushortcyrillic",
+ "usmallhiragana",
+ "usmallkatakana",
+ "usmallkatakanahalfwidth",
+ "ustraightcyrillic",
+ "ustraightstrokecyrillic",
"utilde",
+ "utildeacute",
+ "utildebelow",
+ "uubengali",
+ "uudeva",
+ "uugujarati",
+ "uugurmukhi",
+ "uumatragurmukhi",
+ "uuvowelsignbengali",
+ "uuvowelsigndeva",
+ "uuvowelsigngujarati",
+ "uvowelsignbengali",
+ "uvowelsigndeva",
+ "uvowelsigngujarati",
+ "vadeva",
+ "vagujarati",
+ "vagurmukhi",
+ "vakatakana",
+ "vav",
+ "vavdagesh",
+ "vavdagesh65",
+ "vavdageshhebrew",
+ "vavhebrew",
+ "vavholam",
+ "vavholamhebrew",
+ "vavvavhebrew",
+ "vavyodhebrew",
+ "vcircle",
+ "vdotbelow",
+ "vecyrillic",
+ "veharabic",
+ "vehfinalarabic",
+ "vehinitialarabic",
+ "vehmedialarabic",
+ "vekatakana",
+ "venus",
+ "verticalbar",
+ "verticallineabovecmb",
+ "verticallinebelowcmb",
+ "verticallinelowmod",
+ "verticallinemod",
+ "vewarmenian",
+ "vhook",
+ "vikatakana",
+ "viramabengali",
+ "viramadeva",
+ "viramagujarati",
+ "visargabengali",
+ "visargadeva",
+ "visargagujarati",
+ "vmonospace",
+ "voarmenian",
+ "voicediterationhiragana",
+ "voicediterationkatakana",
+ "voicedmarkkana",
+ "voicedmarkkanahalfwidth",
+ "vokatakana",
+ "vparen",
+ "vtilde",
+ "vturned",
+ "vuhiragana",
+ "vukatakana",
"wacute",
+ "waekorean",
+ "wahiragana",
+ "wakatakana",
+ "wakatakanahalfwidth",
+ "wakorean",
+ "wasmallhiragana",
+ "wasmallkatakana",
+ "wattosquare",
+ "wavedash",
+ "wavyunderscorevertical",
+ "wawarabic",
+ "wawfinalarabic",
+ "wawhamzaabovearabic",
+ "wawhamzaabovefinalarabic",
+ "wbsquare",
+ "wcircle",
"wcircumflex",
"wdieresis",
+ "wdotaccent",
+ "wdotbelow",
+ "wehiragana",
"weierstrass",
+ "wekatakana",
+ "wekorean",
+ "weokorean",
"wgrave",
+ "whitebullet",
+ "whitecircle",
+ "whitecircleinverse",
+ "whitecornerbracketleft",
+ "whitecornerbracketleftvertical",
+ "whitecornerbracketright",
+ "whitecornerbracketrightvertical",
+ "whitediamond",
+ "whitediamondcontainingblacksmalldiamond",
+ "whitedownpointingsmalltriangle",
+ "whitedownpointingtriangle",
+ "whiteleftpointingsmalltriangle",
+ "whiteleftpointingtriangle",
+ "whitelenticularbracketleft",
+ "whitelenticularbracketright",
+ "whiterightpointingsmalltriangle",
+ "whiterightpointingtriangle",
+ "whitesmallsquare",
+ "whitesmilingface",
+ "whitesquare",
+ "whitestar",
+ "whitetelephone",
+ "whitetortoiseshellbracketleft",
+ "whitetortoiseshellbracketright",
+ "whiteuppointingsmalltriangle",
+ "whiteuppointingtriangle",
+ "wihiragana",
+ "wikatakana",
+ "wikorean",
+ "wmonospace",
+ "wohiragana",
+ "wokatakana",
+ "wokatakanahalfwidth",
+ "won",
+ "wonmonospace",
+ "wowaenthai",
+ "wparen",
+ "wring",
+ "wsuperior",
+ "wturned",
+ "wynn",
+ "xabovecmb",
+ "xbopomofo",
+ "xcircle",
+ "xdieresis",
+ "xdotaccent",
+ "xeharmenian",
"xi",
+ "xmonospace",
+ "xparen",
+ "xsuperior",
+ "yaadosquare",
+ "yabengali",
+ "yadeva",
+ "yaekorean",
+ "yagujarati",
+ "yagurmukhi",
+ "yahiragana",
+ "yakatakana",
+ "yakatakanahalfwidth",
+ "yakorean",
+ "yamakkanthai",
+ "yasmallhiragana",
+ "yasmallkatakana",
+ "yasmallkatakanahalfwidth",
+ "yatcyrillic",
+ "ycircle",
"ycircumflex",
+ "ydotaccent",
+ "ydotbelow",
+ "yeharabic",
+ "yehbarreearabic",
+ "yehbarreefinalarabic",
+ "yehfinalarabic",
+ "yehhamzaabovearabic",
+ "yehhamzaabovefinalarabic",
+ "yehhamzaaboveinitialarabic",
+ "yehhamzaabovemedialarabic",
+ "yehinitialarabic",
+ "yehmedialarabic",
+ "yehmeeminitialarabic",
+ "yehmeemisolatedarabic",
+ "yehnoonfinalarabic",
+ "yehthreedotsbelowarabic",
+ "yekorean",
+ "yenmonospace",
+ "yeokorean",
+ "yeorinhieuhkorean",
+ "yerahbenyomohebrew",
+ "yerahbenyomolefthebrew",
+ "yericyrillic",
+ "yerudieresiscyrillic",
+ "yesieungkorean",
+ "yesieungpansioskorean",
+ "yesieungsioskorean",
+ "yetivhebrew",
"ygrave",
+ "yhook",
+ "yhookabove",
+ "yiarmenian",
+ "yicyrillic",
+ "yikorean",
+ "yinyang",
+ "yiwnarmenian",
+ "ymonospace",
+ "yod",
+ "yoddagesh",
+ "yoddageshhebrew",
+ "yodhebrew",
+ "yodyodhebrew",
+ "yodyodpatahhebrew",
+ "yohiragana",
+ "yoikorean",
+ "yokatakana",
+ "yokatakanahalfwidth",
+ "yokorean",
+ "yosmallhiragana",
+ "yosmallkatakana",
+ "yosmallkatakanahalfwidth",
+ "yotgreek",
+ "yoyaekorean",
+ "yoyakorean",
+ "yoyakthai",
+ "yoyingthai",
+ "yparen",
+ "ypogegrammeni",
+ "ypogegrammenigreekcmb",
+ "yr",
+ "yring",
+ "ysuperior",
+ "ytilde",
+ "yturned",
+ "yuhiragana",
+ "yuikorean",
+ "yukatakana",
+ "yukatakanahalfwidth",
+ "yukorean",
+ "yusbigcyrillic",
+ "yusbigiotifiedcyrillic",
+ "yuslittlecyrillic",
+ "yuslittleiotifiedcyrillic",
+ "yusmallhiragana",
+ "yusmallkatakana",
+ "yusmallkatakanahalfwidth",
+ "yuyekorean",
+ "yuyeokorean",
+ "yyabengali",
+ "yyadeva",
+ "zaarmenian",
"zacute",
+ "zadeva",
+ "zagurmukhi",
+ "zaharabic",
+ "zahfinalarabic",
+ "zahinitialarabic",
+ "zahiragana",
+ "zahmedialarabic",
+ "zainarabic",
+ "zainfinalarabic",
+ "zakatakana",
+ "zaqefgadolhebrew",
+ "zaqefqatanhebrew",
+ "zarqahebrew",
+ "zayin",
+ "zayindagesh",
+ "zayindageshhebrew",
+ "zayinhebrew",
+ "zbopomofo",
+ "zcircle",
+ "zcircumflex",
+ "zcurl",
+ "zdot",
"zdotaccent",
+ "zdotbelow",
+ "zecyrillic",
+ "zedescendercyrillic",
+ "zedieresiscyrillic",
+ "zehiragana",
+ "zekatakana",
+ "zeroarabic",
+ "zerobengali",
+ "zerodeva",
+ "zerogujarati",
+ "zerogurmukhi",
+ "zerohackarabic",
+ "zeromonospace",
+ "zeropersian",
+ "zerothai",
+ "zerowidthjoiner",
+ "zerowidthnonjoiner",
+ "zerowidthspace",
"zeta",
+ "zhbopomofo",
+ "zhearmenian",
+ "zhebrevecyrillic",
+ "zhecyrillic",
+ "zhedescendercyrillic",
+ "zhedieresiscyrillic",
+ "zihiragana",
+ "zikatakana",
+ "zinorhebrew",
+ "zlinebelow",
+ "zmonospace",
+ "zohiragana",
+ "zokatakana",
+ "zparen",
+ "zretroflexhook",
+ "zstroke",
+ "zuhiragana",
+ "zukatakana",
#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
@@ -1093,13 +4327,13 @@
};
- static const char* const * const sid_standard_names = ps_glyph_names + 4;
+ static const char* const * const sid_standard_names = ps_glyph_names + 2;
#define NUM_SID_GLYPHS 391
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
-#define NUM_ADOBE_GLYPHS 1058
+#define NUM_ADOBE_GLYPHS 4294
#else
#define NUM_ADOBE_GLYPHS 391
#endif
@@ -1107,17 +4341,19 @@
static const unsigned short mac_standard_names[259] =
{
- 4,
+ 2,
0,
1,
+ 3,
+ 4,
5,
6,
7,
8,
9,
- 10,
+ 106,
11,
- 108,
+ 12,
13,
14,
15,
@@ -1172,9 +4408,9 @@
64,
65,
66,
- 67,
+ 126,
68,
- 128,
+ 69,
70,
71,
72,
@@ -1203,554 +4439,552 @@
95,
96,
97,
- 98,
- 99,
+ 175,
177,
179,
- 181,
- 182,
- 190,
- 193,
- 199,
+ 180,
+ 188,
+ 191,
+ 197,
+ 202,
+ 205,
+ 203,
204,
207,
- 205,
206,
- 209,
208,
+ 209,
+ 212,
210,
211,
- 214,
- 212,
213,
- 215,
- 218,
216,
+ 214,
+ 215,
217,
+ 218,
+ 221,
219,
220,
- 223,
- 221,
222,
224,
- 226,
- 229,
227,
- 228,
- 116,
- 165,
- 101,
- 102,
- 106,
- 120,
- 119,
- 153,
- 169,
- 174,
- 157,
- 129,
- 135,
- 959,
- 142,
- 145,
- 917,
- 160,
- 941,
- 908,
+ 225,
+ 226,
+ 114,
+ 163,
+ 99,
+ 100,
104,
- 156,
- 980,
- 1018,
- 987,
- 985,
- 918,
- 143,
- 147,
- 471,
- 148,
+ 118,
+ 117,
151,
- 127,
- 100,
+ 167,
+ 172,
155,
- 994,
- 105,
- 815,
- 412,
- 110,
- 124,
- 125,
- 2,
- 178,
- 180,
- 195,
- 146,
- 152,
- 115,
+ 127,
+ 133,
+ 2919,
+ 140,
+ 143,
+ 2413,
+ 158,
+ 2642,
+ 2156,
+ 102,
+ 154,
+ 3092,
+ 3681,
+ 3192,
+ 3153,
+ 2415,
141,
- 109,
- 123,
- 69,
- 12,
- 163,
- 948,
- 231,
- 202,
+ 145,
+ 741,
+ 146,
+ 149,
+ 125,
+ 98,
+ 153,
+ 3284,
103,
+ 1353,
+ 472,
+ 108,
+ 122,
+ 123,
+ 2901,
+ 176,
+ 178,
+ 193,
+ 144,
+ 150,
+ 113,
+ 139,
107,
+ 121,
+ 67,
+ 10,
+ 161,
+ 2677,
+ 229,
+ 200,
+ 101,
+ 105,
+ 109,
+ 110,
111,
112,
- 113,
- 114,
- 117,
- 118,
- 121,
- 122,
- 126,
- 176,
+ 115,
+ 116,
+ 119,
+ 120,
+ 124,
+ 174,
+ 181,
+ 173,
+ 182,
183,
- 175,
184,
185,
186,
187,
- 188,
189,
- 191,
+ 190,
+ 1351,
192,
- 3,
- 194,
- 197,
+ 195,
+ 196,
198,
- 200,
- 149,
+ 147,
+ 128,
+ 129,
130,
131,
132,
- 133,
134,
+ 135,
136,
137,
138,
- 139,
- 140,
- 144,
- 150,
- 196,
- 225,
- 203,
- 232,
- 164,
- 158,
- 171,
+ 142,
+ 148,
+ 194,
+ 223,
201,
230,
- 161,
- 166,
- 170,
- 172,
- 154,
- 168,
- 173,
- 159,
162,
- 167,
- 899,
- 429,
- 901,
- 444,
- 526,
- 1006,
- 404,
- 847,
- 406,
- 849,
- 868,
+ 156,
+ 169,
+ 199,
+ 228,
+ 159,
+ 164,
+ 168,
+ 170,
+ 152,
+ 166,
+ 171,
+ 157,
+ 160,
+ 165,
+ 2074,
+ 556,
+ 2091,
+ 609,
+ 836,
+ 3465,
+ 438,
+ 1545,
+ 440,
+ 1560,
+ 1767,
0
};
- static const unsigned short ps_names_to_unicode[1059] =
+ static const unsigned short ps_names_to_unicode[4295] =
{
0,
- 0x0020,
- 0x0021,
- 0x0022,
- 0x0023,
- 0x0024,
- 0x0025,
- 0x0026,
- 0x2019,
- 0x0028,
- 0x0029,
- 0x002A,
- 0x002B,
- 0x002C,
- 0x002D,
- 0x002E,
- 0x002F,
- 0x0030,
- 0x0031,
- 0x0032,
- 0x0033,
- 0x0034,
- 0x0035,
- 0x0036,
- 0x0037,
- 0x0038,
- 0x0039,
- 0x003A,
- 0x003B,
- 0x003C,
- 0x003D,
- 0x003E,
- 0x003F,
- 0x0040,
- 0x0041,
- 0x0042,
- 0x0043,
- 0x0044,
- 0x0045,
- 0x0046,
- 0x0047,
- 0x0048,
- 0x0049,
- 0x004A,
- 0x004B,
- 0x004C,
- 0x004D,
- 0x004E,
- 0x004F,
- 0x0050,
- 0x0051,
- 0x0052,
- 0x0053,
- 0x0054,
- 0x0055,
- 0x0056,
- 0x0057,
- 0x0058,
- 0x0059,
- 0x005A,
- 0x005B,
- 0x005C,
- 0x005D,
- 0x005E,
- 0x005F,
- 0x2018,
- 0x0061,
- 0x0062,
- 0x0063,
- 0x0064,
- 0x0065,
- 0x0066,
- 0x0067,
- 0x0068,
- 0x0069,
- 0x006A,
- 0x006B,
- 0x006C,
- 0x006D,
- 0x006E,
- 0x006F,
- 0x0070,
- 0x0071,
- 0x0072,
- 0x0073,
- 0x0074,
- 0x0075,
- 0x0076,
- 0x0077,
- 0x0078,
- 0x0079,
- 0x007A,
- 0x007B,
- 0x007C,
- 0x007D,
- 0x007E,
- 0x00A1,
- 0x00A2,
- 0x00A3,
- 0x2044,
- 0x00A5,
- 0x0192,
- 0x00A7,
- 0x00A4,
- 0x0027,
- 0x201C,
- 0x00AB,
- 0x2039,
- 0x203A,
- 0xFB01,
- 0xFB02,
- 0x2013,
- 0x2020,
- 0x2021,
- 0x00B7,
- 0x00B6,
- 0x2022,
- 0x201A,
- 0x201E,
- 0x201D,
- 0x00BB,
- 0x2026,
- 0x2030,
- 0x00BF,
- 0x0060,
- 0x00B4,
- 0x02C6,
- 0x02DC,
- 0x00AF,
- 0x02D8,
- 0x02D9,
- 0x00A8,
- 0x02DA,
- 0x00B8,
- 0x02DD,
- 0x02DB,
- 0x02C7,
- 0x2014,
- 0x00C6,
- 0x00AA,
- 0x0141,
- 0x00D8,
- 0x0152,
- 0x00BA,
- 0x00E6,
- 0x0131,
- 0x0142,
- 0x00F8,
- 0x0153,
- 0x00DF,
- 0x00B9,
- 0x00AC,
- 0x00B5,
- 0x2122,
- 0x00D0,
- 0x00BD,
- 0x00B1,
- 0x00DE,
- 0x00BC,
- 0x00F7,
- 0x00A6,
- 0x00B0,
- 0x00FE,
- 0x00BE,
- 0x00B2,
- 0x00AE,
- 0x2212,
- 0x00F0,
- 0x00D7,
- 0x00B3,
- 0x00A9,
- 0x00C1,
- 0x00C2,
- 0x00C4,
- 0x00C0,
- 0x00C5,
- 0x00C3,
- 0x00C7,
- 0x00C9,
- 0x00CA,
- 0x00CB,
- 0x00C8,
- 0x00CD,
- 0x00CE,
- 0x00CF,
- 0x00CC,
- 0x00D1,
- 0x00D3,
- 0x00D4,
- 0x00D6,
- 0x00D2,
- 0x00D5,
- 0x0160,
- 0x00DA,
- 0x00DB,
- 0x00DC,
- 0x00D9,
- 0x00DD,
- 0x0178,
- 0x017D,
- 0x00E1,
- 0x00E2,
- 0x00E4,
- 0x00E0,
- 0x00E5,
- 0x00E3,
- 0x00E7,
- 0x00E9,
- 0x00EA,
- 0x00EB,
- 0x00E8,
- 0x00ED,
- 0x00EE,
- 0x00EF,
- 0x00EC,
- 0x00F1,
- 0x00F3,
- 0x00F4,
- 0x00F6,
- 0x00F2,
- 0x00F5,
- 0x0161,
- 0x00FA,
- 0x00FB,
- 0x00FC,
- 0x00F9,
- 0x00FD,
- 0x00FF,
- 0x017E,
- 0xF721,
- 0xF6F8,
- 0xF724,
- 0xF6E4,
- 0xF726,
- 0xF7B4,
- 0x207D,
- 0x207E,
- 0x2025,
- 0x2024,
- 0xF730,
- 0xF731,
- 0xF732,
- 0xF733,
- 0xF734,
- 0xF735,
- 0xF736,
- 0xF737,
- 0xF738,
- 0xF739,
- 0xF6E2,
- 0xF6DE,
- 0xF6E8,
- 0xF73F,
- 0xF6E9,
- 0xF6EA,
- 0xF6E0,
- 0xF6EB,
- 0xF6EC,
- 0xF6ED,
- 0xF6EE,
- 0xF6EF,
- 0x207F,
- 0xF6F0,
- 0xF6F1,
- 0xF6F2,
- 0xF6F3,
- 0xFB00,
- 0xFB03,
- 0xFB04,
- 0x208D,
- 0x208E,
- 0xF6F6,
- 0xF6E6,
- 0xF760,
- 0xF761,
- 0xF762,
- 0xF763,
- 0xF764,
- 0xF765,
- 0xF766,
- 0xF767,
- 0xF768,
- 0xF769,
- 0xF76A,
- 0xF76B,
- 0xF76C,
- 0xF76D,
- 0xF76E,
- 0xF76F,
- 0xF770,
- 0xF771,
- 0xF772,
- 0xF773,
- 0xF774,
- 0xF775,
- 0xF776,
- 0xF777,
- 0xF778,
- 0xF779,
- 0xF77A,
- 0x20A1,
- 0xF6DC,
- 0xF6DD,
- 0xF6FE,
- 0xF7A1,
- 0xF7A2,
- 0xF6F9,
- 0xF6FD,
- 0xF6FF,
- 0xF7A8,
- 0xF6F4,
- 0xF6F5,
- 0xF6F7,
- 0xF7AF,
- 0x2012,
- 0xF6E5,
- 0xF6FB,
- 0xF6FC,
- 0xF7B8,
- 0xF7BF,
- 0x215B,
- 0x215C,
- 0x215D,
- 0x215E,
- 0x2153,
- 0x2154,
- 0x2070,
- 0x2074,
- 0x2075,
- 0x2076,
- 0x2077,
- 0x2078,
- 0x2079,
- 0x2080,
- 0x2081,
- 0x2082,
- 0x2083,
- 0x2084,
- 0x2085,
- 0x2086,
- 0x2087,
- 0x2088,
- 0x2089,
- 0xF6DF,
- 0xF6E3,
- 0xF6E7,
- 0xF6E1,
- 0xF7E0,
- 0xF7E1,
- 0xF7E2,
- 0xF7E3,
- 0xF7E4,
- 0xF7E5,
- 0xF7E6,
- 0xF7E7,
- 0xF7E8,
- 0xF7E9,
- 0xF7EA,
- 0xF7EB,
- 0xF7EC,
- 0xF7ED,
- 0xF7EE,
- 0xF7EF,
- 0xF7F0,
- 0xF7F1,
- 0xF7F2,
- 0xF7F3,
- 0xF7F4,
- 0xF7F5,
- 0xF7F6,
- 0xF6FA,
- 0xF7F8,
- 0xF7F9,
- 0xF7FA,
- 0xF7FB,
- 0xF7FC,
- 0xF7FD,
- 0xF7FE,
- 0xF7FF,
+ 0x0020U,
+ 0x0021U,
+ 0x0022U,
+ 0x0023U,
+ 0x0024U,
+ 0x0025U,
+ 0x0026U,
+ 0x2019U,
+ 0x0028U,
+ 0x0029U,
+ 0x002AU,
+ 0x002BU,
+ 0x002CU,
+ 0x002DU,
+ 0x002EU,
+ 0x002FU,
+ 0x0030U,
+ 0x0031U,
+ 0x0032U,
+ 0x0033U,
+ 0x0034U,
+ 0x0035U,
+ 0x0036U,
+ 0x0037U,
+ 0x0038U,
+ 0x0039U,
+ 0x003AU,
+ 0x003BU,
+ 0x003CU,
+ 0x003DU,
+ 0x003EU,
+ 0x003FU,
+ 0x0040U,
+ 0x0041U,
+ 0x0042U,
+ 0x0043U,
+ 0x0044U,
+ 0x0045U,
+ 0x0046U,
+ 0x0047U,
+ 0x0048U,
+ 0x0049U,
+ 0x004AU,
+ 0x004BU,
+ 0x004CU,
+ 0x004DU,
+ 0x004EU,
+ 0x004FU,
+ 0x0050U,
+ 0x0051U,
+ 0x0052U,
+ 0x0053U,
+ 0x0054U,
+ 0x0055U,
+ 0x0056U,
+ 0x0057U,
+ 0x0058U,
+ 0x0059U,
+ 0x005AU,
+ 0x005BU,
+ 0x005CU,
+ 0x005DU,
+ 0x005EU,
+ 0x005FU,
+ 0x2018U,
+ 0x0061U,
+ 0x0062U,
+ 0x0063U,
+ 0x0064U,
+ 0x0065U,
+ 0x0066U,
+ 0x0067U,
+ 0x0068U,
+ 0x0069U,
+ 0x006AU,
+ 0x006BU,
+ 0x006CU,
+ 0x006DU,
+ 0x006EU,
+ 0x006FU,
+ 0x0070U,
+ 0x0071U,
+ 0x0072U,
+ 0x0073U,
+ 0x0074U,
+ 0x0075U,
+ 0x0076U,
+ 0x0077U,
+ 0x0078U,
+ 0x0079U,
+ 0x007AU,
+ 0x007BU,
+ 0x007CU,
+ 0x007DU,
+ 0x007EU,
+ 0x00A1U,
+ 0x00A2U,
+ 0x00A3U,
+ 0x2044U,
+ 0x00A5U,
+ 0x0192U,
+ 0x00A7U,
+ 0x00A4U,
+ 0x0027U,
+ 0x201CU,
+ 0x00ABU,
+ 0x2039U,
+ 0x203AU,
+ 0xFB01U,
+ 0xFB02U,
+ 0x2013U,
+ 0x2020U,
+ 0x2021U,
+ 0x00B7U,
+ 0x00B6U,
+ 0x2022U,
+ 0x201AU,
+ 0x201EU,
+ 0x201DU,
+ 0x00BBU,
+ 0x2026U,
+ 0x2030U,
+ 0x00BFU,
+ 0x0060U,
+ 0x00B4U,
+ 0x02C6U,
+ 0x02DCU,
+ 0x00AFU,
+ 0x02D8U,
+ 0x02D9U,
+ 0x00A8U,
+ 0x02DAU,
+ 0x00B8U,
+ 0x02DDU,
+ 0x02DBU,
+ 0x02C7U,
+ 0x2014U,
+ 0x00C6U,
+ 0x00AAU,
+ 0x0141U,
+ 0x00D8U,
+ 0x0152U,
+ 0x00BAU,
+ 0x00E6U,
+ 0x0131U,
+ 0x0142U,
+ 0x00F8U,
+ 0x0153U,
+ 0x00DFU,
+ 0x00B9U,
+ 0x00ACU,
+ 0x00B5U,
+ 0x2122U,
+ 0x00D0U,
+ 0x00BDU,
+ 0x00B1U,
+ 0x00DEU,
+ 0x00BCU,
+ 0x00F7U,
+ 0x00A6U,
+ 0x00B0U,
+ 0x00FEU,
+ 0x00BEU,
+ 0x00B2U,
+ 0x00AEU,
+ 0x2212U,
+ 0x00F0U,
+ 0x00D7U,
+ 0x00B3U,
+ 0x00A9U,
+ 0x00C1U,
+ 0x00C2U,
+ 0x00C4U,
+ 0x00C0U,
+ 0x00C5U,
+ 0x00C3U,
+ 0x00C7U,
+ 0x00C9U,
+ 0x00CAU,
+ 0x00CBU,
+ 0x00C8U,
+ 0x00CDU,
+ 0x00CEU,
+ 0x00CFU,
+ 0x00CCU,
+ 0x00D1U,
+ 0x00D3U,
+ 0x00D4U,
+ 0x00D6U,
+ 0x00D2U,
+ 0x00D5U,
+ 0x0160U,
+ 0x00DAU,
+ 0x00DBU,
+ 0x00DCU,
+ 0x00D9U,
+ 0x00DDU,
+ 0x0178U,
+ 0x017DU,
+ 0x00E1U,
+ 0x00E2U,
+ 0x00E4U,
+ 0x00E0U,
+ 0x00E5U,
+ 0x00E3U,
+ 0x00E7U,
+ 0x00E9U,
+ 0x00EAU,
+ 0x00EBU,
+ 0x00E8U,
+ 0x00EDU,
+ 0x00EEU,
+ 0x00EFU,
+ 0x00ECU,
+ 0x00F1U,
+ 0x00F3U,
+ 0x00F4U,
+ 0x00F6U,
+ 0x00F2U,
+ 0x00F5U,
+ 0x0161U,
+ 0x00FAU,
+ 0x00FBU,
+ 0x00FCU,
+ 0x00F9U,
+ 0x00FDU,
+ 0x00FFU,
+ 0x017EU,
+ 0xF721U,
+ 0xF6F8U,
+ 0xF724U,
+ 0xF6E4U,
+ 0xF726U,
+ 0xF7B4U,
+ 0x207DU,
+ 0x207EU,
+ 0x2025U,
+ 0x2024U,
+ 0xF730U,
+ 0xF731U,
+ 0xF732U,
+ 0xF733U,
+ 0xF734U,
+ 0xF735U,
+ 0xF736U,
+ 0xF737U,
+ 0xF738U,
+ 0xF739U,
+ 0xF6E2U,
+ 0xF6DEU,
+ 0xF6E8U,
+ 0xF73FU,
+ 0xF6E9U,
+ 0xF6EAU,
+ 0xF6E0U,
+ 0xF6EBU,
+ 0xF6ECU,
+ 0xF6EDU,
+ 0xF6EEU,
+ 0xF6EFU,
+ 0x207FU,
+ 0xF6F0U,
+ 0xF6F1U,
+ 0xF6F2U,
+ 0xF6F3U,
+ 0xFB00U,
+ 0xFB03U,
+ 0xFB04U,
+ 0x208DU,
+ 0x208EU,
+ 0xF6F6U,
+ 0xF6E6U,
+ 0xF760U,
+ 0xF761U,
+ 0xF762U,
+ 0xF763U,
+ 0xF764U,
+ 0xF765U,
+ 0xF766U,
+ 0xF767U,
+ 0xF768U,
+ 0xF769U,
+ 0xF76AU,
+ 0xF76BU,
+ 0xF76CU,
+ 0xF76DU,
+ 0xF76EU,
+ 0xF76FU,
+ 0xF770U,
+ 0xF771U,
+ 0xF772U,
+ 0xF773U,
+ 0xF774U,
+ 0xF775U,
+ 0xF776U,
+ 0xF777U,
+ 0xF778U,
+ 0xF779U,
+ 0xF77AU,
+ 0x20A1U,
+ 0xF6DCU,
+ 0xF6DDU,
+ 0xF6FEU,
+ 0xF7A1U,
+ 0xF7A2U,
+ 0xF6F9U,
+ 0xF6FDU,
+ 0xF6FFU,
+ 0xF7A8U,
+ 0xF6F4U,
+ 0xF6F5U,
+ 0xF6F7U,
+ 0xF7AFU,
+ 0x2012U,
+ 0xF6E5U,
+ 0xF6FBU,
+ 0xF6FCU,
+ 0xF7B8U,
+ 0xF7BFU,
+ 0x215BU,
+ 0x215CU,
+ 0x215DU,
+ 0x215EU,
+ 0x2153U,
+ 0x2154U,
+ 0x2070U,
+ 0x2074U,
+ 0x2075U,
+ 0x2076U,
+ 0x2077U,
+ 0x2078U,
+ 0x2079U,
+ 0x2080U,
+ 0x2081U,
+ 0x2082U,
+ 0x2083U,
+ 0x2084U,
+ 0x2085U,
+ 0x2086U,
+ 0x2087U,
+ 0x2088U,
+ 0x2089U,
+ 0xF6DFU,
+ 0xF6E3U,
+ 0xF6E7U,
+ 0xF6E1U,
+ 0xF7E0U,
+ 0xF7E1U,
+ 0xF7E2U,
+ 0xF7E3U,
+ 0xF7E4U,
+ 0xF7E5U,
+ 0xF7E6U,
+ 0xF7E7U,
+ 0xF7E8U,
+ 0xF7E9U,
+ 0xF7EAU,
+ 0xF7EBU,
+ 0xF7ECU,
+ 0xF7EDU,
+ 0xF7EEU,
+ 0xF7EFU,
+ 0xF7F0U,
+ 0xF7F1U,
+ 0xF7F2U,
+ 0xF7F3U,
+ 0xF7F4U,
+ 0xF7F5U,
+ 0xF7F6U,
+ 0xF6FAU,
+ 0xF7F8U,
+ 0xF7F9U,
+ 0xF7FAU,
+ 0xF7FBU,
+ 0xF7FCU,
+ 0xF7FDU,
+ 0xF7FEU,
+ 0xF7FFU,
0,
0,
0,
@@ -1766,673 +5000,3909 @@
#ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
- 0x01FC,
- 0x0102,
- 0xF6C9,
- 0x0391,
- 0x0386,
- 0x0100,
- 0x0104,
- 0x01FA,
- 0x0392,
- 0x0106,
- 0xF6CA,
- 0x010C,
- 0x0108,
- 0x010A,
- 0x03A7,
- 0x010E,
- 0x0110,
- 0x2206,
- 0x2206,
- 0xF6CB,
- 0xF6CC,
- 0xF6CD,
- 0x0114,
- 0x011A,
- 0x0116,
- 0x0112,
- 0x014A,
- 0x0118,
- 0x0395,
- 0x0388,
- 0x0397,
- 0x0389,
- 0x20AC,
- 0x0393,
- 0x011E,
- 0x01E6,
- 0x011C,
- 0x0122,
- 0x0120,
- 0xF6CE,
- 0x25CF,
- 0x25AA,
- 0x25AB,
- 0x25A1,
- 0x0126,
- 0x0124,
- 0xF6CF,
- 0x0132,
- 0x012C,
- 0x0130,
- 0x2111,
- 0x012A,
- 0x012E,
- 0x0399,
- 0x03AA,
- 0x038A,
- 0x0128,
- 0x0134,
- 0x039A,
- 0x0136,
- 0xF6BF,
- 0x0139,
- 0x039B,
- 0x013D,
- 0x013B,
- 0x013F,
- 0xF6D0,
- 0x039C,
- 0x0143,
- 0x0147,
- 0x0145,
- 0x039D,
- 0x014E,
- 0x01A0,
- 0x0150,
- 0x014C,
- 0x2126,
- 0x2126,
- 0x038F,
- 0x039F,
- 0x038C,
- 0x01FE,
- 0x03A6,
- 0x03A0,
- 0x03A8,
- 0x0154,
- 0x0158,
- 0x0156,
- 0x211C,
- 0x03A1,
- 0x250C,
- 0x2514,
- 0x2510,
- 0x2518,
- 0x253C,
- 0x252C,
- 0x2534,
- 0x251C,
- 0x2524,
- 0x2500,
- 0x2502,
- 0x2561,
- 0x2562,
- 0x2556,
- 0x2555,
- 0x2563,
- 0x2551,
- 0x2557,
- 0x255D,
- 0x255C,
- 0x255B,
- 0x255E,
- 0x255F,
- 0x255A,
- 0x2554,
- 0x2569,
- 0x2566,
- 0x2560,
- 0x2550,
- 0x256C,
- 0x2567,
- 0x2568,
- 0x2564,
- 0x2565,
- 0x2559,
- 0x2558,
- 0x2552,
- 0x2553,
- 0x256B,
- 0x256A,
- 0x015A,
- 0x015E,
- 0x015E,
- 0x015C,
- 0x0218,
- 0x03A3,
- 0x03A4,
- 0x0166,
- 0x0164,
- 0x0162,
- 0x0162,
- 0x0398,
- 0x016C,
- 0x01AF,
- 0x0170,
- 0x016A,
- 0x0172,
- 0x03A5,
- 0x03D2,
- 0x03AB,
- 0x038E,
- 0x016E,
- 0x0168,
- 0x1E82,
- 0x0174,
- 0x1E84,
- 0x1E80,
- 0x039E,
- 0x0176,
- 0x1EF2,
- 0x0179,
- 0x017B,
- 0x0396,
- 0x0103,
- 0x0301,
- 0x01FD,
- 0x2015,
- 0x0410,
- 0x0411,
- 0x0412,
- 0x0413,
- 0x0414,
- 0x0415,
- 0x0401,
- 0x0416,
- 0x0417,
- 0x0418,
- 0x0419,
- 0x041A,
- 0x041B,
- 0x041C,
- 0x041D,
- 0x041E,
- 0x041F,
- 0x0420,
- 0x0421,
- 0x0422,
- 0x0423,
- 0x0424,
- 0x0425,
- 0x0426,
- 0x0427,
- 0x0428,
- 0x0429,
- 0x042A,
- 0x042B,
- 0x042C,
- 0x042D,
- 0x042E,
- 0x042F,
- 0x0490,
- 0x0402,
- 0x0403,
- 0x0404,
- 0x0405,
- 0x0406,
- 0x0407,
- 0x0408,
- 0x0409,
- 0x040A,
- 0x040B,
- 0x040C,
- 0x040E,
- 0xF6C4,
- 0xF6C5,
- 0x0430,
- 0x0431,
- 0x0432,
- 0x0433,
- 0x0434,
- 0x0435,
- 0x0451,
- 0x0436,
- 0x0437,
- 0x0438,
- 0x0439,
- 0x043A,
- 0x043B,
- 0x043C,
- 0x043D,
- 0x043E,
- 0x043F,
- 0x0440,
- 0x0441,
- 0x0442,
- 0x0443,
- 0x0444,
- 0x0445,
- 0x0446,
- 0x0447,
- 0x0448,
- 0x0449,
- 0x044A,
- 0x044B,
- 0x044C,
- 0x044D,
- 0x044E,
- 0x044F,
- 0x0491,
- 0x0452,
- 0x0453,
- 0x0454,
- 0x0455,
- 0x0456,
- 0x0457,
- 0x0458,
- 0x0459,
- 0x045A,
- 0x045B,
- 0x045C,
- 0x045E,
- 0x040F,
- 0x0462,
- 0x0472,
- 0x0474,
- 0xF6C6,
- 0x045F,
- 0x0463,
- 0x0473,
- 0x0475,
- 0xF6C7,
- 0xF6C8,
- 0x04D9,
- 0x200E,
- 0x200F,
- 0x200D,
- 0x066A,
- 0x060C,
- 0x0660,
- 0x0661,
- 0x0662,
- 0x0663,
- 0x0664,
- 0x0665,
- 0x0666,
- 0x0667,
- 0x0668,
- 0x0669,
- 0x061B,
- 0x061F,
- 0x0621,
- 0x0622,
- 0x0623,
- 0x0624,
- 0x0625,
- 0x0626,
- 0x0627,
- 0x0628,
- 0x0629,
- 0x062A,
- 0x062B,
- 0x062C,
- 0x062D,
- 0x062E,
- 0x062F,
- 0x0630,
- 0x0631,
- 0x0632,
- 0x0633,
- 0x0634,
- 0x0635,
- 0x0636,
- 0x0637,
- 0x0638,
- 0x0639,
- 0x063A,
- 0x0640,
- 0x0641,
- 0x0642,
- 0x0643,
- 0x0644,
- 0x0645,
- 0x0646,
- 0x0648,
- 0x0649,
- 0x064A,
- 0x064B,
- 0x064C,
- 0x064D,
- 0x064E,
- 0x064F,
- 0x0650,
- 0x0651,
- 0x0652,
- 0x0647,
- 0x06A4,
- 0x067E,
- 0x0686,
- 0x0698,
- 0x06AF,
- 0x0679,
- 0x0688,
- 0x0691,
- 0x06BA,
- 0x06D2,
- 0x06D5,
- 0x20AA,
- 0x05BE,
- 0x05C3,
- 0x05D0,
- 0x05D1,
- 0x05D2,
- 0x05D3,
- 0x05D4,
- 0x05D5,
- 0x05D6,
- 0x05D7,
- 0x05D8,
- 0x05D9,
- 0x05DA,
- 0x05DB,
- 0x05DC,
- 0x05DD,
- 0x05DE,
- 0x05DF,
- 0x05E0,
- 0x05E1,
- 0x05E2,
- 0x05E3,
- 0x05E4,
- 0x05E5,
- 0x05E6,
- 0x05E7,
- 0x05E8,
- 0x05E9,
- 0x05EA,
- 0xFB2A,
- 0xFB2B,
- 0xFB4B,
- 0xFB1F,
- 0x05F0,
- 0x05F1,
- 0x05F2,
- 0xFB35,
- 0x05B4,
- 0x05B5,
- 0x05B6,
- 0x05BB,
- 0x05B8,
- 0x05B7,
- 0x05B0,
- 0x05B2,
- 0x05B1,
- 0x05B3,
- 0x05C2,
- 0x05C1,
- 0x05B9,
- 0x05BC,
- 0x05BD,
- 0x05BF,
- 0x05C0,
- 0x02BC,
- 0x2105,
- 0x2113,
- 0x2116,
- 0x202C,
- 0x202D,
- 0x202E,
- 0x200C,
- 0x066D,
- 0x02BD,
- 0x2135,
- 0x03B1,
- 0x03AC,
- 0x0101,
- 0x2220,
- 0x2329,
- 0x232A,
- 0x0387,
- 0x0105,
- 0x2248,
- 0x01FB,
- 0x2194,
- 0x21D4,
- 0x21D3,
- 0x21D0,
- 0x21D2,
- 0x21D1,
- 0x2193,
- 0xF8E7,
- 0x2190,
- 0x2192,
- 0x2191,
- 0x2195,
- 0x21A8,
- 0xF8E6,
- 0x2217,
- 0x03B2,
- 0x2588,
- 0xF8F4,
- 0xF8F3,
- 0xF8F2,
- 0xF8F1,
- 0xF8FE,
- 0xF8FD,
- 0xF8FC,
- 0xF8F0,
- 0xF8EF,
- 0xF8EE,
- 0xF8FB,
- 0xF8FA,
- 0xF8F9,
- 0x0107,
- 0x21B5,
- 0x010D,
- 0x0109,
- 0x010B,
- 0x03C7,
- 0x25CB,
- 0x2297,
- 0x2295,
- 0x2663,
- 0xF6C3,
- 0x2245,
- 0xF8E9,
- 0xF6D9,
- 0xF6D1,
- 0xF6D2,
- 0xF6D4,
- 0xF6D5,
- 0xF6D3,
- 0xF6D6,
- 0x010F,
- 0x0111,
- 0x03B4,
- 0x2666,
- 0xF6D7,
- 0xF6D8,
- 0x0385,
- 0x2593,
- 0x2584,
- 0x20AB,
- 0x0323,
- 0xF6BE,
- 0x22C5,
- 0x0115,
- 0x011B,
- 0x0117,
- 0x2208,
- 0x0113,
- 0x2205,
- 0x014B,
- 0x0119,
- 0x03B5,
- 0x03AD,
- 0x2261,
- 0x212E,
- 0x03B7,
- 0x03AE,
- 0x203C,
- 0x2203,
- 0x2640,
- 0x25A0,
- 0x25AC,
- 0x20A3,
- 0x03B3,
- 0x011F,
- 0x01E7,
- 0x011D,
- 0x0123,
- 0x0121,
- 0x2207,
- 0x0300,
- 0x2265,
- 0x0127,
- 0x0125,
- 0x2665,
- 0x0309,
- 0x2302,
- 0x012D,
- 0x0133,
- 0x012B,
- 0x221E,
- 0x222B,
- 0x2321,
- 0xF8F5,
- 0x2320,
- 0x2229,
- 0x25D8,
- 0x25D9,
- 0x263B,
- 0x012F,
- 0x03B9,
- 0x03CA,
- 0x0390,
- 0x03AF,
- 0x0129,
- 0x0135,
- 0x03BA,
- 0x0137,
- 0x0138,
- 0x013A,
- 0x03BB,
- 0x013E,
- 0x013C,
- 0x0140,
- 0x2264,
- 0x258C,
- 0x20A4,
- 0xF6C0,
- 0x2227,
- 0x2228,
- 0x017F,
- 0x25CA,
- 0x2591,
- 0x2642,
- 0x2032,
- 0x266A,
- 0x266B,
- 0x0144,
- 0x0149,
- 0x0148,
- 0x0146,
- 0x2209,
- 0x2260,
- 0x2284,
- 0x03BD,
- 0x014F,
- 0x01A1,
- 0x0151,
- 0x014D,
- 0x03C9,
- 0x03D6,
- 0x03CE,
- 0x03BF,
- 0x03CC,
- 0x25E6,
- 0x221F,
- 0x01FF,
- 0xF8ED,
- 0xF8EC,
- 0xF8EB,
- 0xF8F8,
- 0xF8F7,
- 0xF8F6,
- 0x2202,
- 0x22A5,
- 0x20A7,
- 0x03C6,
- 0x03D5,
- 0x03C0,
- 0x211E,
- 0x220F,
- 0x2282,
- 0x2283,
- 0x221D,
- 0x03C8,
- 0x201B,
- 0x0155,
- 0x221A,
- 0xF8E5,
- 0x0159,
- 0x0157,
- 0x2286,
- 0x2287,
- 0xF8E8,
- 0xF6DA,
- 0x2310,
- 0x03C1,
- 0x2590,
- 0x015B,
- 0x015F,
- 0x015F,
- 0x015D,
- 0x0219,
- 0x2033,
- 0x2592,
- 0x03C3,
- 0x03C2,
- 0x223C,
- 0x263A,
- 0x2660,
- 0x220B,
- 0x2211,
- 0x263C,
- 0x03C4,
- 0x0167,
- 0x0165,
- 0x0163,
- 0x0163,
- 0x2234,
- 0x03B8,
- 0x03D1,
- 0x0303,
- 0x0384,
- 0xF8EA,
- 0xF6DB,
- 0x25BC,
- 0x25C4,
- 0x25BA,
- 0x25B2,
- 0x016D,
- 0x01B0,
- 0x0171,
- 0x016B,
- 0x2017,
- 0x222A,
- 0x2200,
- 0x0173,
- 0x2580,
- 0x03C5,
- 0x03CB,
- 0x03B0,
- 0x03CD,
- 0x016F,
- 0x0169,
- 0x1E83,
- 0x0175,
- 0x1E85,
- 0x2118,
- 0x1E81,
- 0x03BE,
- 0x0177,
- 0x1EF3,
- 0x017A,
- 0x017C,
- 0x03B6,
+ 0x01FCU,
+ 0x01E2U,
+ 0x0102U,
+ 0x1EAEU,
+ 0x04D0U,
+ 0x1EB6U,
+ 0x1EB0U,
+ 0x1EB2U,
+ 0x1EB4U,
+ 0x01CDU,
+ 0x24B6U,
+ 0x1EA4U,
+ 0x1EACU,
+ 0x1EA6U,
+ 0x1EA8U,
+ 0x1EAAU,
+ 0xF6C9U,
+ 0x0410U,
+ 0x0200U,
+ 0x04D2U,
+ 0x01DEU,
+ 0x1EA0U,
+ 0x01E0U,
+ 0x1EA2U,
+ 0x04D4U,
+ 0x0202U,
+ 0x0391U,
+ 0x0386U,
+ 0x0100U,
+ 0xFF21U,
+ 0x0104U,
+ 0x01FAU,
+ 0x1E00U,
+ 0x0531U,
+ 0x24B7U,
+ 0x1E02U,
+ 0x1E04U,
+ 0x0411U,
+ 0x0532U,
+ 0x0392U,
+ 0x0181U,
+ 0x1E06U,
+ 0xFF22U,
+ 0x0182U,
+ 0x053EU,
+ 0x0106U,
+ 0xF6CAU,
+ 0x010CU,
+ 0x1E08U,
+ 0x24B8U,
+ 0x0108U,
+ 0x010AU,
+ 0x010AU,
+ 0x0549U,
+ 0x04BCU,
+ 0x0427U,
+ 0x04BEU,
+ 0x04B6U,
+ 0x04F4U,
+ 0x0543U,
+ 0x04CBU,
+ 0x04B8U,
+ 0x03A7U,
+ 0x0187U,
+ 0xFF23U,
+ 0x0551U,
+ 0x01F1U,
+ 0x01C4U,
+ 0x0534U,
+ 0x0189U,
+ 0x010EU,
+ 0x1E10U,
+ 0x24B9U,
+ 0x1E12U,
+ 0x0110U,
+ 0x1E0AU,
+ 0x1E0CU,
+ 0x0414U,
+ 0x03EEU,
+ 0x2206U,
+ 0x0394U,
+ 0x018AU,
+ 0xF6CBU,
+ 0xF6CCU,
+ 0xF6CDU,
+ 0x03DCU,
+ 0x0402U,
+ 0x1E0EU,
+ 0xFF24U,
+ 0x0110U,
+ 0x018BU,
+ 0x01F2U,
+ 0x01C5U,
+ 0x04E0U,
+ 0x0405U,
+ 0x040FU,
+ 0x0114U,
+ 0x011AU,
+ 0x1E1CU,
+ 0x0535U,
+ 0x24BAU,
+ 0x1EBEU,
+ 0x1E18U,
+ 0x1EC6U,
+ 0x1EC0U,
+ 0x1EC2U,
+ 0x1EC4U,
+ 0x0404U,
+ 0x0204U,
+ 0x0116U,
+ 0x0116U,
+ 0x1EB8U,
+ 0x0424U,
+ 0x0537U,
+ 0x1EBAU,
+ 0x2167U,
+ 0x0206U,
+ 0x0464U,
+ 0x041BU,
+ 0x216AU,
+ 0x0112U,
+ 0x1E16U,
+ 0x1E14U,
+ 0x041CU,
+ 0xFF25U,
+ 0x041DU,
+ 0x04A2U,
+ 0x014AU,
+ 0x04A4U,
+ 0x04C7U,
+ 0x0118U,
+ 0x0190U,
+ 0x0395U,
+ 0x0388U,
+ 0x0420U,
+ 0x018EU,
+ 0x042DU,
+ 0x0421U,
+ 0x04AAU,
+ 0x01A9U,
+ 0x0397U,
+ 0x0538U,
+ 0x0389U,
+ 0x1EBCU,
+ 0x1E1AU,
+ 0x20ACU,
+ 0x01B7U,
+ 0x01EEU,
+ 0x01B8U,
+ 0x24BBU,
+ 0x1E1EU,
+ 0x0556U,
+ 0x03E4U,
+ 0x0191U,
+ 0x0472U,
+ 0x2164U,
+ 0xFF26U,
+ 0x2163U,
+ 0x3387U,
+ 0x01F4U,
+ 0x0393U,
+ 0x0194U,
+ 0x03EAU,
+ 0x011EU,
+ 0x01E6U,
+ 0x0122U,
+ 0x24BCU,
+ 0x011CU,
+ 0x0122U,
+ 0x0120U,
+ 0x0120U,
+ 0x0413U,
+ 0x0542U,
+ 0x0494U,
+ 0x0492U,
+ 0x0490U,
+ 0x0193U,
+ 0x0533U,
+ 0x0403U,
+ 0x1E20U,
+ 0xFF27U,
+ 0xF6CEU,
+ 0x029BU,
+ 0x01E4U,
+ 0x25CFU,
+ 0x25AAU,
+ 0x25ABU,
+ 0x25A1U,
+ 0x33CBU,
+ 0x04A8U,
+ 0x04B2U,
+ 0x042AU,
+ 0x0126U,
+ 0x1E2AU,
+ 0x1E28U,
+ 0x24BDU,
+ 0x0124U,
+ 0x1E26U,
+ 0x1E22U,
+ 0x1E24U,
+ 0xFF28U,
+ 0x0540U,
+ 0x03E8U,
+ 0xF6CFU,
+ 0x3390U,
+ 0x042FU,
+ 0x0132U,
+ 0x042EU,
+ 0x012CU,
+ 0x01CFU,
+ 0x24BEU,
+ 0x0406U,
+ 0x0208U,
+ 0x1E2EU,
+ 0x04E4U,
+ 0x0130U,
+ 0x0130U,
+ 0x1ECAU,
+ 0x04D6U,
+ 0x0415U,
+ 0x2111U,
+ 0x1EC8U,
+ 0x0418U,
+ 0x020AU,
+ 0x0419U,
+ 0x012AU,
+ 0x04E2U,
+ 0xFF29U,
+ 0x053BU,
+ 0x0401U,
+ 0x012EU,
+ 0x0399U,
+ 0x0196U,
+ 0x03AAU,
+ 0x038AU,
+ 0x0197U,
+ 0x0128U,
+ 0x1E2CU,
+ 0x0474U,
+ 0x0476U,
+ 0x0541U,
+ 0x24BFU,
+ 0x0134U,
+ 0x0408U,
+ 0x054BU,
+ 0xFF2AU,
+ 0x3385U,
+ 0x33CDU,
+ 0x04A0U,
+ 0x1E30U,
+ 0x041AU,
+ 0x049AU,
+ 0x04C3U,
+ 0x039AU,
+ 0x049EU,
+ 0x049CU,
+ 0x01E8U,
+ 0x0136U,
+ 0x24C0U,
+ 0x0136U,
+ 0x1E32U,
+ 0x0554U,
+ 0x053FU,
+ 0x0425U,
+ 0x03E6U,
+ 0x0198U,
+ 0x040CU,
+ 0x1E34U,
+ 0xFF2BU,
+ 0x0480U,
+ 0x03DEU,
+ 0x046EU,
+ 0x01C7U,
+ 0xF6BFU,
+ 0x0139U,
+ 0x039BU,
+ 0x013DU,
+ 0x013BU,
+ 0x24C1U,
+ 0x1E3CU,
+ 0x013BU,
+ 0x013FU,
+ 0x013FU,
+ 0x1E36U,
+ 0x1E38U,
+ 0x053CU,
+ 0x01C8U,
+ 0x0409U,
+ 0x1E3AU,
+ 0xFF2CU,
+ 0x3386U,
+ 0xF6D0U,
+ 0x1E3EU,
+ 0x24C2U,
+ 0x1E40U,
+ 0x1E42U,
+ 0x0544U,
+ 0xFF2DU,
+ 0x019CU,
+ 0x039CU,
+ 0x01CAU,
+ 0x0143U,
+ 0x0147U,
+ 0x0145U,
+ 0x24C3U,
+ 0x1E4AU,
+ 0x0145U,
+ 0x1E44U,
+ 0x1E46U,
+ 0x019DU,
+ 0x2168U,
+ 0x01CBU,
+ 0x040AU,
+ 0x1E48U,
+ 0xFF2EU,
+ 0x0546U,
+ 0x039DU,
+ 0x04E8U,
+ 0x04EAU,
+ 0x014EU,
+ 0x01D1U,
+ 0x019FU,
+ 0x24C4U,
+ 0x1ED0U,
+ 0x1ED8U,
+ 0x1ED2U,
+ 0x1ED4U,
+ 0x1ED6U,
+ 0x041EU,
+ 0x0150U,
+ 0x020CU,
+ 0x04E6U,
+ 0x1ECCU,
+ 0x0555U,
+ 0x2126U,
+ 0x1ECEU,
+ 0x01A0U,
+ 0x1EDAU,
+ 0x1EE2U,
+ 0x1EDCU,
+ 0x1EDEU,
+ 0x1EE0U,
+ 0x0150U,
+ 0x01A2U,
+ 0x020EU,
+ 0x014CU,
+ 0x1E52U,
+ 0x1E50U,
+ 0x2126U,
+ 0x0460U,
+ 0x03A9U,
+ 0x047AU,
+ 0x047CU,
+ 0x038FU,
+ 0x039FU,
+ 0x038CU,
+ 0xFF2FU,
+ 0x2160U,
+ 0x01EAU,
+ 0x01ECU,
+ 0x0186U,
+ 0x01FEU,
+ 0x01FEU,
+ 0x047EU,
+ 0x1E4CU,
+ 0x1E4EU,
+ 0x1E54U,
+ 0x24C5U,
+ 0x1E56U,
+ 0x041FU,
+ 0x054AU,
+ 0x04A6U,
+ 0x03A6U,
+ 0x01A4U,
+ 0x03A0U,
+ 0x0553U,
+ 0xFF30U,
+ 0x03A8U,
+ 0x0470U,
+ 0x24C6U,
+ 0xFF31U,
+ 0x054CU,
+ 0x0154U,
+ 0x0158U,
+ 0x0156U,
+ 0x24C7U,
+ 0x0156U,
+ 0x0210U,
+ 0x1E58U,
+ 0x1E5AU,
+ 0x1E5CU,
+ 0x0550U,
+ 0x211CU,
+ 0x03A1U,
+ 0x0212U,
+ 0x1E5EU,
+ 0xFF32U,
+ 0x0281U,
+ 0x02B6U,
+ 0x250CU,
+ 0x2514U,
+ 0x2510U,
+ 0x2518U,
+ 0x253CU,
+ 0x252CU,
+ 0x2534U,
+ 0x251CU,
+ 0x2524U,
+ 0x2500U,
+ 0x2502U,
+ 0x2561U,
+ 0x2562U,
+ 0x2556U,
+ 0x2555U,
+ 0x2563U,
+ 0x2551U,
+ 0x2557U,
+ 0x255DU,
+ 0x255CU,
+ 0x255BU,
+ 0x255EU,
+ 0x255FU,
+ 0x255AU,
+ 0x2554U,
+ 0x2569U,
+ 0x2566U,
+ 0x2560U,
+ 0x2550U,
+ 0x256CU,
+ 0x2567U,
+ 0x2568U,
+ 0x2564U,
+ 0x2565U,
+ 0x2559U,
+ 0x2558U,
+ 0x2552U,
+ 0x2553U,
+ 0x256BU,
+ 0x256AU,
+ 0x015AU,
+ 0x1E64U,
+ 0x03E0U,
+ 0x1E66U,
+ 0x015EU,
+ 0x018FU,
+ 0x04D8U,
+ 0x04DAU,
+ 0x24C8U,
+ 0x015CU,
+ 0x0218U,
+ 0x1E60U,
+ 0x1E62U,
+ 0x1E68U,
+ 0x054DU,
+ 0x2166U,
+ 0x0547U,
+ 0x0428U,
+ 0x0429U,
+ 0x03E2U,
+ 0x04BAU,
+ 0x03ECU,
+ 0x03A3U,
+ 0x2165U,
+ 0xFF33U,
+ 0x042CU,
+ 0x03DAU,
+ 0x03A4U,
+ 0x0166U,
+ 0x0164U,
+ 0x0162U,
+ 0x24C9U,
+ 0x1E70U,
+ 0x0162U,
+ 0x1E6AU,
+ 0x1E6CU,
+ 0x0422U,
+ 0x04ACU,
+ 0x2169U,
+ 0x04B4U,
+ 0x0398U,
+ 0x01ACU,
+ 0x2162U,
+ 0x054FU,
+ 0x1E6EU,
+ 0xFF34U,
+ 0x0539U,
+ 0x01BCU,
+ 0x0184U,
+ 0x01A7U,
+ 0x01AEU,
+ 0x0426U,
+ 0x040BU,
+ 0x216BU,
+ 0x2161U,
+ 0x016CU,
+ 0x01D3U,
+ 0x24CAU,
+ 0x1E76U,
+ 0x0423U,
+ 0x0170U,
+ 0x0214U,
+ 0x01D7U,
+ 0x1E72U,
+ 0x01D9U,
+ 0x04F0U,
+ 0x01DBU,
+ 0x01D5U,
+ 0x1EE4U,
+ 0x1EE6U,
+ 0x01AFU,
+ 0x1EE8U,
+ 0x1EF0U,
+ 0x1EEAU,
+ 0x1EECU,
+ 0x1EEEU,
+ 0x0170U,
+ 0x04F2U,
+ 0x0216U,
+ 0x0478U,
+ 0x016AU,
+ 0x04EEU,
+ 0x1E7AU,
+ 0xFF35U,
+ 0x0172U,
+ 0x03A5U,
+ 0x03D2U,
+ 0x03D3U,
+ 0x01B1U,
+ 0x03ABU,
+ 0x03D4U,
+ 0x03D2U,
+ 0x038EU,
+ 0x016EU,
+ 0x040EU,
+ 0x04AEU,
+ 0x04B0U,
+ 0x0168U,
+ 0x1E78U,
+ 0x1E74U,
+ 0x24CBU,
+ 0x1E7EU,
+ 0x0412U,
+ 0x054EU,
+ 0x01B2U,
+ 0xFF36U,
+ 0x0548U,
+ 0x1E7CU,
+ 0x1E82U,
+ 0x24CCU,
+ 0x0174U,
+ 0x1E84U,
+ 0x1E86U,
+ 0x1E88U,
+ 0x1E80U,
+ 0xFF37U,
+ 0x24CDU,
+ 0x1E8CU,
+ 0x1E8AU,
+ 0x053DU,
+ 0x039EU,
+ 0xFF38U,
+ 0x0462U,
+ 0x24CEU,
+ 0x0176U,
+ 0x1E8EU,
+ 0x1EF4U,
+ 0x042BU,
+ 0x04F8U,
+ 0x1EF2U,
+ 0x01B3U,
+ 0x1EF6U,
+ 0x0545U,
+ 0x0407U,
+ 0x0552U,
+ 0xFF39U,
+ 0x1EF8U,
+ 0x046AU,
+ 0x046CU,
+ 0x0466U,
+ 0x0468U,
+ 0x0536U,
+ 0x0179U,
+ 0x24CFU,
+ 0x1E90U,
+ 0x017BU,
+ 0x017BU,
+ 0x1E92U,
+ 0x0417U,
+ 0x0498U,
+ 0x04DEU,
+ 0x0396U,
+ 0x053AU,
+ 0x04C1U,
+ 0x0416U,
+ 0x0496U,
+ 0x04DCU,
+ 0x1E94U,
+ 0xFF3AU,
+ 0x01B5U,
+ 0x0986U,
+ 0x0906U,
+ 0x0A86U,
+ 0x0A06U,
+ 0x0A3EU,
+ 0x3303U,
+ 0x09BEU,
+ 0x093EU,
+ 0x0ABEU,
+ 0x055FU,
+ 0x0970U,
+ 0x0985U,
+ 0x311AU,
+ 0x0103U,
+ 0x1EAFU,
+ 0x04D1U,
+ 0x1EB7U,
+ 0x1EB1U,
+ 0x1EB3U,
+ 0x1EB5U,
+ 0x01CEU,
+ 0x24D0U,
+ 0x1EA5U,
+ 0x1EADU,
+ 0x1EA7U,
+ 0x1EA9U,
+ 0x1EABU,
+ 0x0317U,
+ 0x0301U,
+ 0x0301U,
+ 0x0954U,
+ 0x02CFU,
+ 0x0341U,
+ 0x0430U,
+ 0x0201U,
+ 0x0A71U,
+ 0x0905U,
+ 0x04D3U,
+ 0x01DFU,
+ 0x1EA1U,
+ 0x01E1U,
+ 0x01FDU,
+ 0x3150U,
+ 0x01E3U,
+ 0x2015U,
+ 0x20A4U,
+ 0x0410U,
+ 0x0411U,
+ 0x0412U,
+ 0x0413U,
+ 0x0414U,
+ 0x0415U,
+ 0x0401U,
+ 0x0416U,
+ 0x0417U,
+ 0x0418U,
+ 0x0419U,
+ 0x041AU,
+ 0x041BU,
+ 0x041CU,
+ 0x041DU,
+ 0x041EU,
+ 0x041FU,
+ 0x0420U,
+ 0x0421U,
+ 0x0422U,
+ 0x0423U,
+ 0x0424U,
+ 0x0425U,
+ 0x0426U,
+ 0x0427U,
+ 0x0428U,
+ 0x0429U,
+ 0x042AU,
+ 0x042BU,
+ 0x042CU,
+ 0x042DU,
+ 0x042EU,
+ 0x042FU,
+ 0x0490U,
+ 0x0402U,
+ 0x0403U,
+ 0x0404U,
+ 0x0405U,
+ 0x0406U,
+ 0x0407U,
+ 0x0408U,
+ 0x0409U,
+ 0x040AU,
+ 0x040BU,
+ 0x040CU,
+ 0x040EU,
+ 0xF6C4U,
+ 0xF6C5U,
+ 0x0430U,
+ 0x0431U,
+ 0x0432U,
+ 0x0433U,
+ 0x0434U,
+ 0x0435U,
+ 0x0451U,
+ 0x0436U,
+ 0x0437U,
+ 0x0438U,
+ 0x0439U,
+ 0x043AU,
+ 0x043BU,
+ 0x043CU,
+ 0x043DU,
+ 0x043EU,
+ 0x043FU,
+ 0x0440U,
+ 0x0441U,
+ 0x0442U,
+ 0x0443U,
+ 0x0444U,
+ 0x0445U,
+ 0x0446U,
+ 0x0447U,
+ 0x0448U,
+ 0x0449U,
+ 0x044AU,
+ 0x044BU,
+ 0x044CU,
+ 0x044DU,
+ 0x044EU,
+ 0x044FU,
+ 0x0491U,
+ 0x0452U,
+ 0x0453U,
+ 0x0454U,
+ 0x0455U,
+ 0x0456U,
+ 0x0457U,
+ 0x0458U,
+ 0x0459U,
+ 0x045AU,
+ 0x045BU,
+ 0x045CU,
+ 0x045EU,
+ 0x040FU,
+ 0x0462U,
+ 0x0472U,
+ 0x0474U,
+ 0xF6C6U,
+ 0x045FU,
+ 0x0463U,
+ 0x0473U,
+ 0x0475U,
+ 0xF6C7U,
+ 0xF6C8U,
+ 0x04D9U,
+ 0x200EU,
+ 0x200FU,
+ 0x200DU,
+ 0x066AU,
+ 0x060CU,
+ 0x0660U,
+ 0x0661U,
+ 0x0662U,
+ 0x0663U,
+ 0x0664U,
+ 0x0665U,
+ 0x0666U,
+ 0x0667U,
+ 0x0668U,
+ 0x0669U,
+ 0x061BU,
+ 0x061FU,
+ 0x0621U,
+ 0x0622U,
+ 0x0623U,
+ 0x0624U,
+ 0x0625U,
+ 0x0626U,
+ 0x0627U,
+ 0x0628U,
+ 0x0629U,
+ 0x062AU,
+ 0x062BU,
+ 0x062CU,
+ 0x062DU,
+ 0x062EU,
+ 0x062FU,
+ 0x0630U,
+ 0x0631U,
+ 0x0632U,
+ 0x0633U,
+ 0x0634U,
+ 0x0635U,
+ 0x0636U,
+ 0x0637U,
+ 0x0638U,
+ 0x0639U,
+ 0x063AU,
+ 0x0640U,
+ 0x0641U,
+ 0x0642U,
+ 0x0643U,
+ 0x0644U,
+ 0x0645U,
+ 0x0646U,
+ 0x0648U,
+ 0x0649U,
+ 0x064AU,
+ 0x064BU,
+ 0x064CU,
+ 0x064DU,
+ 0x064EU,
+ 0x064FU,
+ 0x0650U,
+ 0x0651U,
+ 0x0652U,
+ 0x0647U,
+ 0x06A4U,
+ 0x067EU,
+ 0x0686U,
+ 0x0698U,
+ 0x06AFU,
+ 0x0679U,
+ 0x0688U,
+ 0x0691U,
+ 0x06BAU,
+ 0x06D2U,
+ 0x06D5U,
+ 0x20AAU,
+ 0x05BEU,
+ 0x05C3U,
+ 0x05D0U,
+ 0x05D1U,
+ 0x05D2U,
+ 0x05D3U,
+ 0x05D4U,
+ 0x05D5U,
+ 0x05D6U,
+ 0x05D7U,
+ 0x05D8U,
+ 0x05D9U,
+ 0x05DAU,
+ 0x05DBU,
+ 0x05DCU,
+ 0x05DDU,
+ 0x05DEU,
+ 0x05DFU,
+ 0x05E0U,
+ 0x05E1U,
+ 0x05E2U,
+ 0x05E3U,
+ 0x05E4U,
+ 0x05E5U,
+ 0x05E6U,
+ 0x05E7U,
+ 0x05E8U,
+ 0x05E9U,
+ 0x05EAU,
+ 0xFB2AU,
+ 0xFB2BU,
+ 0xFB4BU,
+ 0xFB1FU,
+ 0x05F0U,
+ 0x05F1U,
+ 0x05F2U,
+ 0xFB35U,
+ 0x05B4U,
+ 0x05B5U,
+ 0x05B6U,
+ 0x05BBU,
+ 0x05B8U,
+ 0x05B7U,
+ 0x05B0U,
+ 0x05B2U,
+ 0x05B1U,
+ 0x05B3U,
+ 0x05C2U,
+ 0x05C1U,
+ 0x05B9U,
+ 0x05BCU,
+ 0x05BDU,
+ 0x05BFU,
+ 0x05C0U,
+ 0x02BCU,
+ 0x2105U,
+ 0x2113U,
+ 0x2116U,
+ 0x202CU,
+ 0x202DU,
+ 0x202EU,
+ 0x200CU,
+ 0x066DU,
+ 0x02BDU,
+ 0x0A85U,
+ 0x0A05U,
+ 0x3042U,
+ 0x1EA3U,
+ 0x0990U,
+ 0x311EU,
+ 0x0910U,
+ 0x04D5U,
+ 0x0A90U,
+ 0x0A10U,
+ 0x0A48U,
+ 0x0639U,
+ 0xFECAU,
+ 0xFECBU,
+ 0xFECCU,
+ 0x0203U,
+ 0x09C8U,
+ 0x0948U,
+ 0x0AC8U,
+ 0x30A2U,
+ 0xFF71U,
+ 0x314FU,
+ 0x05D0U,
+ 0x0627U,
+ 0xFB30U,
+ 0xFE8EU,
+ 0x0623U,
+ 0xFE84U,
+ 0x0625U,
+ 0xFE88U,
+ 0x05D0U,
+ 0xFB4FU,
+ 0x0622U,
+ 0xFE82U,
+ 0x0649U,
+ 0xFEF0U,
+ 0xFEF3U,
+ 0xFEF4U,
+ 0xFB2EU,
+ 0xFB2FU,
+ 0x2135U,
+ 0x224CU,
+ 0x03B1U,
+ 0x03ACU,
+ 0x0101U,
+ 0xFF41U,
+ 0xFF06U,
+ 0x33C2U,
+ 0x3122U,
+ 0x3124U,
+ 0x0E5AU,
+ 0x2220U,
+ 0x3008U,
+ 0xFE3FU,
+ 0x3009U,
+ 0xFE40U,
+ 0x2329U,
+ 0x232AU,
+ 0x212BU,
+ 0x0387U,
+ 0x0952U,
+ 0x0982U,
+ 0x0902U,
+ 0x0A82U,
+ 0x0105U,
+ 0x3300U,
+ 0x249CU,
+ 0x055AU,
+ 0x02BCU,
+ 0xF8FFU,
+ 0x2250U,
+ 0x2248U,
+ 0x2252U,
+ 0x2245U,
+ 0x318EU,
+ 0x318DU,
+ 0x2312U,
+ 0x1E9AU,
+ 0x01FBU,
+ 0x1E01U,
+ 0x2194U,
+ 0x21E3U,
+ 0x21E0U,
+ 0x21E2U,
+ 0x21E1U,
+ 0x21D4U,
+ 0x21D3U,
+ 0x21D0U,
+ 0x21D2U,
+ 0x21D1U,
+ 0x2193U,
+ 0x2199U,
+ 0x2198U,
+ 0x21E9U,
+ 0x02C5U,
+ 0x02C2U,
+ 0x02C3U,
+ 0x02C4U,
+ 0xF8E7U,
+ 0x2190U,
+ 0x21D0U,
+ 0x21CDU,
+ 0x21C6U,
+ 0x21E6U,
+ 0x2192U,
+ 0x21CFU,
+ 0x279EU,
+ 0x21C4U,
+ 0x21E8U,
+ 0x21E4U,
+ 0x21E5U,
+ 0x2191U,
+ 0x2195U,
+ 0x21A8U,
+ 0x21A8U,
+ 0x2196U,
+ 0x21C5U,
+ 0x2197U,
+ 0x21E7U,
+ 0xF8E6U,
+ 0xFF3EU,
+ 0xFF5EU,
+ 0x0251U,
+ 0x0252U,
+ 0x3041U,
+ 0x30A1U,
+ 0xFF67U,
+ 0x066DU,
+ 0x066DU,
+ 0x2217U,
+ 0xFF0AU,
+ 0xFE61U,
+ 0x2042U,
+ 0x2243U,
+ 0xFF20U,
+ 0xFE6BU,
+ 0x0250U,
+ 0x0994U,
+ 0x3120U,
+ 0x0914U,
+ 0x0A94U,
+ 0x0A14U,
+ 0x09D7U,
+ 0x0A4CU,
+ 0x09CCU,
+ 0x094CU,
+ 0x0ACCU,
+ 0x093DU,
+ 0x0561U,
+ 0x05E2U,
+ 0xFB20U,
+ 0x05E2U,
+ 0x09ACU,
+ 0xFF3CU,
+ 0x092CU,
+ 0x0AACU,
+ 0x0A2CU,
+ 0x3070U,
+ 0x0E3FU,
+ 0x30D0U,
+ 0xFF5CU,
+ 0x3105U,
+ 0x24D1U,
+ 0x1E03U,
+ 0x1E05U,
+ 0x266CU,
+ 0x2235U,
+ 0x0431U,
+ 0x0628U,
+ 0xFE90U,
+ 0xFE91U,
+ 0x3079U,
+ 0xFE92U,
+ 0xFC9FU,
+ 0xFC08U,
+ 0xFC6DU,
+ 0x30D9U,
+ 0x0562U,
+ 0x05D1U,
+ 0x03B2U,
+ 0x03D0U,
+ 0xFB31U,
+ 0xFB31U,
+ 0x05D1U,
+ 0xFB4CU,
+ 0x09ADU,
+ 0x092DU,
+ 0x0AADU,
+ 0x0A2DU,
+ 0x0253U,
+ 0x3073U,
+ 0x30D3U,
+ 0x0298U,
+ 0x0A02U,
+ 0x3331U,
+ 0x25CFU,
+ 0x25C6U,
+ 0x25BCU,
+ 0x25C4U,
+ 0x25C0U,
+ 0x3010U,
+ 0xFE3BU,
+ 0x3011U,
+ 0xFE3CU,
+ 0x25E3U,
+ 0x25E2U,
+ 0x25ACU,
+ 0x25BAU,
+ 0x25B6U,
+ 0x25AAU,
+ 0x263BU,
+ 0x25A0U,
+ 0x2605U,
+ 0x25E4U,
+ 0x25E5U,
+ 0x25B4U,
+ 0x25B2U,
+ 0x2423U,
+ 0x1E07U,
+ 0x2588U,
+ 0xFF42U,
+ 0x0E1AU,
+ 0x307CU,
+ 0x30DCU,
+ 0x249DU,
+ 0x33C3U,
+ 0xF8F4U,
+ 0xF8F3U,
+ 0xF8F2U,
+ 0xFF5BU,
+ 0xFE5BU,
+ 0xF8F1U,
+ 0xFE37U,
+ 0xF8FEU,
+ 0xF8FDU,
+ 0xFF5DU,
+ 0xFE5CU,
+ 0xF8FCU,
+ 0xFE38U,
+ 0xF8F0U,
+ 0xF8EFU,
+ 0xFF3BU,
+ 0xF8EEU,
+ 0xF8FBU,
+ 0xF8FAU,
+ 0xFF3DU,
+ 0xF8F9U,
+ 0x032EU,
+ 0x0306U,
+ 0x032FU,
+ 0x0311U,
+ 0x0361U,
+ 0x032AU,
+ 0x033AU,
+ 0x0180U,
+ 0x0183U,
+ 0x3076U,
+ 0x30D6U,
+ 0x25D8U,
+ 0x2219U,
+ 0x25CEU,
+ 0x056EU,
+ 0x099AU,
+ 0x0107U,
+ 0x091AU,
+ 0x0A9AU,
+ 0x0A1AU,
+ 0x3388U,
+ 0x0981U,
+ 0x0310U,
+ 0x0901U,
+ 0x0A81U,
+ 0x21EAU,
+ 0x2105U,
+ 0x032CU,
+ 0x030CU,
+ 0x21B5U,
+ 0x3118U,
+ 0x010DU,
+ 0x1E09U,
+ 0x24D2U,
+ 0x0109U,
+ 0x0255U,
+ 0x010BU,
+ 0x010BU,
+ 0x33C5U,
+ 0x0327U,
+ 0x2103U,
+ 0xFFE0U,
+ 0x0579U,
+ 0x099BU,
+ 0x091BU,
+ 0x0A9BU,
+ 0x0A1BU,
+ 0x3114U,
+ 0x04BDU,
+ 0x2713U,
+ 0x0447U,
+ 0x04BFU,
+ 0x04B7U,
+ 0x04F5U,
+ 0x0573U,
+ 0x04CCU,
+ 0x04B9U,
+ 0x03C7U,
+ 0x3277U,
+ 0x3217U,
+ 0x3269U,
+ 0x314AU,
+ 0x3209U,
+ 0x0E0AU,
+ 0x0E08U,
+ 0x0E09U,
+ 0x0E0CU,
+ 0x0188U,
+ 0x3276U,
+ 0x3216U,
+ 0x3268U,
+ 0x3148U,
+ 0x3208U,
+ 0x321CU,
+ 0x25CBU,
+ 0x2297U,
+ 0x2299U,
+ 0x2295U,
+ 0x3036U,
+ 0x25D0U,
+ 0x25D1U,
+ 0x032DU,
+ 0x0302U,
+ 0x2327U,
+ 0x01C2U,
+ 0x01C0U,
+ 0x01C1U,
+ 0x01C3U,
+ 0x2663U,
+ 0x2663U,
+ 0x2667U,
+ 0x33A4U,
+ 0xFF43U,
+ 0x33A0U,
+ 0x0581U,
+ 0xFF1AU,
+ 0x20A1U,
+ 0xFE55U,
+ 0x02D1U,
+ 0x02D0U,
+ 0x0313U,
+ 0x0315U,
+ 0xF6C3U,
+ 0x060CU,
+ 0x055DU,
+ 0xFF0CU,
+ 0x0314U,
+ 0x02BDU,
+ 0xFE50U,
+ 0x0312U,
+ 0x02BBU,
+ 0x263CU,
+ 0x2245U,
+ 0x222EU,
+ 0x2303U,
+ 0x0006U,
+ 0x0007U,
+ 0x0008U,
+ 0x0018U,
+ 0x000DU,
+ 0x0011U,
+ 0x0012U,
+ 0x0013U,
+ 0x0014U,
+ 0x007FU,
+ 0x0010U,
+ 0x0019U,
+ 0x0005U,
+ 0x0004U,
+ 0x001BU,
+ 0x0017U,
+ 0x0003U,
+ 0x000CU,
+ 0x001CU,
+ 0x001DU,
+ 0x0009U,
+ 0x000AU,
+ 0x0015U,
+ 0x001EU,
+ 0x000FU,
+ 0x000EU,
+ 0x0002U,
+ 0x0001U,
+ 0x001AU,
+ 0x0016U,
+ 0x001FU,
+ 0x000BU,
+ 0xF8E9U,
+ 0xF6D9U,
+ 0x300CU,
+ 0xFF62U,
+ 0xFE41U,
+ 0x300DU,
+ 0xFF63U,
+ 0xFE42U,
+ 0x337FU,
+ 0x33C7U,
+ 0x33C6U,
+ 0x249EU,
+ 0x20A2U,
+ 0x0297U,
+ 0x22CFU,
+ 0x22CEU,
+ 0xF6D1U,
+ 0xF6D2U,
+ 0xF6D4U,
+ 0xF6D5U,
+ 0x0564U,
+ 0x09A6U,
+ 0x0636U,
+ 0x0926U,
+ 0xFEBEU,
+ 0xFEBFU,
+ 0xFEC0U,
+ 0x05BCU,
+ 0x05BCU,
+ 0x0AA6U,
+ 0x0A26U,
+ 0x3060U,
+ 0x30C0U,
+ 0x062FU,
+ 0x05D3U,
+ 0xFB33U,
+ 0xFB33U,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0x05D3U,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0xFEAAU,
+ 0x064FU,
+ 0x064FU,
+ 0x064CU,
+ 0x064CU,
+ 0x0964U,
+ 0x05A7U,
+ 0x05A7U,
+ 0x0485U,
+ 0xF6D3U,
+ 0x300AU,
+ 0xFE3DU,
+ 0x300BU,
+ 0xFE3EU,
+ 0x032BU,
+ 0x21D4U,
+ 0x21D2U,
+ 0x0965U,
+ 0xF6D6U,
+ 0x030FU,
+ 0x222CU,
+ 0x2017U,
+ 0x0333U,
+ 0x033FU,
+ 0x02BAU,
+ 0x2016U,
+ 0x030EU,
+ 0x3109U,
+ 0x33C8U,
+ 0x010FU,
+ 0x1E11U,
+ 0x24D3U,
+ 0x1E13U,
+ 0x0111U,
+ 0x09A1U,
+ 0x0921U,
+ 0x0AA1U,
+ 0x0A21U,
+ 0x0688U,
+ 0xFB89U,
+ 0x095CU,
+ 0x09A2U,
+ 0x0922U,
+ 0x0AA2U,
+ 0x0A22U,
+ 0x1E0BU,
+ 0x1E0DU,
+ 0x066BU,
+ 0x066BU,
+ 0x0434U,
+ 0x05ADU,
+ 0x3067U,
+ 0x03EFU,
+ 0x30C7U,
+ 0x232BU,
+ 0x2326U,
+ 0x03B4U,
+ 0x018DU,
+ 0x09F8U,
+ 0x02A4U,
+ 0x09A7U,
+ 0x0927U,
+ 0x0AA7U,
+ 0x0A27U,
+ 0x0257U,
+ 0x0385U,
+ 0x0344U,
+ 0x2666U,
+ 0x2662U,
+ 0xF6D7U,
+ 0x0324U,
+ 0x0308U,
+ 0xF6D8U,
+ 0x0385U,
+ 0x3062U,
+ 0x30C2U,
+ 0x3003U,
+ 0x2223U,
+ 0x2215U,
+ 0x0452U,
+ 0x2593U,
+ 0x1E0FU,
+ 0x3397U,
+ 0x0111U,
+ 0xFF44U,
+ 0x2584U,
+ 0x0E0EU,
+ 0x0E14U,
+ 0x3069U,
+ 0x30C9U,
+ 0xFF04U,
+ 0xFE69U,
+ 0x20ABU,
+ 0x3326U,
+ 0x0307U,
+ 0x0323U,
+ 0x0323U,
+ 0x30FBU,
+ 0xF6BEU,
+ 0x0284U,
+ 0x22C5U,
+ 0x25CCU,
+ 0xFB1FU,
+ 0xFB1FU,
+ 0x031EU,
+ 0x02D5U,
+ 0x249FU,
+ 0x0256U,
+ 0x018CU,
+ 0x3065U,
+ 0x30C5U,
+ 0x01F3U,
+ 0x02A3U,
+ 0x01C6U,
+ 0x02A5U,
+ 0x04E1U,
+ 0x0455U,
+ 0x045FU,
+ 0x2641U,
+ 0x098FU,
+ 0x311CU,
+ 0x0115U,
+ 0x090DU,
+ 0x0A8DU,
+ 0x0945U,
+ 0x0AC5U,
+ 0x011BU,
+ 0x1E1DU,
+ 0x0565U,
+ 0x0587U,
+ 0x24D4U,
+ 0x1EBFU,
+ 0x1E19U,
+ 0x1EC7U,
+ 0x1EC1U,
+ 0x1EC3U,
+ 0x1EC5U,
+ 0x0454U,
+ 0x0205U,
+ 0x090FU,
+ 0x0117U,
+ 0x0117U,
+ 0x1EB9U,
+ 0x0A0FU,
+ 0x0A47U,
+ 0x0444U,
+ 0x0A8FU,
+ 0x0567U,
+ 0x311DU,
+ 0x3048U,
+ 0x1EBBU,
+ 0x311FU,
+ 0x0668U,
+ 0x09EEU,
+ 0x2467U,
+ 0x2791U,
+ 0x096EU,
+ 0x2471U,
+ 0x2485U,
+ 0x2499U,
+ 0x0AEEU,
+ 0x0A6EU,
+ 0x0668U,
+ 0x3028U,
+ 0x266BU,
+ 0x3227U,
+ 0xFF18U,
+ 0x247BU,
+ 0x248FU,
+ 0x06F8U,
+ 0x2177U,
+ 0x0E58U,
+ 0x0207U,
+ 0x0465U,
+ 0x30A8U,
+ 0xFF74U,
+ 0x0A74U,
+ 0x3154U,
+ 0x043BU,
+ 0x2208U,
+ 0x246AU,
+ 0x247EU,
+ 0x2492U,
+ 0x217AU,
+ 0x22EEU,
+ 0x0113U,
+ 0x1E17U,
+ 0x1E15U,
+ 0x043CU,
+ 0xFE31U,
+ 0xFF45U,
+ 0x055BU,
+ 0x2205U,
+ 0x3123U,
+ 0x043DU,
+ 0xFE32U,
+ 0x04A3U,
+ 0x014BU,
+ 0x3125U,
+ 0x04A5U,
+ 0x04C8U,
+ 0x2002U,
+ 0x0119U,
+ 0x3153U,
+ 0x025BU,
+ 0x029AU,
+ 0x025CU,
+ 0x025EU,
+ 0x025DU,
+ 0x24A0U,
+ 0x03B5U,
+ 0x03ADU,
+ 0xFF1DU,
+ 0xFE66U,
+ 0x207CU,
+ 0x2261U,
+ 0x3126U,
+ 0x0440U,
+ 0x0258U,
+ 0x044DU,
+ 0x0441U,
+ 0x04ABU,
+ 0x0283U,
+ 0x0286U,
+ 0x090EU,
+ 0x0946U,
+ 0x01AAU,
+ 0x0285U,
+ 0x3047U,
+ 0x30A7U,
+ 0xFF6AU,
+ 0x212EU,
+ 0x03B7U,
+ 0x0568U,
+ 0x03AEU,
+ 0x1EBDU,
+ 0x1E1BU,
+ 0x0591U,
+ 0x0591U,
+ 0x0591U,
+ 0x0591U,
+ 0x01DDU,
+ 0x3161U,
+ 0x20ACU,
+ 0x09C7U,
+ 0x0947U,
+ 0x0AC7U,
+ 0x055CU,
+ 0x203CU,
+ 0xFF01U,
+ 0x2203U,
+ 0x0292U,
+ 0x01EFU,
+ 0x0293U,
+ 0x01B9U,
+ 0x01BAU,
+ 0x095EU,
+ 0x0A5EU,
+ 0x2109U,
+ 0x064EU,
+ 0x064EU,
+ 0x064BU,
+ 0x3108U,
+ 0x24D5U,
+ 0x1E1FU,
+ 0x0641U,
+ 0x0586U,
+ 0xFED2U,
+ 0xFED3U,
+ 0xFED4U,
+ 0x03E5U,
+ 0x2640U,
+ 0x246EU,
+ 0x2482U,
+ 0x2496U,
+ 0x25A0U,
+ 0x25ACU,
+ 0x05DAU,
+ 0xFB3AU,
+ 0xFB3AU,
+ 0x05DAU,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0x05DDU,
+ 0x05DDU,
+ 0x05DFU,
+ 0x05DFU,
+ 0x05E3U,
+ 0x05E3U,
+ 0x05E5U,
+ 0x05E5U,
+ 0x02C9U,
+ 0x25C9U,
+ 0x0473U,
+ 0x0665U,
+ 0x09EBU,
+ 0x2464U,
+ 0x278EU,
+ 0x096BU,
+ 0x0AEBU,
+ 0x0A6BU,
+ 0x0665U,
+ 0x3025U,
+ 0x3224U,
+ 0xFF15U,
+ 0x2478U,
+ 0x248CU,
+ 0x06F5U,
+ 0x2174U,
+ 0x0E55U,
+ 0xFF46U,
+ 0x3399U,
+ 0x0E1FU,
+ 0x0E1DU,
+ 0x0E4FU,
+ 0x2200U,
+ 0x0664U,
+ 0x09EAU,
+ 0x2463U,
+ 0x278DU,
+ 0x096AU,
+ 0x0AEAU,
+ 0x0A6AU,
+ 0x0664U,
+ 0x3024U,
+ 0x3223U,
+ 0xFF14U,
+ 0x09F7U,
+ 0x2477U,
+ 0x248BU,
+ 0x06F4U,
+ 0x2173U,
+ 0x246DU,
+ 0x2481U,
+ 0x2495U,
+ 0x0E54U,
+ 0x02CBU,
+ 0x24A1U,
+ 0x20A3U,
+ 0x0997U,
+ 0x01F5U,
+ 0x0917U,
+ 0x06AFU,
+ 0xFB93U,
+ 0xFB94U,
+ 0xFB95U,
+ 0x0A97U,
+ 0x0A17U,
+ 0x304CU,
+ 0x30ACU,
+ 0x03B3U,
+ 0x0263U,
+ 0x02E0U,
+ 0x03EBU,
+ 0x310DU,
+ 0x011FU,
+ 0x01E7U,
+ 0x0123U,
+ 0x24D6U,
+ 0x011DU,
+ 0x0123U,
+ 0x0121U,
+ 0x0121U,
+ 0x0433U,
+ 0x3052U,
+ 0x30B2U,
+ 0x2251U,
+ 0x059CU,
+ 0x05F3U,
+ 0x059DU,
+ 0x059EU,
+ 0x05F4U,
+ 0x3013U,
+ 0x0998U,
+ 0x0572U,
+ 0x0918U,
+ 0x0A98U,
+ 0x0A18U,
+ 0x063AU,
+ 0xFECEU,
+ 0xFECFU,
+ 0xFED0U,
+ 0x0495U,
+ 0x0493U,
+ 0x0491U,
+ 0x095AU,
+ 0x0A5AU,
+ 0x0260U,
+ 0x3393U,
+ 0x304EU,
+ 0x30AEU,
+ 0x0563U,
+ 0x05D2U,
+ 0xFB32U,
+ 0xFB32U,
+ 0x05D2U,
+ 0x0453U,
+ 0x01BEU,
+ 0x0294U,
+ 0x0296U,
+ 0x02C0U,
+ 0x0295U,
+ 0x02C1U,
+ 0x02E4U,
+ 0x02A1U,
+ 0x02A2U,
+ 0x1E21U,
+ 0xFF47U,
+ 0x3054U,
+ 0x30B4U,
+ 0x24A2U,
+ 0x33ACU,
+ 0x2207U,
+ 0x0316U,
+ 0x0300U,
+ 0x0300U,
+ 0x0953U,
+ 0x02CEU,
+ 0xFF40U,
+ 0x0340U,
+ 0x2265U,
+ 0x22DBU,
+ 0xFF1EU,
+ 0x2273U,
+ 0x2277U,
+ 0x2267U,
+ 0xFE65U,
+ 0x0261U,
+ 0x01E5U,
+ 0x3050U,
+ 0x30B0U,
+ 0x3318U,
+ 0x33C9U,
+ 0x04A9U,
+ 0x06C1U,
+ 0x09B9U,
+ 0x04B3U,
+ 0x0939U,
+ 0x0AB9U,
+ 0x0A39U,
+ 0x062DU,
+ 0xFEA2U,
+ 0xFEA3U,
+ 0x306FU,
+ 0xFEA4U,
+ 0x332AU,
+ 0x30CFU,
+ 0xFF8AU,
+ 0x0A4DU,
+ 0x0621U,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0x0621U,
+ 0,
+ 0,
+ 0,
+ 0x3164U,
+ 0x044AU,
+ 0x21BCU,
+ 0x21C0U,
+ 0x33CAU,
+ 0x05B2U,
+ 0x05B2U,
+ 0x05B2U,
+ 0x05B2U,
+ 0x05B2U,
+ 0x05B2U,
+ 0x05B2U,
+ 0x05B2U,
+ 0x05B3U,
+ 0x05B3U,
+ 0x05B3U,
+ 0x05B3U,
+ 0x05B3U,
+ 0x05B3U,
+ 0x05B3U,
+ 0x05B3U,
+ 0x05B1U,
+ 0x05B1U,
+ 0x05B1U,
+ 0x05B1U,
+ 0x05B1U,
+ 0x05B1U,
+ 0x05B1U,
+ 0x05B1U,
+ 0x0127U,
+ 0x310FU,
+ 0x1E2BU,
+ 0x1E29U,
+ 0x24D7U,
+ 0x0125U,
+ 0x1E27U,
+ 0x1E23U,
+ 0x1E25U,
+ 0x05D4U,
+ 0x2665U,
+ 0x2665U,
+ 0x2661U,
+ 0xFB34U,
+ 0xFB34U,
+ 0x06C1U,
+ 0x0647U,
+ 0x05D4U,
+ 0xFBA7U,
+ 0xFEEAU,
+ 0xFEEAU,
+ 0xFBA5U,
+ 0xFBA4U,
+ 0xFBA8U,
+ 0xFEEBU,
+ 0x3078U,
+ 0xFBA9U,
+ 0xFEECU,
+ 0x337BU,
+ 0x30D8U,
+ 0xFF8DU,
+ 0x3336U,
+ 0x0267U,
+ 0x3339U,
+ 0x05D7U,
+ 0x05D7U,
+ 0x0266U,
+ 0x02B1U,
+ 0x327BU,
+ 0x321BU,
+ 0x326DU,
+ 0x314EU,
+ 0x320DU,
+ 0x3072U,
+ 0x30D2U,
+ 0xFF8BU,
+ 0x05B4U,
+ 0x05B4U,
+ 0x05B4U,
+ 0x05B4U,
+ 0x05B4U,
+ 0x05B4U,
+ 0x05B4U,
+ 0x05B4U,
+ 0x1E96U,
+ 0xFF48U,
+ 0x0570U,
+ 0x0E2BU,
+ 0x307BU,
+ 0x30DBU,
+ 0xFF8EU,
+ 0x05B9U,
+ 0x05B9U,
+ 0x05B9U,
+ 0x05B9U,
+ 0x05B9U,
+ 0x05B9U,
+ 0x05B9U,
+ 0x05B9U,
+ 0x0E2EU,
+ 0x0309U,
+ 0x0309U,
+ 0x0321U,
+ 0x0322U,
+ 0x3342U,
+ 0x03E9U,
+ 0x2015U,
+ 0x031BU,
+ 0x2668U,
+ 0x2302U,
+ 0x24A3U,
+ 0x02B0U,
+ 0x0265U,
+ 0x3075U,
+ 0x3333U,
+ 0x30D5U,
+ 0xFF8CU,
+ 0x030BU,
+ 0x0195U,
+ 0xFF0DU,
+ 0xFE63U,
+ 0x2010U,
+ 0x044FU,
+ 0x0987U,
+ 0x3127U,
+ 0x012DU,
+ 0x01D0U,
+ 0x24D8U,
+ 0x0456U,
+ 0x0209U,
+ 0x328FU,
+ 0x328BU,
+ 0x323FU,
+ 0x323AU,
+ 0x32A5U,
+ 0x3006U,
+ 0x3001U,
+ 0xFF64U,
+ 0x3237U,
+ 0x32A3U,
+ 0x322FU,
+ 0x323DU,
+ 0x329DU,
+ 0x3240U,
+ 0x3296U,
+ 0x3236U,
+ 0x322BU,
+ 0x3232U,
+ 0x32A4U,
+ 0x3005U,
+ 0x3298U,
+ 0x3238U,
+ 0x32A7U,
+ 0x32A6U,
+ 0x32A9U,
+ 0x322EU,
+ 0x322AU,
+ 0x3234U,
+ 0x3002U,
+ 0x329EU,
+ 0x3243U,
+ 0x3239U,
+ 0x323EU,
+ 0x32A8U,
+ 0x3299U,
+ 0x3242U,
+ 0x3233U,
+ 0x3000U,
+ 0x3235U,
+ 0x3231U,
+ 0x323BU,
+ 0x3230U,
+ 0x323CU,
+ 0x322CU,
+ 0x322DU,
+ 0x3007U,
+ 0x328EU,
+ 0x328AU,
+ 0x3294U,
+ 0x3290U,
+ 0x328CU,
+ 0x328DU,
+ 0x0907U,
+ 0x1E2FU,
+ 0x04E5U,
+ 0x1ECBU,
+ 0x04D7U,
+ 0x0435U,
+ 0x3275U,
+ 0x3215U,
+ 0x3267U,
+ 0x3147U,
+ 0x3207U,
+ 0x0A87U,
+ 0x0A07U,
+ 0x3044U,
+ 0x1EC9U,
+ 0x0988U,
+ 0x0438U,
+ 0x0908U,
+ 0x0A88U,
+ 0x0A08U,
+ 0x0A40U,
+ 0x020BU,
+ 0x0439U,
+ 0x09C0U,
+ 0x0940U,
+ 0x0AC0U,
+ 0x0133U,
+ 0x30A4U,
+ 0xFF72U,
+ 0x3163U,
+ 0x02DCU,
+ 0x05ACU,
+ 0x012BU,
+ 0x04E3U,
+ 0x2253U,
+ 0x0A3FU,
+ 0xFF49U,
+ 0x2206U,
+ 0x221EU,
+ 0x056BU,
+ 0x222BU,
+ 0x2321U,
+ 0x2321U,
+ 0xF8F5U,
+ 0x2320U,
+ 0x2320U,
+ 0x2229U,
+ 0x3305U,
+ 0x25D8U,
+ 0x25D9U,
+ 0x263BU,
+ 0x0451U,
+ 0x012FU,
+ 0x03B9U,
+ 0x03CAU,
+ 0x0390U,
+ 0x0269U,
+ 0x03AFU,
+ 0x24A4U,
+ 0x0A72U,
+ 0x3043U,
+ 0x30A3U,
+ 0xFF68U,
+ 0x09FAU,
+ 0x0268U,
+ 0x309DU,
+ 0x30FDU,
+ 0x0129U,
+ 0x1E2DU,
+ 0x3129U,
+ 0x044EU,
+ 0x09BFU,
+ 0x093FU,
+ 0x0ABFU,
+ 0x0475U,
+ 0x0477U,
+ 0x0571U,
+ 0x099CU,
+ 0x091CU,
+ 0x0A9CU,
+ 0x0A1CU,
+ 0x3110U,
+ 0x01F0U,
+ 0x24D9U,
+ 0x0135U,
+ 0x029DU,
+ 0x025FU,
+ 0x0458U,
+ 0x062CU,
+ 0xFE9EU,
+ 0xFE9FU,
+ 0xFEA0U,
+ 0x0698U,
+ 0xFB8BU,
+ 0x099DU,
+ 0x091DU,
+ 0x0A9DU,
+ 0x0A1DU,
+ 0x057BU,
+ 0x3004U,
+ 0xFF4AU,
+ 0x24A5U,
+ 0x02B2U,
+ 0x04A1U,
+ 0x0995U,
+ 0x1E31U,
+ 0x043AU,
+ 0x049BU,
+ 0x0915U,
+ 0x05DBU,
+ 0x0643U,
+ 0xFB3BU,
+ 0xFB3BU,
+ 0xFEDAU,
+ 0x05DBU,
+ 0xFEDBU,
+ 0xFEDCU,
+ 0xFB4DU,
+ 0x0A95U,
+ 0x0A15U,
+ 0x304BU,
+ 0x04C4U,
+ 0x30ABU,
+ 0xFF76U,
+ 0x03BAU,
+ 0x03F0U,
+ 0x3171U,
+ 0x3184U,
+ 0x3178U,
+ 0x3179U,
+ 0x330DU,
+ 0x0640U,
+ 0x0640U,
+ 0x30F5U,
+ 0x3384U,
+ 0x0650U,
+ 0x064DU,
+ 0x049FU,
+ 0xFF70U,
+ 0x049DU,
+ 0x310EU,
+ 0x3389U,
+ 0x01E9U,
+ 0x0137U,
+ 0x24DAU,
+ 0x0137U,
+ 0x1E33U,
+ 0x0584U,
+ 0x3051U,
+ 0x30B1U,
+ 0xFF79U,
+ 0x056FU,
+ 0x30F6U,
+ 0x0138U,
+ 0x0996U,
+ 0x0445U,
+ 0x0916U,
+ 0x0A96U,
+ 0x0A16U,
+ 0x062EU,
+ 0xFEA6U,
+ 0xFEA7U,
+ 0xFEA8U,
+ 0x03E7U,
+ 0x0959U,
+ 0x0A59U,
+ 0x3278U,
+ 0x3218U,
+ 0x326AU,
+ 0x314BU,
+ 0x320AU,
+ 0x0E02U,
+ 0x0E05U,
+ 0x0E03U,
+ 0x0E04U,
+ 0x0E5BU,
+ 0x0199U,
+ 0x0E06U,
+ 0x3391U,
+ 0x304DU,
+ 0x30ADU,
+ 0xFF77U,
+ 0x3315U,
+ 0x3316U,
+ 0x3314U,
+ 0x326EU,
+ 0x320EU,
+ 0x3260U,
+ 0x3131U,
+ 0x3200U,
+ 0x3133U,
+ 0x045CU,
+ 0x1E35U,
+ 0x3398U,
+ 0x33A6U,
+ 0xFF4BU,
+ 0x33A2U,
+ 0x3053U,
+ 0x33C0U,
+ 0x0E01U,
+ 0x30B3U,
+ 0xFF7AU,
+ 0x331EU,
+ 0x0481U,
+ 0x327FU,
+ 0x0343U,
+ 0x24A6U,
+ 0x33AAU,
+ 0x046FU,
+ 0x33CFU,
+ 0x029EU,
+ 0x304FU,
+ 0x30AFU,
+ 0xFF78U,
+ 0x33B8U,
+ 0x33BEU,
+ 0x09B2U,
+ 0x013AU,
+ 0x0932U,
+ 0x0AB2U,
+ 0x0A32U,
+ 0x0E45U,
+ 0xFEFCU,
+ 0xFEF8U,
+ 0xFEF7U,
+ 0xFEFAU,
+ 0xFEF9U,
+ 0xFEFBU,
+ 0xFEF6U,
+ 0xFEF5U,
+ 0x0644U,
+ 0x03BBU,
+ 0x019BU,
+ 0x05DCU,
+ 0xFB3CU,
+ 0xFB3CU,
+ 0x05DCU,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0xFEDEU,
+ 0xFCCAU,
+ 0xFEDFU,
+ 0xFCC9U,
+ 0xFCCBU,
+ 0xFDF2U,
+ 0xFEE0U,
+ 0xFD88U,
+ 0xFCCCU,
+ 0,
+ 0,
+ 0x25EFU,
+ 0x019AU,
+ 0x026CU,
+ 0x310CU,
+ 0x013EU,
+ 0x013CU,
+ 0x24DBU,
+ 0x1E3DU,
+ 0x013CU,
+ 0x0140U,
+ 0x0140U,
+ 0x1E37U,
+ 0x1E39U,
+ 0x031AU,
+ 0x0318U,
+ 0x2264U,
+ 0x22DAU,
+ 0xFF1CU,
+ 0x2272U,
+ 0x2276U,
+ 0x2266U,
+ 0xFE64U,
+ 0x026EU,
+ 0x258CU,
+ 0x026DU,
+ 0x20A4U,
+ 0x056CU,
+ 0x01C9U,
+ 0x0459U,
+ 0xF6C0U,
+ 0x0933U,
+ 0x0AB3U,
+ 0x1E3BU,
+ 0x0934U,
+ 0x09E1U,
+ 0x0961U,
+ 0x09E3U,
+ 0x0963U,
+ 0x026BU,
+ 0xFF4CU,
+ 0x33D0U,
+ 0x0E2CU,
+ 0x2227U,
+ 0x2310U,
+ 0x2228U,
+ 0x0E25U,
+ 0x017FU,
+ 0xFE4EU,
+ 0x0332U,
+ 0xFE4DU,
+ 0x25CAU,
+ 0x24A7U,
+ 0x2113U,
+ 0x2591U,
+ 0x0E26U,
+ 0x098CU,
+ 0x090CU,
+ 0x09E2U,
+ 0x0962U,
+ 0x33D3U,
+ 0x09AEU,
+ 0x0331U,
+ 0x0304U,
+ 0x02CDU,
+ 0xFFE3U,
+ 0x1E3FU,
+ 0x092EU,
+ 0x0AAEU,
+ 0x0A2EU,
+ 0x05A4U,
+ 0x05A4U,
+ 0x307EU,
+ 0xF895U,
+ 0xF894U,
+ 0x0E4BU,
+ 0xF893U,
+ 0xF88CU,
+ 0xF88BU,
+ 0x0E48U,
+ 0xF88AU,
+ 0xF884U,
+ 0x0E31U,
+ 0xF889U,
+ 0x0E47U,
+ 0xF88FU,
+ 0xF88EU,
+ 0x0E49U,
+ 0xF88DU,
+ 0xF892U,
+ 0xF891U,
+ 0x0E4AU,
+ 0xF890U,
+ 0x0E46U,
+ 0x30DEU,
+ 0xFF8FU,
+ 0x2642U,
+ 0x3347U,
+ 0x05BEU,
+ 0x2642U,
+ 0x05AFU,
+ 0x3383U,
+ 0x3107U,
+ 0x33D4U,
+ 0x24DCU,
+ 0x33A5U,
+ 0x1E41U,
+ 0x1E43U,
+ 0x0645U,
+ 0xFEE2U,
+ 0xFEE3U,
+ 0xFEE4U,
+ 0xFCD1U,
+ 0xFC48U,
+ 0x334DU,
+ 0x3081U,
+ 0x337EU,
+ 0x30E1U,
+ 0xFF92U,
+ 0x05DEU,
+ 0xFB3EU,
+ 0xFB3EU,
+ 0x05DEU,
+ 0x0574U,
+ 0x05A5U,
+ 0x05A6U,
+ 0x05A6U,
+ 0x05A5U,
+ 0x0271U,
+ 0x3392U,
+ 0xFF65U,
+ 0x00B7U,
+ 0x3272U,
+ 0x3212U,
+ 0x3264U,
+ 0x3141U,
+ 0x3170U,
+ 0x3204U,
+ 0x316EU,
+ 0x316FU,
+ 0x307FU,
+ 0x30DFU,
+ 0xFF90U,
+ 0x0320U,
+ 0x2296U,
+ 0x02D7U,
+ 0x2213U,
+ 0x2032U,
+ 0x334AU,
+ 0x3349U,
+ 0x0270U,
+ 0x3396U,
+ 0x33A3U,
+ 0xFF4DU,
+ 0x339FU,
+ 0x3082U,
+ 0x33C1U,
+ 0x30E2U,
+ 0xFF93U,
+ 0x33D6U,
+ 0x0E21U,
+ 0x33A7U,
+ 0x33A8U,
+ 0x24A8U,
+ 0x33ABU,
+ 0x33B3U,
+ 0x026FU,
+ 0x00B5U,
+ 0x3382U,
+ 0x226BU,
+ 0x226AU,
+ 0x338CU,
+ 0x03BCU,
+ 0x338DU,
+ 0x3080U,
+ 0x30E0U,
+ 0xFF91U,
+ 0x3395U,
+ 0x339BU,
+ 0x05A3U,
+ 0x05A3U,
+ 0x266AU,
+ 0x266BU,
+ 0x266DU,
+ 0x266FU,
+ 0x33B2U,
+ 0x33B6U,
+ 0x33BCU,
+ 0x33B9U,
+ 0x33B7U,
+ 0x33BFU,
+ 0x33BDU,
+ 0x09A8U,
+ 0x2207U,
+ 0x0144U,
+ 0x0928U,
+ 0x0AA8U,
+ 0x0A28U,
+ 0x306AU,
+ 0x30CAU,
+ 0xFF85U,
+ 0x0149U,
+ 0x3381U,
+ 0x310BU,
+ 0x00A0U,
+ 0x0148U,
+ 0x0146U,
+ 0x24DDU,
+ 0x1E4BU,
+ 0x0146U,
+ 0x1E45U,
+ 0x1E47U,
+ 0x306DU,
+ 0x30CDU,
+ 0xFF88U,
+ 0x20AAU,
+ 0x338BU,
+ 0x0999U,
+ 0x0919U,
+ 0x0A99U,
+ 0x0A19U,
+ 0x0E07U,
+ 0x3093U,
+ 0x0272U,
+ 0x0273U,
+ 0x326FU,
+ 0x320FU,
+ 0x3135U,
+ 0x3261U,
+ 0x3136U,
+ 0x3134U,
+ 0x3168U,
+ 0x3201U,
+ 0x3167U,
+ 0x3166U,
+ 0x306BU,
+ 0x30CBU,
+ 0xFF86U,
+ 0xF899U,
+ 0x0E4DU,
+ 0x0669U,
+ 0x09EFU,
+ 0x2468U,
+ 0x2792U,
+ 0x096FU,
+ 0x0AEFU,
+ 0x0A6FU,
+ 0x0669U,
+ 0x3029U,
+ 0x3228U,
+ 0xFF19U,
+ 0x247CU,
+ 0x2490U,
+ 0x06F9U,
+ 0x2178U,
+ 0x2472U,
+ 0x2486U,
+ 0x249AU,
+ 0x0E59U,
+ 0x01CCU,
+ 0x045AU,
+ 0x30F3U,
+ 0xFF9DU,
+ 0x019EU,
+ 0x1E49U,
+ 0xFF4EU,
+ 0x339AU,
+ 0x09A3U,
+ 0x0923U,
+ 0x0AA3U,
+ 0x0A23U,
+ 0x0929U,
+ 0x306EU,
+ 0x30CEU,
+ 0xFF89U,
+ 0x00A0U,
+ 0x0E13U,
+ 0x0E19U,
+ 0x0646U,
+ 0xFEE6U,
+ 0x06BAU,
+ 0xFB9FU,
+ 0,
+ 0xFEE7U,
+ 0xFCD2U,
+ 0xFC4BU,
+ 0xFEE8U,
+ 0xFCD5U,
+ 0xFC4EU,
+ 0xFC8DU,
+ 0x220CU,
+ 0x2209U,
+ 0x2209U,
+ 0x2260U,
+ 0x226FU,
+ 0x2271U,
+ 0x2279U,
+ 0x2262U,
+ 0x226EU,
+ 0x2270U,
+ 0x2226U,
+ 0x2280U,
+ 0x2284U,
+ 0x2281U,
+ 0x2285U,
+ 0x0576U,
+ 0x24A9U,
+ 0x33B1U,
+ 0x03BDU,
+ 0x306CU,
+ 0x30CCU,
+ 0xFF87U,
+ 0x09BCU,
+ 0x093CU,
+ 0x0ABCU,
+ 0x0A3CU,
+ 0xFF03U,
+ 0xFE5FU,
+ 0x0374U,
+ 0x0375U,
+ 0x2116U,
+ 0x05E0U,
+ 0xFB40U,
+ 0xFB40U,
+ 0x05E0U,
+ 0x33B5U,
+ 0x33BBU,
+ 0x099EU,
+ 0x091EU,
+ 0x0A9EU,
+ 0x0A1EU,
+ 0x0E2DU,
+ 0x0275U,
+ 0x04E9U,
+ 0x04EBU,
+ 0x0993U,
+ 0x311BU,
+ 0x014FU,
+ 0x0911U,
+ 0x0A91U,
+ 0x0949U,
+ 0x0AC9U,
+ 0x01D2U,
+ 0x24DEU,
+ 0x1ED1U,
+ 0x1ED9U,
+ 0x1ED3U,
+ 0x1ED5U,
+ 0x1ED7U,
+ 0x043EU,
+ 0x0151U,
+ 0x020DU,
+ 0x0913U,
+ 0x04E7U,
+ 0x1ECDU,
+ 0x315AU,
+ 0x0328U,
+ 0x0A93U,
+ 0x0585U,
+ 0x304AU,
+ 0x1ECFU,
+ 0x01A1U,
+ 0x1EDBU,
+ 0x1EE3U,
+ 0x1EDDU,
+ 0x1EDFU,
+ 0x1EE1U,
+ 0x0151U,
+ 0x01A3U,
+ 0x020FU,
+ 0x30AAU,
+ 0xFF75U,
+ 0x3157U,
+ 0x05ABU,
+ 0x014DU,
+ 0x1E53U,
+ 0x1E51U,
+ 0x0950U,
+ 0x03C9U,
+ 0x03D6U,
+ 0x0461U,
+ 0x0277U,
+ 0x047BU,
+ 0x047DU,
+ 0x03CEU,
+ 0x0AD0U,
+ 0x03BFU,
+ 0x03CCU,
+ 0xFF4FU,
+ 0x0661U,
+ 0x09E7U,
+ 0x2460U,
+ 0x278AU,
+ 0x0967U,
+ 0x0AE7U,
+ 0x0A67U,
+ 0x0661U,
+ 0x3021U,
+ 0x3220U,
+ 0xFF11U,
+ 0x09F4U,
+ 0x2474U,
+ 0x2488U,
+ 0x06F1U,
+ 0x2170U,
+ 0x0E51U,
+ 0x01EBU,
+ 0x01EDU,
+ 0x0A13U,
+ 0x0A4BU,
+ 0x0254U,
+ 0x24AAU,
+ 0x25E6U,
+ 0x2325U,
+ 0x221FU,
+ 0x0912U,
+ 0x094AU,
+ 0x01FFU,
+ 0x3049U,
+ 0x30A9U,
+ 0xFF6BU,
+ 0x01FFU,
+ 0x047FU,
+ 0x1E4DU,
+ 0x1E4FU,
+ 0x3121U,
+ 0x203EU,
+ 0xFE4AU,
+ 0x0305U,
+ 0xFE49U,
+ 0xFE4CU,
+ 0xFE4BU,
+ 0x00AFU,
+ 0x09CBU,
+ 0x094BU,
+ 0x0ACBU,
+ 0x3380U,
+ 0x332BU,
+ 0x09AAU,
+ 0x1E55U,
+ 0x092AU,
+ 0x21DFU,
+ 0x21DEU,
+ 0x0AAAU,
+ 0x0A2AU,
+ 0x3071U,
+ 0x0E2FU,
+ 0x30D1U,
+ 0x0484U,
+ 0x04C0U,
+ 0x317FU,
+ 0x2225U,
+ 0xFD3EU,
+ 0xF8EDU,
+ 0xF8ECU,
+ 0xFF08U,
+ 0xFE59U,
+ 0xF8EBU,
+ 0xFE35U,
+ 0xFD3FU,
+ 0xF8F8U,
+ 0xF8F7U,
+ 0xFF09U,
+ 0xFE5AU,
+ 0xF8F6U,
+ 0xFE36U,
+ 0x2202U,
+ 0x05C0U,
+ 0x0599U,
+ 0x33A9U,
+ 0x05B7U,
+ 0x05B7U,
+ 0x05B7U,
+ 0x05B7U,
+ 0x05B7U,
+ 0x05B7U,
+ 0x05B7U,
+ 0x05B7U,
+ 0x05A1U,
+ 0x3106U,
+ 0x24DFU,
+ 0x1E57U,
+ 0x05E4U,
+ 0x043FU,
+ 0xFB44U,
+ 0xFB44U,
+ 0x333BU,
+ 0xFB43U,
+ 0x067EU,
+ 0x057AU,
+ 0x05E4U,
+ 0xFB57U,
+ 0xFB58U,
+ 0x307AU,
+ 0xFB59U,
+ 0x30DAU,
+ 0x04A7U,
+ 0xFB4EU,
+ 0x066AU,
+ 0xFF05U,
+ 0xFE6AU,
+ 0x0589U,
+ 0xFF61U,
+ 0xFF0EU,
+ 0xFE52U,
+ 0x0342U,
+ 0x22A5U,
+ 0x20A7U,
+ 0x338AU,
+ 0x09ABU,
+ 0x092BU,
+ 0x0AABU,
+ 0x0A2BU,
+ 0x03C6U,
+ 0x03D5U,
+ 0x327AU,
+ 0x321AU,
+ 0x326CU,
+ 0x314DU,
+ 0x320CU,
+ 0x0278U,
+ 0x0E3AU,
+ 0x03D5U,
+ 0x01A5U,
+ 0x0E1EU,
+ 0x0E1CU,
+ 0x0E20U,
+ 0x03C0U,
+ 0x3273U,
+ 0x3213U,
+ 0x3176U,
+ 0x3265U,
+ 0x3172U,
+ 0x3142U,
+ 0x3205U,
+ 0x3174U,
+ 0x3144U,
+ 0x3175U,
+ 0x3177U,
+ 0x3173U,
+ 0x3074U,
+ 0x30D4U,
+ 0x03D6U,
+ 0x0583U,
+ 0x031FU,
+ 0x2295U,
+ 0x02D6U,
+ 0xFF0BU,
+ 0xFE62U,
+ 0x207AU,
+ 0xFF50U,
+ 0x33D8U,
+ 0x307DU,
+ 0x261FU,
+ 0x261CU,
+ 0x261EU,
+ 0x261DU,
+ 0x30DDU,
+ 0x0E1BU,
+ 0x3012U,
+ 0x3020U,
+ 0x24ABU,
+ 0x227AU,
+ 0x211EU,
+ 0x02B9U,
+ 0x2035U,
+ 0x220FU,
+ 0x2305U,
+ 0x30FCU,
+ 0x2318U,
+ 0x2282U,
+ 0x2283U,
+ 0x2237U,
+ 0x221DU,
+ 0x03C8U,
+ 0x0471U,
+ 0x0486U,
+ 0x33B0U,
+ 0x3077U,
+ 0x30D7U,
+ 0x33B4U,
+ 0x33BAU,
+ 0x0958U,
+ 0x05A8U,
+ 0x0642U,
+ 0xFED6U,
+ 0xFED7U,
+ 0xFED8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x05B8U,
+ 0x059FU,
+ 0x3111U,
+ 0x24E0U,
+ 0x02A0U,
+ 0xFF51U,
+ 0x05E7U,
+ 0xFB47U,
+ 0xFB47U,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0x05E7U,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0x24ACU,
+ 0x2669U,
+ 0x05BBU,
+ 0x05BBU,
+ 0x05BBU,
+ 0x05BBU,
+ 0x05BBU,
+ 0x05BBU,
+ 0x05BBU,
+ 0x05BBU,
+ 0x061FU,
+ 0x055EU,
+ 0x037EU,
+ 0xFF1FU,
+ 0xFF02U,
+ 0x301EU,
+ 0x301DU,
+ 0x201BU,
+ 0x201BU,
+ 0x0149U,
+ 0xFF07U,
+ 0x057CU,
+ 0x09B0U,
+ 0x0155U,
+ 0x0930U,
+ 0x221AU,
+ 0xF8E5U,
+ 0x33AEU,
+ 0x33AFU,
+ 0x33ADU,
+ 0x05BFU,
+ 0x05BFU,
+ 0x0AB0U,
+ 0x0A30U,
+ 0x3089U,
+ 0x30E9U,
+ 0xFF97U,
+ 0x09F1U,
+ 0x09F0U,
+ 0x0264U,
+ 0x2236U,
+ 0x3116U,
+ 0x0159U,
+ 0x0157U,
+ 0x24E1U,
+ 0x0157U,
+ 0x0211U,
+ 0x1E59U,
+ 0x1E5BU,
+ 0x1E5DU,
+ 0x203BU,
+ 0x2286U,
+ 0x2287U,
+ 0xF8E8U,
+ 0xF6DAU,
+ 0x0631U,
+ 0x0580U,
+ 0xFEAEU,
+ 0x308CU,
+ 0,
+ 0x30ECU,
+ 0xFF9AU,
+ 0x05E8U,
+ 0xFB48U,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0x05E8U,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0x223DU,
+ 0x0597U,
+ 0x0597U,
+ 0x2310U,
+ 0x027EU,
+ 0x027FU,
+ 0x09DDU,
+ 0x095DU,
+ 0x03C1U,
+ 0x027DU,
+ 0x027BU,
+ 0x02B5U,
+ 0x03F1U,
+ 0x02DEU,
+ 0x3271U,
+ 0x3211U,
+ 0x3263U,
+ 0x3140U,
+ 0x313AU,
+ 0x3169U,
+ 0x3139U,
+ 0x313BU,
+ 0x316CU,
+ 0x3203U,
+ 0x313FU,
+ 0x313CU,
+ 0x316BU,
+ 0x313DU,
+ 0x313EU,
+ 0x316AU,
+ 0x316DU,
+ 0x221FU,
+ 0x0319U,
+ 0x22BFU,
+ 0x308AU,
+ 0x30EAU,
+ 0xFF98U,
+ 0x0325U,
+ 0x030AU,
+ 0x02BFU,
+ 0x0559U,
+ 0x031CU,
+ 0x02D3U,
+ 0x02BEU,
+ 0x0339U,
+ 0x02D2U,
+ 0x0213U,
+ 0x3351U,
+ 0x1E5FU,
+ 0x027CU,
+ 0x027AU,
+ 0xFF52U,
+ 0x308DU,
+ 0x30EDU,
+ 0xFF9BU,
+ 0x0E23U,
+ 0x24ADU,
+ 0x09DCU,
+ 0x0931U,
+ 0x0A5CU,
+ 0x0691U,
+ 0xFB8DU,
+ 0x09E0U,
+ 0x0960U,
+ 0x0AE0U,
+ 0x09C4U,
+ 0x0944U,
+ 0x0AC4U,
+ 0x2590U,
+ 0x0279U,
+ 0x02B4U,
+ 0x308BU,
+ 0x30EBU,
+ 0xFF99U,
+ 0x09F2U,
+ 0x09F3U,
+ 0x0E24U,
+ 0x098BU,
+ 0x090BU,
+ 0x0A8BU,
+ 0x09C3U,
+ 0x0943U,
+ 0x0AC3U,
+ 0x09B8U,
+ 0x015BU,
+ 0x1E65U,
+ 0x0635U,
+ 0x0938U,
+ 0xFEBAU,
+ 0xFEBBU,
+ 0xFEBCU,
+ 0x0AB8U,
+ 0x0A38U,
+ 0x3055U,
+ 0x30B5U,
+ 0xFF7BU,
+ 0xFDFAU,
+ 0x05E1U,
+ 0xFB41U,
+ 0xFB41U,
+ 0x05E1U,
+ 0x0E32U,
+ 0x0E41U,
+ 0x0E44U,
+ 0x0E43U,
+ 0x0E33U,
+ 0x0E30U,
+ 0x0E40U,
+ 0xF886U,
+ 0x0E35U,
+ 0xF885U,
+ 0x0E34U,
+ 0x0E42U,
+ 0xF888U,
+ 0x0E37U,
+ 0xF887U,
+ 0x0E36U,
+ 0x0E38U,
+ 0x0E39U,
+ 0x3119U,
+ 0x1E67U,
+ 0x015FU,
+ 0x0259U,
+ 0x04D9U,
+ 0x04DBU,
+ 0x025AU,
+ 0x24E2U,
+ 0x015DU,
+ 0x0219U,
+ 0x1E61U,
+ 0x1E63U,
+ 0x1E69U,
+ 0x033CU,
+ 0x2033U,
+ 0x02CAU,
+ 0x0633U,
+ 0xFEB2U,
+ 0xFEB3U,
+ 0xFEB4U,
+ 0x05B6U,
+ 0x05B6U,
+ 0x05B6U,
+ 0x05B6U,
+ 0x05B6U,
+ 0x05B6U,
+ 0x05B6U,
+ 0x0592U,
+ 0x05B6U,
+ 0x057DU,
+ 0x305BU,
+ 0x30BBU,
+ 0xFF7EU,
+ 0x061BU,
+ 0xFF1BU,
+ 0xFE54U,
+ 0x309CU,
+ 0xFF9FU,
+ 0x3322U,
+ 0x3323U,
+ 0x0667U,
+ 0x09EDU,
+ 0x2466U,
+ 0x2790U,
+ 0x096DU,
+ 0x0AEDU,
+ 0x0A6DU,
+ 0x0667U,
+ 0x3027U,
+ 0x3226U,
+ 0xFF17U,
+ 0x247AU,
+ 0x248EU,
+ 0x06F7U,
+ 0x2176U,
+ 0x2470U,
+ 0x2484U,
+ 0x2498U,
+ 0x0E57U,
+ 0x00ADU,
+ 0x0577U,
+ 0x09B6U,
+ 0x0448U,
+ 0x0651U,
+ 0xFC61U,
+ 0xFC5EU,
+ 0xFC60U,
+ 0,
+ 0xFC62U,
+ 0xFC5FU,
+ 0x2592U,
+ 0x2593U,
+ 0x2591U,
+ 0x2592U,
+ 0x0936U,
+ 0x0AB6U,
+ 0x0A36U,
+ 0x0593U,
+ 0x3115U,
+ 0x0449U,
+ 0x0634U,
+ 0xFEB6U,
+ 0xFEB7U,
+ 0xFEB8U,
+ 0x03E3U,
+ 0x20AAU,
+ 0x20AAU,
+ 0x05B0U,
+ 0x05B0U,
+ 0x05B0U,
+ 0x05B0U,
+ 0x05B0U,
+ 0x05B0U,
+ 0x05B0U,
+ 0x05B0U,
+ 0x05B0U,
+ 0x04BBU,
+ 0x03EDU,
+ 0x05E9U,
+ 0xFB49U,
+ 0xFB49U,
+ 0xFB2CU,
+ 0xFB2CU,
+ 0xFB2DU,
+ 0xFB2DU,
+ 0x05C1U,
+ 0x05E9U,
+ 0xFB2AU,
+ 0xFB2AU,
+ 0xFB2BU,
+ 0xFB2BU,
+ 0x0282U,
+ 0x03C3U,
+ 0x03C2U,
+ 0x03C2U,
+ 0x03F2U,
+ 0x3057U,
+ 0x30B7U,
+ 0xFF7CU,
+ 0x05BDU,
+ 0x05BDU,
+ 0x223CU,
+ 0x05C2U,
+ 0x3274U,
+ 0x3214U,
+ 0x317EU,
+ 0x3266U,
+ 0x317AU,
+ 0x3145U,
+ 0x317BU,
+ 0x3206U,
+ 0x317DU,
+ 0x317CU,
+ 0x0666U,
+ 0x09ECU,
+ 0x2465U,
+ 0x278FU,
+ 0x096CU,
+ 0x0AECU,
+ 0x0A6CU,
+ 0x0666U,
+ 0x3026U,
+ 0x3225U,
+ 0xFF16U,
+ 0x2479U,
+ 0x248DU,
+ 0x06F6U,
+ 0x2175U,
+ 0x246FU,
+ 0x09F9U,
+ 0x2483U,
+ 0x2497U,
+ 0x0E56U,
+ 0xFF0FU,
+ 0x017FU,
+ 0x1E9BU,
+ 0x263AU,
+ 0xFF53U,
+ 0x05C3U,
+ 0x00ADU,
+ 0x044CU,
+ 0x305DU,
+ 0x30BDU,
+ 0xFF7FU,
+ 0x0338U,
+ 0x0337U,
+ 0x0E29U,
+ 0x0E28U,
+ 0x0E0BU,
+ 0x0E2AU,
+ 0x0020U,
+ 0x2660U,
+ 0x2660U,
+ 0x2664U,
+ 0x24AEU,
+ 0x033BU,
+ 0x33C4U,
+ 0x339DU,
+ 0x25A9U,
+ 0x25A4U,
+ 0x338FU,
+ 0x339EU,
+ 0x33CEU,
+ 0x33D1U,
+ 0x33D2U,
+ 0x338EU,
+ 0x33D5U,
+ 0x339CU,
+ 0x33A1U,
+ 0x25A6U,
+ 0x25A7U,
+ 0x25A8U,
+ 0x25A5U,
+ 0x25A3U,
+ 0x33DBU,
+ 0x09B7U,
+ 0x0937U,
+ 0x0AB7U,
+ 0x3149U,
+ 0x3185U,
+ 0x3180U,
+ 0x3132U,
+ 0x3165U,
+ 0x3143U,
+ 0x3146U,
+ 0x3138U,
+ 0xFFE1U,
+ 0x0336U,
+ 0x0335U,
+ 0x2282U,
+ 0x228AU,
+ 0x2286U,
+ 0x227BU,
+ 0x220BU,
+ 0x3059U,
+ 0x30B9U,
+ 0xFF7DU,
+ 0x0652U,
+ 0x2211U,
+ 0x263CU,
+ 0x2283U,
+ 0x228BU,
+ 0x2287U,
+ 0x33DCU,
+ 0x337CU,
+ 0x09A4U,
+ 0x22A4U,
+ 0x22A3U,
+ 0x0924U,
+ 0x0AA4U,
+ 0x0A24U,
+ 0x0637U,
+ 0xFEC2U,
+ 0xFEC3U,
+ 0x305FU,
+ 0xFEC4U,
+ 0x337DU,
+ 0x30BFU,
+ 0xFF80U,
+ 0x0640U,
+ 0x03C4U,
+ 0x05EAU,
+ 0xFB4AU,
+ 0xFB4AU,
+ 0xFB4AU,
+ 0x05EAU,
+ 0x0167U,
+ 0x310AU,
+ 0x0165U,
+ 0x02A8U,
+ 0x0163U,
+ 0x0686U,
+ 0xFB7BU,
+ 0xFB7CU,
+ 0xFB7DU,
+ 0,
+ 0x24E3U,
+ 0x1E71U,
+ 0x0163U,
+ 0x1E97U,
+ 0x1E6BU,
+ 0x1E6DU,
+ 0x0442U,
+ 0x04ADU,
+ 0x062AU,
+ 0xFE96U,
+ 0xFCA2U,
+ 0xFC0CU,
+ 0xFE97U,
+ 0x3066U,
+ 0xFCA1U,
+ 0xFC0BU,
+ 0x0629U,
+ 0xFE94U,
+ 0xFE98U,
+ 0xFCA4U,
+ 0xFC0EU,
+ 0xFC73U,
+ 0x30C6U,
+ 0xFF83U,
+ 0x2121U,
+ 0x260EU,
+ 0x05A0U,
+ 0x05A9U,
+ 0x2469U,
+ 0x3229U,
+ 0x247DU,
+ 0x2491U,
+ 0x2179U,
+ 0x02A7U,
+ 0x05D8U,
+ 0xFB38U,
+ 0xFB38U,
+ 0x05D8U,
+ 0x04B5U,
+ 0x059BU,
+ 0x059BU,
+ 0x09A5U,
+ 0x0925U,
+ 0x0AA5U,
+ 0x0A25U,
+ 0x0630U,
+ 0xFEACU,
+ 0xF898U,
+ 0xF897U,
+ 0x0E4CU,
+ 0xF896U,
+ 0x062BU,
+ 0xFE9AU,
+ 0xFE9BU,
+ 0xFE9CU,
+ 0x2203U,
+ 0x2234U,
+ 0x03B8U,
+ 0x03D1U,
+ 0x03D1U,
+ 0x3279U,
+ 0x3219U,
+ 0x326BU,
+ 0x314CU,
+ 0x320BU,
+ 0x246CU,
+ 0x2480U,
+ 0x2494U,
+ 0x0E11U,
+ 0x01ADU,
+ 0x0E12U,
+ 0x0E17U,
+ 0x0E10U,
+ 0x0E18U,
+ 0x0E16U,
+ 0x0482U,
+ 0x066CU,
+ 0x066CU,
+ 0x0663U,
+ 0x09E9U,
+ 0x2462U,
+ 0x278CU,
+ 0x0969U,
+ 0x0AE9U,
+ 0x0A69U,
+ 0x0663U,
+ 0x3023U,
+ 0x3222U,
+ 0xFF13U,
+ 0x09F6U,
+ 0x2476U,
+ 0x248AU,
+ 0x06F3U,
+ 0x2172U,
+ 0x0E53U,
+ 0x3394U,
+ 0x3061U,
+ 0x30C1U,
+ 0xFF81U,
+ 0x3270U,
+ 0x3210U,
+ 0x3262U,
+ 0x3137U,
+ 0x3202U,
+ 0x0330U,
+ 0x0303U,
+ 0x0303U,
+ 0x0360U,
+ 0x223CU,
+ 0x0334U,
+ 0x033EU,
+ 0x2297U,
+ 0x0596U,
+ 0x0596U,
+ 0x0A70U,
+ 0x0483U,
+ 0x057FU,
+ 0x1E6FU,
+ 0xFF54U,
+ 0x0569U,
+ 0x3068U,
+ 0x30C8U,
+ 0xFF84U,
+ 0x02E5U,
+ 0x02E9U,
+ 0x02E6U,
+ 0x02E8U,
+ 0x02E7U,
+ 0x01BDU,
+ 0x0185U,
+ 0x01A8U,
+ 0x0384U,
+ 0x3327U,
+ 0x0E0FU,
+ 0x3014U,
+ 0xFE5DU,
+ 0xFE39U,
+ 0x3015U,
+ 0xFE5EU,
+ 0xFE3AU,
+ 0x0E15U,
+ 0x01ABU,
+ 0x24AFU,
+ 0xF8EAU,
+ 0xF6DBU,
+ 0x0288U,
+ 0x25BCU,
+ 0x25C4U,
+ 0x25BAU,
+ 0x25B2U,
+ 0x02A6U,
+ 0x05E6U,
+ 0xFB46U,
+ 0xFB46U,
+ 0x05E6U,
+ 0x0446U,
+ 0x05B5U,
+ 0x05B5U,
+ 0x05B5U,
+ 0x05B5U,
+ 0x05B5U,
+ 0x05B5U,
+ 0x05B5U,
+ 0x05B5U,
+ 0x045BU,
+ 0x099FU,
+ 0x091FU,
+ 0x0A9FU,
+ 0x0A1FU,
+ 0x0679U,
+ 0xFB67U,
+ 0xFB68U,
+ 0xFB69U,
+ 0x09A0U,
+ 0x0920U,
+ 0x0AA0U,
+ 0x0A20U,
+ 0x0287U,
+ 0x3064U,
+ 0x30C4U,
+ 0xFF82U,
+ 0x3063U,
+ 0x30C3U,
+ 0xFF6FU,
+ 0x246BU,
+ 0x247FU,
+ 0x2493U,
+ 0x217BU,
+ 0x2473U,
+ 0x5344U,
+ 0x2487U,
+ 0x249BU,
+ 0x0662U,
+ 0x09E8U,
+ 0x2461U,
+ 0x278BU,
+ 0x0968U,
+ 0x2025U,
+ 0xFE30U,
+ 0x0AE8U,
+ 0x0A68U,
+ 0x0662U,
+ 0x3022U,
+ 0x3221U,
+ 0xFF12U,
+ 0x09F5U,
+ 0x2475U,
+ 0x2489U,
+ 0x06F2U,
+ 0x2171U,
+ 0x01BBU,
+ 0x0E52U,
+ 0x0289U,
+ 0x0989U,
+ 0x3128U,
+ 0x016DU,
+ 0x01D4U,
+ 0x24E4U,
+ 0x1E77U,
+ 0x0443U,
+ 0x0951U,
+ 0x0171U,
+ 0x0215U,
+ 0x0909U,
+ 0x01D8U,
+ 0x1E73U,
+ 0x01DAU,
+ 0x04F1U,
+ 0x01DCU,
+ 0x01D6U,
+ 0x1EE5U,
+ 0x0A89U,
+ 0x0A09U,
+ 0x3046U,
+ 0x1EE7U,
+ 0x01B0U,
+ 0x1EE9U,
+ 0x1EF1U,
+ 0x1EEBU,
+ 0x1EEDU,
+ 0x1EEFU,
+ 0x0171U,
+ 0x04F3U,
+ 0x0217U,
+ 0x30A6U,
+ 0xFF73U,
+ 0x0479U,
+ 0x315CU,
+ 0x016BU,
+ 0x04EFU,
+ 0x1E7BU,
+ 0x0A41U,
+ 0xFF55U,
+ 0x2017U,
+ 0xFF3FU,
+ 0xFE33U,
+ 0xFE4FU,
+ 0x222AU,
+ 0x2200U,
+ 0x0173U,
+ 0x24B0U,
+ 0x2580U,
+ 0x05C4U,
+ 0x03C5U,
+ 0x03CBU,
+ 0x03B0U,
+ 0x028AU,
+ 0x03CDU,
+ 0x031DU,
+ 0x02D4U,
+ 0x0A73U,
+ 0x016FU,
+ 0x045EU,
+ 0x3045U,
+ 0x30A5U,
+ 0xFF69U,
+ 0x04AFU,
+ 0x04B1U,
+ 0x0169U,
+ 0x1E79U,
+ 0x1E75U,
+ 0x098AU,
+ 0x090AU,
+ 0x0A8AU,
+ 0x0A0AU,
+ 0x0A42U,
+ 0x09C2U,
+ 0x0942U,
+ 0x0AC2U,
+ 0x09C1U,
+ 0x0941U,
+ 0x0AC1U,
+ 0x0935U,
+ 0x0AB5U,
+ 0x0A35U,
+ 0x30F7U,
+ 0x05D5U,
+ 0xFB35U,
+ 0xFB35U,
+ 0xFB35U,
+ 0x05D5U,
+ 0xFB4BU,
+ 0xFB4BU,
+ 0x05F0U,
+ 0x05F1U,
+ 0x24E5U,
+ 0x1E7FU,
+ 0x0432U,
+ 0x06A4U,
+ 0xFB6BU,
+ 0xFB6CU,
+ 0xFB6DU,
+ 0x30F9U,
+ 0x2640U,
+ 0x007CU,
+ 0x030DU,
+ 0x0329U,
+ 0x02CCU,
+ 0x02C8U,
+ 0x057EU,
+ 0x028BU,
+ 0x30F8U,
+ 0x09CDU,
+ 0x094DU,
+ 0x0ACDU,
+ 0x0983U,
+ 0x0903U,
+ 0x0A83U,
+ 0xFF56U,
+ 0x0578U,
+ 0x309EU,
+ 0x30FEU,
+ 0x309BU,
+ 0xFF9EU,
+ 0x30FAU,
+ 0x24B1U,
+ 0x1E7DU,
+ 0x028CU,
+ 0x3094U,
+ 0x30F4U,
+ 0x1E83U,
+ 0x3159U,
+ 0x308FU,
+ 0x30EFU,
+ 0xFF9CU,
+ 0x3158U,
+ 0x308EU,
+ 0x30EEU,
+ 0x3357U,
+ 0x301CU,
+ 0xFE34U,
+ 0x0648U,
+ 0xFEEEU,
+ 0x0624U,
+ 0xFE86U,
+ 0x33DDU,
+ 0x24E6U,
+ 0x0175U,
+ 0x1E85U,
+ 0x1E87U,
+ 0x1E89U,
+ 0x3091U,
+ 0x2118U,
+ 0x30F1U,
+ 0x315EU,
+ 0x315DU,
+ 0x1E81U,
+ 0x25E6U,
+ 0x25CBU,
+ 0x25D9U,
+ 0x300EU,
+ 0xFE43U,
+ 0x300FU,
+ 0xFE44U,
+ 0x25C7U,
+ 0x25C8U,
+ 0x25BFU,
+ 0x25BDU,
+ 0x25C3U,
+ 0x25C1U,
+ 0x3016U,
+ 0x3017U,
+ 0x25B9U,
+ 0x25B7U,
+ 0x25ABU,
+ 0x263AU,
+ 0x25A1U,
+ 0x2606U,
+ 0x260FU,
+ 0x3018U,
+ 0x3019U,
+ 0x25B5U,
+ 0x25B3U,
+ 0x3090U,
+ 0x30F0U,
+ 0x315FU,
+ 0xFF57U,
+ 0x3092U,
+ 0x30F2U,
+ 0xFF66U,
+ 0x20A9U,
+ 0xFFE6U,
+ 0x0E27U,
+ 0x24B2U,
+ 0x1E98U,
+ 0x02B7U,
+ 0x028DU,
+ 0x01BFU,
+ 0x033DU,
+ 0x3112U,
+ 0x24E7U,
+ 0x1E8DU,
+ 0x1E8BU,
+ 0x056DU,
+ 0x03BEU,
+ 0xFF58U,
+ 0x24B3U,
+ 0x02E3U,
+ 0x334EU,
+ 0x09AFU,
+ 0x092FU,
+ 0x3152U,
+ 0x0AAFU,
+ 0x0A2FU,
+ 0x3084U,
+ 0x30E4U,
+ 0xFF94U,
+ 0x3151U,
+ 0x0E4EU,
+ 0x3083U,
+ 0x30E3U,
+ 0xFF6CU,
+ 0x0463U,
+ 0x24E8U,
+ 0x0177U,
+ 0x1E8FU,
+ 0x1EF5U,
+ 0x064AU,
+ 0x06D2U,
+ 0xFBAFU,
+ 0xFEF2U,
+ 0x0626U,
+ 0xFE8AU,
+ 0xFE8BU,
+ 0xFE8CU,
+ 0xFEF3U,
+ 0xFEF4U,
+ 0xFCDDU,
+ 0xFC58U,
+ 0xFC94U,
+ 0x06D1U,
+ 0x3156U,
+ 0xFFE5U,
+ 0x3155U,
+ 0x3186U,
+ 0x05AAU,
+ 0x05AAU,
+ 0x044BU,
+ 0x04F9U,
+ 0x3181U,
+ 0x3183U,
+ 0x3182U,
+ 0x059AU,
+ 0x1EF3U,
+ 0x01B4U,
+ 0x1EF7U,
+ 0x0575U,
+ 0x0457U,
+ 0x3162U,
+ 0x262FU,
+ 0x0582U,
+ 0xFF59U,
+ 0x05D9U,
+ 0xFB39U,
+ 0xFB39U,
+ 0x05D9U,
+ 0x05F2U,
+ 0xFB1FU,
+ 0x3088U,
+ 0x3189U,
+ 0x30E8U,
+ 0xFF96U,
+ 0x315BU,
+ 0x3087U,
+ 0x30E7U,
+ 0xFF6EU,
+ 0x03F3U,
+ 0x3188U,
+ 0x3187U,
+ 0x0E22U,
+ 0x0E0DU,
+ 0x24B4U,
+ 0x037AU,
+ 0x0345U,
+ 0x01A6U,
+ 0x1E99U,
+ 0x02B8U,
+ 0x1EF9U,
+ 0x028EU,
+ 0x3086U,
+ 0x318CU,
+ 0x30E6U,
+ 0xFF95U,
+ 0x3160U,
+ 0x046BU,
+ 0x046DU,
+ 0x0467U,
+ 0x0469U,
+ 0x3085U,
+ 0x30E5U,
+ 0xFF6DU,
+ 0x318BU,
+ 0x318AU,
+ 0x09DFU,
+ 0x095FU,
+ 0x0566U,
+ 0x017AU,
+ 0x095BU,
+ 0x0A5BU,
+ 0x0638U,
+ 0xFEC6U,
+ 0xFEC7U,
+ 0x3056U,
+ 0xFEC8U,
+ 0x0632U,
+ 0xFEB0U,
+ 0x30B6U,
+ 0x0595U,
+ 0x0594U,
+ 0x0598U,
+ 0x05D6U,
+ 0xFB36U,
+ 0xFB36U,
+ 0x05D6U,
+ 0x3117U,
+ 0x24E9U,
+ 0x1E91U,
+ 0x0291U,
+ 0x017CU,
+ 0x017CU,
+ 0x1E93U,
+ 0x0437U,
+ 0x0499U,
+ 0x04DFU,
+ 0x305CU,
+ 0x30BCU,
+ 0x0660U,
+ 0x09E6U,
+ 0x0966U,
+ 0x0AE6U,
+ 0x0A66U,
+ 0x0660U,
+ 0xFF10U,
+ 0x06F0U,
+ 0x0E50U,
+ 0xFEFFU,
+ 0x200CU,
+ 0x200BU,
+ 0x03B6U,
+ 0x3113U,
+ 0x056AU,
+ 0x04C2U,
+ 0x0436U,
+ 0x0497U,
+ 0x04DDU,
+ 0x3058U,
+ 0x30B8U,
+ 0x05AEU,
+ 0x1E95U,
+ 0xFF5AU,
+ 0x305EU,
+ 0x30BEU,
+ 0x24B5U,
+ 0x0290U,
+ 0x01B6U,
+ 0x305AU,
+ 0x30BAU,
#endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
0
diff --git a/extras/freetype2/src/psnames/rules.mk b/extras/freetype2/src/psnames/rules.mk
index 4a4b82e82..06bd161e3 100644
--- a/extras/freetype2/src/psnames/rules.mk
+++ b/extras/freetype2/src/psnames/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001 by
+# Copyright 1996-2000, 2001, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,25 +15,24 @@
# PSNames driver directory
#
-PSNAMES_DIR := $(SRC_)psnames
-PSNAMES_DIR_ := $(PSNAMES_DIR)$(SEP)
+PSNAMES_DIR := $(SRC_DIR)/psnames
# compilation flags for the driver
#
-PSNAMES_COMPILE := $(FT_COMPILE) $I$(PSNAMES_DIR)
+PSNAMES_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(PSNAMES_DIR))
# PSNames driver sources (i.e., C files)
#
-PSNAMES_DRV_SRC := $(PSNAMES_DIR_)psmodule.c
+PSNAMES_DRV_SRC := $(PSNAMES_DIR)/psmodule.c
# PSNames driver headers
#
PSNAMES_DRV_H := $(PSNAMES_DRV_SRC:%.c=%.h) \
- $(PSNAMES_DIR_)pstables.h \
- $(PSNAMES_DIR_)psnamerr.h
+ $(PSNAMES_DIR)/pstables.h \
+ $(PSNAMES_DIR)/psnamerr.h
# PSNames driver object(s)
@@ -41,25 +40,25 @@ PSNAMES_DRV_H := $(PSNAMES_DRV_SRC:%.c=%.h) \
# PSNAMES_DRV_OBJ_M is used during `multi' builds
# PSNAMES_DRV_OBJ_S is used during `single' builds
#
-PSNAMES_DRV_OBJ_M := $(PSNAMES_DRV_SRC:$(PSNAMES_DIR_)%.c=$(OBJ_)%.$O)
-PSNAMES_DRV_OBJ_S := $(OBJ_)psnames.$O
+PSNAMES_DRV_OBJ_M := $(PSNAMES_DRV_SRC:$(PSNAMES_DIR)/%.c=$(OBJ_DIR)/%.$O)
+PSNAMES_DRV_OBJ_S := $(OBJ_DIR)/psnames.$O
# PSNames driver source file for single build
#
-PSNAMES_DRV_SRC_S := $(PSNAMES_DIR_)psmodule.c
+PSNAMES_DRV_SRC_S := $(PSNAMES_DIR)/psmodule.c
# PSNames driver - single object
#
$(PSNAMES_DRV_OBJ_S): $(PSNAMES_DRV_SRC_S) $(PSNAMES_DRV_SRC) \
$(FREETYPE_H) $(PSNAMES_DRV_H)
- $(PSNAMES_COMPILE) $T$@ $(PSNAMES_DRV_SRC_S)
+ $(PSNAMES_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(PSNAMES_DRV_SRC_S))
# PSNames driver - multiple objects
#
-$(OBJ_)%.$O: $(PSNAMES_DIR_)%.c $(FREETYPE_H) $(PSNAMES_DRV_H)
- $(PSNAMES_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(PSNAMES_DIR)/%.c $(FREETYPE_H) $(PSNAMES_DRV_H)
+ $(PSNAMES_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
diff --git a/extras/freetype2/src/raster/ftraster.c b/extras/freetype2/src/raster/ftraster.c
index 654a81ec3..757cba758 100644
--- a/extras/freetype2/src/raster/ftraster.c
+++ b/extras/freetype2/src/raster/ftraster.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph rasterizer (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -687,8 +687,8 @@
static Bool
Insert_Y_Turn( RAS_ARGS Int y )
{
- PLong y_turns;
- Int y2, n;
+ PLong y_turns;
+ Int y2, n;
n = ras.numTurns - 1;
@@ -710,12 +710,12 @@
if ( n < 0 )
{
+ ras.maxBuff--;
if ( ras.maxBuff <= ras.top )
{
ras.error = Raster_Err_Overflow;
return FAILURE;
}
- ras.maxBuff--;
ras.numTurns++;
ras.sizeBuff[-ras.numTurns] = y;
}
@@ -917,7 +917,7 @@
/* Take care: miny-y1 can be a very large value; we use */
/* a slow MulDiv function to avoid clipping bugs */
x1 += SMulDiv( Dx, miny - y1, Dy );
- e1 = TRUNC( miny );
+ e1 = (Int)TRUNC( miny );
f1 = 0;
}
else
diff --git a/extras/freetype2/src/raster/ftrend1.c b/extras/freetype2/src/raster/ftrend1.c
index 86b170cfe..a17ef9b61 100644
--- a/extras/freetype2/src/raster/ftrend1.c
+++ b/extras/freetype2/src/raster/ftrend1.c
@@ -4,7 +4,7 @@
/* */
/* The FreeType glyph rasterizer interface (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -140,10 +140,10 @@
/* compute the control box, and grid fit it */
FT_Outline_Get_CBox( outline, &cbox );
- cbox.xMin &= -64;
- cbox.yMin &= -64;
- cbox.xMax = ( cbox.xMax + 63 ) & -64;
- cbox.yMax = ( cbox.yMax + 63 ) & -64;
+ cbox.xMin = FT_PIX_FLOOR( cbox.xMin );
+ cbox.yMin = FT_PIX_FLOOR( cbox.yMin );
+ cbox.xMax = FT_PIX_CEIL( cbox.xMax );
+ cbox.yMax = FT_PIX_CEIL( cbox.yMax );
width = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );
height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
@@ -151,17 +151,17 @@
memory = render->root.memory;
/* release old bitmap buffer */
- if ( slot->flags & FT_GLYPH_OWN_BITMAP )
+ if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
{
FT_FREE( bitmap->buffer );
- slot->flags &= ~FT_GLYPH_OWN_BITMAP;
+ slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
}
/* allocate new one, depends on pixel format */
if ( !( mode & FT_RENDER_MODE_MONO ) )
{
/* we pad to 32 bits, only for backwards compatibility with FT 1.x */
- pitch = ( width + 3 ) & -4;
+ pitch = FT_PAD_CEIL( width, 4 );
bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
bitmap->num_grays = 256;
}
@@ -178,7 +178,7 @@
if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) )
goto Exit;
- slot->flags |= FT_GLYPH_OWN_BITMAP;
+ slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
/* translate outline to render it into the bitmap */
FT_Outline_Translate( outline, -cbox.xMin, -cbox.yMin );
@@ -193,9 +193,9 @@
/* render outline into the bitmap */
error = render->raster_render( render->raster, &params );
-
+
FT_Outline_Translate( outline, cbox.xMin, cbox.yMin );
-
+
if ( error )
goto Exit;
@@ -212,7 +212,7 @@
const FT_Renderer_Class ft_raster1_renderer_class =
{
{
- ft_module_renderer,
+ FT_MODULE_RENDERER,
sizeof( FT_RendererRec ),
"raster1",
@@ -245,7 +245,7 @@
const FT_Renderer_Class ft_raster5_renderer_class =
{
{
- ft_module_renderer,
+ FT_MODULE_RENDERER,
sizeof( FT_RendererRec ),
"raster5",
diff --git a/extras/freetype2/src/raster/rules.mk b/extras/freetype2/src/raster/rules.mk
index 9fe4b8bd0..0dc8782ea 100644
--- a/extras/freetype2/src/raster/rules.mk
+++ b/extras/freetype2/src/raster/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001 by
+# Copyright 1996-2000, 2001, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -13,58 +13,57 @@
# fully.
-# raster1 driver directory
+# raster driver directory
#
-RAS1_DIR := $(SRC_)raster
-RAS1_DIR_ := $(RAS1_DIR)$(SEP)
+RASTER_DIR := $(SRC_DIR)/raster
# compilation flags for the driver
#
-RAS1_COMPILE := $(FT_COMPILE) $I$(RAS1_DIR)
+RASTER_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(RASTER_DIR))
-# raster1 driver sources (i.e., C files)
+# raster driver sources (i.e., C files)
#
-RAS1_DRV_SRC := $(RAS1_DIR_)ftraster.c \
- $(RAS1_DIR_)ftrend1.c
+RASTER_DRV_SRC := $(RASTER_DIR)/ftraster.c \
+ $(RASTER_DIR)/ftrend1.c
-# raster1 driver headers
+# raster driver headers
#
-RAS1_DRV_H := $(RAS1_DRV_SRC:%.c=%.h) \
- $(RAS1_DIR_)rasterrs.h
+RASTER_DRV_H := $(RASTER_DRV_SRC:%.c=%.h) \
+ $(RASTER_DIR)/rasterrs.h
-# raster1 driver object(s)
+# raster driver object(s)
#
-# RAS1_DRV_OBJ_M is used during `multi' builds.
-# RAS1_DRV_OBJ_S is used during `single' builds.
+# RASTER_DRV_OBJ_M is used during `multi' builds.
+# RASTER_DRV_OBJ_S is used during `single' builds.
#
-RAS1_DRV_OBJ_M := $(RAS1_DRV_SRC:$(RAS1_DIR_)%.c=$(OBJ_)%.$O)
-RAS1_DRV_OBJ_S := $(OBJ_)raster.$O
+RASTER_DRV_OBJ_M := $(RASTER_DRV_SRC:$(RASTER_DIR)/%.c=$(OBJ_DIR)/%.$O)
+RASTER_DRV_OBJ_S := $(OBJ_DIR)/raster.$O
-# raster1 driver source file for single build
+# raster driver source file for single build
#
-RAS1_DRV_SRC_S := $(RAS1_DIR_)raster.c
+RASTER_DRV_SRC_S := $(RASTER_DIR)/raster.c
-# raster1 driver - single object
+# raster driver - single object
#
-$(RAS1_DRV_OBJ_S): $(RAS1_DRV_SRC_S) $(RAS1_DRV_SRC) \
- $(FREETYPE_H) $(RAS1_DRV_H)
- $(RAS1_COMPILE) $T$@ $(RAS1_DRV_SRC_S)
+$(RASTER_DRV_OBJ_S): $(RASTER_DRV_SRC_S) $(RASTER_DRV_SRC) \
+ $(FREETYPE_H) $(RASTER_DRV_H)
+ $(RASTER_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(RASTER_DRV_SRC_S))
-# raster1 driver - multiple objects
+# raster driver - multiple objects
#
-$(OBJ_)%.$O: $(RAS1_DIR_)%.c $(FREETYPE_H) $(RAS1_DRV_H)
- $(RAS1_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(RASTER_DIR)/%.c $(FREETYPE_H) $(RASTER_DRV_H)
+ $(RASTER_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
#
-DRV_OBJS_S += $(RAS1_DRV_OBJ_S)
-DRV_OBJS_M += $(RAS1_DRV_OBJ_M)
+DRV_OBJS_S += $(RASTER_DRV_OBJ_S)
+DRV_OBJS_M += $(RASTER_DRV_OBJ_M)
# EOF
diff --git a/extras/freetype2/src/sfnt/Jamfile b/extras/freetype2/src/sfnt/Jamfile
index adddfb6fd..257b3442c 100644
--- a/extras/freetype2/src/sfnt/Jamfile
+++ b/extras/freetype2/src/sfnt/Jamfile
@@ -1,4 +1,4 @@
-# FreeType 2 src/sfnt Jamfile (c) 2001, 2002 David Turner
+# FreeType 2 src/sfnt Jamfile (c) 2001, 2002, 2004 David Turner
#
SubDir FT2_TOP $(FT2_SRC_DIR) sfnt ;
@@ -8,7 +8,7 @@ SubDir FT2_TOP $(FT2_SRC_DIR) sfnt ;
if $(FT2_MULTI)
{
- _sources = sfobjs sfdriver ttcmap ttcmap0 ttpost ttload ttsbit ;
+ _sources = sfobjs sfdriver ttcmap0 ttpost ttload ttsbit ;
}
else
{
diff --git a/extras/freetype2/src/sfnt/rules.mk b/extras/freetype2/src/sfnt/rules.mk
index c074a6afc..f13238549 100644
--- a/extras/freetype2/src/sfnt/rules.mk
+++ b/extras/freetype2/src/sfnt/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2002 by
+# Copyright 1996-2000, 2002, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,29 +15,27 @@
# SFNT driver directory
#
-SFNT_DIR := $(SRC_)sfnt
-SFNT_DIR_ := $(SFNT_DIR)$(SEP)
+SFNT_DIR := $(SRC_DIR)/sfnt
# compilation flags for the driver
#
-SFNT_COMPILE := $(FT_COMPILE) $I$(SFNT_DIR)
+SFNT_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SFNT_DIR))
# SFNT driver sources (i.e., C files)
#
-SFNT_DRV_SRC := $(SFNT_DIR_)ttload.c \
- $(SFNT_DIR_)ttcmap.c \
- $(SFNT_DIR_)ttcmap0.c \
- $(SFNT_DIR_)ttsbit.c \
- $(SFNT_DIR_)ttpost.c \
- $(SFNT_DIR_)sfobjs.c \
- $(SFNT_DIR_)sfdriver.c
+SFNT_DRV_SRC := $(SFNT_DIR)/ttload.c \
+ $(SFNT_DIR)/ttcmap0.c \
+ $(SFNT_DIR)/ttsbit.c \
+ $(SFNT_DIR)/ttpost.c \
+ $(SFNT_DIR)/sfobjs.c \
+ $(SFNT_DIR)/sfdriver.c
# SFNT driver headers
#
SFNT_DRV_H := $(SFNT_DRV_SRC:%c=%h) \
- $(SFNT_DIR_)sferrors.h
+ $(SFNT_DIR)/sferrors.h
# SFNT driver object(s)
@@ -45,25 +43,25 @@ SFNT_DRV_H := $(SFNT_DRV_SRC:%c=%h) \
# SFNT_DRV_OBJ_M is used during `multi' builds.
# SFNT_DRV_OBJ_S is used during `single' builds.
#
-SFNT_DRV_OBJ_M := $(SFNT_DRV_SRC:$(SFNT_DIR_)%.c=$(OBJ_)%.$O)
-SFNT_DRV_OBJ_S := $(OBJ_)sfnt.$O
+SFNT_DRV_OBJ_M := $(SFNT_DRV_SRC:$(SFNT_DIR)/%.c=$(OBJ_DIR)/%.$O)
+SFNT_DRV_OBJ_S := $(OBJ_DIR)/sfnt.$O
# SFNT driver source file for single build
#
-SFNT_DRV_SRC_S := $(SFNT_DIR_)sfnt.c
+SFNT_DRV_SRC_S := $(SFNT_DIR)/sfnt.c
# SFNT driver - single object
#
$(SFNT_DRV_OBJ_S): $(SFNT_DRV_SRC_S) $(SFNT_DRV_SRC) \
$(FREETYPE_H) $(SFNT_DRV_H)
- $(SFNT_COMPILE) $T$@ $(SFNT_DRV_SRC_S)
+ $(SFNT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(SFNT_DRV_SRC_S))
# SFNT driver - multiple objects
#
-$(OBJ_)%.$O: $(SFNT_DIR_)%.c $(FREETYPE_H) $(SFNT_DRV_H)
- $(SFNT_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(SFNT_DIR)/%.c $(FREETYPE_H) $(SFNT_DRV_H)
+ $(SFNT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
diff --git a/extras/freetype2/src/sfnt/sfdriver.c b/extras/freetype2/src/sfnt/sfdriver.c
index c4dd1b478..7da53d2f1 100644
--- a/extras/freetype2/src/sfnt/sfdriver.c
+++ b/extras/freetype2/src/sfnt/sfdriver.c
@@ -4,7 +4,7 @@
/* */
/* High-level SFNT driver interface (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,9 +22,10 @@
#include "sfdriver.h"
#include "ttload.h"
-#include "ttcmap.h"
#include "sfobjs.h"
+#include "sferrors.h"
+
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
#include "ttsbit.h"
#endif
@@ -33,6 +34,18 @@
#include "ttpost.h"
#endif
+#include "ttcmap0.h"
+
+#include FT_SERVICE_GLYPH_DICT_H
+#include FT_SERVICE_POSTSCRIPT_NAME_H
+#include FT_SERVICE_SFNT_H
+#include FT_SERVICE_TT_CMAP_H
+
+
+ /*
+ * SFNT TABLE SERVICE
+ *
+ */
static void*
get_sfnt_table( TT_Face face,
@@ -79,11 +92,22 @@
}
+ static const FT_Service_SFNT_TableRec sfnt_service_sfnt_table =
+ {
+ (FT_SFNT_TableLoadFunc)tt_face_load_any,
+ (FT_SFNT_TableGetFunc) get_sfnt_table
+ };
+
+
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+ /*
+ * GLYPH DICT SERVICE
+ *
+ */
static FT_Error
- get_sfnt_glyph_name( TT_Face face,
+ sfnt_get_glyph_name( TT_Face face,
FT_UInt glyph_index,
FT_Pointer buffer,
FT_UInt buffer_max )
@@ -109,16 +133,30 @@
}
+ static const FT_Service_GlyphDictRec sfnt_service_glyph_dict =
+ {
+ (FT_GlyphDict_GetNameFunc) sfnt_get_glyph_name,
+ (FT_GlyphDict_NameIndexFunc)NULL
+ };
+
+#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+
+
+ /*
+ * POSTSCRIPT NAME SERVICE
+ *
+ */
+
static const char*
- get_sfnt_postscript_name( TT_Face face )
+ sfnt_get_ps_name( TT_Face face )
{
FT_Int n, found_win, found_apple;
const char* result = NULL;
/* shouldn't happen, but just in case to avoid memory leaks */
- if ( face->root.internal->postscript_name )
- return face->root.internal->postscript_name;
+ if ( face->postscript_name )
+ return face->postscript_name;
/* scan the name table to see whether we have a Postscript name here, */
/* either in Macintosh or Windows platform encodings */
@@ -149,7 +187,9 @@
FT_Memory memory = face->root.memory;
TT_NameEntryRec* name = face->name_table.names + found_win;
FT_UInt len = name->stringLength / 2;
- FT_Error error;
+ FT_Error error = SFNT_Err_Ok;
+
+ FT_UNUSED( error );
if ( !FT_ALLOC( result, name->stringLength + 1 ) )
@@ -189,7 +229,9 @@
FT_Memory memory = face->root.memory;
TT_NameEntryRec* name = face->name_table.names + found_apple;
FT_UInt len = name->stringLength;
- FT_Error error;
+ FT_Error error = SFNT_Err_Ok;
+
+ FT_UNUSED( error );
if ( !FT_ALLOC( result, len + 1 ) )
@@ -211,12 +253,42 @@
}
Exit:
- face->root.internal->postscript_name = result;
+ face->postscript_name = result;
return result;
}
+ static const FT_Service_PsFontNameRec sfnt_service_ps_name =
+ {
+ (FT_PsName_GetFunc)sfnt_get_ps_name
+ };
-#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
+
+ /*
+ * TT CMAP INFO
+ *
+ */
+ static const FT_Service_TTCMapsRec tt_service_get_cmap_info =
+ {
+ (TT_CMap_Info_GetFunc)tt_get_cmap_info
+ };
+
+
+ /*
+ * SERVICE LIST
+ *
+ */
+
+ static const FT_ServiceDescRec sfnt_services[] =
+ {
+ { FT_SERVICE_ID_SFNT_TABLE, &sfnt_service_sfnt_table },
+ { FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &sfnt_service_ps_name },
+#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+ { FT_SERVICE_ID_GLYPH_DICT, &sfnt_service_glyph_dict },
+#endif
+ { FT_SERVICE_ID_TT_CMAP, &tt_service_get_cmap_info },
+
+ { NULL, NULL }
+ };
FT_CALLBACK_DEF( FT_Module_Interface )
@@ -231,15 +303,7 @@
if ( ft_strcmp( module_interface, "load_sfnt" ) == 0 )
return (FT_Module_Interface)tt_face_load_any;
-#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
- if ( ft_strcmp( module_interface, "glyph_name" ) == 0 )
- return (FT_Module_Interface)get_sfnt_glyph_name;
-#endif
-
- if ( ft_strcmp( module_interface, "postscript_name" ) == 0 )
- return (FT_Module_Interface)get_sfnt_postscript_name;
-
- return 0;
+ return ft_service_list_lookup( sfnt_services, module_interface );
}
@@ -279,9 +343,11 @@
/* see `ttload.h' */
tt_face_load_bitmap_header,
- /* see `ttsbit.h' */
+ /* see `ttsbit.h' and `sfnt.h' */
tt_face_set_sbit_strike,
tt_face_load_sbit_strikes,
+ tt_find_sbit_image,
+ tt_load_sbit_metrics,
tt_face_load_sbit_image,
tt_face_free_sbit_strikes,
@@ -290,6 +356,8 @@
0,
0,
0,
+ 0,
+ 0,
0,
0,
@@ -308,9 +376,6 @@
#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
- /* see `ttcmap.h' */
- tt_face_load_charmap,
- tt_face_free_charmap,
};
diff --git a/extras/freetype2/src/sfnt/sfnt.c b/extras/freetype2/src/sfnt/sfnt.c
index 6e0757aa8..90c1bee91 100644
--- a/extras/freetype2/src/sfnt/sfnt.c
+++ b/extras/freetype2/src/sfnt/sfnt.c
@@ -4,7 +4,7 @@
/* */
/* Single object library component. */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -20,7 +20,6 @@
#include <ft2build.h>
#include "ttload.c"
-#include "ttcmap.c"
#include "ttcmap0.c"
#include "sfobjs.c"
#include "sfdriver.c"
diff --git a/extras/freetype2/src/sfnt/sfobjs.c b/extras/freetype2/src/sfnt/sfobjs.c
index adaca2440..cb304fdc1 100644
--- a/extras/freetype2/src/sfnt/sfobjs.c
+++ b/extras/freetype2/src/sfnt/sfobjs.c
@@ -4,7 +4,7 @@
/* */
/* SFNT object management (base). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,10 +21,9 @@
#include "ttload.h"
#include "ttcmap0.h"
#include FT_INTERNAL_SFNT_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
#include FT_TRUETYPE_IDS_H
#include FT_TRUETYPE_TAGS_H
-
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include "sferrors.h"
@@ -258,9 +257,11 @@
{
if ( rec->string == NULL )
{
- FT_Error error;
+ FT_Error error = SFNT_Err_Ok;
FT_Stream stream = face->name_table.stream;
+ FT_UNUSED( error );
+
if ( FT_NEW_ARRAY ( rec->string, rec->stringLength ) ||
FT_STREAM_SEEK( rec->stringOffset ) ||
@@ -305,11 +306,11 @@
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_SYMBOL_CS, FT_ENCODING_MS_SYMBOL },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_UCS_4, FT_ENCODING_UNICODE },
{ TT_PLATFORM_MICROSOFT, TT_MS_ID_UNICODE_CS, FT_ENCODING_UNICODE },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, FT_ENCODING_MS_SJIS },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_GB2312, FT_ENCODING_MS_GB2312 },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, FT_ENCODING_MS_BIG5 },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_WANSUNG, FT_ENCODING_MS_WANSUNG },
- { TT_PLATFORM_MICROSOFT, TT_MS_ID_JOHAB, FT_ENCODING_MS_JOHAB }
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_SJIS, FT_ENCODING_SJIS },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_GB2312, FT_ENCODING_GB2312 },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_BIG_5, FT_ENCODING_BIG5 },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_WANSUNG, FT_ENCODING_WANSUNG },
+ { TT_PLATFORM_MICROSOFT, TT_MS_ID_JOHAB, FT_ENCODING_JOHAB }
};
const TEncoding *cur, *limit;
@@ -363,11 +364,7 @@
face->goto_table = sfnt->goto_table;
}
- if ( !face->psnames )
- {
- face->psnames = (PSNames_Service)
- FT_Get_Module_Interface( library, "psnames" );
- }
+ FT_FACE_FIND_GLOBAL_SERVICE( face, face->psnames, POSTSCRIPT_CMAPS );
/* check that we have a valid TrueType file */
error = sfnt->load_sfnt_header( face, stream, face_index, &sfnt_header );
@@ -403,7 +400,7 @@
FT_Int num_params,
FT_Parameter* params )
{
- FT_Error error;
+ FT_Error error, psnames_error;
FT_Bool has_outline;
FT_Bool is_apple_sbit;
@@ -465,7 +462,7 @@
/* the following tables are optional in PCL fonts -- */
/* don't check for errors */
(void)LOAD_( names );
- (void)LOAD_( psnames );
+ psnames_error = LOAD_( psnames );
/* do not load the metrics headers and tables if this is an Apple */
/* sbit font file */
@@ -532,9 +529,9 @@
FT_FACE_FLAG_HORIZONTAL; /* horizontal data */
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
- /* might need more polish to detect the presence of a Postscript */
- /* name table in the font */
- flags |= FT_FACE_FLAG_GLYPH_NAMES;
+ if ( psnames_error == SFNT_Err_Ok &&
+ face->postscript.FormatType != 0x00030000L )
+ flags |= FT_FACE_FLAG_GLYPH_NAMES;
#endif
/* fixed width font? */
@@ -556,7 +553,7 @@
/* Compute style flags. */
/* */
flags = 0;
- if ( has_outline == TRUE && face->os2.version != 0xFFFF )
+ if ( has_outline == TRUE && face->os2.version != 0xFFFFU )
{
/* we have an OS/2 table; use the `fsSelection' field */
if ( face->os2.fsSelection & 1 )
@@ -631,18 +628,30 @@
root->face_flags |= FT_FACE_FLAG_VERTICAL;
}
#endif
- root->num_fixed_sizes = face->num_sbit_strikes;
+ root->num_fixed_sizes = (FT_Int)face->num_sbit_strikes;
if ( FT_NEW_ARRAY( root->available_sizes, face->num_sbit_strikes ) )
goto Exit;
for ( n = 0 ; n < face->num_sbit_strikes ; n++ )
{
- root->available_sizes[n].width =
- face->sbit_strikes[n].x_ppem;
-
- root->available_sizes[n].height =
- face->sbit_strikes[n].y_ppem;
+ FT_Bitmap_Size* bsize = root->available_sizes + n;
+ TT_SBit_Strike strike = face->sbit_strikes + n;
+ FT_UShort fupem = face->header.Units_Per_EM;
+ FT_Short height = (FT_Short)( face->horizontal.Ascender -
+ face->horizontal.Descender +
+ face->horizontal.Line_Gap );
+ FT_Short avg = face->os2.xAvgCharWidth;
+
+
+ /* assume 72dpi */
+ bsize->height =
+ (FT_Short)( ( height * strike->y_ppem + fupem/2 ) / fupem );
+ bsize->width =
+ (FT_Short)( ( avg * strike->y_ppem + fupem/2 ) / fupem );
+ bsize->size = strike->y_ppem << 6;
+ bsize->x_ppem = strike->x_ppem << 6;
+ bsize->y_ppem = strike->y_ppem << 6;
}
}
else
@@ -661,7 +670,7 @@
if ( has_outline == TRUE )
{
/* XXX What about if outline header is missing */
- /* (e.g. sfnt wrapped outline)? */
+ /* (e.g. sfnt wrapped bitmap)? */
root->bbox.xMin = face->header.xMin;
root->bbox.yMin = face->header.yMin;
root->bbox.xMax = face->header.xMax;
@@ -706,16 +715,18 @@
root->height = (FT_Short)( root->ascender - root->descender +
face->horizontal.Line_Gap );
+#if 0
/* if the line_gap is 0, we add an extra 15% to the text height -- */
/* this computation is based on various versions of Times New Roman */
if ( face->horizontal.Line_Gap == 0 )
root->height = (FT_Short)( ( root->height * 115 + 50 ) / 100 );
+#endif
#if 0
/* some fonts have the OS/2 "sTypoAscender", "sTypoDescender" & */
/* "sTypoLineGap" fields set to 0, like ARIALNB.TTF */
- if ( face->os2.version != 0xFFFF && root->ascender )
+ if ( face->os2.version != 0xFFFFU && root->ascender )
{
FT_Int height;
diff --git a/extras/freetype2/src/sfnt/ttcmap0.c b/extras/freetype2/src/sfnt/ttcmap0.c
index 405334577..dd1c76aaa 100644
--- a/extras/freetype2/src/sfnt/ttcmap0.c
+++ b/extras/freetype2/src/sfnt/ttcmap0.c
@@ -4,7 +4,7 @@
/* */
/* TrueType new character mapping table (cmap) support (body). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -144,6 +144,19 @@
}
+ FT_CALLBACK_DEF( FT_Error )
+ tt_cmap0_get_info( TT_CMap cmap,
+ TT_CMapInfo *cmap_info )
+ {
+ FT_Byte* p = cmap->data + 4;
+
+
+ cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p );
+
+ return FT_Err_Ok;
+ }
+
+
FT_CALLBACK_TABLE_DEF
const TT_CMap_ClassRec tt_cmap0_class_rec =
{
@@ -156,7 +169,8 @@
(FT_CMap_CharNextFunc) tt_cmap0_char_next
},
0,
- (TT_CMap_ValidateFunc) tt_cmap0_validate
+ (TT_CMap_ValidateFunc) tt_cmap0_validate,
+ (TT_CMap_Info_GetFunc) tt_cmap0_get_info
};
#endif /* TT_CONFIG_CMAP_FORMAT_0 */
@@ -378,10 +392,13 @@
else
{
/* a 16-bit character code */
- p += char_hi * 2; /* jump to key entry */
- sub = subs + ( TT_PEEK_USHORT( p ) & -8 ); /* jump to sub-header */
- /* check that the hi byte isn't a valid one-byte value */
+ /* jump to key entry */
+ p += char_hi * 2;
+ /* jump to sub-header */
+ sub = subs + ( FT_PAD_FLOOR( TT_PEEK_USHORT( p ), 8 ) );
+
+ /* check that the high byte isn't a valid one-byte value */
if ( sub == subs )
goto Exit;
}
@@ -467,7 +484,7 @@
pos = (FT_UInt)( char_lo - start );
p += offset + pos * 2;
- charcode = ( charcode & -256 ) + char_lo;
+ charcode = FT_PAD_FLOOR( charcode, 256 ) + char_lo;
for ( ; pos < count; pos++, charcode++ )
{
@@ -487,7 +504,7 @@
/* jump to next sub-header, i.e. higher byte value */
Next_SubHeader:
- charcode = ( charcode & -256 ) + 256;
+ charcode = FT_PAD_FLOOR( charcode, 256 ) + 256;
}
Exit:
@@ -497,6 +514,19 @@
}
+ FT_CALLBACK_DEF( FT_Error )
+ tt_cmap2_get_info( TT_CMap cmap,
+ TT_CMapInfo *cmap_info )
+ {
+ FT_Byte* p = cmap->data + 4;
+
+
+ cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p );
+
+ return FT_Err_Ok;
+ }
+
+
FT_CALLBACK_TABLE_DEF
const TT_CMap_ClassRec tt_cmap2_class_rec =
{
@@ -509,7 +539,8 @@
(FT_CMap_CharNextFunc) tt_cmap2_char_next
},
2,
- (TT_CMap_ValidateFunc) tt_cmap2_validate
+ (TT_CMap_ValidateFunc) tt_cmap2_validate,
+ (TT_CMap_Info_GetFunc) tt_cmap2_get_info
};
#endif /* TT_CONFIG_CMAP_FORMAT_2 */
@@ -701,9 +732,18 @@
p += offset; /* start of glyph id array */
/* check that we point within the glyph ids table only */
- if ( p < glyph_ids ||
- p + ( end - start + 1 ) * 2 > table + length )
- FT_INVALID_DATA;
+ if ( valid->level >= FT_VALIDATE_TIGHT )
+ {
+ if ( p < glyph_ids ||
+ p + ( end - start + 1 ) * 2 > table + length )
+ FT_INVALID_DATA;
+ }
+ else
+ {
+ if ( p < glyph_ids ||
+ p + ( end - start + 1 ) * 2 > valid->limit )
+ FT_INVALID_DATA;
+ }
/* check glyph indices within the segment range */
if ( valid->level >= FT_VALIDATE_TIGHT )
@@ -758,7 +798,7 @@
p = table + 6;
- num_segs2 = TT_PEEK_USHORT( p ) & -2; /* be paranoid! */
+ num_segs2 = FT_PAD_FLOOR( TT_PEEK_USHORT( p ), 2 ); /* be paranoid! */
#if 1
/* Some fonts have more than 170 segments in their charmaps! */
@@ -780,10 +820,8 @@
if ( code < start )
max = mid;
-
else if ( code > end )
min = mid + 1;
-
else
{
/* we found the segment */
@@ -872,24 +910,117 @@
{
FT_Byte* table = cmap->data;
FT_UInt32 result = 0;
- FT_UInt32 char_code = *pchar_code + 1;
FT_UInt gindex = 0;
+ FT_UInt32 char_code = *pchar_code;
FT_Byte* p;
- FT_Byte* q;
FT_UInt code, num_segs2;
- if ( char_code >= 0x10000UL )
+ if ( char_code >= 0xFFFFUL )
goto Exit;
- code = (FT_UInt)char_code;
+ code = (FT_UInt)char_code + 1;
p = table + 6;
- num_segs2 = TT_PEEK_USHORT(p) & -2; /* ensure even-ness */
+ num_segs2 = FT_PAD_FLOOR( TT_PEEK_USHORT(p), 2 ); /* ensure even-ness */
+
+#if 1
for (;;)
{
- FT_UInt offset, n;
+ /* Some fonts have more than 170 segments in their charmaps! */
+ /* We changed this function to use a more efficient binary */
+ /* search */
+ FT_UInt offset;
FT_Int delta;
+ FT_UInt min = 0;
+ FT_UInt max = num_segs2 >> 1;
+ FT_UInt mid, start, end;
+ FT_UInt hi;
+
+
+ /* we begin by finding the segment which end is
+ closer to our code point */
+ hi = max + 1;
+ while ( min < max )
+ {
+ mid = ( min + max ) >> 1;
+ p = table + 14 + mid * 2;
+ end = TT_PEEK_USHORT( p );
+
+ if ( end < code )
+ min = mid + 1;
+ else
+ {
+ hi = mid;
+ max = mid;
+ }
+ }
+
+ if ( hi > max )
+ {
+ /* the point is behind the last segment;
+ we will exit right now */
+ goto Exit;
+ }
+
+ p = table + 14 + hi * 2;
+ end = TT_PEEK_USHORT( p );
+
+ p += 2 + num_segs2;
+ start = TT_PEEK_USHORT( p );
+
+ if ( code < start )
+ code = start;
+
+ p += num_segs2;
+ delta = TT_PEEK_USHORT( p );
+
+ p += num_segs2;
+ offset = TT_PEEK_USHORT( p );
+
+ if ( offset != 0 && offset != 0xFFFFU )
+ {
+ /* parse the glyph ids array for non-zero index */
+ p += offset + ( code - start ) * 2;
+ while ( code <= end )
+ {
+ gindex = TT_NEXT_USHORT( p );
+ if ( gindex != 0 )
+ {
+ gindex = (FT_UInt)( gindex + delta ) & 0xFFFFU;
+ if ( gindex != 0 )
+ {
+ result = code;
+ goto Exit;
+ }
+ }
+ code++;
+ }
+ }
+ else if ( offset == 0xFFFFU )
+ {
+ /* an offset of 0xFFFF means an empty glyph in certain fonts! */
+ code = end + 1;
+ }
+ else /* offset == 0 */
+ {
+ gindex = (FT_UInt)( code + delta ) & 0xFFFFU;
+ if ( gindex != 0 )
+ {
+ result = code;
+ goto Exit;
+ }
+ code++;
+ }
+ }
+
+#else /* old code -- kept for reference */
+
+ for ( ;; )
+ {
+ FT_UInt offset, n;
+ FT_Int delta;
+ FT_Byte* q;
p = table + 14; /* ends table */
@@ -943,14 +1074,14 @@
goto Exit;
}
}
-
/* loop to next trial charcode */
if ( code >= 0xFFFFU )
break;
code++;
}
- return (FT_UInt)result;
+
+#endif /* !1 */
Exit:
*pchar_code = result;
@@ -958,6 +1089,19 @@
}
+ FT_CALLBACK_DEF( FT_Error )
+ tt_cmap4_get_info( TT_CMap cmap,
+ TT_CMapInfo *cmap_info )
+ {
+ FT_Byte* p = cmap->data + 4;
+
+
+ cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p );
+
+ return FT_Err_Ok;
+ }
+
+
FT_CALLBACK_TABLE_DEF
const TT_CMap_ClassRec tt_cmap4_class_rec =
{
@@ -970,7 +1114,8 @@
(FT_CMap_CharNextFunc) tt_cmap4_char_next
},
4,
- (TT_CMap_ValidateFunc) tt_cmap4_validate
+ (TT_CMap_ValidateFunc) tt_cmap4_validate,
+ (TT_CMap_Info_GetFunc) tt_cmap4_get_info
};
#endif /* TT_CONFIG_CMAP_FORMAT_4 */
@@ -1009,7 +1154,7 @@
FT_Validator valid )
{
FT_Byte* p;
- FT_UInt length, start, count;
+ FT_UInt length, count;
if ( table + 10 > valid->limit )
@@ -1018,8 +1163,7 @@
p = table + 2;
length = TT_NEXT_USHORT( p );
- p = table + 6; /* skip language */
- start = TT_NEXT_USHORT( p );
+ p = table + 8; /* skip language and start index */
count = TT_NEXT_USHORT( p );
if ( table + length > valid->limit || length < 10 + count * 2 )
@@ -1103,6 +1247,19 @@
}
+ FT_CALLBACK_DEF( FT_Error )
+ tt_cmap6_get_info( TT_CMap cmap,
+ TT_CMapInfo *cmap_info )
+ {
+ FT_Byte* p = cmap->data + 4;
+
+
+ cmap_info->language = (FT_ULong)TT_PEEK_USHORT( p );
+
+ return FT_Err_Ok;
+ }
+
+
FT_CALLBACK_TABLE_DEF
const TT_CMap_ClassRec tt_cmap6_class_rec =
{
@@ -1115,7 +1272,8 @@
(FT_CMap_CharNextFunc) tt_cmap6_char_next
},
6,
- (TT_CMap_ValidateFunc) tt_cmap6_validate
+ (TT_CMap_ValidateFunc) tt_cmap6_validate,
+ (TT_CMap_Info_GetFunc) tt_cmap6_get_info
};
#endif /* TT_CONFIG_CMAP_FORMAT_6 */
@@ -1340,6 +1498,18 @@
}
+ FT_CALLBACK_DEF( FT_Error )
+ tt_cmap8_get_info( TT_CMap cmap,
+ TT_CMapInfo *cmap_info )
+ {
+ FT_Byte* p = cmap->data + 8;
+
+
+ cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p );
+ return FT_Err_Ok;
+ }
+
+
FT_CALLBACK_TABLE_DEF
const TT_CMap_ClassRec tt_cmap8_class_rec =
{
@@ -1352,7 +1522,8 @@
(FT_CMap_CharNextFunc) tt_cmap8_char_next
},
8,
- (TT_CMap_ValidateFunc) tt_cmap8_validate
+ (TT_CMap_ValidateFunc) tt_cmap8_validate,
+ (TT_CMap_Info_GetFunc) tt_cmap8_get_info
};
#endif /* TT_CONFIG_CMAP_FORMAT_8 */
@@ -1390,15 +1561,14 @@
FT_Validator valid )
{
FT_Byte* p = table + 4;
- FT_ULong length, start, count;
+ FT_ULong length, count;
if ( table + 20 > valid->limit )
FT_INVALID_TOO_SHORT;
length = TT_NEXT_ULONG( p );
- p = table + 12;
- start = TT_NEXT_ULONG( p );
+ p = table + 16;
count = TT_NEXT_ULONG( p );
if ( table + length > valid->limit || length < 20 + count * 2 )
@@ -1446,7 +1616,6 @@
FT_UInt32 *pchar_code )
{
FT_Byte* table = cmap->data;
- FT_UInt32 result = 0;
FT_UInt32 char_code = *pchar_code + 1;
FT_UInt gindex = 0;
FT_Byte* p = table + 12;
@@ -1465,10 +1634,7 @@
{
gindex = TT_NEXT_USHORT( p );
if ( gindex != 0 )
- {
- result = char_code;
break;
- }
char_code++;
}
@@ -1477,6 +1643,19 @@
}
+ FT_CALLBACK_DEF( FT_Error )
+ tt_cmap10_get_info( TT_CMap cmap,
+ TT_CMapInfo *cmap_info )
+ {
+ FT_Byte* p = cmap->data + 8;
+
+
+ cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p );
+
+ return FT_Err_Ok;
+ }
+
+
FT_CALLBACK_TABLE_DEF
const TT_CMap_ClassRec tt_cmap10_class_rec =
{
@@ -1489,7 +1668,8 @@
(FT_CMap_CharNextFunc) tt_cmap10_char_next
},
10,
- (TT_CMap_ValidateFunc) tt_cmap10_validate
+ (TT_CMap_ValidateFunc) tt_cmap10_validate,
+ (TT_CMap_Info_GetFunc) tt_cmap10_get_info
};
#endif /* TT_CONFIG_CMAP_FORMAT_10 */
@@ -1647,6 +1827,19 @@
}
+ FT_CALLBACK_DEF( FT_Error )
+ tt_cmap12_get_info( TT_CMap cmap,
+ TT_CMapInfo *cmap_info )
+ {
+ FT_Byte* p = cmap->data + 8;
+
+
+ cmap_info->language = (FT_ULong)TT_PEEK_ULONG( p );
+
+ return FT_Err_Ok;
+ }
+
+
FT_CALLBACK_TABLE_DEF
const TT_CMap_ClassRec tt_cmap12_class_rec =
{
@@ -1659,7 +1852,8 @@
(FT_CMap_CharNextFunc) tt_cmap12_char_next
},
12,
- (TT_CMap_ValidateFunc) tt_cmap12_validate
+ (TT_CMap_ValidateFunc) tt_cmap12_validate,
+ (TT_CMap_Info_GetFunc) tt_cmap12_get_info
};
@@ -1713,7 +1907,7 @@
if ( p + 4 > limit )
- return FT_Err_Invalid_Table;
+ return SFNT_Err_Invalid_Table;
/* only recognize format 0 */
if ( TT_NEXT_USHORT( p ) != 0 )
@@ -1721,7 +1915,7 @@
p -= 2;
FT_ERROR(( "tt_face_build_cmaps: unsupported `cmap' table format = %d\n",
TT_PEEK_USHORT( p ) ));
- return FT_Err_Invalid_Table;
+ return SFNT_Err_Invalid_Table;
}
num_cmaps = TT_NEXT_USHORT( p );
@@ -1741,7 +1935,7 @@
if ( offset && table + offset + 2 < limit )
{
FT_Byte* cmap = table + offset;
- FT_UInt format = TT_PEEK_USHORT( cmap );
+ volatile FT_UInt format = TT_PEEK_USHORT( cmap );
const TT_CMap_Class* volatile pclazz = tt_cmap_classes;
TT_CMap_Class clazz;
@@ -1772,6 +1966,7 @@
FT_ERROR(( "tt_face_build_cmaps:" ));
FT_ERROR(( " broken cmap sub-table ignored!\n" ));
}
+ break;
}
}
}
@@ -1781,4 +1976,16 @@
}
+ FT_LOCAL( FT_Error )
+ tt_get_cmap_info( FT_CharMap charmap,
+ TT_CMapInfo *cmap_info )
+ {
+ FT_CMap cmap = (FT_CMap)charmap;
+ TT_CMap_Class clazz = (TT_CMap_Class)cmap->clazz;
+
+
+ return clazz->get_cmap_info( charmap, cmap_info );
+ }
+
+
/* END */
diff --git a/extras/freetype2/src/sfnt/ttcmap0.h b/extras/freetype2/src/sfnt/ttcmap0.h
index ff1276e09..6ca9ca110 100644
--- a/extras/freetype2/src/sfnt/ttcmap0.h
+++ b/extras/freetype2/src/sfnt/ttcmap0.h
@@ -4,7 +4,7 @@
/* */
/* TrueType new character mapping table (cmap) support (specification). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,7 +23,7 @@
#include <ft2build.h>
#include FT_INTERNAL_TRUETYPE_TYPES_H
#include FT_INTERNAL_OBJECTS_H
-
+#include FT_SERVICE_TT_CMAP_H
FT_BEGIN_HEADER
@@ -46,6 +46,7 @@ FT_BEGIN_HEADER
FT_CMap_ClassRec clazz;
FT_UInt format;
TT_CMap_ValidateFunc validate;
+ TT_CMap_Info_GetFunc get_cmap_info;
} TT_CMap_ClassRec;
@@ -65,6 +66,11 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
tt_face_build_cmaps( TT_Face face );
+ /* used in tt-cmaps service */
+ FT_LOCAL( FT_Error )
+ tt_get_cmap_info( FT_CharMap charmap,
+ TT_CMapInfo *cmap_info );
+
FT_END_HEADER
diff --git a/extras/freetype2/src/sfnt/ttload.c b/extras/freetype2/src/sfnt/ttload.c
index 7a79503f9..d1b0b208b 100644
--- a/extras/freetype2/src/sfnt/ttload.c
+++ b/extras/freetype2/src/sfnt/ttload.c
@@ -5,7 +5,7 @@
/* Load the basic TrueType tables, i.e., tables that can be either in */
/* TTF or OTF fonts (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -22,7 +22,6 @@
#include FT_INTERNAL_STREAM_H
#include FT_TRUETYPE_TAGS_H
#include "ttload.h"
-#include "ttcmap.h"
#include "sferrors.h"
@@ -179,11 +178,8 @@
/* if 'num_tables' is 0, read the table count from the file */
if ( num_tables == 0 )
{
- FT_ULong format_tag;
-
-
if ( FT_STREAM_SEEK( offset ) ||
- FT_READ_ULONG ( format_tag ) ||
+ FT_STREAM_SKIP( 4 ) ||
FT_READ_USHORT( num_tables ) ||
FT_STREAM_SKIP( 6 ) )
goto Bad_Format;
@@ -213,13 +209,13 @@
has_head = 1;
- /* the table length should be 0x36, but certain font tools
- * make it 0x38, so we will just check that it is greater.
- *
- * note that according to the specification,
- * the table must be padded to 32-bit lengths, but this doesn't
- * apply to the value of its "Length" field !!
- */
+ /* The table length should be 0x36, but certain font tools
+ * make it 0x38, so we will just check that it is greater.
+ *
+ * Note that according to the specification,
+ * the table must be padded to 32-bit lengths, but this doesn't
+ * apply to the value of its "Length" field!
+ */
if ( table.Length < 0x36 ||
FT_STREAM_SEEK( table.Offset + 12 ) ||
FT_READ_ULONG( magic ) ||
@@ -238,7 +234,7 @@
return error;
Bad_Format:
- error = FT_Err_Unknown_File_Format;
+ error = SFNT_Err_Unknown_File_Format;
goto Exit;
}
@@ -257,7 +253,7 @@
/* stream :: The input stream. */
/* */
/* face_index :: If the font is a collection, the number of the font */
- /* in the collection, ignored otherwise. */
+ /* in the collection. Must be zero otherwise. */
/* */
/* <Output> */
/* sfnt :: The SFNT header. */
@@ -280,7 +276,7 @@
SFNT_Header sfnt )
{
FT_Error error;
- FT_ULong format_tag, offset;
+ FT_ULong font_format_tag, format_tag, offset;
FT_Memory memory = stream->memory;
static const FT_Frame_Field sfnt_header_fields[] =
@@ -317,16 +313,17 @@
face->num_tables = 0;
- /* first of all, read the first 4 bytes. If it is `ttcf', then the */
- /* file is a TrueType collection, otherwise it can be any other */
- /* kind of font. */
- /* */
+ /* First of all, read the first 4 bytes. If it is `ttcf', then the */
+ /* file is a TrueType collection, otherwise it is a single-face font. */
+ /* */
offset = FT_STREAM_POS();
- if ( FT_READ_ULONG( format_tag ) )
+ if ( FT_READ_ULONG( font_format_tag ) )
goto Exit;
- if ( format_tag == TTAG_ttcf )
+ format_tag = font_format_tag;
+
+ if ( font_format_tag == TTAG_ttcf )
{
FT_Int n;
@@ -358,8 +355,8 @@
/* seek to the appropriate TrueType file, then read tag */
offset = face->ttc_header.offsets[face_index];
- if ( FT_STREAM_SEEK( offset ) ||
- FT_READ_LONG( format_tag ) )
+ if ( FT_STREAM_SEEK( offset ) ||
+ FT_READ_LONG( format_tag ) )
goto Exit;
}
@@ -376,8 +373,13 @@
{
FT_TRACE2(( "tt_face_load_sfnt_header: file is not SFNT!\n" ));
error = SFNT_Err_Unknown_File_Format;
+ goto Exit;
}
+ /* disallow face index values > 0 for non-TTC files */
+ if ( font_format_tag != TTAG_ttcf && face_index > 0 )
+ error = SFNT_Err_Bad_Argument;
+
Exit:
return error;
}
@@ -744,12 +746,12 @@
face->root.num_glyphs = maxProfile->numGlyphs;
face->root.internal->max_points =
- (FT_UShort)MAX( maxProfile->maxCompositePoints,
- maxProfile->maxPoints );
+ (FT_UShort)FT_MAX( maxProfile->maxCompositePoints,
+ maxProfile->maxPoints );
face->root.internal->max_contours =
- (FT_Short)MAX( maxProfile->maxCompositeContours,
- maxProfile->maxContours );
+ (FT_Short)FT_MAX( maxProfile->maxCompositeContours,
+ maxProfile->maxContours );
face->max_components = (FT_ULong)maxProfile->maxComponentElements +
maxProfile->maxComponentDepth;
@@ -840,16 +842,16 @@
{
#ifdef FT_CONFIG_OPTION_INCREMENTAL
- /* If this is an incrementally loaded font and there are */
- /* overriding metrics tolerate a missing 'hmtx' table. */
+ /* If this is an incrementally loaded font and there are */
+ /* overriding metrics tolerate a missing 'hmtx' table. */
if ( face->root.internal->incremental_interface &&
face->root.internal->incremental_interface->funcs->
- get_glyph_metrics )
+ get_glyph_metrics )
{
face->horizontal.number_Of_HMetrics = 0;
error = SFNT_Err_Ok;
goto Exit;
- }
+ }
#endif
FT_ERROR(( " no horizontal metrics in file!\n" ));
@@ -900,7 +902,8 @@
/* do we have an inconsistent number of metric values? */
{
TT_ShortMetrics* cur = *shorts;
- TT_ShortMetrics* limit = cur + MIN( num_shorts, num_shorts_checked );
+ TT_ShortMetrics* limit = cur +
+ FT_MIN( num_shorts, num_shorts_checked );
for ( ; cur < limit; cur++ )
@@ -1779,6 +1782,7 @@
FT_Memory memory = stream->memory;
TT_Hdmx hdmx = &face->hdmx;
+ FT_Short num_records;
FT_Long num_glyphs;
FT_Long record_size;
@@ -1796,7 +1800,7 @@
goto Exit;
hdmx->version = FT_GET_USHORT();
- hdmx->num_records = FT_GET_SHORT();
+ num_records = FT_GET_SHORT();
record_size = FT_GET_LONG();
FT_FRAME_EXIT();
@@ -1805,9 +1809,10 @@
if ( hdmx->version != 0 )
goto Exit;
- if ( FT_NEW_ARRAY( hdmx->records, hdmx->num_records ) )
+ if ( FT_NEW_ARRAY( hdmx->records, num_records ) )
goto Exit;
+ hdmx->num_records = num_records;
num_glyphs = face->root.num_glyphs;
record_size -= num_glyphs + 2;
diff --git a/extras/freetype2/src/sfnt/ttpost.c b/extras/freetype2/src/sfnt/ttpost.c
index 486ba3dd2..3d526db4c 100644
--- a/extras/freetype2/src/sfnt/ttpost.c
+++ b/extras/freetype2/src/sfnt/ttpost.c
@@ -5,7 +5,7 @@
/* Postcript name table processing for TrueType and OpenType fonts */
/* (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -50,7 +50,7 @@
#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#define MAC_NAME( x ) ( (FT_String*)psnames->macintosh_name( x ) )
@@ -441,7 +441,7 @@
FT_Fixed format;
#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
- PSNames_Service psnames;
+ FT_Service_PsCMaps psnames;
#endif
@@ -452,7 +452,7 @@
return SFNT_Err_Invalid_Glyph_Index;
#ifdef FT_CONFIG_OPTION_POSTSCRIPT_NAMES
- psnames = (PSNames_Service)face->psnames;
+ psnames = (FT_Service_PsCMaps)face->psnames;
if ( !psnames )
return SFNT_Err_Unimplemented_Feature;
#endif
@@ -510,7 +510,7 @@
*PSname = MAC_NAME( idx );
}
}
-
+
/* nothing to do for format == 0x00030000L */
End:
diff --git a/extras/freetype2/src/sfnt/ttsbit.c b/extras/freetype2/src/sfnt/ttsbit.c
index 9cfa92be6..444c27acc 100644
--- a/extras/freetype2/src/sfnt/ttsbit.c
+++ b/extras/freetype2/src/sfnt/ttsbit.c
@@ -4,7 +4,7 @@
/* */
/* TrueType and OpenType embedded bitmap support (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -622,22 +622,22 @@
FT_LOCAL_DEF( FT_Error )
tt_face_set_sbit_strike( TT_Face face,
- FT_Int x_ppem,
- FT_Int y_ppem,
+ FT_UInt x_ppem,
+ FT_UInt y_ppem,
FT_ULong *astrike_index )
{
FT_ULong i;
- if ( x_ppem < 0 || x_ppem > 255 ||
+ if ( x_ppem > 255 ||
y_ppem < 1 || y_ppem > 255 )
return SFNT_Err_Invalid_PPem;
for ( i = 0; i < face->num_sbit_strikes; i++ )
{
- if ( ( face->sbit_strikes[i].y_ppem == y_ppem ) &&
- ( ( x_ppem == 0 ) ||
- ( face->sbit_strikes[i].x_ppem == x_ppem ) ) )
+ if ( ( (FT_UInt)face->sbit_strikes[i].y_ppem == y_ppem ) &&
+ ( ( x_ppem == 0 ) ||
+ ( (FT_UInt)face->sbit_strikes[i].x_ppem == x_ppem ) ) )
{
*astrike_index = i;
return SFNT_Err_Ok;
@@ -754,7 +754,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* find_sbit_image */
+ /* tt_find_sbit_image */
/* */
/* <Description> */
/* Checks whether an embedded bitmap (an `sbit') exists for a given */
@@ -779,13 +779,13 @@
/* SFNT_Err_Invalid_Argument if no sbit exists for the requested */
/* glyph. */
/* */
- static FT_Error
- find_sbit_image( TT_Face face,
- FT_UInt glyph_index,
- FT_ULong strike_index,
- TT_SBit_Range *arange,
- TT_SBit_Strike *astrike,
- FT_ULong *aglyph_offset )
+ FT_LOCAL( FT_Error )
+ tt_find_sbit_image( TT_Face face,
+ FT_UInt glyph_index,
+ FT_ULong strike_index,
+ TT_SBit_Range *arange,
+ TT_SBit_Strike *astrike,
+ FT_ULong *aglyph_offset )
{
FT_Error error;
TT_SBit_Strike strike;
@@ -819,7 +819,7 @@
/*************************************************************************/
/* */
/* <Function> */
- /* load_sbit_metrics */
+ /* tt_load_sbit_metrics */
/* */
/* <Description> */
/* Gets the big metrics for a given SBit. */
@@ -843,10 +843,10 @@
/* positioned just after the metrics header in the `EBDT' table on */
/* function exit. */
/* */
- static FT_Error
- load_sbit_metrics( FT_Stream stream,
- TT_SBit_Range range,
- TT_SBit_Metrics metrics )
+ FT_LOCAL( FT_Error )
+ tt_load_sbit_metrics( FT_Stream stream,
+ TT_SBit_Range range,
+ TT_SBit_Metrics metrics )
{
FT_Error error = SFNT_Err_Ok;
@@ -1228,13 +1228,13 @@
if ( FT_STREAM_SEEK( ebdt_pos + glyph_offset ) )
goto Exit;
- error = load_sbit_metrics( stream, range, metrics );
+ error = tt_load_sbit_metrics( stream, range, metrics );
if ( error )
goto Exit;
- /* this function is recursive. At the top-level call, we */
+ /* This function is recursive. At the top-level call, we */
/* compute the dimensions of the higher-level glyph to */
- /* allocate the final pixmap buffer */
+ /* allocate the final pixmap buffer. */
if ( depth == 0 )
{
FT_Long size;
@@ -1355,7 +1355,7 @@
y_offset + comp->y_offset,
stream,
&elem_metrics,
- depth+1 );
+ depth + 1 );
if ( error )
goto Fail_Memory;
}
@@ -1419,8 +1419,8 @@
/* Check whether there is a glyph sbit for the current index */
- error = find_sbit_image( face, glyph_index, strike_index,
- &range, &strike, &glyph_offset );
+ error = tt_find_sbit_image( face, glyph_index, strike_index,
+ &range, &strike, &glyph_offset );
if ( error )
goto Exit;
diff --git a/extras/freetype2/src/sfnt/ttsbit.h b/extras/freetype2/src/sfnt/ttsbit.h
index edc858a60..f1b63b7ec 100644
--- a/extras/freetype2/src/sfnt/ttsbit.h
+++ b/extras/freetype2/src/sfnt/ttsbit.h
@@ -4,7 +4,7 @@
/* */
/* TrueType and OpenType embedded bitmap support (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -37,11 +37,24 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
tt_face_set_sbit_strike( TT_Face face,
- FT_Int x_ppem,
- FT_Int y_ppem,
+ FT_UInt x_ppem,
+ FT_UInt y_ppem,
FT_ULong *astrike_index );
FT_LOCAL( FT_Error )
+ tt_find_sbit_image( TT_Face face,
+ FT_UInt glyph_index,
+ FT_ULong strike_index,
+ TT_SBit_Range *arange,
+ TT_SBit_Strike *astrike,
+ FT_ULong *aglyph_offset );
+
+ FT_LOCAL( FT_Error )
+ tt_load_sbit_metrics( FT_Stream stream,
+ TT_SBit_Range range,
+ TT_SBit_Metrics metrics );
+
+ FT_LOCAL( FT_Error )
tt_face_load_sbit_image( TT_Face face,
FT_ULong strike_index,
FT_UInt glyph_index,
diff --git a/extras/freetype2/src/smooth/ftgrays.c b/extras/freetype2/src/smooth/ftgrays.c
index 6c0948188..499cc8cb5 100644
--- a/extras/freetype2/src/smooth/ftgrays.c
+++ b/extras/freetype2/src/smooth/ftgrays.c
@@ -4,7 +4,7 @@
/* */
/* A new `perfect' anti-aliasing renderer (body). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -340,7 +340,7 @@
long byte_size )
{
ras.cells = (PCell)buffer;
- ras.max_cells = byte_size / sizeof ( TCell );
+ ras.max_cells = (int)( byte_size / sizeof ( TCell ) );
ras.num_cells = 0;
ras.area = 0;
ras.cover = 0;
@@ -567,16 +567,16 @@
if ( ex1 != ex2 )
{
- p = ONE_PIXEL * ( y2 - y1 + delta );
- lift = (TCoord)( p / dx );
- rem = (TCoord)( p % dx );
+ p = ONE_PIXEL * ( y2 - y1 + delta );
+ lift = (TCoord)( p / dx );
+ rem = (TCoord)( p % dx );
if ( rem < 0 )
{
lift--;
rem += (TCoord)dx;
}
- mod -= dx;
+ mod -= (int)dx;
while ( ex1 != ex2 )
{
diff --git a/extras/freetype2/src/smooth/ftsmooth.c b/extras/freetype2/src/smooth/ftsmooth.c
index 131b17eba..af8783e29 100644
--- a/extras/freetype2/src/smooth/ftsmooth.c
+++ b/extras/freetype2/src/smooth/ftsmooth.c
@@ -4,7 +4,7 @@
/* */
/* Anti-aliasing renderer interface (body). */
/* */
-/* Copyright 2000-2001, 2002 by */
+/* Copyright 2000-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -132,21 +132,21 @@
/* compute the control box, and grid fit it */
FT_Outline_Get_CBox( outline, &cbox );
- cbox.xMin &= -64;
- cbox.yMin &= -64;
- cbox.xMax = ( cbox.xMax + 63 ) & -64;
- cbox.yMax = ( cbox.yMax + 63 ) & -64;
+ cbox.xMin = FT_PIX_FLOOR( cbox.xMin );
+ cbox.yMin = FT_PIX_FLOOR( cbox.yMin );
+ cbox.xMax = FT_PIX_CEIL( cbox.xMax );
+ cbox.yMax = FT_PIX_CEIL( cbox.yMax );
- width = ( cbox.xMax - cbox.xMin ) >> 6;
- height = ( cbox.yMax - cbox.yMin ) >> 6;
+ width = (FT_UInt)( ( cbox.xMax - cbox.xMin ) >> 6 );
+ height = (FT_UInt)( ( cbox.yMax - cbox.yMin ) >> 6 );
bitmap = &slot->bitmap;
memory = render->root.memory;
/* release old bitmap buffer */
- if ( slot->flags & FT_GLYPH_OWN_BITMAP )
+ if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
{
FT_FREE( bitmap->buffer );
- slot->flags &= ~FT_GLYPH_OWN_BITMAP;
+ slot->internal->flags &= ~FT_GLYPH_OWN_BITMAP;
}
/* allocate new one, depends on pixel format */
@@ -154,7 +154,7 @@
if ( hmul )
{
width = width * hmul;
- pitch = ( width + 3 ) & -4;
+ pitch = FT_PAD_CEIL( width, 4 );
}
if ( vmul )
@@ -169,7 +169,7 @@
if ( FT_ALLOC( bitmap->buffer, (FT_ULong)pitch * height ) )
goto Exit;
- slot->flags |= FT_GLYPH_OWN_BITMAP;
+ slot->internal->flags |= FT_GLYPH_OWN_BITMAP;
/* translate outline to render it into the bitmap */
FT_Outline_Translate( outline, -cbox.xMin, -cbox.yMin );
@@ -236,6 +236,9 @@
FT_Render_Mode mode,
FT_Vector* origin )
{
+ if ( mode == FT_RENDER_MODE_LIGHT )
+ mode = FT_RENDER_MODE_NORMAL;
+
return ft_smooth_render_generic( render, slot, mode, origin,
FT_RENDER_MODE_NORMAL,
0, 0 );
@@ -284,7 +287,7 @@
const FT_Renderer_Class ft_smooth_renderer_class =
{
{
- ft_module_renderer,
+ FT_MODULE_RENDERER,
sizeof( FT_RendererRec ),
"smooth",
@@ -313,7 +316,7 @@
const FT_Renderer_Class ft_smooth_lcd_renderer_class =
{
{
- ft_module_renderer,
+ FT_MODULE_RENDERER,
sizeof( FT_RendererRec ),
"smooth-lcd",
@@ -343,7 +346,7 @@
const FT_Renderer_Class ft_smooth_lcdv_renderer_class =
{
{
- ft_module_renderer,
+ FT_MODULE_RENDERER,
sizeof( FT_RendererRec ),
"smooth-lcdv",
diff --git a/extras/freetype2/src/smooth/rules.mk b/extras/freetype2/src/smooth/rules.mk
index 457f1e5f4..4f27f01db 100644
--- a/extras/freetype2/src/smooth/rules.mk
+++ b/extras/freetype2/src/smooth/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001 by
+# Copyright 1996-2000, 2001, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,24 +15,23 @@
# smooth driver directory
#
-SMOOTH_DIR := $(SRC_)smooth
-SMOOTH_DIR_ := $(SMOOTH_DIR)$(SEP)
+SMOOTH_DIR := $(SRC_DIR)/smooth
# compilation flags for the driver
#
-SMOOTH_COMPILE := $(FT_COMPILE) $I$(SMOOTH_DIR)
+SMOOTH_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(SMOOTH_DIR))
# smooth driver sources (i.e., C files)
#
-SMOOTH_DRV_SRC := $(SMOOTH_DIR_)ftgrays.c \
- $(SMOOTH_DIR_)ftsmooth.c
+SMOOTH_DRV_SRC := $(SMOOTH_DIR)/ftgrays.c \
+ $(SMOOTH_DIR)/ftsmooth.c
# smooth driver headers
#
SMOOTH_DRV_H := $(SMOOTH_DRV_SRC:%c=%h) \
- $(SMOOTH_DIR_)ftsmerrs.h
+ $(SMOOTH_DIR)/ftsmerrs.h
# smooth driver object(s)
@@ -40,25 +39,25 @@ SMOOTH_DRV_H := $(SMOOTH_DRV_SRC:%c=%h) \
# SMOOTH_DRV_OBJ_M is used during `multi' builds.
# SMOOTH_DRV_OBJ_S is used during `single' builds.
#
-SMOOTH_DRV_OBJ_M := $(SMOOTH_DRV_SRC:$(SMOOTH_DIR_)%.c=$(OBJ_)%.$O)
-SMOOTH_DRV_OBJ_S := $(OBJ_)smooth.$O
+SMOOTH_DRV_OBJ_M := $(SMOOTH_DRV_SRC:$(SMOOTH_DIR)/%.c=$(OBJ_DIR)/%.$O)
+SMOOTH_DRV_OBJ_S := $(OBJ_DIR)/smooth.$O
# smooth driver source file for single build
#
-SMOOTH_DRV_SRC_S := $(SMOOTH_DIR_)smooth.c
+SMOOTH_DRV_SRC_S := $(SMOOTH_DIR)/smooth.c
# smooth driver - single object
#
$(SMOOTH_DRV_OBJ_S): $(SMOOTH_DRV_SRC_S) $(SMOOTH_DRV_SRC) \
- $(FREETYPE_H) $(SMOOTH_DRV_H)
- $(SMOOTH_COMPILE) $T$@ $(SMOOTH_DRV_SRC_S)
+ $(FREETYPE_H) $(SMOOTH_DRV_H)
+ $(SMOOTH_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(SMOOTH_DRV_SRC_S))
# smooth driver - multiple objects
#
-$(OBJ_)%.$O: $(SMOOTH_DIR_)%.c $(FREETYPE_H) $(SMOOTH_DRV_H)
- $(SMOOTH_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(SMOOTH_DIR)/%.c $(FREETYPE_H) $(SMOOTH_DRV_H)
+ $(SMOOTH_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
diff --git a/extras/freetype2/src/tools/docmaker/.cvsignore b/extras/freetype2/src/tools/docmaker/.cvsignore
new file mode 100644
index 000000000..0d20b6487
--- /dev/null
+++ b/extras/freetype2/src/tools/docmaker/.cvsignore
@@ -0,0 +1 @@
+*.pyc
diff --git a/extras/freetype2/src/tools/docmaker/content.py b/extras/freetype2/src/tools/docmaker/content.py
index 6d33b5db2..ebfeb8bf4 100755
--- a/extras/freetype2/src/tools/docmaker/content.py
+++ b/extras/freetype2/src/tools/docmaker/content.py
@@ -56,8 +56,16 @@ class DocCode:
self.lines.append( l )
def dump( self, prefix = "", width=60 ):
- for l in self.lines:
+ lines = self.dump_lines( 0, width )
+ for l in lines:
print prefix + l
+
+ def dump_lines( self, margin=0, width=60 ):
+ result = []
+ for l in self.lines:
+ result.append( " "*margin + l )
+ return result
+
#############################################################################
@@ -76,8 +84,14 @@ class DocPara:
self.words.extend( string.split( l ) )
def dump( self, prefix = "", width = 60 ):
- cur = "" # current line
- col = 0 # current width
+ lines = self.dump_lines( 0, width )
+ for l in lines:
+ print prefix + l
+
+ def dump_lines( self, margin=0, width = 60 ):
+ cur = "" # current line
+ col = 0 # current width
+ result = []
for word in self.words:
ln = len(word)
@@ -85,7 +99,7 @@ class DocPara:
ln = ln+1
if col + ln > width:
- print prefix + cur
+ result.append( " "*margin + cur )
cur = word
col = len(word)
else:
@@ -95,8 +109,11 @@ class DocPara:
col = col + ln
if col > 0:
- print prefix + cur
+ result.append( " "*margin + cur )
+
+ return result
+
#############################################################################
@@ -187,6 +204,17 @@ class DocField:
p.dump( prefix )
first = 0
+ def dump_lines( self, margin=0, width=60 ):
+ result = []
+ nl = None
+ for p in self.items:
+ if nl:
+ result.append( "" )
+
+ result.extend( p.dump_lines( margin, width ) )
+ nl = 1
+
+ return result
# this regular expression is used to detect field definitions
#
@@ -233,6 +261,16 @@ class DocMarkup:
except:
return None
+
+ def get_start( self ):
+ try:
+ result = ""
+ for word in self.fields[0].items[0].words:
+ result = result + " " + word
+ return result[1:]
+
+ except:
+ return "ERROR"
def dump( self, margin ):
print " "*margin + "<" + self.tag + ">"
@@ -544,4 +582,4 @@ class DocBlock:
m = self.get_markup( tag_name )
return m.fields[0].items
except:
- return None \ No newline at end of file
+ return None
diff --git a/extras/freetype2/src/tools/docmaker/docbeauty.py b/extras/freetype2/src/tools/docmaker/docbeauty.py
new file mode 100755
index 000000000..94b266b6d
--- /dev/null
+++ b/extras/freetype2/src/tools/docmaker/docbeauty.py
@@ -0,0 +1,109 @@
+#!/usr/bin/env python
+#
+# DocBeauty (c) 2003, 2004 David Turner <david@freetype.org>
+#
+# This program is used to beautify the documentation comments used
+# in the FreeType 2 public headers.
+#
+
+from sources import *
+from content import *
+from utils import *
+
+import utils
+
+import sys, os, time, string, getopt
+
+content_processor = ContentProcessor()
+
+
+def beautify_block( block ):
+ if block.content:
+ content_processor.reset()
+
+ markups = content_processor.process_content( block.content )
+ text = []
+ first = 1
+
+ for markup in markups:
+ text.extend( markup.beautify( first ) )
+ first = 0
+
+ # now beautify the documentation "borders" themselves
+ lines = [ " /*************************************************************************" ]
+ for l in text:
+ lines.append( " *" + l )
+ lines.append( " */" )
+
+ block.lines = lines
+
+
+def usage():
+ print "\nDocBeauty 0.1 Usage information\n"
+ print " docbeauty [options] file1 [ file2 ... ]\n"
+ print "using the following options:\n"
+ print " -h : print this page"
+ print " -b : backup original files with the 'orig' extension"
+ print ""
+ print " --backup : same as -b"
+
+
+def main( argv ):
+ """main program loop"""
+
+ global output_dir
+
+ try:
+ opts, args = getopt.getopt( sys.argv[1:],
+ "hb",
+ [ "help", "backup" ] )
+
+ except getopt.GetoptError:
+ usage()
+ sys.exit( 2 )
+
+ if args == []:
+ usage()
+ sys.exit( 1 )
+
+ # process options
+ #
+ output_dir = None
+ do_backup = None
+
+ for opt in opts:
+ if opt[0] in ( "-h", "--help" ):
+ usage()
+ sys.exit( 0 )
+
+ if opt[0] in ( "-b", "--backup" ):
+ do_backup = 1
+
+ # create context and processor
+ source_processor = SourceProcessor()
+
+ # retrieve the list of files to process
+ file_list = make_file_list( args )
+ for filename in file_list:
+ source_processor.parse_file( filename )
+ for block in source_processor.blocks:
+ beautify_block( block )
+ new_name = filename + ".new"
+ ok = None
+ try:
+ file = open( new_name, "wt" )
+ for block in source_processor.blocks:
+ for line in block.lines:
+ file.write( line )
+ file.write( "\n" )
+ file.close()
+ except:
+ ok = 0
+
+# if called from the command line
+#
+if __name__ == '__main__':
+ main( sys.argv )
+
+
+# eof
diff --git a/extras/freetype2/src/tools/docmaker/docmaker.py b/extras/freetype2/src/tools/docmaker/docmaker.py
index 285bcd6a2..9da4bbf8e 100755
--- a/extras/freetype2/src/tools/docmaker/docmaker.py
+++ b/extras/freetype2/src/tools/docmaker/docmaker.py
@@ -1,16 +1,16 @@
#!/usr/bin/env python
#
-# DocMaker 0.2 (c) 2002 David Turner <david@freetype.org>
+# DocMaker (c) 2002, 2004 David Turner <david@freetype.org>
#
# This program is a re-write of the original DocMaker took used
# to generate the API Reference of the FreeType font engine
-# by converting in-source comments into structured HTML
+# by converting in-source comments into structured HTML.
#
# This new version is capable of outputting XML data, as well
-# as accepts more liberal formatting options
+# as accepts more liberal formatting options.
#
# It also uses regular expression matching and substitution
-# to speed things significantly
+# to speed things significantly.
#
from sources import *
@@ -24,50 +24,8 @@ import utils
import sys, os, time, string, glob, getopt
-def file_exists( pathname ):
- """checks that a given file exists"""
- result = 1
- try:
- file = open( pathname, "r" )
- file.close()
- except:
- result = None
- sys.stderr.write( pathname + " couldn't be accessed\n" )
-
- return result
-
-
-def make_file_list( args = None ):
- """builds a list of input files from command-line arguments"""
-
- file_list = []
- # sys.stderr.write( repr( sys.argv[1 :] ) + '\n' )
-
- if not args:
- args = sys.argv[1 :]
-
- for pathname in args:
- if string.find( pathname, '*' ) >= 0:
- newpath = glob.glob( pathname )
- newpath.sort() # sort files -- this is important because
- # of the order of files
- else:
- newpath = [pathname]
-
- file_list.extend( newpath )
-
- if len( file_list ) == 0:
- file_list = None
- else:
- # now filter the file list to remove non-existing ones
- file_list = filter( file_exists, file_list )
-
- return file_list
-
-
-
def usage():
- print "\nDocMaker 0.2 Usage information\n"
+ print "\nDocMaker Usage information\n"
print " docmaker [options] file1 [ file2 ... ]\n"
print "using the following options:\n"
print " -h : print this page"
diff --git a/extras/freetype2/src/tools/docmaker/formatter.py b/extras/freetype2/src/tools/docmaker/formatter.py
index 36d72aeca..63ecddc97 100755
--- a/extras/freetype2/src/tools/docmaker/formatter.py
+++ b/extras/freetype2/src/tools/docmaker/formatter.py
@@ -2,6 +2,15 @@ from sources import *
from content import *
from utils import *
+# This is the base Formatter class. its purpose is to convert
+# a content processor's data into specific documents (i.e. table of
+# contents, global index, and individual API reference indices).
+#
+# You'll need to sub-class it to output anything sensible. For example,
+# the file tohtml.py contains the definition of the HtmlFormatter sub-class
+# used to output, you guessed it, HTML.
+#
+
class Formatter:
def __init__( self, processor ):
diff --git a/extras/freetype2/src/tools/docmaker/sources.py b/extras/freetype2/src/tools/docmaker/sources.py
index 9828aa642..492300562 100755
--- a/extras/freetype2/src/tools/docmaker/sources.py
+++ b/extras/freetype2/src/tools/docmaker/sources.py
@@ -130,7 +130,7 @@ re_markup_tags = [ re_markup_tag1, re_markup_tag2 ]
#
# used to detect a cross-reference, after markup tags have been stripped
#
-re_crossref = re.compile( r'@(\w*)' )
+re_crossref = re.compile( r'@(\w*)(.*)' )
#
# used to detect italic and bold styles in paragraph text
@@ -200,7 +200,7 @@ class SourceBlock:
self.processor = processor
self.filename = filename
self.lineno = lineno
- self.lines = lines
+ self.lines = lines[:]
self.format = processor.format
self.content = []
@@ -212,7 +212,7 @@ class SourceBlock:
# extract comment lines
lines = []
- for line0 in self.lines[1:]:
+ for line0 in self.lines:
m = self.format.column.match( line0 )
if m:
lines.append( m.group(1) )
@@ -304,7 +304,7 @@ class SourceProcessor:
if self.format.end.match( line ):
# that's a normal block end, add it to lines and
# create a new block
- # self.lines.append( line )
+ self.lines.append( line )
self.add_block_lines()
elif self.format.column.match( line ):
diff --git a/extras/freetype2/src/tools/docmaker/tohtml.py b/extras/freetype2/src/tools/docmaker/tohtml.py
index 75e5db068..2a3cf239b 100755
--- a/extras/freetype2/src/tools/docmaker/tohtml.py
+++ b/extras/freetype2/src/tools/docmaker/tohtml.py
@@ -7,23 +7,38 @@ import time
# The following defines the HTML header used by all generated pages.
#
html_header_1 = """\
+<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
<html>
-<header>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>"""
html_header_2= """ API Reference</title>
-<basefont face="Verdana,Geneva,Arial,Helvetica">
-<style content="text/css">
- P { text-align=justify }
- H1 { text-align=center }
- LI { text-align=justify }
+<style type="text/css">
+ body { font-family: Verdana, Geneva, Arial, Helvetica, serif;
+ color: #000000;
+ background: #FFFFFF; }
+
+ p { text-align: justify; }
+ h1 { text-align: center; }
+ li { text-align: justify; }
+
+ a:link { color: #0000EF; }
+ a:visited { color: #51188E; }
+ a:hover { color: #FF0000; }
+
+ span.keyword { font-family: monospace;
+ text-align: left;
+ white-space: pre;
+ color: darkblue; }
+
+ pre.colored { color: blue; }
+
+ ul.empty { list-style-type: none; }
</style>
-</header>
-<body text=#000000
- bgcolor=#FFFFFF
- link=#0000EF
- vlink=#51188E
- alink=#FF0000>
+</head>
+<body>
<center><h1>"""
html_header_3=""" API Reference</h1></center>
@@ -44,8 +59,8 @@ section_title_footer = "</h1></center>"
# The header and footer used for code segments.
#
-code_header = "<font color=blue><pre>"
-code_footer = "</pre></font>"
+code_header = '<pre class="colored">'
+code_footer = '</pre>'
# Paragraph header and footer.
#
@@ -54,39 +69,39 @@ para_footer = "</p>"
# Block header and footer.
#
-block_header = "<center><table width=75%><tr><td>"
-block_footer = "</td></tr></table><hr width=75%></center>"
+block_header = '<table align=center width="75%"><tr><td>'
+block_footer = '</td></tr></table><hr width="75%">'
# Description header/footer.
#
-description_header = "<center><table width=87%><tr><td>"
-description_footer = "</td></tr></table></center><br>"
+description_header = '<table align=center width="87%"><tr><td>'
+description_footer = "</td></tr></table><br>"
# Marker header/inter/footer combination.
#
-marker_header = "<center><table width=87% cellpadding=5><tr bgcolor=#EEEEFF><td><em><b>"
+marker_header = '<table align=center width="87%" cellpadding=5><tr bgcolor="#EEEEFF"><td><em><b>'
marker_inter = "</b></em></td></tr><tr><td>"
-marker_footer = "</td></tr></table></center>"
+marker_footer = "</td></tr></table>"
# Source code extracts header/footer.
#
-source_header = "<center><table width=87%><tr bgcolor=#D6E8FF width=100%><td><pre>\n"
-source_footer = "\n</pre></table></center><br>"
+source_header = '<table align=center width="87%"><tr bgcolor="#D6E8FF"><td><pre>\n'
+source_footer = "\n</pre></table><br>"
# Chapter header/inter/footer.
#
-chapter_header = "<br><center><table width=75%><tr><td><h2>"
-chapter_inter = "</h2><ul>"
-chapter_footer = "</ul></td></tr></table></center>"
+chapter_header = '<br><table align=center width="75%"><tr><td><h2>'
+chapter_inter = '</h2><ul class="empty"><li>'
+chapter_footer = '</li></ul></td></tr></table>'
# source language keyword coloration/styling
#
-keyword_prefix = '<font color="darkblue">'
-keyword_suffix = '</font>'
+keyword_prefix = '<span class="keyword">'
+keyword_suffix = '</span>'
-section_synopsis_header = '<h2>Synopsys</h2><font color="cyan">'
-section_synopsis_footer = '</font>'
+section_synopsis_header = '<h2>Synopsis</h2>'
+section_synopsis_footer = ''
# Translate a single line of source to HTML. This will convert
# a "<" into "&lt.", ">" into "&gt.", etc.
@@ -139,9 +154,9 @@ class HtmlFormatter(Formatter):
self.html_header = html_header_1 + project_title + html_header_2 + \
project_title + html_header_3
- self.html_footer = "<p><center><font size=""-2"">generated on " + \
+ self.html_footer = "<center><font size=""-2"">generated on " + \
time.asctime( time.localtime( time.time() ) ) + \
- "</font></p></center>" + html_footer
+ "</font></center>" + html_footer
self.columns = 3
@@ -172,11 +187,12 @@ class HtmlFormatter(Formatter):
if m:
try:
name = m.group(1)
+ rest = m.group(2)
block = self.identifiers[ name ]
url = self.make_block_url( block )
- return '<a href="' + url + '">' + name + '</a>'
+ return '<a href="' + url + '">' + name + '</a>' + rest
except:
- return '?' + name + '?'
+ return '?' + name + '?' + rest
# look for italics and bolds
m = re_italic.match( word )
@@ -230,7 +246,7 @@ class HtmlFormatter(Formatter):
def print_html_field( self, field ):
if field.name:
- print "<table valign=top><tr><td><b>"+field.name+"</b></td><td>"
+ print "<table><tr valign=top><td><b>"+field.name+"</b></td><td>"
print self.make_html_items( field.items )
@@ -272,7 +288,7 @@ class HtmlFormatter(Formatter):
def print_html_field_list( self, fields ):
- print "<table valign=top cellpadding=3>"
+ print "<table cellpadding=3>"
for field in fields:
print "<tr valign=top><td><b>" + field.name + "</b></td><td>"
self.print_html_items( field.items )
@@ -319,7 +335,7 @@ class HtmlFormatter(Formatter):
count = len( self.block_index )
rows = (count + self.columns - 1)/self.columns
- print "<center><table border=0 cellpadding=0 cellspacing=0>"
+ print "<table align=center border=0 cellpadding=0 cellspacing=0>"
for r in range(rows):
line = "<tr>"
for c in range(self.columns):
@@ -333,7 +349,7 @@ class HtmlFormatter(Formatter):
line = line + "</tr>"
print line
- print "</table></center>"
+ print "</table>"
print self.html_footer
self.index_items = {}
@@ -373,7 +389,6 @@ class HtmlFormatter(Formatter):
print chapter_header + '<a href="' + index_filename + '">Global Index</a>' + chapter_inter + chapter_footer
def toc_exit( self ):
- print "</table></center>"
print self.html_footer
def toc_dump( self, toc_filename = None, index_filename = None ):
@@ -397,7 +412,7 @@ class HtmlFormatter(Formatter):
# print section synopsys
print section_synopsis_header
- print "<center><table cellspacing=5 cellpadding=0 border=0>"
+ print "<table align=center cellspacing=5 cellpadding=0 border=0>"
maxwidth = 0
for b in section.blocks.values():
@@ -424,7 +439,7 @@ class HtmlFormatter(Formatter):
line = line + "</tr>"
print line
- print "</table></center><br><br>"
+ print "</table><br><br>"
print section_synopsis_footer
print description_header
@@ -436,9 +451,7 @@ class HtmlFormatter(Formatter):
# place html anchor if needed
if block.name:
- print '<a name="' + block.name + '">'
- print "<h4>" + block.name + "</h4>"
- print "</a>"
+ print '<h4><a name="' + block.name + '">' + block.name + '</a></h4>'
# dump the block C source lines now
if block.code:
@@ -473,4 +486,4 @@ class HtmlFormatter(Formatter):
def section_dump_all( self ):
for section in self.sections:
self.section_dump( section, self.file_prefix + section.name + '.html' )
- \ No newline at end of file
+
diff --git a/extras/freetype2/src/tools/docmaker/utils.py b/extras/freetype2/src/tools/docmaker/utils.py
index 6d4653db5..c3e9e2700 100755
--- a/extras/freetype2/src/tools/docmaker/utils.py
+++ b/extras/freetype2/src/tools/docmaker/utils.py
@@ -1,4 +1,4 @@
-import string, sys, os
+import string, sys, os, glob
# current output directory
#
@@ -85,3 +85,44 @@ def check_output( ):
sys.exit( 2 )
else:
output_dir = None
+
+def file_exists( pathname ):
+ """checks that a given file exists"""
+ result = 1
+ try:
+ file = open( pathname, "r" )
+ file.close()
+ except:
+ result = None
+ sys.stderr.write( pathname + " couldn't be accessed\n" )
+
+ return result
+
+
+def make_file_list( args = None ):
+ """builds a list of input files from command-line arguments"""
+
+ file_list = []
+ # sys.stderr.write( repr( sys.argv[1 :] ) + '\n' )
+
+ if not args:
+ args = sys.argv[1 :]
+
+ for pathname in args:
+ if string.find( pathname, '*' ) >= 0:
+ newpath = glob.glob( pathname )
+ newpath.sort() # sort files -- this is important because
+ # of the order of files
+ else:
+ newpath = [pathname]
+
+ file_list.extend( newpath )
+
+ if len( file_list ) == 0:
+ file_list = None
+ else:
+ # now filter the file list to remove non-existing ones
+ file_list = filter( file_exists, file_list )
+
+ return file_list
+
diff --git a/extras/freetype2/src/tools/glnames.py b/extras/freetype2/src/tools/glnames.py
index e377cd0d3..e8e80ec6c 100755
--- a/extras/freetype2/src/tools/glnames.py
+++ b/extras/freetype2/src/tools/glnames.py
@@ -6,7 +6,7 @@
#
-# Copyright 1996-2000 by
+# Copyright 1996-2000, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -30,11 +30,11 @@ usage: %s <output-file>
import sys, string
-# This table is used to name the glyph according to the Macintosh
-# specification. It is used by the TrueType Postscript names table
+# This table is used to name the glyphs according to the Macintosh
+# specification. It is used by the TrueType Postscript names table.
#
-# see http://fonts.apple.com/TTRefMan/RM06/Chap6post.html
-# for the official list
+# See http://fonts.apple.com/TTRefMan/RM06/Chap6post.html
+# for the official list.
#
mac_standard_names = \
[
@@ -145,9 +145,9 @@ mac_standard_names = \
]
-# the list of standard "SID" glyph names. For the official list,
+# The list of standard "SID" glyph names. For the official list,
# see Annex A of document at
-# http://partners.adobe.com/asn/developer/pdfs/tn/5176.CFF.pdf
+# http://partners.adobe.com/asn/developer/pdfs/tn/5176.CFF.pdf.
#
sid_standard_names = \
[
@@ -330,8 +330,8 @@ sid_standard_names = \
]
-# this table maps character code of the Adobe Standard Type 1
-# encoding to glyph indexes in the sid_standard_names table
+# This table maps character codes of the Adobe Standard Type 1
+# encoding to glyph indices in the sid_standard_names table.
#
t1_standard_encoding = \
[
@@ -369,8 +369,8 @@ t1_standard_encoding = \
]
-# this table maps character code of the Adobe Expert Type 1
-# encoding to glyph indexes in the sid_standard_names table
+# This table maps character codes of the Adobe Expert Type 1
+# encoding to glyph indices in the sid_standard_names table.
#
t1_expert_encoding = \
[
@@ -409,1062 +409,4292 @@ t1_expert_encoding = \
# This data has been taken literally from the file `glyphlist.txt',
-# version 1.2, 22 Oct 1998. It is available from
+# version 2.0, 22 Sept 2002. It is available from
#
# http://partners.adobe.com/asn/developer/typeforum/unicodegn.html
#
adobe_glyph_list = """\
-0041;A;LATIN CAPITAL LETTER A
-00C6;AE;LATIN CAPITAL LETTER AE
-01FC;AEacute;LATIN CAPITAL LETTER AE WITH ACUTE
-F7E6;AEsmall;LATIN SMALL CAPITAL LETTER AE
-00C1;Aacute;LATIN CAPITAL LETTER A WITH ACUTE
-F7E1;Aacutesmall;LATIN SMALL CAPITAL LETTER A WITH ACUTE
-0102;Abreve;LATIN CAPITAL LETTER A WITH BREVE
-00C2;Acircumflex;LATIN CAPITAL LETTER A WITH CIRCUMFLEX
-F7E2;Acircumflexsmall;LATIN SMALL CAPITAL LETTER A WITH CIRCUMFLEX
-F6C9;Acute;CAPITAL ACUTE ACCENT
-F7B4;Acutesmall;SMALL CAPITAL ACUTE ACCENT
-00C4;Adieresis;LATIN CAPITAL LETTER A WITH DIAERESIS
-F7E4;Adieresissmall;LATIN SMALL CAPITAL LETTER A WITH DIAERESIS
-00C0;Agrave;LATIN CAPITAL LETTER A WITH GRAVE
-F7E0;Agravesmall;LATIN SMALL CAPITAL LETTER A WITH GRAVE
-0391;Alpha;GREEK CAPITAL LETTER ALPHA
-0386;Alphatonos;GREEK CAPITAL LETTER ALPHA WITH TONOS
-0100;Amacron;LATIN CAPITAL LETTER A WITH MACRON
-0104;Aogonek;LATIN CAPITAL LETTER A WITH OGONEK
-00C5;Aring;LATIN CAPITAL LETTER A WITH RING ABOVE
-01FA;Aringacute;LATIN CAPITAL LETTER A WITH RING ABOVE AND ACUTE
-F7E5;Aringsmall;LATIN SMALL CAPITAL LETTER A WITH RING ABOVE
-F761;Asmall;LATIN SMALL CAPITAL LETTER A
-00C3;Atilde;LATIN CAPITAL LETTER A WITH TILDE
-F7E3;Atildesmall;LATIN SMALL CAPITAL LETTER A WITH TILDE
-0042;B;LATIN CAPITAL LETTER B
-0392;Beta;GREEK CAPITAL LETTER BETA
-F6F4;Brevesmall;SMALL CAPITAL BREVE
-F762;Bsmall;LATIN SMALL CAPITAL LETTER B
-0043;C;LATIN CAPITAL LETTER C
-0106;Cacute;LATIN CAPITAL LETTER C WITH ACUTE
-F6CA;Caron;CAPITAL CARON
-F6F5;Caronsmall;SMALL CAPITAL CARON
-010C;Ccaron;LATIN CAPITAL LETTER C WITH CARON
-00C7;Ccedilla;LATIN CAPITAL LETTER C WITH CEDILLA
-F7E7;Ccedillasmall;LATIN SMALL CAPITAL LETTER C WITH CEDILLA
-0108;Ccircumflex;LATIN CAPITAL LETTER C WITH CIRCUMFLEX
-010A;Cdotaccent;LATIN CAPITAL LETTER C WITH DOT ABOVE
-F7B8;Cedillasmall;SMALL CAPITAL CEDILLA
-03A7;Chi;GREEK CAPITAL LETTER CHI
-F6F6;Circumflexsmall;SMALL CAPITAL MODIFIER LETTER CIRCUMFLEX ACCENT
-F763;Csmall;LATIN SMALL CAPITAL LETTER C
-0044;D;LATIN CAPITAL LETTER D
-010E;Dcaron;LATIN CAPITAL LETTER D WITH CARON
-0110;Dcroat;LATIN CAPITAL LETTER D WITH STROKE
-2206;Delta;INCREMENT
-0394;Delta;GREEK CAPITAL LETTER DELTA;Duplicate
-F6CB;Dieresis;CAPITAL DIAERESIS
-F6CC;DieresisAcute;CAPITAL DIAERESIS ACUTE ACCENT
-F6CD;DieresisGrave;CAPITAL DIAERESIS GRAVE ACCENT
-F7A8;Dieresissmall;SMALL CAPITAL DIAERESIS
-F6F7;Dotaccentsmall;SMALL CAPITAL DOT ABOVE
-F764;Dsmall;LATIN SMALL CAPITAL LETTER D
-0045;E;LATIN CAPITAL LETTER E
-00C9;Eacute;LATIN CAPITAL LETTER E WITH ACUTE
-F7E9;Eacutesmall;LATIN SMALL CAPITAL LETTER E WITH ACUTE
-0114;Ebreve;LATIN CAPITAL LETTER E WITH BREVE
-011A;Ecaron;LATIN CAPITAL LETTER E WITH CARON
-00CA;Ecircumflex;LATIN CAPITAL LETTER E WITH CIRCUMFLEX
-F7EA;Ecircumflexsmall;LATIN SMALL CAPITAL LETTER E WITH CIRCUMFLEX
-00CB;Edieresis;LATIN CAPITAL LETTER E WITH DIAERESIS
-F7EB;Edieresissmall;LATIN SMALL CAPITAL LETTER E WITH DIAERESIS
-0116;Edotaccent;LATIN CAPITAL LETTER E WITH DOT ABOVE
-00C8;Egrave;LATIN CAPITAL LETTER E WITH GRAVE
-F7E8;Egravesmall;LATIN SMALL CAPITAL LETTER E WITH GRAVE
-0112;Emacron;LATIN CAPITAL LETTER E WITH MACRON
-014A;Eng;LATIN CAPITAL LETTER ENG
-0118;Eogonek;LATIN CAPITAL LETTER E WITH OGONEK
-0395;Epsilon;GREEK CAPITAL LETTER EPSILON
-0388;Epsilontonos;GREEK CAPITAL LETTER EPSILON WITH TONOS
-F765;Esmall;LATIN SMALL CAPITAL LETTER E
-0397;Eta;GREEK CAPITAL LETTER ETA
-0389;Etatonos;GREEK CAPITAL LETTER ETA WITH TONOS
-00D0;Eth;LATIN CAPITAL LETTER ETH
-F7F0;Ethsmall;LATIN SMALL CAPITAL LETTER ETH
-20AC;Euro;EURO SIGN
-0046;F;LATIN CAPITAL LETTER F
-F766;Fsmall;LATIN SMALL CAPITAL LETTER F
-0047;G;LATIN CAPITAL LETTER G
-0393;Gamma;GREEK CAPITAL LETTER GAMMA
-011E;Gbreve;LATIN CAPITAL LETTER G WITH BREVE
-01E6;Gcaron;LATIN CAPITAL LETTER G WITH CARON
-011C;Gcircumflex;LATIN CAPITAL LETTER G WITH CIRCUMFLEX
-0122;Gcommaaccent;LATIN CAPITAL LETTER G WITH CEDILLA
-0120;Gdotaccent;LATIN CAPITAL LETTER G WITH DOT ABOVE
-F6CE;Grave;CAPITAL GRAVE ACCENT
-F760;Gravesmall;SMALL CAPITAL GRAVE ACCENT
-F767;Gsmall;LATIN SMALL CAPITAL LETTER G
-0048;H;LATIN CAPITAL LETTER H
-25CF;H18533;BLACK CIRCLE
-25AA;H18543;BLACK SMALL SQUARE
-25AB;H18551;WHITE SMALL SQUARE
-25A1;H22073;WHITE SQUARE
-0126;Hbar;LATIN CAPITAL LETTER H WITH STROKE
-0124;Hcircumflex;LATIN CAPITAL LETTER H WITH CIRCUMFLEX
-F768;Hsmall;LATIN SMALL CAPITAL LETTER H
-F6CF;Hungarumlaut;CAPITAL DOUBLE ACUTE ACCENT
-F6F8;Hungarumlautsmall;SMALL CAPITAL DOUBLE ACUTE ACCENT
-0049;I;LATIN CAPITAL LETTER I
-0132;IJ;LATIN CAPITAL LIGATURE IJ
-00CD;Iacute;LATIN CAPITAL LETTER I WITH ACUTE
-F7ED;Iacutesmall;LATIN SMALL CAPITAL LETTER I WITH ACUTE
-012C;Ibreve;LATIN CAPITAL LETTER I WITH BREVE
-00CE;Icircumflex;LATIN CAPITAL LETTER I WITH CIRCUMFLEX
-F7EE;Icircumflexsmall;LATIN SMALL CAPITAL LETTER I WITH CIRCUMFLEX
-00CF;Idieresis;LATIN CAPITAL LETTER I WITH DIAERESIS
-F7EF;Idieresissmall;LATIN SMALL CAPITAL LETTER I WITH DIAERESIS
-0130;Idotaccent;LATIN CAPITAL LETTER I WITH DOT ABOVE
-2111;Ifraktur;BLACK-LETTER CAPITAL I
-00CC;Igrave;LATIN CAPITAL LETTER I WITH GRAVE
-F7EC;Igravesmall;LATIN SMALL CAPITAL LETTER I WITH GRAVE
-012A;Imacron;LATIN CAPITAL LETTER I WITH MACRON
-012E;Iogonek;LATIN CAPITAL LETTER I WITH OGONEK
-0399;Iota;GREEK CAPITAL LETTER IOTA
-03AA;Iotadieresis;GREEK CAPITAL LETTER IOTA WITH DIALYTIKA
-038A;Iotatonos;GREEK CAPITAL LETTER IOTA WITH TONOS
-F769;Ismall;LATIN SMALL CAPITAL LETTER I
-0128;Itilde;LATIN CAPITAL LETTER I WITH TILDE
-004A;J;LATIN CAPITAL LETTER J
-0134;Jcircumflex;LATIN CAPITAL LETTER J WITH CIRCUMFLEX
-F76A;Jsmall;LATIN SMALL CAPITAL LETTER J
-004B;K;LATIN CAPITAL LETTER K
-039A;Kappa;GREEK CAPITAL LETTER KAPPA
-0136;Kcommaaccent;LATIN CAPITAL LETTER K WITH CEDILLA
-F76B;Ksmall;LATIN SMALL CAPITAL LETTER K
-004C;L;LATIN CAPITAL LETTER L
-F6BF;LL;LATIN CAPITAL LETTER LL
-0139;Lacute;LATIN CAPITAL LETTER L WITH ACUTE
-039B;Lambda;GREEK CAPITAL LETTER LAMDA
-013D;Lcaron;LATIN CAPITAL LETTER L WITH CARON
-013B;Lcommaaccent;LATIN CAPITAL LETTER L WITH CEDILLA
-013F;Ldot;LATIN CAPITAL LETTER L WITH MIDDLE DOT
-0141;Lslash;LATIN CAPITAL LETTER L WITH STROKE
-F6F9;Lslashsmall;LATIN SMALL CAPITAL LETTER L WITH STROKE
-F76C;Lsmall;LATIN SMALL CAPITAL LETTER L
-004D;M;LATIN CAPITAL LETTER M
-F6D0;Macron;CAPITAL MACRON
-F7AF;Macronsmall;SMALL CAPITAL MACRON
-F76D;Msmall;LATIN SMALL CAPITAL LETTER M
-039C;Mu;GREEK CAPITAL LETTER MU
-004E;N;LATIN CAPITAL LETTER N
-0143;Nacute;LATIN CAPITAL LETTER N WITH ACUTE
-0147;Ncaron;LATIN CAPITAL LETTER N WITH CARON
-0145;Ncommaaccent;LATIN CAPITAL LETTER N WITH CEDILLA
-F76E;Nsmall;LATIN SMALL CAPITAL LETTER N
-00D1;Ntilde;LATIN CAPITAL LETTER N WITH TILDE
-F7F1;Ntildesmall;LATIN SMALL CAPITAL LETTER N WITH TILDE
-039D;Nu;GREEK CAPITAL LETTER NU
-004F;O;LATIN CAPITAL LETTER O
-0152;OE;LATIN CAPITAL LIGATURE OE
-F6FA;OEsmall;LATIN SMALL CAPITAL LIGATURE OE
-00D3;Oacute;LATIN CAPITAL LETTER O WITH ACUTE
-F7F3;Oacutesmall;LATIN SMALL CAPITAL LETTER O WITH ACUTE
-014E;Obreve;LATIN CAPITAL LETTER O WITH BREVE
-00D4;Ocircumflex;LATIN CAPITAL LETTER O WITH CIRCUMFLEX
-F7F4;Ocircumflexsmall;LATIN SMALL CAPITAL LETTER O WITH CIRCUMFLEX
-00D6;Odieresis;LATIN CAPITAL LETTER O WITH DIAERESIS
-F7F6;Odieresissmall;LATIN SMALL CAPITAL LETTER O WITH DIAERESIS
-F6FB;Ogoneksmall;SMALL CAPITAL OGONEK
-00D2;Ograve;LATIN CAPITAL LETTER O WITH GRAVE
-F7F2;Ogravesmall;LATIN SMALL CAPITAL LETTER O WITH GRAVE
-01A0;Ohorn;LATIN CAPITAL LETTER O WITH HORN
-0150;Ohungarumlaut;LATIN CAPITAL LETTER O WITH DOUBLE ACUTE
-014C;Omacron;LATIN CAPITAL LETTER O WITH MACRON
-2126;Omega;OHM SIGN
-03A9;Omega;GREEK CAPITAL LETTER OMEGA;Duplicate
-038F;Omegatonos;GREEK CAPITAL LETTER OMEGA WITH TONOS
-039F;Omicron;GREEK CAPITAL LETTER OMICRON
-038C;Omicrontonos;GREEK CAPITAL LETTER OMICRON WITH TONOS
-00D8;Oslash;LATIN CAPITAL LETTER O WITH STROKE
-01FE;Oslashacute;LATIN CAPITAL LETTER O WITH STROKE AND ACUTE
-F7F8;Oslashsmall;LATIN SMALL CAPITAL LETTER O WITH STROKE
-F76F;Osmall;LATIN SMALL CAPITAL LETTER O
-00D5;Otilde;LATIN CAPITAL LETTER O WITH TILDE
-F7F5;Otildesmall;LATIN SMALL CAPITAL LETTER O WITH TILDE
-0050;P;LATIN CAPITAL LETTER P
-03A6;Phi;GREEK CAPITAL LETTER PHI
-03A0;Pi;GREEK CAPITAL LETTER PI
-03A8;Psi;GREEK CAPITAL LETTER PSI
-F770;Psmall;LATIN SMALL CAPITAL LETTER P
-0051;Q;LATIN CAPITAL LETTER Q
-F771;Qsmall;LATIN SMALL CAPITAL LETTER Q
-0052;R;LATIN CAPITAL LETTER R
-0154;Racute;LATIN CAPITAL LETTER R WITH ACUTE
-0158;Rcaron;LATIN CAPITAL LETTER R WITH CARON
-0156;Rcommaaccent;LATIN CAPITAL LETTER R WITH CEDILLA
-211C;Rfraktur;BLACK-LETTER CAPITAL R
-03A1;Rho;GREEK CAPITAL LETTER RHO
-F6FC;Ringsmall;SMALL CAPITAL RING ABOVE
-F772;Rsmall;LATIN SMALL CAPITAL LETTER R
-0053;S;LATIN CAPITAL LETTER S
-250C;SF010000;BOX DRAWINGS LIGHT DOWN AND RIGHT
-2514;SF020000;BOX DRAWINGS LIGHT UP AND RIGHT
-2510;SF030000;BOX DRAWINGS LIGHT DOWN AND LEFT
-2518;SF040000;BOX DRAWINGS LIGHT UP AND LEFT
-253C;SF050000;BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
-252C;SF060000;BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
-2534;SF070000;BOX DRAWINGS LIGHT UP AND HORIZONTAL
-251C;SF080000;BOX DRAWINGS LIGHT VERTICAL AND RIGHT
-2524;SF090000;BOX DRAWINGS LIGHT VERTICAL AND LEFT
-2500;SF100000;BOX DRAWINGS LIGHT HORIZONTAL
-2502;SF110000;BOX DRAWINGS LIGHT VERTICAL
-2561;SF190000;BOX DRAWINGS VERTICAL SINGLE AND LEFT DOUBLE
-2562;SF200000;BOX DRAWINGS VERTICAL DOUBLE AND LEFT SINGLE
-2556;SF210000;BOX DRAWINGS DOWN DOUBLE AND LEFT SINGLE
-2555;SF220000;BOX DRAWINGS DOWN SINGLE AND LEFT DOUBLE
-2563;SF230000;BOX DRAWINGS DOUBLE VERTICAL AND LEFT
-2551;SF240000;BOX DRAWINGS DOUBLE VERTICAL
-2557;SF250000;BOX DRAWINGS DOUBLE DOWN AND LEFT
-255D;SF260000;BOX DRAWINGS DOUBLE UP AND LEFT
-255C;SF270000;BOX DRAWINGS UP DOUBLE AND LEFT SINGLE
-255B;SF280000;BOX DRAWINGS UP SINGLE AND LEFT DOUBLE
-255E;SF360000;BOX DRAWINGS VERTICAL SINGLE AND RIGHT DOUBLE
-255F;SF370000;BOX DRAWINGS VERTICAL DOUBLE AND RIGHT SINGLE
-255A;SF380000;BOX DRAWINGS DOUBLE UP AND RIGHT
-2554;SF390000;BOX DRAWINGS DOUBLE DOWN AND RIGHT
-2569;SF400000;BOX DRAWINGS DOUBLE UP AND HORIZONTAL
-2566;SF410000;BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL
-2560;SF420000;BOX DRAWINGS DOUBLE VERTICAL AND RIGHT
-2550;SF430000;BOX DRAWINGS DOUBLE HORIZONTAL
-256C;SF440000;BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL
-2567;SF450000;BOX DRAWINGS UP SINGLE AND HORIZONTAL DOUBLE
-2568;SF460000;BOX DRAWINGS UP DOUBLE AND HORIZONTAL SINGLE
-2564;SF470000;BOX DRAWINGS DOWN SINGLE AND HORIZONTAL DOUBLE
-2565;SF480000;BOX DRAWINGS DOWN DOUBLE AND HORIZONTAL SINGLE
-2559;SF490000;BOX DRAWINGS UP DOUBLE AND RIGHT SINGLE
-2558;SF500000;BOX DRAWINGS UP SINGLE AND RIGHT DOUBLE
-2552;SF510000;BOX DRAWINGS DOWN SINGLE AND RIGHT DOUBLE
-2553;SF520000;BOX DRAWINGS DOWN DOUBLE AND RIGHT SINGLE
-256B;SF530000;BOX DRAWINGS VERTICAL DOUBLE AND HORIZONTAL SINGLE
-256A;SF540000;BOX DRAWINGS VERTICAL SINGLE AND HORIZONTAL DOUBLE
-015A;Sacute;LATIN CAPITAL LETTER S WITH ACUTE
-0160;Scaron;LATIN CAPITAL LETTER S WITH CARON
-F6FD;Scaronsmall;LATIN SMALL CAPITAL LETTER S WITH CARON
-015E;Scedilla;LATIN CAPITAL LETTER S WITH CEDILLA
-F6C1;Scedilla;LATIN CAPITAL LETTER S WITH CEDILLA;Duplicate
-015C;Scircumflex;LATIN CAPITAL LETTER S WITH CIRCUMFLEX
-0218;Scommaaccent;LATIN CAPITAL LETTER S WITH COMMA BELOW
-03A3;Sigma;GREEK CAPITAL LETTER SIGMA
-F773;Ssmall;LATIN SMALL CAPITAL LETTER S
-0054;T;LATIN CAPITAL LETTER T
-03A4;Tau;GREEK CAPITAL LETTER TAU
-0166;Tbar;LATIN CAPITAL LETTER T WITH STROKE
-0164;Tcaron;LATIN CAPITAL LETTER T WITH CARON
-0162;Tcommaaccent;LATIN CAPITAL LETTER T WITH CEDILLA
-021A;Tcommaaccent;LATIN CAPITAL LETTER T WITH COMMA BELOW;Duplicate
-0398;Theta;GREEK CAPITAL LETTER THETA
-00DE;Thorn;LATIN CAPITAL LETTER THORN
-F7FE;Thornsmall;LATIN SMALL CAPITAL LETTER THORN
-F6FE;Tildesmall;SMALL CAPITAL SMALL TILDE
-F774;Tsmall;LATIN SMALL CAPITAL LETTER T
-0055;U;LATIN CAPITAL LETTER U
-00DA;Uacute;LATIN CAPITAL LETTER U WITH ACUTE
-F7FA;Uacutesmall;LATIN SMALL CAPITAL LETTER U WITH ACUTE
-016C;Ubreve;LATIN CAPITAL LETTER U WITH BREVE
-00DB;Ucircumflex;LATIN CAPITAL LETTER U WITH CIRCUMFLEX
-F7FB;Ucircumflexsmall;LATIN SMALL CAPITAL LETTER U WITH CIRCUMFLEX
-00DC;Udieresis;LATIN CAPITAL LETTER U WITH DIAERESIS
-F7FC;Udieresissmall;LATIN SMALL CAPITAL LETTER U WITH DIAERESIS
-00D9;Ugrave;LATIN CAPITAL LETTER U WITH GRAVE
-F7F9;Ugravesmall;LATIN SMALL CAPITAL LETTER U WITH GRAVE
-01AF;Uhorn;LATIN CAPITAL LETTER U WITH HORN
-0170;Uhungarumlaut;LATIN CAPITAL LETTER U WITH DOUBLE ACUTE
-016A;Umacron;LATIN CAPITAL LETTER U WITH MACRON
-0172;Uogonek;LATIN CAPITAL LETTER U WITH OGONEK
-03A5;Upsilon;GREEK CAPITAL LETTER UPSILON
-03D2;Upsilon1;GREEK UPSILON WITH HOOK SYMBOL
-03AB;Upsilondieresis;GREEK CAPITAL LETTER UPSILON WITH DIALYTIKA
-038E;Upsilontonos;GREEK CAPITAL LETTER UPSILON WITH TONOS
-016E;Uring;LATIN CAPITAL LETTER U WITH RING ABOVE
-F775;Usmall;LATIN SMALL CAPITAL LETTER U
-0168;Utilde;LATIN CAPITAL LETTER U WITH TILDE
-0056;V;LATIN CAPITAL LETTER V
-F776;Vsmall;LATIN SMALL CAPITAL LETTER V
-0057;W;LATIN CAPITAL LETTER W
-1E82;Wacute;LATIN CAPITAL LETTER W WITH ACUTE
-0174;Wcircumflex;LATIN CAPITAL LETTER W WITH CIRCUMFLEX
-1E84;Wdieresis;LATIN CAPITAL LETTER W WITH DIAERESIS
-1E80;Wgrave;LATIN CAPITAL LETTER W WITH GRAVE
-F777;Wsmall;LATIN SMALL CAPITAL LETTER W
-0058;X;LATIN CAPITAL LETTER X
-039E;Xi;GREEK CAPITAL LETTER XI
-F778;Xsmall;LATIN SMALL CAPITAL LETTER X
-0059;Y;LATIN CAPITAL LETTER Y
-00DD;Yacute;LATIN CAPITAL LETTER Y WITH ACUTE
-F7FD;Yacutesmall;LATIN SMALL CAPITAL LETTER Y WITH ACUTE
-0176;Ycircumflex;LATIN CAPITAL LETTER Y WITH CIRCUMFLEX
-0178;Ydieresis;LATIN CAPITAL LETTER Y WITH DIAERESIS
-F7FF;Ydieresissmall;LATIN SMALL CAPITAL LETTER Y WITH DIAERESIS
-1EF2;Ygrave;LATIN CAPITAL LETTER Y WITH GRAVE
-F779;Ysmall;LATIN SMALL CAPITAL LETTER Y
-005A;Z;LATIN CAPITAL LETTER Z
-0179;Zacute;LATIN CAPITAL LETTER Z WITH ACUTE
-017D;Zcaron;LATIN CAPITAL LETTER Z WITH CARON
-F6FF;Zcaronsmall;LATIN SMALL CAPITAL LETTER Z WITH CARON
-017B;Zdotaccent;LATIN CAPITAL LETTER Z WITH DOT ABOVE
-0396;Zeta;GREEK CAPITAL LETTER ZETA
-F77A;Zsmall;LATIN SMALL CAPITAL LETTER Z
-0061;a;LATIN SMALL LETTER A
-00E1;aacute;LATIN SMALL LETTER A WITH ACUTE
-0103;abreve;LATIN SMALL LETTER A WITH BREVE
-00E2;acircumflex;LATIN SMALL LETTER A WITH CIRCUMFLEX
-00B4;acute;ACUTE ACCENT
-0301;acutecomb;COMBINING ACUTE ACCENT
-00E4;adieresis;LATIN SMALL LETTER A WITH DIAERESIS
-00E6;ae;LATIN SMALL LETTER AE
-01FD;aeacute;LATIN SMALL LETTER AE WITH ACUTE
-2015;afii00208;HORIZONTAL BAR
-0410;afii10017;CYRILLIC CAPITAL LETTER A
-0411;afii10018;CYRILLIC CAPITAL LETTER BE
-0412;afii10019;CYRILLIC CAPITAL LETTER VE
-0413;afii10020;CYRILLIC CAPITAL LETTER GHE
-0414;afii10021;CYRILLIC CAPITAL LETTER DE
-0415;afii10022;CYRILLIC CAPITAL LETTER IE
-0401;afii10023;CYRILLIC CAPITAL LETTER IO
-0416;afii10024;CYRILLIC CAPITAL LETTER ZHE
-0417;afii10025;CYRILLIC CAPITAL LETTER ZE
-0418;afii10026;CYRILLIC CAPITAL LETTER I
-0419;afii10027;CYRILLIC CAPITAL LETTER SHORT I
-041A;afii10028;CYRILLIC CAPITAL LETTER KA
-041B;afii10029;CYRILLIC CAPITAL LETTER EL
-041C;afii10030;CYRILLIC CAPITAL LETTER EM
-041D;afii10031;CYRILLIC CAPITAL LETTER EN
-041E;afii10032;CYRILLIC CAPITAL LETTER O
-041F;afii10033;CYRILLIC CAPITAL LETTER PE
-0420;afii10034;CYRILLIC CAPITAL LETTER ER
-0421;afii10035;CYRILLIC CAPITAL LETTER ES
-0422;afii10036;CYRILLIC CAPITAL LETTER TE
-0423;afii10037;CYRILLIC CAPITAL LETTER U
-0424;afii10038;CYRILLIC CAPITAL LETTER EF
-0425;afii10039;CYRILLIC CAPITAL LETTER HA
-0426;afii10040;CYRILLIC CAPITAL LETTER TSE
-0427;afii10041;CYRILLIC CAPITAL LETTER CHE
-0428;afii10042;CYRILLIC CAPITAL LETTER SHA
-0429;afii10043;CYRILLIC CAPITAL LETTER SHCHA
-042A;afii10044;CYRILLIC CAPITAL LETTER HARD SIGN
-042B;afii10045;CYRILLIC CAPITAL LETTER YERU
-042C;afii10046;CYRILLIC CAPITAL LETTER SOFT SIGN
-042D;afii10047;CYRILLIC CAPITAL LETTER E
-042E;afii10048;CYRILLIC CAPITAL LETTER YU
-042F;afii10049;CYRILLIC CAPITAL LETTER YA
-0490;afii10050;CYRILLIC CAPITAL LETTER GHE WITH UPTURN
-0402;afii10051;CYRILLIC CAPITAL LETTER DJE
-0403;afii10052;CYRILLIC CAPITAL LETTER GJE
-0404;afii10053;CYRILLIC CAPITAL LETTER UKRAINIAN IE
-0405;afii10054;CYRILLIC CAPITAL LETTER DZE
-0406;afii10055;CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I
-0407;afii10056;CYRILLIC CAPITAL LETTER YI
-0408;afii10057;CYRILLIC CAPITAL LETTER JE
-0409;afii10058;CYRILLIC CAPITAL LETTER LJE
-040A;afii10059;CYRILLIC CAPITAL LETTER NJE
-040B;afii10060;CYRILLIC CAPITAL LETTER TSHE
-040C;afii10061;CYRILLIC CAPITAL LETTER KJE
-040E;afii10062;CYRILLIC CAPITAL LETTER SHORT U
-F6C4;afii10063;CYRILLIC SMALL LETTER GHE VARIANT
-F6C5;afii10064;CYRILLIC SMALL LETTER BE VARIANT
-0430;afii10065;CYRILLIC SMALL LETTER A
-0431;afii10066;CYRILLIC SMALL LETTER BE
-0432;afii10067;CYRILLIC SMALL LETTER VE
-0433;afii10068;CYRILLIC SMALL LETTER GHE
-0434;afii10069;CYRILLIC SMALL LETTER DE
-0435;afii10070;CYRILLIC SMALL LETTER IE
-0451;afii10071;CYRILLIC SMALL LETTER IO
-0436;afii10072;CYRILLIC SMALL LETTER ZHE
-0437;afii10073;CYRILLIC SMALL LETTER ZE
-0438;afii10074;CYRILLIC SMALL LETTER I
-0439;afii10075;CYRILLIC SMALL LETTER SHORT I
-043A;afii10076;CYRILLIC SMALL LETTER KA
-043B;afii10077;CYRILLIC SMALL LETTER EL
-043C;afii10078;CYRILLIC SMALL LETTER EM
-043D;afii10079;CYRILLIC SMALL LETTER EN
-043E;afii10080;CYRILLIC SMALL LETTER O
-043F;afii10081;CYRILLIC SMALL LETTER PE
-0440;afii10082;CYRILLIC SMALL LETTER ER
-0441;afii10083;CYRILLIC SMALL LETTER ES
-0442;afii10084;CYRILLIC SMALL LETTER TE
-0443;afii10085;CYRILLIC SMALL LETTER U
-0444;afii10086;CYRILLIC SMALL LETTER EF
-0445;afii10087;CYRILLIC SMALL LETTER HA
-0446;afii10088;CYRILLIC SMALL LETTER TSE
-0447;afii10089;CYRILLIC SMALL LETTER CHE
-0448;afii10090;CYRILLIC SMALL LETTER SHA
-0449;afii10091;CYRILLIC SMALL LETTER SHCHA
-044A;afii10092;CYRILLIC SMALL LETTER HARD SIGN
-044B;afii10093;CYRILLIC SMALL LETTER YERU
-044C;afii10094;CYRILLIC SMALL LETTER SOFT SIGN
-044D;afii10095;CYRILLIC SMALL LETTER E
-044E;afii10096;CYRILLIC SMALL LETTER YU
-044F;afii10097;CYRILLIC SMALL LETTER YA
-0491;afii10098;CYRILLIC SMALL LETTER GHE WITH UPTURN
-0452;afii10099;CYRILLIC SMALL LETTER DJE
-0453;afii10100;CYRILLIC SMALL LETTER GJE
-0454;afii10101;CYRILLIC SMALL LETTER UKRAINIAN IE
-0455;afii10102;CYRILLIC SMALL LETTER DZE
-0456;afii10103;CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
-0457;afii10104;CYRILLIC SMALL LETTER YI
-0458;afii10105;CYRILLIC SMALL LETTER JE
-0459;afii10106;CYRILLIC SMALL LETTER LJE
-045A;afii10107;CYRILLIC SMALL LETTER NJE
-045B;afii10108;CYRILLIC SMALL LETTER TSHE
-045C;afii10109;CYRILLIC SMALL LETTER KJE
-045E;afii10110;CYRILLIC SMALL LETTER SHORT U
-040F;afii10145;CYRILLIC CAPITAL LETTER DZHE
-0462;afii10146;CYRILLIC CAPITAL LETTER YAT
-0472;afii10147;CYRILLIC CAPITAL LETTER FITA
-0474;afii10148;CYRILLIC CAPITAL LETTER IZHITSA
-F6C6;afii10192;CYRILLIC SMALL LETTER DE VARIANT
-045F;afii10193;CYRILLIC SMALL LETTER DZHE
-0463;afii10194;CYRILLIC SMALL LETTER YAT
-0473;afii10195;CYRILLIC SMALL LETTER FITA
-0475;afii10196;CYRILLIC SMALL LETTER IZHITSA
-F6C7;afii10831;CYRILLIC SMALL LETTER PE VARIANT
-F6C8;afii10832;CYRILLIC SMALL LETTER TE VARIANT
-04D9;afii10846;CYRILLIC SMALL LETTER SCHWA
-200E;afii299;LEFT-TO-RIGHT MARK
-200F;afii300;RIGHT-TO-LEFT MARK
-200D;afii301;ZERO WIDTH JOINER
-066A;afii57381;ARABIC PERCENT SIGN
-060C;afii57388;ARABIC COMMA
-0660;afii57392;ARABIC-INDIC DIGIT ZERO
-0661;afii57393;ARABIC-INDIC DIGIT ONE
-0662;afii57394;ARABIC-INDIC DIGIT TWO
-0663;afii57395;ARABIC-INDIC DIGIT THREE
-0664;afii57396;ARABIC-INDIC DIGIT FOUR
-0665;afii57397;ARABIC-INDIC DIGIT FIVE
-0666;afii57398;ARABIC-INDIC DIGIT SIX
-0667;afii57399;ARABIC-INDIC DIGIT SEVEN
-0668;afii57400;ARABIC-INDIC DIGIT EIGHT
-0669;afii57401;ARABIC-INDIC DIGIT NINE
-061B;afii57403;ARABIC SEMICOLON
-061F;afii57407;ARABIC QUESTION MARK
-0621;afii57409;ARABIC LETTER HAMZA
-0622;afii57410;ARABIC LETTER ALEF WITH MADDA ABOVE
-0623;afii57411;ARABIC LETTER ALEF WITH HAMZA ABOVE
-0624;afii57412;ARABIC LETTER WAW WITH HAMZA ABOVE
-0625;afii57413;ARABIC LETTER ALEF WITH HAMZA BELOW
-0626;afii57414;ARABIC LETTER YEH WITH HAMZA ABOVE
-0627;afii57415;ARABIC LETTER ALEF
-0628;afii57416;ARABIC LETTER BEH
-0629;afii57417;ARABIC LETTER TEH MARBUTA
-062A;afii57418;ARABIC LETTER TEH
-062B;afii57419;ARABIC LETTER THEH
-062C;afii57420;ARABIC LETTER JEEM
-062D;afii57421;ARABIC LETTER HAH
-062E;afii57422;ARABIC LETTER KHAH
-062F;afii57423;ARABIC LETTER DAL
-0630;afii57424;ARABIC LETTER THAL
-0631;afii57425;ARABIC LETTER REH
-0632;afii57426;ARABIC LETTER ZAIN
-0633;afii57427;ARABIC LETTER SEEN
-0634;afii57428;ARABIC LETTER SHEEN
-0635;afii57429;ARABIC LETTER SAD
-0636;afii57430;ARABIC LETTER DAD
-0637;afii57431;ARABIC LETTER TAH
-0638;afii57432;ARABIC LETTER ZAH
-0639;afii57433;ARABIC LETTER AIN
-063A;afii57434;ARABIC LETTER GHAIN
-0640;afii57440;ARABIC TATWEEL
-0641;afii57441;ARABIC LETTER FEH
-0642;afii57442;ARABIC LETTER QAF
-0643;afii57443;ARABIC LETTER KAF
-0644;afii57444;ARABIC LETTER LAM
-0645;afii57445;ARABIC LETTER MEEM
-0646;afii57446;ARABIC LETTER NOON
-0648;afii57448;ARABIC LETTER WAW
-0649;afii57449;ARABIC LETTER ALEF MAKSURA
-064A;afii57450;ARABIC LETTER YEH
-064B;afii57451;ARABIC FATHATAN
-064C;afii57452;ARABIC DAMMATAN
-064D;afii57453;ARABIC KASRATAN
-064E;afii57454;ARABIC FATHA
-064F;afii57455;ARABIC DAMMA
-0650;afii57456;ARABIC KASRA
-0651;afii57457;ARABIC SHADDA
-0652;afii57458;ARABIC SUKUN
-0647;afii57470;ARABIC LETTER HEH
-06A4;afii57505;ARABIC LETTER VEH
-067E;afii57506;ARABIC LETTER PEH
-0686;afii57507;ARABIC LETTER TCHEH
-0698;afii57508;ARABIC LETTER JEH
-06AF;afii57509;ARABIC LETTER GAF
-0679;afii57511;ARABIC LETTER TTEH
-0688;afii57512;ARABIC LETTER DDAL
-0691;afii57513;ARABIC LETTER RREH
-06BA;afii57514;ARABIC LETTER NOON GHUNNA
-06D2;afii57519;ARABIC LETTER YEH BARREE
-06D5;afii57534;ARABIC LETTER AE
-20AA;afii57636;NEW SHEQEL SIGN
-05BE;afii57645;HEBREW PUNCTUATION MAQAF
-05C3;afii57658;HEBREW PUNCTUATION SOF PASUQ
-05D0;afii57664;HEBREW LETTER ALEF
-05D1;afii57665;HEBREW LETTER BET
-05D2;afii57666;HEBREW LETTER GIMEL
-05D3;afii57667;HEBREW LETTER DALET
-05D4;afii57668;HEBREW LETTER HE
-05D5;afii57669;HEBREW LETTER VAV
-05D6;afii57670;HEBREW LETTER ZAYIN
-05D7;afii57671;HEBREW LETTER HET
-05D8;afii57672;HEBREW LETTER TET
-05D9;afii57673;HEBREW LETTER YOD
-05DA;afii57674;HEBREW LETTER FINAL KAF
-05DB;afii57675;HEBREW LETTER KAF
-05DC;afii57676;HEBREW LETTER LAMED
-05DD;afii57677;HEBREW LETTER FINAL MEM
-05DE;afii57678;HEBREW LETTER MEM
-05DF;afii57679;HEBREW LETTER FINAL NUN
-05E0;afii57680;HEBREW LETTER NUN
-05E1;afii57681;HEBREW LETTER SAMEKH
-05E2;afii57682;HEBREW LETTER AYIN
-05E3;afii57683;HEBREW LETTER FINAL PE
-05E4;afii57684;HEBREW LETTER PE
-05E5;afii57685;HEBREW LETTER FINAL TSADI
-05E6;afii57686;HEBREW LETTER TSADI
-05E7;afii57687;HEBREW LETTER QOF
-05E8;afii57688;HEBREW LETTER RESH
-05E9;afii57689;HEBREW LETTER SHIN
-05EA;afii57690;HEBREW LETTER TAV
-FB2A;afii57694;HEBREW LETTER SHIN WITH SHIN DOT
-FB2B;afii57695;HEBREW LETTER SHIN WITH SIN DOT
-FB4B;afii57700;HEBREW LETTER VAV WITH HOLAM
-FB1F;afii57705;HEBREW LIGATURE YIDDISH YOD YOD PATAH
-05F0;afii57716;HEBREW LIGATURE YIDDISH DOUBLE VAV
-05F1;afii57717;HEBREW LIGATURE YIDDISH VAV YOD
-05F2;afii57718;HEBREW LIGATURE YIDDISH DOUBLE YOD
-FB35;afii57723;HEBREW LETTER VAV WITH DAGESH
-05B4;afii57793;HEBREW POINT HIRIQ
-05B5;afii57794;HEBREW POINT TSERE
-05B6;afii57795;HEBREW POINT SEGOL
-05BB;afii57796;HEBREW POINT QUBUTS
-05B8;afii57797;HEBREW POINT QAMATS
-05B7;afii57798;HEBREW POINT PATAH
-05B0;afii57799;HEBREW POINT SHEVA
-05B2;afii57800;HEBREW POINT HATAF PATAH
-05B1;afii57801;HEBREW POINT HATAF SEGOL
-05B3;afii57802;HEBREW POINT HATAF QAMATS
-05C2;afii57803;HEBREW POINT SIN DOT
-05C1;afii57804;HEBREW POINT SHIN DOT
-05B9;afii57806;HEBREW POINT HOLAM
-05BC;afii57807;HEBREW POINT DAGESH OR MAPIQ
-05BD;afii57839;HEBREW POINT METEG
-05BF;afii57841;HEBREW POINT RAFE
-05C0;afii57842;HEBREW PUNCTUATION PASEQ
-02BC;afii57929;MODIFIER LETTER APOSTROPHE
-2105;afii61248;CARE OF
-2113;afii61289;SCRIPT SMALL L
-2116;afii61352;NUMERO SIGN
-202C;afii61573;POP DIRECTIONAL FORMATTING
-202D;afii61574;LEFT-TO-RIGHT OVERRIDE
-202E;afii61575;RIGHT-TO-LEFT OVERRIDE
-200C;afii61664;ZERO WIDTH NON-JOINER
-066D;afii63167;ARABIC FIVE POINTED STAR
-02BD;afii64937;MODIFIER LETTER REVERSED COMMA
-00E0;agrave;LATIN SMALL LETTER A WITH GRAVE
-2135;aleph;ALEF SYMBOL
-03B1;alpha;GREEK SMALL LETTER ALPHA
-03AC;alphatonos;GREEK SMALL LETTER ALPHA WITH TONOS
-0101;amacron;LATIN SMALL LETTER A WITH MACRON
-0026;ampersand;AMPERSAND
-F726;ampersandsmall;SMALL CAPITAL AMPERSAND
-2220;angle;ANGLE
-2329;angleleft;LEFT-POINTING ANGLE BRACKET
-232A;angleright;RIGHT-POINTING ANGLE BRACKET
-0387;anoteleia;GREEK ANO TELEIA
-0105;aogonek;LATIN SMALL LETTER A WITH OGONEK
-2248;approxequal;ALMOST EQUAL TO
-00E5;aring;LATIN SMALL LETTER A WITH RING ABOVE
-01FB;aringacute;LATIN SMALL LETTER A WITH RING ABOVE AND ACUTE
-2194;arrowboth;LEFT RIGHT ARROW
-21D4;arrowdblboth;LEFT RIGHT DOUBLE ARROW
-21D3;arrowdbldown;DOWNWARDS DOUBLE ARROW
-21D0;arrowdblleft;LEFTWARDS DOUBLE ARROW
-21D2;arrowdblright;RIGHTWARDS DOUBLE ARROW
-21D1;arrowdblup;UPWARDS DOUBLE ARROW
-2193;arrowdown;DOWNWARDS ARROW
-F8E7;arrowhorizex;HORIZONTAL ARROW EXTENDER
-2190;arrowleft;LEFTWARDS ARROW
-2192;arrowright;RIGHTWARDS ARROW
-2191;arrowup;UPWARDS ARROW
-2195;arrowupdn;UP DOWN ARROW
-21A8;arrowupdnbse;UP DOWN ARROW WITH BASE
-F8E6;arrowvertex;VERTICAL ARROW EXTENDER
-005E;asciicircum;CIRCUMFLEX ACCENT
-007E;asciitilde;TILDE
-002A;asterisk;ASTERISK
-2217;asteriskmath;ASTERISK OPERATOR
-F6E9;asuperior;SUPERSCRIPT LATIN SMALL LETTER A
-0040;at;COMMERCIAL AT
-00E3;atilde;LATIN SMALL LETTER A WITH TILDE
-0062;b;LATIN SMALL LETTER B
-005C;backslash;REVERSE SOLIDUS
-007C;bar;VERTICAL LINE
-03B2;beta;GREEK SMALL LETTER BETA
-2588;block;FULL BLOCK
-F8F4;braceex;CURLY BRACKET EXTENDER
-007B;braceleft;LEFT CURLY BRACKET
-F8F3;braceleftbt;LEFT CURLY BRACKET BOTTOM
-F8F2;braceleftmid;LEFT CURLY BRACKET MID
-F8F1;bracelefttp;LEFT CURLY BRACKET TOP
-007D;braceright;RIGHT CURLY BRACKET
-F8FE;bracerightbt;RIGHT CURLY BRACKET BOTTOM
-F8FD;bracerightmid;RIGHT CURLY BRACKET MID
-F8FC;bracerighttp;RIGHT CURLY BRACKET TOP
-005B;bracketleft;LEFT SQUARE BRACKET
-F8F0;bracketleftbt;LEFT SQUARE BRACKET BOTTOM
-F8EF;bracketleftex;LEFT SQUARE BRACKET EXTENDER
-F8EE;bracketlefttp;LEFT SQUARE BRACKET TOP
-005D;bracketright;RIGHT SQUARE BRACKET
-F8FB;bracketrightbt;RIGHT SQUARE BRACKET BOTTOM
-F8FA;bracketrightex;RIGHT SQUARE BRACKET EXTENDER
-F8F9;bracketrighttp;RIGHT SQUARE BRACKET TOP
-02D8;breve;BREVE
-00A6;brokenbar;BROKEN BAR
-F6EA;bsuperior;SUPERSCRIPT LATIN SMALL LETTER B
-2022;bullet;BULLET
-0063;c;LATIN SMALL LETTER C
-0107;cacute;LATIN SMALL LETTER C WITH ACUTE
-02C7;caron;CARON
-21B5;carriagereturn;DOWNWARDS ARROW WITH CORNER LEFTWARDS
-010D;ccaron;LATIN SMALL LETTER C WITH CARON
-00E7;ccedilla;LATIN SMALL LETTER C WITH CEDILLA
-0109;ccircumflex;LATIN SMALL LETTER C WITH CIRCUMFLEX
-010B;cdotaccent;LATIN SMALL LETTER C WITH DOT ABOVE
-00B8;cedilla;CEDILLA
-00A2;cent;CENT SIGN
-F6DF;centinferior;SUBSCRIPT CENT SIGN
-F7A2;centoldstyle;OLDSTYLE CENT SIGN
-F6E0;centsuperior;SUPERSCRIPT CENT SIGN
-03C7;chi;GREEK SMALL LETTER CHI
-25CB;circle;WHITE CIRCLE
-2297;circlemultiply;CIRCLED TIMES
-2295;circleplus;CIRCLED PLUS
-02C6;circumflex;MODIFIER LETTER CIRCUMFLEX ACCENT
-2663;club;BLACK CLUB SUIT
-003A;colon;COLON
-20A1;colonmonetary;COLON SIGN
-002C;comma;COMMA
-F6C3;commaaccent;COMMA BELOW
-F6E1;commainferior;SUBSCRIPT COMMA
-F6E2;commasuperior;SUPERSCRIPT COMMA
-2245;congruent;APPROXIMATELY EQUAL TO
-00A9;copyright;COPYRIGHT SIGN
-F8E9;copyrightsans;COPYRIGHT SIGN SANS SERIF
-F6D9;copyrightserif;COPYRIGHT SIGN SERIF
-00A4;currency;CURRENCY SIGN
-F6D1;cyrBreve;CAPITAL CYRILLIC BREVE
-F6D2;cyrFlex;CAPITAL CYRILLIC CIRCUMFLEX
-F6D4;cyrbreve;CYRILLIC BREVE
-F6D5;cyrflex;CYRILLIC CIRCUMFLEX
-0064;d;LATIN SMALL LETTER D
-2020;dagger;DAGGER
-2021;daggerdbl;DOUBLE DAGGER
-F6D3;dblGrave;CAPITAL DOUBLE GRAVE ACCENT
-F6D6;dblgrave;DOUBLE GRAVE ACCENT
-010F;dcaron;LATIN SMALL LETTER D WITH CARON
-0111;dcroat;LATIN SMALL LETTER D WITH STROKE
-00B0;degree;DEGREE SIGN
-03B4;delta;GREEK SMALL LETTER DELTA
-2666;diamond;BLACK DIAMOND SUIT
-00A8;dieresis;DIAERESIS
-F6D7;dieresisacute;DIAERESIS ACUTE ACCENT
-F6D8;dieresisgrave;DIAERESIS GRAVE ACCENT
-0385;dieresistonos;GREEK DIALYTIKA TONOS
-00F7;divide;DIVISION SIGN
-2593;dkshade;DARK SHADE
-2584;dnblock;LOWER HALF BLOCK
-0024;dollar;DOLLAR SIGN
-F6E3;dollarinferior;SUBSCRIPT DOLLAR SIGN
-F724;dollaroldstyle;OLDSTYLE DOLLAR SIGN
-F6E4;dollarsuperior;SUPERSCRIPT DOLLAR SIGN
-20AB;dong;DONG SIGN
-02D9;dotaccent;DOT ABOVE
-0323;dotbelowcomb;COMBINING DOT BELOW
-0131;dotlessi;LATIN SMALL LETTER DOTLESS I
-F6BE;dotlessj;LATIN SMALL LETTER DOTLESS J
-22C5;dotmath;DOT OPERATOR
-F6EB;dsuperior;SUPERSCRIPT LATIN SMALL LETTER D
-0065;e;LATIN SMALL LETTER E
-00E9;eacute;LATIN SMALL LETTER E WITH ACUTE
-0115;ebreve;LATIN SMALL LETTER E WITH BREVE
-011B;ecaron;LATIN SMALL LETTER E WITH CARON
-00EA;ecircumflex;LATIN SMALL LETTER E WITH CIRCUMFLEX
-00EB;edieresis;LATIN SMALL LETTER E WITH DIAERESIS
-0117;edotaccent;LATIN SMALL LETTER E WITH DOT ABOVE
-00E8;egrave;LATIN SMALL LETTER E WITH GRAVE
-0038;eight;DIGIT EIGHT
-2088;eightinferior;SUBSCRIPT EIGHT
-F738;eightoldstyle;OLDSTYLE DIGIT EIGHT
-2078;eightsuperior;SUPERSCRIPT EIGHT
-2208;element;ELEMENT OF
-2026;ellipsis;HORIZONTAL ELLIPSIS
-0113;emacron;LATIN SMALL LETTER E WITH MACRON
-2014;emdash;EM DASH
-2205;emptyset;EMPTY SET
-2013;endash;EN DASH
-014B;eng;LATIN SMALL LETTER ENG
-0119;eogonek;LATIN SMALL LETTER E WITH OGONEK
-03B5;epsilon;GREEK SMALL LETTER EPSILON
-03AD;epsilontonos;GREEK SMALL LETTER EPSILON WITH TONOS
-003D;equal;EQUALS SIGN
-2261;equivalence;IDENTICAL TO
-212E;estimated;ESTIMATED SYMBOL
-F6EC;esuperior;SUPERSCRIPT LATIN SMALL LETTER E
-03B7;eta;GREEK SMALL LETTER ETA
-03AE;etatonos;GREEK SMALL LETTER ETA WITH TONOS
-00F0;eth;LATIN SMALL LETTER ETH
-0021;exclam;EXCLAMATION MARK
-203C;exclamdbl;DOUBLE EXCLAMATION MARK
-00A1;exclamdown;INVERTED EXCLAMATION MARK
-F7A1;exclamdownsmall;SMALL CAPITAL INVERTED EXCLAMATION MARK
-F721;exclamsmall;SMALL CAPITAL EXCLAMATION MARK
-2203;existential;THERE EXISTS
-0066;f;LATIN SMALL LETTER F
-2640;female;FEMALE SIGN
-FB00;ff;LATIN SMALL LIGATURE FF
-FB03;ffi;LATIN SMALL LIGATURE FFI
-FB04;ffl;LATIN SMALL LIGATURE FFL
-FB01;fi;LATIN SMALL LIGATURE FI
-2012;figuredash;FIGURE DASH
-25A0;filledbox;BLACK SQUARE
-25AC;filledrect;BLACK RECTANGLE
-0035;five;DIGIT FIVE
-215D;fiveeighths;VULGAR FRACTION FIVE EIGHTHS
-2085;fiveinferior;SUBSCRIPT FIVE
-F735;fiveoldstyle;OLDSTYLE DIGIT FIVE
-2075;fivesuperior;SUPERSCRIPT FIVE
-FB02;fl;LATIN SMALL LIGATURE FL
-0192;florin;LATIN SMALL LETTER F WITH HOOK
-0034;four;DIGIT FOUR
-2084;fourinferior;SUBSCRIPT FOUR
-F734;fouroldstyle;OLDSTYLE DIGIT FOUR
-2074;foursuperior;SUPERSCRIPT FOUR
-2044;fraction;FRACTION SLASH
-2215;fraction;DIVISION SLASH;Duplicate
-20A3;franc;FRENCH FRANC SIGN
-0067;g;LATIN SMALL LETTER G
-03B3;gamma;GREEK SMALL LETTER GAMMA
-011F;gbreve;LATIN SMALL LETTER G WITH BREVE
-01E7;gcaron;LATIN SMALL LETTER G WITH CARON
-011D;gcircumflex;LATIN SMALL LETTER G WITH CIRCUMFLEX
-0123;gcommaaccent;LATIN SMALL LETTER G WITH CEDILLA
-0121;gdotaccent;LATIN SMALL LETTER G WITH DOT ABOVE
-00DF;germandbls;LATIN SMALL LETTER SHARP S
-2207;gradient;NABLA
-0060;grave;GRAVE ACCENT
-0300;gravecomb;COMBINING GRAVE ACCENT
-003E;greater;GREATER-THAN SIGN
-2265;greaterequal;GREATER-THAN OR EQUAL TO
-00AB;guillemotleft;LEFT-POINTING DOUBLE ANGLE QUOTATION MARK
-00BB;guillemotright;RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK
-2039;guilsinglleft;SINGLE LEFT-POINTING ANGLE QUOTATION MARK
-203A;guilsinglright;SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
-0068;h;LATIN SMALL LETTER H
-0127;hbar;LATIN SMALL LETTER H WITH STROKE
-0125;hcircumflex;LATIN SMALL LETTER H WITH CIRCUMFLEX
-2665;heart;BLACK HEART SUIT
-0309;hookabovecomb;COMBINING HOOK ABOVE
-2302;house;HOUSE
-02DD;hungarumlaut;DOUBLE ACUTE ACCENT
-002D;hyphen;HYPHEN-MINUS
-00AD;hyphen;SOFT HYPHEN;Duplicate
-F6E5;hypheninferior;SUBSCRIPT HYPHEN-MINUS
-F6E6;hyphensuperior;SUPERSCRIPT HYPHEN-MINUS
-0069;i;LATIN SMALL LETTER I
-00ED;iacute;LATIN SMALL LETTER I WITH ACUTE
-012D;ibreve;LATIN SMALL LETTER I WITH BREVE
-00EE;icircumflex;LATIN SMALL LETTER I WITH CIRCUMFLEX
-00EF;idieresis;LATIN SMALL LETTER I WITH DIAERESIS
-00EC;igrave;LATIN SMALL LETTER I WITH GRAVE
-0133;ij;LATIN SMALL LIGATURE IJ
-012B;imacron;LATIN SMALL LETTER I WITH MACRON
-221E;infinity;INFINITY
-222B;integral;INTEGRAL
-2321;integralbt;BOTTOM HALF INTEGRAL
-F8F5;integralex;INTEGRAL EXTENDER
-2320;integraltp;TOP HALF INTEGRAL
-2229;intersection;INTERSECTION
-25D8;invbullet;INVERSE BULLET
-25D9;invcircle;INVERSE WHITE CIRCLE
-263B;invsmileface;BLACK SMILING FACE
-012F;iogonek;LATIN SMALL LETTER I WITH OGONEK
-03B9;iota;GREEK SMALL LETTER IOTA
-03CA;iotadieresis;GREEK SMALL LETTER IOTA WITH DIALYTIKA
-0390;iotadieresistonos;GREEK SMALL LETTER IOTA WITH DIALYTIKA AND TONOS
-03AF;iotatonos;GREEK SMALL LETTER IOTA WITH TONOS
-F6ED;isuperior;SUPERSCRIPT LATIN SMALL LETTER I
-0129;itilde;LATIN SMALL LETTER I WITH TILDE
-006A;j;LATIN SMALL LETTER J
-0135;jcircumflex;LATIN SMALL LETTER J WITH CIRCUMFLEX
-006B;k;LATIN SMALL LETTER K
-03BA;kappa;GREEK SMALL LETTER KAPPA
-0137;kcommaaccent;LATIN SMALL LETTER K WITH CEDILLA
-0138;kgreenlandic;LATIN SMALL LETTER KRA
-006C;l;LATIN SMALL LETTER L
-013A;lacute;LATIN SMALL LETTER L WITH ACUTE
-03BB;lambda;GREEK SMALL LETTER LAMDA
-013E;lcaron;LATIN SMALL LETTER L WITH CARON
-013C;lcommaaccent;LATIN SMALL LETTER L WITH CEDILLA
-0140;ldot;LATIN SMALL LETTER L WITH MIDDLE DOT
-003C;less;LESS-THAN SIGN
-2264;lessequal;LESS-THAN OR EQUAL TO
-258C;lfblock;LEFT HALF BLOCK
-20A4;lira;LIRA SIGN
-F6C0;ll;LATIN SMALL LETTER LL
-2227;logicaland;LOGICAL AND
-00AC;logicalnot;NOT SIGN
-2228;logicalor;LOGICAL OR
-017F;longs;LATIN SMALL LETTER LONG S
-25CA;lozenge;LOZENGE
-0142;lslash;LATIN SMALL LETTER L WITH STROKE
-F6EE;lsuperior;SUPERSCRIPT LATIN SMALL LETTER L
-2591;ltshade;LIGHT SHADE
-006D;m;LATIN SMALL LETTER M
-00AF;macron;MACRON
-02C9;macron;MODIFIER LETTER MACRON;Duplicate
-2642;male;MALE SIGN
-2212;minus;MINUS SIGN
-2032;minute;PRIME
-F6EF;msuperior;SUPERSCRIPT LATIN SMALL LETTER M
-00B5;mu;MICRO SIGN
-03BC;mu;GREEK SMALL LETTER MU;Duplicate
-00D7;multiply;MULTIPLICATION SIGN
-266A;musicalnote;EIGHTH NOTE
-266B;musicalnotedbl;BEAMED EIGHTH NOTES
-006E;n;LATIN SMALL LETTER N
-0144;nacute;LATIN SMALL LETTER N WITH ACUTE
-0149;napostrophe;LATIN SMALL LETTER N PRECEDED BY APOSTROPHE
-0148;ncaron;LATIN SMALL LETTER N WITH CARON
-0146;ncommaaccent;LATIN SMALL LETTER N WITH CEDILLA
-0039;nine;DIGIT NINE
-2089;nineinferior;SUBSCRIPT NINE
-F739;nineoldstyle;OLDSTYLE DIGIT NINE
-2079;ninesuperior;SUPERSCRIPT NINE
-2209;notelement;NOT AN ELEMENT OF
-2260;notequal;NOT EQUAL TO
-2284;notsubset;NOT A SUBSET OF
-207F;nsuperior;SUPERSCRIPT LATIN SMALL LETTER N
-00F1;ntilde;LATIN SMALL LETTER N WITH TILDE
-03BD;nu;GREEK SMALL LETTER NU
-0023;numbersign;NUMBER SIGN
-006F;o;LATIN SMALL LETTER O
-00F3;oacute;LATIN SMALL LETTER O WITH ACUTE
-014F;obreve;LATIN SMALL LETTER O WITH BREVE
-00F4;ocircumflex;LATIN SMALL LETTER O WITH CIRCUMFLEX
-00F6;odieresis;LATIN SMALL LETTER O WITH DIAERESIS
-0153;oe;LATIN SMALL LIGATURE OE
-02DB;ogonek;OGONEK
-00F2;ograve;LATIN SMALL LETTER O WITH GRAVE
-01A1;ohorn;LATIN SMALL LETTER O WITH HORN
-0151;ohungarumlaut;LATIN SMALL LETTER O WITH DOUBLE ACUTE
-014D;omacron;LATIN SMALL LETTER O WITH MACRON
-03C9;omega;GREEK SMALL LETTER OMEGA
-03D6;omega1;GREEK PI SYMBOL
-03CE;omegatonos;GREEK SMALL LETTER OMEGA WITH TONOS
-03BF;omicron;GREEK SMALL LETTER OMICRON
-03CC;omicrontonos;GREEK SMALL LETTER OMICRON WITH TONOS
-0031;one;DIGIT ONE
-2024;onedotenleader;ONE DOT LEADER
-215B;oneeighth;VULGAR FRACTION ONE EIGHTH
-F6DC;onefitted;PROPORTIONAL DIGIT ONE
-00BD;onehalf;VULGAR FRACTION ONE HALF
-2081;oneinferior;SUBSCRIPT ONE
-F731;oneoldstyle;OLDSTYLE DIGIT ONE
-00BC;onequarter;VULGAR FRACTION ONE QUARTER
-00B9;onesuperior;SUPERSCRIPT ONE
-2153;onethird;VULGAR FRACTION ONE THIRD
-25E6;openbullet;WHITE BULLET
-00AA;ordfeminine;FEMININE ORDINAL INDICATOR
-00BA;ordmasculine;MASCULINE ORDINAL INDICATOR
-221F;orthogonal;RIGHT ANGLE
-00F8;oslash;LATIN SMALL LETTER O WITH STROKE
-01FF;oslashacute;LATIN SMALL LETTER O WITH STROKE AND ACUTE
-F6F0;osuperior;SUPERSCRIPT LATIN SMALL LETTER O
-00F5;otilde;LATIN SMALL LETTER O WITH TILDE
-0070;p;LATIN SMALL LETTER P
-00B6;paragraph;PILCROW SIGN
-0028;parenleft;LEFT PARENTHESIS
-F8ED;parenleftbt;LEFT PAREN BOTTOM
-F8EC;parenleftex;LEFT PAREN EXTENDER
-208D;parenleftinferior;SUBSCRIPT LEFT PARENTHESIS
-207D;parenleftsuperior;SUPERSCRIPT LEFT PARENTHESIS
-F8EB;parenlefttp;LEFT PAREN TOP
-0029;parenright;RIGHT PARENTHESIS
-F8F8;parenrightbt;RIGHT PAREN BOTTOM
-F8F7;parenrightex;RIGHT PAREN EXTENDER
-208E;parenrightinferior;SUBSCRIPT RIGHT PARENTHESIS
-207E;parenrightsuperior;SUPERSCRIPT RIGHT PARENTHESIS
-F8F6;parenrighttp;RIGHT PAREN TOP
-2202;partialdiff;PARTIAL DIFFERENTIAL
-0025;percent;PERCENT SIGN
-002E;period;FULL STOP
-00B7;periodcentered;MIDDLE DOT
-2219;periodcentered;BULLET OPERATOR;Duplicate
-F6E7;periodinferior;SUBSCRIPT FULL STOP
-F6E8;periodsuperior;SUPERSCRIPT FULL STOP
-22A5;perpendicular;UP TACK
-2030;perthousand;PER MILLE SIGN
-20A7;peseta;PESETA SIGN
-03C6;phi;GREEK SMALL LETTER PHI
-03D5;phi1;GREEK PHI SYMBOL
-03C0;pi;GREEK SMALL LETTER PI
-002B;plus;PLUS SIGN
-00B1;plusminus;PLUS-MINUS SIGN
-211E;prescription;PRESCRIPTION TAKE
-220F;product;N-ARY PRODUCT
-2282;propersubset;SUBSET OF
-2283;propersuperset;SUPERSET OF
-221D;proportional;PROPORTIONAL TO
-03C8;psi;GREEK SMALL LETTER PSI
-0071;q;LATIN SMALL LETTER Q
-003F;question;QUESTION MARK
-00BF;questiondown;INVERTED QUESTION MARK
-F7BF;questiondownsmall;SMALL CAPITAL INVERTED QUESTION MARK
-F73F;questionsmall;SMALL CAPITAL QUESTION MARK
-0022;quotedbl;QUOTATION MARK
-201E;quotedblbase;DOUBLE LOW-9 QUOTATION MARK
-201C;quotedblleft;LEFT DOUBLE QUOTATION MARK
-201D;quotedblright;RIGHT DOUBLE QUOTATION MARK
-2018;quoteleft;LEFT SINGLE QUOTATION MARK
-201B;quotereversed;SINGLE HIGH-REVERSED-9 QUOTATION MARK
-2019;quoteright;RIGHT SINGLE QUOTATION MARK
-201A;quotesinglbase;SINGLE LOW-9 QUOTATION MARK
-0027;quotesingle;APOSTROPHE
-0072;r;LATIN SMALL LETTER R
-0155;racute;LATIN SMALL LETTER R WITH ACUTE
-221A;radical;SQUARE ROOT
-F8E5;radicalex;RADICAL EXTENDER
-0159;rcaron;LATIN SMALL LETTER R WITH CARON
-0157;rcommaaccent;LATIN SMALL LETTER R WITH CEDILLA
-2286;reflexsubset;SUBSET OF OR EQUAL TO
-2287;reflexsuperset;SUPERSET OF OR EQUAL TO
-00AE;registered;REGISTERED SIGN
-F8E8;registersans;REGISTERED SIGN SANS SERIF
-F6DA;registerserif;REGISTERED SIGN SERIF
-2310;revlogicalnot;REVERSED NOT SIGN
-03C1;rho;GREEK SMALL LETTER RHO
-02DA;ring;RING ABOVE
-F6F1;rsuperior;SUPERSCRIPT LATIN SMALL LETTER R
-2590;rtblock;RIGHT HALF BLOCK
-F6DD;rupiah;RUPIAH SIGN
-0073;s;LATIN SMALL LETTER S
-015B;sacute;LATIN SMALL LETTER S WITH ACUTE
-0161;scaron;LATIN SMALL LETTER S WITH CARON
-015F;scedilla;LATIN SMALL LETTER S WITH CEDILLA
-F6C2;scedilla;LATIN SMALL LETTER S WITH CEDILLA;Duplicate
-015D;scircumflex;LATIN SMALL LETTER S WITH CIRCUMFLEX
-0219;scommaaccent;LATIN SMALL LETTER S WITH COMMA BELOW
-2033;second;DOUBLE PRIME
-00A7;section;SECTION SIGN
-003B;semicolon;SEMICOLON
-0037;seven;DIGIT SEVEN
-215E;seveneighths;VULGAR FRACTION SEVEN EIGHTHS
-2087;seveninferior;SUBSCRIPT SEVEN
-F737;sevenoldstyle;OLDSTYLE DIGIT SEVEN
-2077;sevensuperior;SUPERSCRIPT SEVEN
-2592;shade;MEDIUM SHADE
-03C3;sigma;GREEK SMALL LETTER SIGMA
-03C2;sigma1;GREEK SMALL LETTER FINAL SIGMA
-223C;similar;TILDE OPERATOR
-0036;six;DIGIT SIX
-2086;sixinferior;SUBSCRIPT SIX
-F736;sixoldstyle;OLDSTYLE DIGIT SIX
-2076;sixsuperior;SUPERSCRIPT SIX
-002F;slash;SOLIDUS
-263A;smileface;WHITE SMILING FACE
-0020;space;SPACE
-00A0;space;NO-BREAK SPACE;Duplicate
-2660;spade;BLACK SPADE SUIT
-F6F2;ssuperior;SUPERSCRIPT LATIN SMALL LETTER S
-00A3;sterling;POUND SIGN
-220B;suchthat;CONTAINS AS MEMBER
-2211;summation;N-ARY SUMMATION
-263C;sun;WHITE SUN WITH RAYS
-0074;t;LATIN SMALL LETTER T
-03C4;tau;GREEK SMALL LETTER TAU
-0167;tbar;LATIN SMALL LETTER T WITH STROKE
-0165;tcaron;LATIN SMALL LETTER T WITH CARON
-0163;tcommaaccent;LATIN SMALL LETTER T WITH CEDILLA
-021B;tcommaaccent;LATIN SMALL LETTER T WITH COMMA BELOW;Duplicate
-2234;therefore;THEREFORE
-03B8;theta;GREEK SMALL LETTER THETA
-03D1;theta1;GREEK THETA SYMBOL
-00FE;thorn;LATIN SMALL LETTER THORN
-0033;three;DIGIT THREE
-215C;threeeighths;VULGAR FRACTION THREE EIGHTHS
-2083;threeinferior;SUBSCRIPT THREE
-F733;threeoldstyle;OLDSTYLE DIGIT THREE
-00BE;threequarters;VULGAR FRACTION THREE QUARTERS
-F6DE;threequartersemdash;THREE QUARTERS EM DASH
-00B3;threesuperior;SUPERSCRIPT THREE
-02DC;tilde;SMALL TILDE
-0303;tildecomb;COMBINING TILDE
-0384;tonos;GREEK TONOS
-2122;trademark;TRADE MARK SIGN
-F8EA;trademarksans;TRADE MARK SIGN SANS SERIF
-F6DB;trademarkserif;TRADE MARK SIGN SERIF
-25BC;triagdn;BLACK DOWN-POINTING TRIANGLE
-25C4;triaglf;BLACK LEFT-POINTING POINTER
-25BA;triagrt;BLACK RIGHT-POINTING POINTER
-25B2;triagup;BLACK UP-POINTING TRIANGLE
-F6F3;tsuperior;SUPERSCRIPT LATIN SMALL LETTER T
-0032;two;DIGIT TWO
-2025;twodotenleader;TWO DOT LEADER
-2082;twoinferior;SUBSCRIPT TWO
-F732;twooldstyle;OLDSTYLE DIGIT TWO
-00B2;twosuperior;SUPERSCRIPT TWO
-2154;twothirds;VULGAR FRACTION TWO THIRDS
-0075;u;LATIN SMALL LETTER U
-00FA;uacute;LATIN SMALL LETTER U WITH ACUTE
-016D;ubreve;LATIN SMALL LETTER U WITH BREVE
-00FB;ucircumflex;LATIN SMALL LETTER U WITH CIRCUMFLEX
-00FC;udieresis;LATIN SMALL LETTER U WITH DIAERESIS
-00F9;ugrave;LATIN SMALL LETTER U WITH GRAVE
-01B0;uhorn;LATIN SMALL LETTER U WITH HORN
-0171;uhungarumlaut;LATIN SMALL LETTER U WITH DOUBLE ACUTE
-016B;umacron;LATIN SMALL LETTER U WITH MACRON
-005F;underscore;LOW LINE
-2017;underscoredbl;DOUBLE LOW LINE
-222A;union;UNION
-2200;universal;FOR ALL
-0173;uogonek;LATIN SMALL LETTER U WITH OGONEK
-2580;upblock;UPPER HALF BLOCK
-03C5;upsilon;GREEK SMALL LETTER UPSILON
-03CB;upsilondieresis;GREEK SMALL LETTER UPSILON WITH DIALYTIKA
-03B0;upsilondieresistonos;GREEK SMALL LETTER UPSILON WITH DIALYTIKA AND TONOS
-03CD;upsilontonos;GREEK SMALL LETTER UPSILON WITH TONOS
-016F;uring;LATIN SMALL LETTER U WITH RING ABOVE
-0169;utilde;LATIN SMALL LETTER U WITH TILDE
-0076;v;LATIN SMALL LETTER V
-0077;w;LATIN SMALL LETTER W
-1E83;wacute;LATIN SMALL LETTER W WITH ACUTE
-0175;wcircumflex;LATIN SMALL LETTER W WITH CIRCUMFLEX
-1E85;wdieresis;LATIN SMALL LETTER W WITH DIAERESIS
-2118;weierstrass;SCRIPT CAPITAL P
-1E81;wgrave;LATIN SMALL LETTER W WITH GRAVE
-0078;x;LATIN SMALL LETTER X
-03BE;xi;GREEK SMALL LETTER XI
-0079;y;LATIN SMALL LETTER Y
-00FD;yacute;LATIN SMALL LETTER Y WITH ACUTE
-0177;ycircumflex;LATIN SMALL LETTER Y WITH CIRCUMFLEX
-00FF;ydieresis;LATIN SMALL LETTER Y WITH DIAERESIS
-00A5;yen;YEN SIGN
-1EF3;ygrave;LATIN SMALL LETTER Y WITH GRAVE
-007A;z;LATIN SMALL LETTER Z
-017A;zacute;LATIN SMALL LETTER Z WITH ACUTE
-017E;zcaron;LATIN SMALL LETTER Z WITH CARON
-017C;zdotaccent;LATIN SMALL LETTER Z WITH DOT ABOVE
-0030;zero;DIGIT ZERO
-2080;zeroinferior;SUBSCRIPT ZERO
-F730;zerooldstyle;OLDSTYLE DIGIT ZERO
-2070;zerosuperior;SUPERSCRIPT ZERO
-03B6;zeta;GREEK SMALL LETTER ZETA
+A;0041
+AE;00C6
+AEacute;01FC
+AEmacron;01E2
+AEsmall;F7E6
+Aacute;00C1
+Aacutesmall;F7E1
+Abreve;0102
+Abreveacute;1EAE
+Abrevecyrillic;04D0
+Abrevedotbelow;1EB6
+Abrevegrave;1EB0
+Abrevehookabove;1EB2
+Abrevetilde;1EB4
+Acaron;01CD
+Acircle;24B6
+Acircumflex;00C2
+Acircumflexacute;1EA4
+Acircumflexdotbelow;1EAC
+Acircumflexgrave;1EA6
+Acircumflexhookabove;1EA8
+Acircumflexsmall;F7E2
+Acircumflextilde;1EAA
+Acute;F6C9
+Acutesmall;F7B4
+Acyrillic;0410
+Adblgrave;0200
+Adieresis;00C4
+Adieresiscyrillic;04D2
+Adieresismacron;01DE
+Adieresissmall;F7E4
+Adotbelow;1EA0
+Adotmacron;01E0
+Agrave;00C0
+Agravesmall;F7E0
+Ahookabove;1EA2
+Aiecyrillic;04D4
+Ainvertedbreve;0202
+Alpha;0391
+Alphatonos;0386
+Amacron;0100
+Amonospace;FF21
+Aogonek;0104
+Aring;00C5
+Aringacute;01FA
+Aringbelow;1E00
+Aringsmall;F7E5
+Asmall;F761
+Atilde;00C3
+Atildesmall;F7E3
+Aybarmenian;0531
+B;0042
+Bcircle;24B7
+Bdotaccent;1E02
+Bdotbelow;1E04
+Becyrillic;0411
+Benarmenian;0532
+Beta;0392
+Bhook;0181
+Blinebelow;1E06
+Bmonospace;FF22
+Brevesmall;F6F4
+Bsmall;F762
+Btopbar;0182
+C;0043
+Caarmenian;053E
+Cacute;0106
+Caron;F6CA
+Caronsmall;F6F5
+Ccaron;010C
+Ccedilla;00C7
+Ccedillaacute;1E08
+Ccedillasmall;F7E7
+Ccircle;24B8
+Ccircumflex;0108
+Cdot;010A
+Cdotaccent;010A
+Cedillasmall;F7B8
+Chaarmenian;0549
+Cheabkhasiancyrillic;04BC
+Checyrillic;0427
+Chedescenderabkhasiancyrillic;04BE
+Chedescendercyrillic;04B6
+Chedieresiscyrillic;04F4
+Cheharmenian;0543
+Chekhakassiancyrillic;04CB
+Cheverticalstrokecyrillic;04B8
+Chi;03A7
+Chook;0187
+Circumflexsmall;F6F6
+Cmonospace;FF23
+Coarmenian;0551
+Csmall;F763
+D;0044
+DZ;01F1
+DZcaron;01C4
+Daarmenian;0534
+Dafrican;0189
+Dcaron;010E
+Dcedilla;1E10
+Dcircle;24B9
+Dcircumflexbelow;1E12
+Dcroat;0110
+Ddotaccent;1E0A
+Ddotbelow;1E0C
+Decyrillic;0414
+Deicoptic;03EE
+Delta;2206
+Deltagreek;0394
+Dhook;018A
+Dieresis;F6CB
+DieresisAcute;F6CC
+DieresisGrave;F6CD
+Dieresissmall;F7A8
+Digammagreek;03DC
+Djecyrillic;0402
+Dlinebelow;1E0E
+Dmonospace;FF24
+Dotaccentsmall;F6F7
+Dslash;0110
+Dsmall;F764
+Dtopbar;018B
+Dz;01F2
+Dzcaron;01C5
+Dzeabkhasiancyrillic;04E0
+Dzecyrillic;0405
+Dzhecyrillic;040F
+E;0045
+Eacute;00C9
+Eacutesmall;F7E9
+Ebreve;0114
+Ecaron;011A
+Ecedillabreve;1E1C
+Echarmenian;0535
+Ecircle;24BA
+Ecircumflex;00CA
+Ecircumflexacute;1EBE
+Ecircumflexbelow;1E18
+Ecircumflexdotbelow;1EC6
+Ecircumflexgrave;1EC0
+Ecircumflexhookabove;1EC2
+Ecircumflexsmall;F7EA
+Ecircumflextilde;1EC4
+Ecyrillic;0404
+Edblgrave;0204
+Edieresis;00CB
+Edieresissmall;F7EB
+Edot;0116
+Edotaccent;0116
+Edotbelow;1EB8
+Efcyrillic;0424
+Egrave;00C8
+Egravesmall;F7E8
+Eharmenian;0537
+Ehookabove;1EBA
+Eightroman;2167
+Einvertedbreve;0206
+Eiotifiedcyrillic;0464
+Elcyrillic;041B
+Elevenroman;216A
+Emacron;0112
+Emacronacute;1E16
+Emacrongrave;1E14
+Emcyrillic;041C
+Emonospace;FF25
+Encyrillic;041D
+Endescendercyrillic;04A2
+Eng;014A
+Enghecyrillic;04A4
+Enhookcyrillic;04C7
+Eogonek;0118
+Eopen;0190
+Epsilon;0395
+Epsilontonos;0388
+Ercyrillic;0420
+Ereversed;018E
+Ereversedcyrillic;042D
+Escyrillic;0421
+Esdescendercyrillic;04AA
+Esh;01A9
+Esmall;F765
+Eta;0397
+Etarmenian;0538
+Etatonos;0389
+Eth;00D0
+Ethsmall;F7F0
+Etilde;1EBC
+Etildebelow;1E1A
+Euro;20AC
+Ezh;01B7
+Ezhcaron;01EE
+Ezhreversed;01B8
+F;0046
+Fcircle;24BB
+Fdotaccent;1E1E
+Feharmenian;0556
+Feicoptic;03E4
+Fhook;0191
+Fitacyrillic;0472
+Fiveroman;2164
+Fmonospace;FF26
+Fourroman;2163
+Fsmall;F766
+G;0047
+GBsquare;3387
+Gacute;01F4
+Gamma;0393
+Gammaafrican;0194
+Gangiacoptic;03EA
+Gbreve;011E
+Gcaron;01E6
+Gcedilla;0122
+Gcircle;24BC
+Gcircumflex;011C
+Gcommaaccent;0122
+Gdot;0120
+Gdotaccent;0120
+Gecyrillic;0413
+Ghadarmenian;0542
+Ghemiddlehookcyrillic;0494
+Ghestrokecyrillic;0492
+Gheupturncyrillic;0490
+Ghook;0193
+Gimarmenian;0533
+Gjecyrillic;0403
+Gmacron;1E20
+Gmonospace;FF27
+Grave;F6CE
+Gravesmall;F760
+Gsmall;F767
+Gsmallhook;029B
+Gstroke;01E4
+H;0048
+H18533;25CF
+H18543;25AA
+H18551;25AB
+H22073;25A1
+HPsquare;33CB
+Haabkhasiancyrillic;04A8
+Hadescendercyrillic;04B2
+Hardsigncyrillic;042A
+Hbar;0126
+Hbrevebelow;1E2A
+Hcedilla;1E28
+Hcircle;24BD
+Hcircumflex;0124
+Hdieresis;1E26
+Hdotaccent;1E22
+Hdotbelow;1E24
+Hmonospace;FF28
+Hoarmenian;0540
+Horicoptic;03E8
+Hsmall;F768
+Hungarumlaut;F6CF
+Hungarumlautsmall;F6F8
+Hzsquare;3390
+I;0049
+IAcyrillic;042F
+IJ;0132
+IUcyrillic;042E
+Iacute;00CD
+Iacutesmall;F7ED
+Ibreve;012C
+Icaron;01CF
+Icircle;24BE
+Icircumflex;00CE
+Icircumflexsmall;F7EE
+Icyrillic;0406
+Idblgrave;0208
+Idieresis;00CF
+Idieresisacute;1E2E
+Idieresiscyrillic;04E4
+Idieresissmall;F7EF
+Idot;0130
+Idotaccent;0130
+Idotbelow;1ECA
+Iebrevecyrillic;04D6
+Iecyrillic;0415
+Ifraktur;2111
+Igrave;00CC
+Igravesmall;F7EC
+Ihookabove;1EC8
+Iicyrillic;0418
+Iinvertedbreve;020A
+Iishortcyrillic;0419
+Imacron;012A
+Imacroncyrillic;04E2
+Imonospace;FF29
+Iniarmenian;053B
+Iocyrillic;0401
+Iogonek;012E
+Iota;0399
+Iotaafrican;0196
+Iotadieresis;03AA
+Iotatonos;038A
+Ismall;F769
+Istroke;0197
+Itilde;0128
+Itildebelow;1E2C
+Izhitsacyrillic;0474
+Izhitsadblgravecyrillic;0476
+J;004A
+Jaarmenian;0541
+Jcircle;24BF
+Jcircumflex;0134
+Jecyrillic;0408
+Jheharmenian;054B
+Jmonospace;FF2A
+Jsmall;F76A
+K;004B
+KBsquare;3385
+KKsquare;33CD
+Kabashkircyrillic;04A0
+Kacute;1E30
+Kacyrillic;041A
+Kadescendercyrillic;049A
+Kahookcyrillic;04C3
+Kappa;039A
+Kastrokecyrillic;049E
+Kaverticalstrokecyrillic;049C
+Kcaron;01E8
+Kcedilla;0136
+Kcircle;24C0
+Kcommaaccent;0136
+Kdotbelow;1E32
+Keharmenian;0554
+Kenarmenian;053F
+Khacyrillic;0425
+Kheicoptic;03E6
+Khook;0198
+Kjecyrillic;040C
+Klinebelow;1E34
+Kmonospace;FF2B
+Koppacyrillic;0480
+Koppagreek;03DE
+Ksicyrillic;046E
+Ksmall;F76B
+L;004C
+LJ;01C7
+LL;F6BF
+Lacute;0139
+Lambda;039B
+Lcaron;013D
+Lcedilla;013B
+Lcircle;24C1
+Lcircumflexbelow;1E3C
+Lcommaaccent;013B
+Ldot;013F
+Ldotaccent;013F
+Ldotbelow;1E36
+Ldotbelowmacron;1E38
+Liwnarmenian;053C
+Lj;01C8
+Ljecyrillic;0409
+Llinebelow;1E3A
+Lmonospace;FF2C
+Lslash;0141
+Lslashsmall;F6F9
+Lsmall;F76C
+M;004D
+MBsquare;3386
+Macron;F6D0
+Macronsmall;F7AF
+Macute;1E3E
+Mcircle;24C2
+Mdotaccent;1E40
+Mdotbelow;1E42
+Menarmenian;0544
+Mmonospace;FF2D
+Msmall;F76D
+Mturned;019C
+Mu;039C
+N;004E
+NJ;01CA
+Nacute;0143
+Ncaron;0147
+Ncedilla;0145
+Ncircle;24C3
+Ncircumflexbelow;1E4A
+Ncommaaccent;0145
+Ndotaccent;1E44
+Ndotbelow;1E46
+Nhookleft;019D
+Nineroman;2168
+Nj;01CB
+Njecyrillic;040A
+Nlinebelow;1E48
+Nmonospace;FF2E
+Nowarmenian;0546
+Nsmall;F76E
+Ntilde;00D1
+Ntildesmall;F7F1
+Nu;039D
+O;004F
+OE;0152
+OEsmall;F6FA
+Oacute;00D3
+Oacutesmall;F7F3
+Obarredcyrillic;04E8
+Obarreddieresiscyrillic;04EA
+Obreve;014E
+Ocaron;01D1
+Ocenteredtilde;019F
+Ocircle;24C4
+Ocircumflex;00D4
+Ocircumflexacute;1ED0
+Ocircumflexdotbelow;1ED8
+Ocircumflexgrave;1ED2
+Ocircumflexhookabove;1ED4
+Ocircumflexsmall;F7F4
+Ocircumflextilde;1ED6
+Ocyrillic;041E
+Odblacute;0150
+Odblgrave;020C
+Odieresis;00D6
+Odieresiscyrillic;04E6
+Odieresissmall;F7F6
+Odotbelow;1ECC
+Ogoneksmall;F6FB
+Ograve;00D2
+Ogravesmall;F7F2
+Oharmenian;0555
+Ohm;2126
+Ohookabove;1ECE
+Ohorn;01A0
+Ohornacute;1EDA
+Ohorndotbelow;1EE2
+Ohorngrave;1EDC
+Ohornhookabove;1EDE
+Ohorntilde;1EE0
+Ohungarumlaut;0150
+Oi;01A2
+Oinvertedbreve;020E
+Omacron;014C
+Omacronacute;1E52
+Omacrongrave;1E50
+Omega;2126
+Omegacyrillic;0460
+Omegagreek;03A9
+Omegaroundcyrillic;047A
+Omegatitlocyrillic;047C
+Omegatonos;038F
+Omicron;039F
+Omicrontonos;038C
+Omonospace;FF2F
+Oneroman;2160
+Oogonek;01EA
+Oogonekmacron;01EC
+Oopen;0186
+Oslash;00D8
+Oslashacute;01FE
+Oslashsmall;F7F8
+Osmall;F76F
+Ostrokeacute;01FE
+Otcyrillic;047E
+Otilde;00D5
+Otildeacute;1E4C
+Otildedieresis;1E4E
+Otildesmall;F7F5
+P;0050
+Pacute;1E54
+Pcircle;24C5
+Pdotaccent;1E56
+Pecyrillic;041F
+Peharmenian;054A
+Pemiddlehookcyrillic;04A6
+Phi;03A6
+Phook;01A4
+Pi;03A0
+Piwrarmenian;0553
+Pmonospace;FF30
+Psi;03A8
+Psicyrillic;0470
+Psmall;F770
+Q;0051
+Qcircle;24C6
+Qmonospace;FF31
+Qsmall;F771
+R;0052
+Raarmenian;054C
+Racute;0154
+Rcaron;0158
+Rcedilla;0156
+Rcircle;24C7
+Rcommaaccent;0156
+Rdblgrave;0210
+Rdotaccent;1E58
+Rdotbelow;1E5A
+Rdotbelowmacron;1E5C
+Reharmenian;0550
+Rfraktur;211C
+Rho;03A1
+Ringsmall;F6FC
+Rinvertedbreve;0212
+Rlinebelow;1E5E
+Rmonospace;FF32
+Rsmall;F772
+Rsmallinverted;0281
+Rsmallinvertedsuperior;02B6
+S;0053
+SF010000;250C
+SF020000;2514
+SF030000;2510
+SF040000;2518
+SF050000;253C
+SF060000;252C
+SF070000;2534
+SF080000;251C
+SF090000;2524
+SF100000;2500
+SF110000;2502
+SF190000;2561
+SF200000;2562
+SF210000;2556
+SF220000;2555
+SF230000;2563
+SF240000;2551
+SF250000;2557
+SF260000;255D
+SF270000;255C
+SF280000;255B
+SF360000;255E
+SF370000;255F
+SF380000;255A
+SF390000;2554
+SF400000;2569
+SF410000;2566
+SF420000;2560
+SF430000;2550
+SF440000;256C
+SF450000;2567
+SF460000;2568
+SF470000;2564
+SF480000;2565
+SF490000;2559
+SF500000;2558
+SF510000;2552
+SF520000;2553
+SF530000;256B
+SF540000;256A
+Sacute;015A
+Sacutedotaccent;1E64
+Sampigreek;03E0
+Scaron;0160
+Scarondotaccent;1E66
+Scaronsmall;F6FD
+Scedilla;015E
+Schwa;018F
+Schwacyrillic;04D8
+Schwadieresiscyrillic;04DA
+Scircle;24C8
+Scircumflex;015C
+Scommaaccent;0218
+Sdotaccent;1E60
+Sdotbelow;1E62
+Sdotbelowdotaccent;1E68
+Seharmenian;054D
+Sevenroman;2166
+Shaarmenian;0547
+Shacyrillic;0428
+Shchacyrillic;0429
+Sheicoptic;03E2
+Shhacyrillic;04BA
+Shimacoptic;03EC
+Sigma;03A3
+Sixroman;2165
+Smonospace;FF33
+Softsigncyrillic;042C
+Ssmall;F773
+Stigmagreek;03DA
+T;0054
+Tau;03A4
+Tbar;0166
+Tcaron;0164
+Tcedilla;0162
+Tcircle;24C9
+Tcircumflexbelow;1E70
+Tcommaaccent;0162
+Tdotaccent;1E6A
+Tdotbelow;1E6C
+Tecyrillic;0422
+Tedescendercyrillic;04AC
+Tenroman;2169
+Tetsecyrillic;04B4
+Theta;0398
+Thook;01AC
+Thorn;00DE
+Thornsmall;F7FE
+Threeroman;2162
+Tildesmall;F6FE
+Tiwnarmenian;054F
+Tlinebelow;1E6E
+Tmonospace;FF34
+Toarmenian;0539
+Tonefive;01BC
+Tonesix;0184
+Tonetwo;01A7
+Tretroflexhook;01AE
+Tsecyrillic;0426
+Tshecyrillic;040B
+Tsmall;F774
+Twelveroman;216B
+Tworoman;2161
+U;0055
+Uacute;00DA
+Uacutesmall;F7FA
+Ubreve;016C
+Ucaron;01D3
+Ucircle;24CA
+Ucircumflex;00DB
+Ucircumflexbelow;1E76
+Ucircumflexsmall;F7FB
+Ucyrillic;0423
+Udblacute;0170
+Udblgrave;0214
+Udieresis;00DC
+Udieresisacute;01D7
+Udieresisbelow;1E72
+Udieresiscaron;01D9
+Udieresiscyrillic;04F0
+Udieresisgrave;01DB
+Udieresismacron;01D5
+Udieresissmall;F7FC
+Udotbelow;1EE4
+Ugrave;00D9
+Ugravesmall;F7F9
+Uhookabove;1EE6
+Uhorn;01AF
+Uhornacute;1EE8
+Uhorndotbelow;1EF0
+Uhorngrave;1EEA
+Uhornhookabove;1EEC
+Uhorntilde;1EEE
+Uhungarumlaut;0170
+Uhungarumlautcyrillic;04F2
+Uinvertedbreve;0216
+Ukcyrillic;0478
+Umacron;016A
+Umacroncyrillic;04EE
+Umacrondieresis;1E7A
+Umonospace;FF35
+Uogonek;0172
+Upsilon;03A5
+Upsilon1;03D2
+Upsilonacutehooksymbolgreek;03D3
+Upsilonafrican;01B1
+Upsilondieresis;03AB
+Upsilondieresishooksymbolgreek;03D4
+Upsilonhooksymbol;03D2
+Upsilontonos;038E
+Uring;016E
+Ushortcyrillic;040E
+Usmall;F775
+Ustraightcyrillic;04AE
+Ustraightstrokecyrillic;04B0
+Utilde;0168
+Utildeacute;1E78
+Utildebelow;1E74
+V;0056
+Vcircle;24CB
+Vdotbelow;1E7E
+Vecyrillic;0412
+Vewarmenian;054E
+Vhook;01B2
+Vmonospace;FF36
+Voarmenian;0548
+Vsmall;F776
+Vtilde;1E7C
+W;0057
+Wacute;1E82
+Wcircle;24CC
+Wcircumflex;0174
+Wdieresis;1E84
+Wdotaccent;1E86
+Wdotbelow;1E88
+Wgrave;1E80
+Wmonospace;FF37
+Wsmall;F777
+X;0058
+Xcircle;24CD
+Xdieresis;1E8C
+Xdotaccent;1E8A
+Xeharmenian;053D
+Xi;039E
+Xmonospace;FF38
+Xsmall;F778
+Y;0059
+Yacute;00DD
+Yacutesmall;F7FD
+Yatcyrillic;0462
+Ycircle;24CE
+Ycircumflex;0176
+Ydieresis;0178
+Ydieresissmall;F7FF
+Ydotaccent;1E8E
+Ydotbelow;1EF4
+Yericyrillic;042B
+Yerudieresiscyrillic;04F8
+Ygrave;1EF2
+Yhook;01B3
+Yhookabove;1EF6
+Yiarmenian;0545
+Yicyrillic;0407
+Yiwnarmenian;0552
+Ymonospace;FF39
+Ysmall;F779
+Ytilde;1EF8
+Yusbigcyrillic;046A
+Yusbigiotifiedcyrillic;046C
+Yuslittlecyrillic;0466
+Yuslittleiotifiedcyrillic;0468
+Z;005A
+Zaarmenian;0536
+Zacute;0179
+Zcaron;017D
+Zcaronsmall;F6FF
+Zcircle;24CF
+Zcircumflex;1E90
+Zdot;017B
+Zdotaccent;017B
+Zdotbelow;1E92
+Zecyrillic;0417
+Zedescendercyrillic;0498
+Zedieresiscyrillic;04DE
+Zeta;0396
+Zhearmenian;053A
+Zhebrevecyrillic;04C1
+Zhecyrillic;0416
+Zhedescendercyrillic;0496
+Zhedieresiscyrillic;04DC
+Zlinebelow;1E94
+Zmonospace;FF3A
+Zsmall;F77A
+Zstroke;01B5
+a;0061
+aabengali;0986
+aacute;00E1
+aadeva;0906
+aagujarati;0A86
+aagurmukhi;0A06
+aamatragurmukhi;0A3E
+aarusquare;3303
+aavowelsignbengali;09BE
+aavowelsigndeva;093E
+aavowelsigngujarati;0ABE
+abbreviationmarkarmenian;055F
+abbreviationsigndeva;0970
+abengali;0985
+abopomofo;311A
+abreve;0103
+abreveacute;1EAF
+abrevecyrillic;04D1
+abrevedotbelow;1EB7
+abrevegrave;1EB1
+abrevehookabove;1EB3
+abrevetilde;1EB5
+acaron;01CE
+acircle;24D0
+acircumflex;00E2
+acircumflexacute;1EA5
+acircumflexdotbelow;1EAD
+acircumflexgrave;1EA7
+acircumflexhookabove;1EA9
+acircumflextilde;1EAB
+acute;00B4
+acutebelowcmb;0317
+acutecmb;0301
+acutecomb;0301
+acutedeva;0954
+acutelowmod;02CF
+acutetonecmb;0341
+acyrillic;0430
+adblgrave;0201
+addakgurmukhi;0A71
+adeva;0905
+adieresis;00E4
+adieresiscyrillic;04D3
+adieresismacron;01DF
+adotbelow;1EA1
+adotmacron;01E1
+ae;00E6
+aeacute;01FD
+aekorean;3150
+aemacron;01E3
+afii00208;2015
+afii08941;20A4
+afii10017;0410
+afii10018;0411
+afii10019;0412
+afii10020;0413
+afii10021;0414
+afii10022;0415
+afii10023;0401
+afii10024;0416
+afii10025;0417
+afii10026;0418
+afii10027;0419
+afii10028;041A
+afii10029;041B
+afii10030;041C
+afii10031;041D
+afii10032;041E
+afii10033;041F
+afii10034;0420
+afii10035;0421
+afii10036;0422
+afii10037;0423
+afii10038;0424
+afii10039;0425
+afii10040;0426
+afii10041;0427
+afii10042;0428
+afii10043;0429
+afii10044;042A
+afii10045;042B
+afii10046;042C
+afii10047;042D
+afii10048;042E
+afii10049;042F
+afii10050;0490
+afii10051;0402
+afii10052;0403
+afii10053;0404
+afii10054;0405
+afii10055;0406
+afii10056;0407
+afii10057;0408
+afii10058;0409
+afii10059;040A
+afii10060;040B
+afii10061;040C
+afii10062;040E
+afii10063;F6C4
+afii10064;F6C5
+afii10065;0430
+afii10066;0431
+afii10067;0432
+afii10068;0433
+afii10069;0434
+afii10070;0435
+afii10071;0451
+afii10072;0436
+afii10073;0437
+afii10074;0438
+afii10075;0439
+afii10076;043A
+afii10077;043B
+afii10078;043C
+afii10079;043D
+afii10080;043E
+afii10081;043F
+afii10082;0440
+afii10083;0441
+afii10084;0442
+afii10085;0443
+afii10086;0444
+afii10087;0445
+afii10088;0446
+afii10089;0447
+afii10090;0448
+afii10091;0449
+afii10092;044A
+afii10093;044B
+afii10094;044C
+afii10095;044D
+afii10096;044E
+afii10097;044F
+afii10098;0491
+afii10099;0452
+afii10100;0453
+afii10101;0454
+afii10102;0455
+afii10103;0456
+afii10104;0457
+afii10105;0458
+afii10106;0459
+afii10107;045A
+afii10108;045B
+afii10109;045C
+afii10110;045E
+afii10145;040F
+afii10146;0462
+afii10147;0472
+afii10148;0474
+afii10192;F6C6
+afii10193;045F
+afii10194;0463
+afii10195;0473
+afii10196;0475
+afii10831;F6C7
+afii10832;F6C8
+afii10846;04D9
+afii299;200E
+afii300;200F
+afii301;200D
+afii57381;066A
+afii57388;060C
+afii57392;0660
+afii57393;0661
+afii57394;0662
+afii57395;0663
+afii57396;0664
+afii57397;0665
+afii57398;0666
+afii57399;0667
+afii57400;0668
+afii57401;0669
+afii57403;061B
+afii57407;061F
+afii57409;0621
+afii57410;0622
+afii57411;0623
+afii57412;0624
+afii57413;0625
+afii57414;0626
+afii57415;0627
+afii57416;0628
+afii57417;0629
+afii57418;062A
+afii57419;062B
+afii57420;062C
+afii57421;062D
+afii57422;062E
+afii57423;062F
+afii57424;0630
+afii57425;0631
+afii57426;0632
+afii57427;0633
+afii57428;0634
+afii57429;0635
+afii57430;0636
+afii57431;0637
+afii57432;0638
+afii57433;0639
+afii57434;063A
+afii57440;0640
+afii57441;0641
+afii57442;0642
+afii57443;0643
+afii57444;0644
+afii57445;0645
+afii57446;0646
+afii57448;0648
+afii57449;0649
+afii57450;064A
+afii57451;064B
+afii57452;064C
+afii57453;064D
+afii57454;064E
+afii57455;064F
+afii57456;0650
+afii57457;0651
+afii57458;0652
+afii57470;0647
+afii57505;06A4
+afii57506;067E
+afii57507;0686
+afii57508;0698
+afii57509;06AF
+afii57511;0679
+afii57512;0688
+afii57513;0691
+afii57514;06BA
+afii57519;06D2
+afii57534;06D5
+afii57636;20AA
+afii57645;05BE
+afii57658;05C3
+afii57664;05D0
+afii57665;05D1
+afii57666;05D2
+afii57667;05D3
+afii57668;05D4
+afii57669;05D5
+afii57670;05D6
+afii57671;05D7
+afii57672;05D8
+afii57673;05D9
+afii57674;05DA
+afii57675;05DB
+afii57676;05DC
+afii57677;05DD
+afii57678;05DE
+afii57679;05DF
+afii57680;05E0
+afii57681;05E1
+afii57682;05E2
+afii57683;05E3
+afii57684;05E4
+afii57685;05E5
+afii57686;05E6
+afii57687;05E7
+afii57688;05E8
+afii57689;05E9
+afii57690;05EA
+afii57694;FB2A
+afii57695;FB2B
+afii57700;FB4B
+afii57705;FB1F
+afii57716;05F0
+afii57717;05F1
+afii57718;05F2
+afii57723;FB35
+afii57793;05B4
+afii57794;05B5
+afii57795;05B6
+afii57796;05BB
+afii57797;05B8
+afii57798;05B7
+afii57799;05B0
+afii57800;05B2
+afii57801;05B1
+afii57802;05B3
+afii57803;05C2
+afii57804;05C1
+afii57806;05B9
+afii57807;05BC
+afii57839;05BD
+afii57841;05BF
+afii57842;05C0
+afii57929;02BC
+afii61248;2105
+afii61289;2113
+afii61352;2116
+afii61573;202C
+afii61574;202D
+afii61575;202E
+afii61664;200C
+afii63167;066D
+afii64937;02BD
+agrave;00E0
+agujarati;0A85
+agurmukhi;0A05
+ahiragana;3042
+ahookabove;1EA3
+aibengali;0990
+aibopomofo;311E
+aideva;0910
+aiecyrillic;04D5
+aigujarati;0A90
+aigurmukhi;0A10
+aimatragurmukhi;0A48
+ainarabic;0639
+ainfinalarabic;FECA
+aininitialarabic;FECB
+ainmedialarabic;FECC
+ainvertedbreve;0203
+aivowelsignbengali;09C8
+aivowelsigndeva;0948
+aivowelsigngujarati;0AC8
+akatakana;30A2
+akatakanahalfwidth;FF71
+akorean;314F
+alef;05D0
+alefarabic;0627
+alefdageshhebrew;FB30
+aleffinalarabic;FE8E
+alefhamzaabovearabic;0623
+alefhamzaabovefinalarabic;FE84
+alefhamzabelowarabic;0625
+alefhamzabelowfinalarabic;FE88
+alefhebrew;05D0
+aleflamedhebrew;FB4F
+alefmaddaabovearabic;0622
+alefmaddaabovefinalarabic;FE82
+alefmaksuraarabic;0649
+alefmaksurafinalarabic;FEF0
+alefmaksurainitialarabic;FEF3
+alefmaksuramedialarabic;FEF4
+alefpatahhebrew;FB2E
+alefqamatshebrew;FB2F
+aleph;2135
+allequal;224C
+alpha;03B1
+alphatonos;03AC
+amacron;0101
+amonospace;FF41
+ampersand;0026
+ampersandmonospace;FF06
+ampersandsmall;F726
+amsquare;33C2
+anbopomofo;3122
+angbopomofo;3124
+angkhankhuthai;0E5A
+angle;2220
+anglebracketleft;3008
+anglebracketleftvertical;FE3F
+anglebracketright;3009
+anglebracketrightvertical;FE40
+angleleft;2329
+angleright;232A
+angstrom;212B
+anoteleia;0387
+anudattadeva;0952
+anusvarabengali;0982
+anusvaradeva;0902
+anusvaragujarati;0A82
+aogonek;0105
+apaatosquare;3300
+aparen;249C
+apostrophearmenian;055A
+apostrophemod;02BC
+apple;F8FF
+approaches;2250
+approxequal;2248
+approxequalorimage;2252
+approximatelyequal;2245
+araeaekorean;318E
+araeakorean;318D
+arc;2312
+arighthalfring;1E9A
+aring;00E5
+aringacute;01FB
+aringbelow;1E01
+arrowboth;2194
+arrowdashdown;21E3
+arrowdashleft;21E0
+arrowdashright;21E2
+arrowdashup;21E1
+arrowdblboth;21D4
+arrowdbldown;21D3
+arrowdblleft;21D0
+arrowdblright;21D2
+arrowdblup;21D1
+arrowdown;2193
+arrowdownleft;2199
+arrowdownright;2198
+arrowdownwhite;21E9
+arrowheaddownmod;02C5
+arrowheadleftmod;02C2
+arrowheadrightmod;02C3
+arrowheadupmod;02C4
+arrowhorizex;F8E7
+arrowleft;2190
+arrowleftdbl;21D0
+arrowleftdblstroke;21CD
+arrowleftoverright;21C6
+arrowleftwhite;21E6
+arrowright;2192
+arrowrightdblstroke;21CF
+arrowrightheavy;279E
+arrowrightoverleft;21C4
+arrowrightwhite;21E8
+arrowtableft;21E4
+arrowtabright;21E5
+arrowup;2191
+arrowupdn;2195
+arrowupdnbse;21A8
+arrowupdownbase;21A8
+arrowupleft;2196
+arrowupleftofdown;21C5
+arrowupright;2197
+arrowupwhite;21E7
+arrowvertex;F8E6
+asciicircum;005E
+asciicircummonospace;FF3E
+asciitilde;007E
+asciitildemonospace;FF5E
+ascript;0251
+ascriptturned;0252
+asmallhiragana;3041
+asmallkatakana;30A1
+asmallkatakanahalfwidth;FF67
+asterisk;002A
+asteriskaltonearabic;066D
+asteriskarabic;066D
+asteriskmath;2217
+asteriskmonospace;FF0A
+asterisksmall;FE61
+asterism;2042
+asuperior;F6E9
+asymptoticallyequal;2243
+at;0040
+atilde;00E3
+atmonospace;FF20
+atsmall;FE6B
+aturned;0250
+aubengali;0994
+aubopomofo;3120
+audeva;0914
+augujarati;0A94
+augurmukhi;0A14
+aulengthmarkbengali;09D7
+aumatragurmukhi;0A4C
+auvowelsignbengali;09CC
+auvowelsigndeva;094C
+auvowelsigngujarati;0ACC
+avagrahadeva;093D
+aybarmenian;0561
+ayin;05E2
+ayinaltonehebrew;FB20
+ayinhebrew;05E2
+b;0062
+babengali;09AC
+backslash;005C
+backslashmonospace;FF3C
+badeva;092C
+bagujarati;0AAC
+bagurmukhi;0A2C
+bahiragana;3070
+bahtthai;0E3F
+bakatakana;30D0
+bar;007C
+barmonospace;FF5C
+bbopomofo;3105
+bcircle;24D1
+bdotaccent;1E03
+bdotbelow;1E05
+beamedsixteenthnotes;266C
+because;2235
+becyrillic;0431
+beharabic;0628
+behfinalarabic;FE90
+behinitialarabic;FE91
+behiragana;3079
+behmedialarabic;FE92
+behmeeminitialarabic;FC9F
+behmeemisolatedarabic;FC08
+behnoonfinalarabic;FC6D
+bekatakana;30D9
+benarmenian;0562
+bet;05D1
+beta;03B2
+betasymbolgreek;03D0
+betdagesh;FB31
+betdageshhebrew;FB31
+bethebrew;05D1
+betrafehebrew;FB4C
+bhabengali;09AD
+bhadeva;092D
+bhagujarati;0AAD
+bhagurmukhi;0A2D
+bhook;0253
+bihiragana;3073
+bikatakana;30D3
+bilabialclick;0298
+bindigurmukhi;0A02
+birusquare;3331
+blackcircle;25CF
+blackdiamond;25C6
+blackdownpointingtriangle;25BC
+blackleftpointingpointer;25C4
+blackleftpointingtriangle;25C0
+blacklenticularbracketleft;3010
+blacklenticularbracketleftvertical;FE3B
+blacklenticularbracketright;3011
+blacklenticularbracketrightvertical;FE3C
+blacklowerlefttriangle;25E3
+blacklowerrighttriangle;25E2
+blackrectangle;25AC
+blackrightpointingpointer;25BA
+blackrightpointingtriangle;25B6
+blacksmallsquare;25AA
+blacksmilingface;263B
+blacksquare;25A0
+blackstar;2605
+blackupperlefttriangle;25E4
+blackupperrighttriangle;25E5
+blackuppointingsmalltriangle;25B4
+blackuppointingtriangle;25B2
+blank;2423
+blinebelow;1E07
+block;2588
+bmonospace;FF42
+bobaimaithai;0E1A
+bohiragana;307C
+bokatakana;30DC
+bparen;249D
+bqsquare;33C3
+braceex;F8F4
+braceleft;007B
+braceleftbt;F8F3
+braceleftmid;F8F2
+braceleftmonospace;FF5B
+braceleftsmall;FE5B
+bracelefttp;F8F1
+braceleftvertical;FE37
+braceright;007D
+bracerightbt;F8FE
+bracerightmid;F8FD
+bracerightmonospace;FF5D
+bracerightsmall;FE5C
+bracerighttp;F8FC
+bracerightvertical;FE38
+bracketleft;005B
+bracketleftbt;F8F0
+bracketleftex;F8EF
+bracketleftmonospace;FF3B
+bracketlefttp;F8EE
+bracketright;005D
+bracketrightbt;F8FB
+bracketrightex;F8FA
+bracketrightmonospace;FF3D
+bracketrighttp;F8F9
+breve;02D8
+brevebelowcmb;032E
+brevecmb;0306
+breveinvertedbelowcmb;032F
+breveinvertedcmb;0311
+breveinverteddoublecmb;0361
+bridgebelowcmb;032A
+bridgeinvertedbelowcmb;033A
+brokenbar;00A6
+bstroke;0180
+bsuperior;F6EA
+btopbar;0183
+buhiragana;3076
+bukatakana;30D6
+bullet;2022
+bulletinverse;25D8
+bulletoperator;2219
+bullseye;25CE
+c;0063
+caarmenian;056E
+cabengali;099A
+cacute;0107
+cadeva;091A
+cagujarati;0A9A
+cagurmukhi;0A1A
+calsquare;3388
+candrabindubengali;0981
+candrabinducmb;0310
+candrabindudeva;0901
+candrabindugujarati;0A81
+capslock;21EA
+careof;2105
+caron;02C7
+caronbelowcmb;032C
+caroncmb;030C
+carriagereturn;21B5
+cbopomofo;3118
+ccaron;010D
+ccedilla;00E7
+ccedillaacute;1E09
+ccircle;24D2
+ccircumflex;0109
+ccurl;0255
+cdot;010B
+cdotaccent;010B
+cdsquare;33C5
+cedilla;00B8
+cedillacmb;0327
+cent;00A2
+centigrade;2103
+centinferior;F6DF
+centmonospace;FFE0
+centoldstyle;F7A2
+centsuperior;F6E0
+chaarmenian;0579
+chabengali;099B
+chadeva;091B
+chagujarati;0A9B
+chagurmukhi;0A1B
+chbopomofo;3114
+cheabkhasiancyrillic;04BD
+checkmark;2713
+checyrillic;0447
+chedescenderabkhasiancyrillic;04BF
+chedescendercyrillic;04B7
+chedieresiscyrillic;04F5
+cheharmenian;0573
+chekhakassiancyrillic;04CC
+cheverticalstrokecyrillic;04B9
+chi;03C7
+chieuchacirclekorean;3277
+chieuchaparenkorean;3217
+chieuchcirclekorean;3269
+chieuchkorean;314A
+chieuchparenkorean;3209
+chochangthai;0E0A
+chochanthai;0E08
+chochingthai;0E09
+chochoethai;0E0C
+chook;0188
+cieucacirclekorean;3276
+cieucaparenkorean;3216
+cieuccirclekorean;3268
+cieuckorean;3148
+cieucparenkorean;3208
+cieucuparenkorean;321C
+circle;25CB
+circlemultiply;2297
+circleot;2299
+circleplus;2295
+circlepostalmark;3036
+circlewithlefthalfblack;25D0
+circlewithrighthalfblack;25D1
+circumflex;02C6
+circumflexbelowcmb;032D
+circumflexcmb;0302
+clear;2327
+clickalveolar;01C2
+clickdental;01C0
+clicklateral;01C1
+clickretroflex;01C3
+club;2663
+clubsuitblack;2663
+clubsuitwhite;2667
+cmcubedsquare;33A4
+cmonospace;FF43
+cmsquaredsquare;33A0
+coarmenian;0581
+colon;003A
+colonmonetary;20A1
+colonmonospace;FF1A
+colonsign;20A1
+colonsmall;FE55
+colontriangularhalfmod;02D1
+colontriangularmod;02D0
+comma;002C
+commaabovecmb;0313
+commaaboverightcmb;0315
+commaaccent;F6C3
+commaarabic;060C
+commaarmenian;055D
+commainferior;F6E1
+commamonospace;FF0C
+commareversedabovecmb;0314
+commareversedmod;02BD
+commasmall;FE50
+commasuperior;F6E2
+commaturnedabovecmb;0312
+commaturnedmod;02BB
+compass;263C
+congruent;2245
+contourintegral;222E
+control;2303
+controlACK;0006
+controlBEL;0007
+controlBS;0008
+controlCAN;0018
+controlCR;000D
+controlDC1;0011
+controlDC2;0012
+controlDC3;0013
+controlDC4;0014
+controlDEL;007F
+controlDLE;0010
+controlEM;0019
+controlENQ;0005
+controlEOT;0004
+controlESC;001B
+controlETB;0017
+controlETX;0003
+controlFF;000C
+controlFS;001C
+controlGS;001D
+controlHT;0009
+controlLF;000A
+controlNAK;0015
+controlRS;001E
+controlSI;000F
+controlSO;000E
+controlSOT;0002
+controlSTX;0001
+controlSUB;001A
+controlSYN;0016
+controlUS;001F
+controlVT;000B
+copyright;00A9
+copyrightsans;F8E9
+copyrightserif;F6D9
+cornerbracketleft;300C
+cornerbracketlefthalfwidth;FF62
+cornerbracketleftvertical;FE41
+cornerbracketright;300D
+cornerbracketrighthalfwidth;FF63
+cornerbracketrightvertical;FE42
+corporationsquare;337F
+cosquare;33C7
+coverkgsquare;33C6
+cparen;249E
+cruzeiro;20A2
+cstretched;0297
+curlyand;22CF
+curlyor;22CE
+currency;00A4
+cyrBreve;F6D1
+cyrFlex;F6D2
+cyrbreve;F6D4
+cyrflex;F6D5
+d;0064
+daarmenian;0564
+dabengali;09A6
+dadarabic;0636
+dadeva;0926
+dadfinalarabic;FEBE
+dadinitialarabic;FEBF
+dadmedialarabic;FEC0
+dagesh;05BC
+dageshhebrew;05BC
+dagger;2020
+daggerdbl;2021
+dagujarati;0AA6
+dagurmukhi;0A26
+dahiragana;3060
+dakatakana;30C0
+dalarabic;062F
+dalet;05D3
+daletdagesh;FB33
+daletdageshhebrew;FB33
+dalethatafpatah;05D3 05B2
+dalethatafpatahhebrew;05D3 05B2
+dalethatafsegol;05D3 05B1
+dalethatafsegolhebrew;05D3 05B1
+dalethebrew;05D3
+dalethiriq;05D3 05B4
+dalethiriqhebrew;05D3 05B4
+daletholam;05D3 05B9
+daletholamhebrew;05D3 05B9
+daletpatah;05D3 05B7
+daletpatahhebrew;05D3 05B7
+daletqamats;05D3 05B8
+daletqamatshebrew;05D3 05B8
+daletqubuts;05D3 05BB
+daletqubutshebrew;05D3 05BB
+daletsegol;05D3 05B6
+daletsegolhebrew;05D3 05B6
+daletsheva;05D3 05B0
+daletshevahebrew;05D3 05B0
+dalettsere;05D3 05B5
+dalettserehebrew;05D3 05B5
+dalfinalarabic;FEAA
+dammaarabic;064F
+dammalowarabic;064F
+dammatanaltonearabic;064C
+dammatanarabic;064C
+danda;0964
+dargahebrew;05A7
+dargalefthebrew;05A7
+dasiapneumatacyrilliccmb;0485
+dblGrave;F6D3
+dblanglebracketleft;300A
+dblanglebracketleftvertical;FE3D
+dblanglebracketright;300B
+dblanglebracketrightvertical;FE3E
+dblarchinvertedbelowcmb;032B
+dblarrowleft;21D4
+dblarrowright;21D2
+dbldanda;0965
+dblgrave;F6D6
+dblgravecmb;030F
+dblintegral;222C
+dbllowline;2017
+dbllowlinecmb;0333
+dbloverlinecmb;033F
+dblprimemod;02BA
+dblverticalbar;2016
+dblverticallineabovecmb;030E
+dbopomofo;3109
+dbsquare;33C8
+dcaron;010F
+dcedilla;1E11
+dcircle;24D3
+dcircumflexbelow;1E13
+dcroat;0111
+ddabengali;09A1
+ddadeva;0921
+ddagujarati;0AA1
+ddagurmukhi;0A21
+ddalarabic;0688
+ddalfinalarabic;FB89
+dddhadeva;095C
+ddhabengali;09A2
+ddhadeva;0922
+ddhagujarati;0AA2
+ddhagurmukhi;0A22
+ddotaccent;1E0B
+ddotbelow;1E0D
+decimalseparatorarabic;066B
+decimalseparatorpersian;066B
+decyrillic;0434
+degree;00B0
+dehihebrew;05AD
+dehiragana;3067
+deicoptic;03EF
+dekatakana;30C7
+deleteleft;232B
+deleteright;2326
+delta;03B4
+deltaturned;018D
+denominatorminusonenumeratorbengali;09F8
+dezh;02A4
+dhabengali;09A7
+dhadeva;0927
+dhagujarati;0AA7
+dhagurmukhi;0A27
+dhook;0257
+dialytikatonos;0385
+dialytikatonoscmb;0344
+diamond;2666
+diamondsuitwhite;2662
+dieresis;00A8
+dieresisacute;F6D7
+dieresisbelowcmb;0324
+dieresiscmb;0308
+dieresisgrave;F6D8
+dieresistonos;0385
+dihiragana;3062
+dikatakana;30C2
+dittomark;3003
+divide;00F7
+divides;2223
+divisionslash;2215
+djecyrillic;0452
+dkshade;2593
+dlinebelow;1E0F
+dlsquare;3397
+dmacron;0111
+dmonospace;FF44
+dnblock;2584
+dochadathai;0E0E
+dodekthai;0E14
+dohiragana;3069
+dokatakana;30C9
+dollar;0024
+dollarinferior;F6E3
+dollarmonospace;FF04
+dollaroldstyle;F724
+dollarsmall;FE69
+dollarsuperior;F6E4
+dong;20AB
+dorusquare;3326
+dotaccent;02D9
+dotaccentcmb;0307
+dotbelowcmb;0323
+dotbelowcomb;0323
+dotkatakana;30FB
+dotlessi;0131
+dotlessj;F6BE
+dotlessjstrokehook;0284
+dotmath;22C5
+dottedcircle;25CC
+doubleyodpatah;FB1F
+doubleyodpatahhebrew;FB1F
+downtackbelowcmb;031E
+downtackmod;02D5
+dparen;249F
+dsuperior;F6EB
+dtail;0256
+dtopbar;018C
+duhiragana;3065
+dukatakana;30C5
+dz;01F3
+dzaltone;02A3
+dzcaron;01C6
+dzcurl;02A5
+dzeabkhasiancyrillic;04E1
+dzecyrillic;0455
+dzhecyrillic;045F
+e;0065
+eacute;00E9
+earth;2641
+ebengali;098F
+ebopomofo;311C
+ebreve;0115
+ecandradeva;090D
+ecandragujarati;0A8D
+ecandravowelsigndeva;0945
+ecandravowelsigngujarati;0AC5
+ecaron;011B
+ecedillabreve;1E1D
+echarmenian;0565
+echyiwnarmenian;0587
+ecircle;24D4
+ecircumflex;00EA
+ecircumflexacute;1EBF
+ecircumflexbelow;1E19
+ecircumflexdotbelow;1EC7
+ecircumflexgrave;1EC1
+ecircumflexhookabove;1EC3
+ecircumflextilde;1EC5
+ecyrillic;0454
+edblgrave;0205
+edeva;090F
+edieresis;00EB
+edot;0117
+edotaccent;0117
+edotbelow;1EB9
+eegurmukhi;0A0F
+eematragurmukhi;0A47
+efcyrillic;0444
+egrave;00E8
+egujarati;0A8F
+eharmenian;0567
+ehbopomofo;311D
+ehiragana;3048
+ehookabove;1EBB
+eibopomofo;311F
+eight;0038
+eightarabic;0668
+eightbengali;09EE
+eightcircle;2467
+eightcircleinversesansserif;2791
+eightdeva;096E
+eighteencircle;2471
+eighteenparen;2485
+eighteenperiod;2499
+eightgujarati;0AEE
+eightgurmukhi;0A6E
+eighthackarabic;0668
+eighthangzhou;3028
+eighthnotebeamed;266B
+eightideographicparen;3227
+eightinferior;2088
+eightmonospace;FF18
+eightoldstyle;F738
+eightparen;247B
+eightperiod;248F
+eightpersian;06F8
+eightroman;2177
+eightsuperior;2078
+eightthai;0E58
+einvertedbreve;0207
+eiotifiedcyrillic;0465
+ekatakana;30A8
+ekatakanahalfwidth;FF74
+ekonkargurmukhi;0A74
+ekorean;3154
+elcyrillic;043B
+element;2208
+elevencircle;246A
+elevenparen;247E
+elevenperiod;2492
+elevenroman;217A
+ellipsis;2026
+ellipsisvertical;22EE
+emacron;0113
+emacronacute;1E17
+emacrongrave;1E15
+emcyrillic;043C
+emdash;2014
+emdashvertical;FE31
+emonospace;FF45
+emphasismarkarmenian;055B
+emptyset;2205
+enbopomofo;3123
+encyrillic;043D
+endash;2013
+endashvertical;FE32
+endescendercyrillic;04A3
+eng;014B
+engbopomofo;3125
+enghecyrillic;04A5
+enhookcyrillic;04C8
+enspace;2002
+eogonek;0119
+eokorean;3153
+eopen;025B
+eopenclosed;029A
+eopenreversed;025C
+eopenreversedclosed;025E
+eopenreversedhook;025D
+eparen;24A0
+epsilon;03B5
+epsilontonos;03AD
+equal;003D
+equalmonospace;FF1D
+equalsmall;FE66
+equalsuperior;207C
+equivalence;2261
+erbopomofo;3126
+ercyrillic;0440
+ereversed;0258
+ereversedcyrillic;044D
+escyrillic;0441
+esdescendercyrillic;04AB
+esh;0283
+eshcurl;0286
+eshortdeva;090E
+eshortvowelsigndeva;0946
+eshreversedloop;01AA
+eshsquatreversed;0285
+esmallhiragana;3047
+esmallkatakana;30A7
+esmallkatakanahalfwidth;FF6A
+estimated;212E
+esuperior;F6EC
+eta;03B7
+etarmenian;0568
+etatonos;03AE
+eth;00F0
+etilde;1EBD
+etildebelow;1E1B
+etnahtafoukhhebrew;0591
+etnahtafoukhlefthebrew;0591
+etnahtahebrew;0591
+etnahtalefthebrew;0591
+eturned;01DD
+eukorean;3161
+euro;20AC
+evowelsignbengali;09C7
+evowelsigndeva;0947
+evowelsigngujarati;0AC7
+exclam;0021
+exclamarmenian;055C
+exclamdbl;203C
+exclamdown;00A1
+exclamdownsmall;F7A1
+exclammonospace;FF01
+exclamsmall;F721
+existential;2203
+ezh;0292
+ezhcaron;01EF
+ezhcurl;0293
+ezhreversed;01B9
+ezhtail;01BA
+f;0066
+fadeva;095E
+fagurmukhi;0A5E
+fahrenheit;2109
+fathaarabic;064E
+fathalowarabic;064E
+fathatanarabic;064B
+fbopomofo;3108
+fcircle;24D5
+fdotaccent;1E1F
+feharabic;0641
+feharmenian;0586
+fehfinalarabic;FED2
+fehinitialarabic;FED3
+fehmedialarabic;FED4
+feicoptic;03E5
+female;2640
+ff;FB00
+ffi;FB03
+ffl;FB04
+fi;FB01
+fifteencircle;246E
+fifteenparen;2482
+fifteenperiod;2496
+figuredash;2012
+filledbox;25A0
+filledrect;25AC
+finalkaf;05DA
+finalkafdagesh;FB3A
+finalkafdageshhebrew;FB3A
+finalkafhebrew;05DA
+finalkafqamats;05DA 05B8
+finalkafqamatshebrew;05DA 05B8
+finalkafsheva;05DA 05B0
+finalkafshevahebrew;05DA 05B0
+finalmem;05DD
+finalmemhebrew;05DD
+finalnun;05DF
+finalnunhebrew;05DF
+finalpe;05E3
+finalpehebrew;05E3
+finaltsadi;05E5
+finaltsadihebrew;05E5
+firsttonechinese;02C9
+fisheye;25C9
+fitacyrillic;0473
+five;0035
+fivearabic;0665
+fivebengali;09EB
+fivecircle;2464
+fivecircleinversesansserif;278E
+fivedeva;096B
+fiveeighths;215D
+fivegujarati;0AEB
+fivegurmukhi;0A6B
+fivehackarabic;0665
+fivehangzhou;3025
+fiveideographicparen;3224
+fiveinferior;2085
+fivemonospace;FF15
+fiveoldstyle;F735
+fiveparen;2478
+fiveperiod;248C
+fivepersian;06F5
+fiveroman;2174
+fivesuperior;2075
+fivethai;0E55
+fl;FB02
+florin;0192
+fmonospace;FF46
+fmsquare;3399
+fofanthai;0E1F
+fofathai;0E1D
+fongmanthai;0E4F
+forall;2200
+four;0034
+fourarabic;0664
+fourbengali;09EA
+fourcircle;2463
+fourcircleinversesansserif;278D
+fourdeva;096A
+fourgujarati;0AEA
+fourgurmukhi;0A6A
+fourhackarabic;0664
+fourhangzhou;3024
+fourideographicparen;3223
+fourinferior;2084
+fourmonospace;FF14
+fournumeratorbengali;09F7
+fouroldstyle;F734
+fourparen;2477
+fourperiod;248B
+fourpersian;06F4
+fourroman;2173
+foursuperior;2074
+fourteencircle;246D
+fourteenparen;2481
+fourteenperiod;2495
+fourthai;0E54
+fourthtonechinese;02CB
+fparen;24A1
+fraction;2044
+franc;20A3
+g;0067
+gabengali;0997
+gacute;01F5
+gadeva;0917
+gafarabic;06AF
+gaffinalarabic;FB93
+gafinitialarabic;FB94
+gafmedialarabic;FB95
+gagujarati;0A97
+gagurmukhi;0A17
+gahiragana;304C
+gakatakana;30AC
+gamma;03B3
+gammalatinsmall;0263
+gammasuperior;02E0
+gangiacoptic;03EB
+gbopomofo;310D
+gbreve;011F
+gcaron;01E7
+gcedilla;0123
+gcircle;24D6
+gcircumflex;011D
+gcommaaccent;0123
+gdot;0121
+gdotaccent;0121
+gecyrillic;0433
+gehiragana;3052
+gekatakana;30B2
+geometricallyequal;2251
+gereshaccenthebrew;059C
+gereshhebrew;05F3
+gereshmuqdamhebrew;059D
+germandbls;00DF
+gershayimaccenthebrew;059E
+gershayimhebrew;05F4
+getamark;3013
+ghabengali;0998
+ghadarmenian;0572
+ghadeva;0918
+ghagujarati;0A98
+ghagurmukhi;0A18
+ghainarabic;063A
+ghainfinalarabic;FECE
+ghaininitialarabic;FECF
+ghainmedialarabic;FED0
+ghemiddlehookcyrillic;0495
+ghestrokecyrillic;0493
+gheupturncyrillic;0491
+ghhadeva;095A
+ghhagurmukhi;0A5A
+ghook;0260
+ghzsquare;3393
+gihiragana;304E
+gikatakana;30AE
+gimarmenian;0563
+gimel;05D2
+gimeldagesh;FB32
+gimeldageshhebrew;FB32
+gimelhebrew;05D2
+gjecyrillic;0453
+glottalinvertedstroke;01BE
+glottalstop;0294
+glottalstopinverted;0296
+glottalstopmod;02C0
+glottalstopreversed;0295
+glottalstopreversedmod;02C1
+glottalstopreversedsuperior;02E4
+glottalstopstroke;02A1
+glottalstopstrokereversed;02A2
+gmacron;1E21
+gmonospace;FF47
+gohiragana;3054
+gokatakana;30B4
+gparen;24A2
+gpasquare;33AC
+gradient;2207
+grave;0060
+gravebelowcmb;0316
+gravecmb;0300
+gravecomb;0300
+gravedeva;0953
+gravelowmod;02CE
+gravemonospace;FF40
+gravetonecmb;0340
+greater;003E
+greaterequal;2265
+greaterequalorless;22DB
+greatermonospace;FF1E
+greaterorequivalent;2273
+greaterorless;2277
+greateroverequal;2267
+greatersmall;FE65
+gscript;0261
+gstroke;01E5
+guhiragana;3050
+guillemotleft;00AB
+guillemotright;00BB
+guilsinglleft;2039
+guilsinglright;203A
+gukatakana;30B0
+guramusquare;3318
+gysquare;33C9
+h;0068
+haabkhasiancyrillic;04A9
+haaltonearabic;06C1
+habengali;09B9
+hadescendercyrillic;04B3
+hadeva;0939
+hagujarati;0AB9
+hagurmukhi;0A39
+haharabic;062D
+hahfinalarabic;FEA2
+hahinitialarabic;FEA3
+hahiragana;306F
+hahmedialarabic;FEA4
+haitusquare;332A
+hakatakana;30CF
+hakatakanahalfwidth;FF8A
+halantgurmukhi;0A4D
+hamzaarabic;0621
+hamzadammaarabic;0621 064F
+hamzadammatanarabic;0621 064C
+hamzafathaarabic;0621 064E
+hamzafathatanarabic;0621 064B
+hamzalowarabic;0621
+hamzalowkasraarabic;0621 0650
+hamzalowkasratanarabic;0621 064D
+hamzasukunarabic;0621 0652
+hangulfiller;3164
+hardsigncyrillic;044A
+harpoonleftbarbup;21BC
+harpoonrightbarbup;21C0
+hasquare;33CA
+hatafpatah;05B2
+hatafpatah16;05B2
+hatafpatah23;05B2
+hatafpatah2f;05B2
+hatafpatahhebrew;05B2
+hatafpatahnarrowhebrew;05B2
+hatafpatahquarterhebrew;05B2
+hatafpatahwidehebrew;05B2
+hatafqamats;05B3
+hatafqamats1b;05B3
+hatafqamats28;05B3
+hatafqamats34;05B3
+hatafqamatshebrew;05B3
+hatafqamatsnarrowhebrew;05B3
+hatafqamatsquarterhebrew;05B3
+hatafqamatswidehebrew;05B3
+hatafsegol;05B1
+hatafsegol17;05B1
+hatafsegol24;05B1
+hatafsegol30;05B1
+hatafsegolhebrew;05B1
+hatafsegolnarrowhebrew;05B1
+hatafsegolquarterhebrew;05B1
+hatafsegolwidehebrew;05B1
+hbar;0127
+hbopomofo;310F
+hbrevebelow;1E2B
+hcedilla;1E29
+hcircle;24D7
+hcircumflex;0125
+hdieresis;1E27
+hdotaccent;1E23
+hdotbelow;1E25
+he;05D4
+heart;2665
+heartsuitblack;2665
+heartsuitwhite;2661
+hedagesh;FB34
+hedageshhebrew;FB34
+hehaltonearabic;06C1
+heharabic;0647
+hehebrew;05D4
+hehfinalaltonearabic;FBA7
+hehfinalalttwoarabic;FEEA
+hehfinalarabic;FEEA
+hehhamzaabovefinalarabic;FBA5
+hehhamzaaboveisolatedarabic;FBA4
+hehinitialaltonearabic;FBA8
+hehinitialarabic;FEEB
+hehiragana;3078
+hehmedialaltonearabic;FBA9
+hehmedialarabic;FEEC
+heiseierasquare;337B
+hekatakana;30D8
+hekatakanahalfwidth;FF8D
+hekutaarusquare;3336
+henghook;0267
+herutusquare;3339
+het;05D7
+hethebrew;05D7
+hhook;0266
+hhooksuperior;02B1
+hieuhacirclekorean;327B
+hieuhaparenkorean;321B
+hieuhcirclekorean;326D
+hieuhkorean;314E
+hieuhparenkorean;320D
+hihiragana;3072
+hikatakana;30D2
+hikatakanahalfwidth;FF8B
+hiriq;05B4
+hiriq14;05B4
+hiriq21;05B4
+hiriq2d;05B4
+hiriqhebrew;05B4
+hiriqnarrowhebrew;05B4
+hiriqquarterhebrew;05B4
+hiriqwidehebrew;05B4
+hlinebelow;1E96
+hmonospace;FF48
+hoarmenian;0570
+hohipthai;0E2B
+hohiragana;307B
+hokatakana;30DB
+hokatakanahalfwidth;FF8E
+holam;05B9
+holam19;05B9
+holam26;05B9
+holam32;05B9
+holamhebrew;05B9
+holamnarrowhebrew;05B9
+holamquarterhebrew;05B9
+holamwidehebrew;05B9
+honokhukthai;0E2E
+hookabovecomb;0309
+hookcmb;0309
+hookpalatalizedbelowcmb;0321
+hookretroflexbelowcmb;0322
+hoonsquare;3342
+horicoptic;03E9
+horizontalbar;2015
+horncmb;031B
+hotsprings;2668
+house;2302
+hparen;24A3
+hsuperior;02B0
+hturned;0265
+huhiragana;3075
+huiitosquare;3333
+hukatakana;30D5
+hukatakanahalfwidth;FF8C
+hungarumlaut;02DD
+hungarumlautcmb;030B
+hv;0195
+hyphen;002D
+hypheninferior;F6E5
+hyphenmonospace;FF0D
+hyphensmall;FE63
+hyphensuperior;F6E6
+hyphentwo;2010
+i;0069
+iacute;00ED
+iacyrillic;044F
+ibengali;0987
+ibopomofo;3127
+ibreve;012D
+icaron;01D0
+icircle;24D8
+icircumflex;00EE
+icyrillic;0456
+idblgrave;0209
+ideographearthcircle;328F
+ideographfirecircle;328B
+ideographicallianceparen;323F
+ideographiccallparen;323A
+ideographiccentrecircle;32A5
+ideographicclose;3006
+ideographiccomma;3001
+ideographiccommaleft;FF64
+ideographiccongratulationparen;3237
+ideographiccorrectcircle;32A3
+ideographicearthparen;322F
+ideographicenterpriseparen;323D
+ideographicexcellentcircle;329D
+ideographicfestivalparen;3240
+ideographicfinancialcircle;3296
+ideographicfinancialparen;3236
+ideographicfireparen;322B
+ideographichaveparen;3232
+ideographichighcircle;32A4
+ideographiciterationmark;3005
+ideographiclaborcircle;3298
+ideographiclaborparen;3238
+ideographicleftcircle;32A7
+ideographiclowcircle;32A6
+ideographicmedicinecircle;32A9
+ideographicmetalparen;322E
+ideographicmoonparen;322A
+ideographicnameparen;3234
+ideographicperiod;3002
+ideographicprintcircle;329E
+ideographicreachparen;3243
+ideographicrepresentparen;3239
+ideographicresourceparen;323E
+ideographicrightcircle;32A8
+ideographicsecretcircle;3299
+ideographicselfparen;3242
+ideographicsocietyparen;3233
+ideographicspace;3000
+ideographicspecialparen;3235
+ideographicstockparen;3231
+ideographicstudyparen;323B
+ideographicsunparen;3230
+ideographicsuperviseparen;323C
+ideographicwaterparen;322C
+ideographicwoodparen;322D
+ideographiczero;3007
+ideographmetalcircle;328E
+ideographmooncircle;328A
+ideographnamecircle;3294
+ideographsuncircle;3290
+ideographwatercircle;328C
+ideographwoodcircle;328D
+ideva;0907
+idieresis;00EF
+idieresisacute;1E2F
+idieresiscyrillic;04E5
+idotbelow;1ECB
+iebrevecyrillic;04D7
+iecyrillic;0435
+ieungacirclekorean;3275
+ieungaparenkorean;3215
+ieungcirclekorean;3267
+ieungkorean;3147
+ieungparenkorean;3207
+igrave;00EC
+igujarati;0A87
+igurmukhi;0A07
+ihiragana;3044
+ihookabove;1EC9
+iibengali;0988
+iicyrillic;0438
+iideva;0908
+iigujarati;0A88
+iigurmukhi;0A08
+iimatragurmukhi;0A40
+iinvertedbreve;020B
+iishortcyrillic;0439
+iivowelsignbengali;09C0
+iivowelsigndeva;0940
+iivowelsigngujarati;0AC0
+ij;0133
+ikatakana;30A4
+ikatakanahalfwidth;FF72
+ikorean;3163
+ilde;02DC
+iluyhebrew;05AC
+imacron;012B
+imacroncyrillic;04E3
+imageorapproximatelyequal;2253
+imatragurmukhi;0A3F
+imonospace;FF49
+increment;2206
+infinity;221E
+iniarmenian;056B
+integral;222B
+integralbottom;2321
+integralbt;2321
+integralex;F8F5
+integraltop;2320
+integraltp;2320
+intersection;2229
+intisquare;3305
+invbullet;25D8
+invcircle;25D9
+invsmileface;263B
+iocyrillic;0451
+iogonek;012F
+iota;03B9
+iotadieresis;03CA
+iotadieresistonos;0390
+iotalatin;0269
+iotatonos;03AF
+iparen;24A4
+irigurmukhi;0A72
+ismallhiragana;3043
+ismallkatakana;30A3
+ismallkatakanahalfwidth;FF68
+issharbengali;09FA
+istroke;0268
+isuperior;F6ED
+iterationhiragana;309D
+iterationkatakana;30FD
+itilde;0129
+itildebelow;1E2D
+iubopomofo;3129
+iucyrillic;044E
+ivowelsignbengali;09BF
+ivowelsigndeva;093F
+ivowelsigngujarati;0ABF
+izhitsacyrillic;0475
+izhitsadblgravecyrillic;0477
+j;006A
+jaarmenian;0571
+jabengali;099C
+jadeva;091C
+jagujarati;0A9C
+jagurmukhi;0A1C
+jbopomofo;3110
+jcaron;01F0
+jcircle;24D9
+jcircumflex;0135
+jcrossedtail;029D
+jdotlessstroke;025F
+jecyrillic;0458
+jeemarabic;062C
+jeemfinalarabic;FE9E
+jeeminitialarabic;FE9F
+jeemmedialarabic;FEA0
+jeharabic;0698
+jehfinalarabic;FB8B
+jhabengali;099D
+jhadeva;091D
+jhagujarati;0A9D
+jhagurmukhi;0A1D
+jheharmenian;057B
+jis;3004
+jmonospace;FF4A
+jparen;24A5
+jsuperior;02B2
+k;006B
+kabashkircyrillic;04A1
+kabengali;0995
+kacute;1E31
+kacyrillic;043A
+kadescendercyrillic;049B
+kadeva;0915
+kaf;05DB
+kafarabic;0643
+kafdagesh;FB3B
+kafdageshhebrew;FB3B
+kaffinalarabic;FEDA
+kafhebrew;05DB
+kafinitialarabic;FEDB
+kafmedialarabic;FEDC
+kafrafehebrew;FB4D
+kagujarati;0A95
+kagurmukhi;0A15
+kahiragana;304B
+kahookcyrillic;04C4
+kakatakana;30AB
+kakatakanahalfwidth;FF76
+kappa;03BA
+kappasymbolgreek;03F0
+kapyeounmieumkorean;3171
+kapyeounphieuphkorean;3184
+kapyeounpieupkorean;3178
+kapyeounssangpieupkorean;3179
+karoriisquare;330D
+kashidaautoarabic;0640
+kashidaautonosidebearingarabic;0640
+kasmallkatakana;30F5
+kasquare;3384
+kasraarabic;0650
+kasratanarabic;064D
+kastrokecyrillic;049F
+katahiraprolongmarkhalfwidth;FF70
+kaverticalstrokecyrillic;049D
+kbopomofo;310E
+kcalsquare;3389
+kcaron;01E9
+kcedilla;0137
+kcircle;24DA
+kcommaaccent;0137
+kdotbelow;1E33
+keharmenian;0584
+kehiragana;3051
+kekatakana;30B1
+kekatakanahalfwidth;FF79
+kenarmenian;056F
+kesmallkatakana;30F6
+kgreenlandic;0138
+khabengali;0996
+khacyrillic;0445
+khadeva;0916
+khagujarati;0A96
+khagurmukhi;0A16
+khaharabic;062E
+khahfinalarabic;FEA6
+khahinitialarabic;FEA7
+khahmedialarabic;FEA8
+kheicoptic;03E7
+khhadeva;0959
+khhagurmukhi;0A59
+khieukhacirclekorean;3278
+khieukhaparenkorean;3218
+khieukhcirclekorean;326A
+khieukhkorean;314B
+khieukhparenkorean;320A
+khokhaithai;0E02
+khokhonthai;0E05
+khokhuatthai;0E03
+khokhwaithai;0E04
+khomutthai;0E5B
+khook;0199
+khorakhangthai;0E06
+khzsquare;3391
+kihiragana;304D
+kikatakana;30AD
+kikatakanahalfwidth;FF77
+kiroguramusquare;3315
+kiromeetorusquare;3316
+kirosquare;3314
+kiyeokacirclekorean;326E
+kiyeokaparenkorean;320E
+kiyeokcirclekorean;3260
+kiyeokkorean;3131
+kiyeokparenkorean;3200
+kiyeoksioskorean;3133
+kjecyrillic;045C
+klinebelow;1E35
+klsquare;3398
+kmcubedsquare;33A6
+kmonospace;FF4B
+kmsquaredsquare;33A2
+kohiragana;3053
+kohmsquare;33C0
+kokaithai;0E01
+kokatakana;30B3
+kokatakanahalfwidth;FF7A
+kooposquare;331E
+koppacyrillic;0481
+koreanstandardsymbol;327F
+koroniscmb;0343
+kparen;24A6
+kpasquare;33AA
+ksicyrillic;046F
+ktsquare;33CF
+kturned;029E
+kuhiragana;304F
+kukatakana;30AF
+kukatakanahalfwidth;FF78
+kvsquare;33B8
+kwsquare;33BE
+l;006C
+labengali;09B2
+lacute;013A
+ladeva;0932
+lagujarati;0AB2
+lagurmukhi;0A32
+lakkhangyaothai;0E45
+lamaleffinalarabic;FEFC
+lamalefhamzaabovefinalarabic;FEF8
+lamalefhamzaaboveisolatedarabic;FEF7
+lamalefhamzabelowfinalarabic;FEFA
+lamalefhamzabelowisolatedarabic;FEF9
+lamalefisolatedarabic;FEFB
+lamalefmaddaabovefinalarabic;FEF6
+lamalefmaddaaboveisolatedarabic;FEF5
+lamarabic;0644
+lambda;03BB
+lambdastroke;019B
+lamed;05DC
+lameddagesh;FB3C
+lameddageshhebrew;FB3C
+lamedhebrew;05DC
+lamedholam;05DC 05B9
+lamedholamdagesh;05DC 05B9 05BC
+lamedholamdageshhebrew;05DC 05B9 05BC
+lamedholamhebrew;05DC 05B9
+lamfinalarabic;FEDE
+lamhahinitialarabic;FCCA
+laminitialarabic;FEDF
+lamjeeminitialarabic;FCC9
+lamkhahinitialarabic;FCCB
+lamlamhehisolatedarabic;FDF2
+lammedialarabic;FEE0
+lammeemhahinitialarabic;FD88
+lammeeminitialarabic;FCCC
+lammeemjeeminitialarabic;FEDF FEE4 FEA0
+lammeemkhahinitialarabic;FEDF FEE4 FEA8
+largecircle;25EF
+lbar;019A
+lbelt;026C
+lbopomofo;310C
+lcaron;013E
+lcedilla;013C
+lcircle;24DB
+lcircumflexbelow;1E3D
+lcommaaccent;013C
+ldot;0140
+ldotaccent;0140
+ldotbelow;1E37
+ldotbelowmacron;1E39
+leftangleabovecmb;031A
+lefttackbelowcmb;0318
+less;003C
+lessequal;2264
+lessequalorgreater;22DA
+lessmonospace;FF1C
+lessorequivalent;2272
+lessorgreater;2276
+lessoverequal;2266
+lesssmall;FE64
+lezh;026E
+lfblock;258C
+lhookretroflex;026D
+lira;20A4
+liwnarmenian;056C
+lj;01C9
+ljecyrillic;0459
+ll;F6C0
+lladeva;0933
+llagujarati;0AB3
+llinebelow;1E3B
+llladeva;0934
+llvocalicbengali;09E1
+llvocalicdeva;0961
+llvocalicvowelsignbengali;09E3
+llvocalicvowelsigndeva;0963
+lmiddletilde;026B
+lmonospace;FF4C
+lmsquare;33D0
+lochulathai;0E2C
+logicaland;2227
+logicalnot;00AC
+logicalnotreversed;2310
+logicalor;2228
+lolingthai;0E25
+longs;017F
+lowlinecenterline;FE4E
+lowlinecmb;0332
+lowlinedashed;FE4D
+lozenge;25CA
+lparen;24A7
+lslash;0142
+lsquare;2113
+lsuperior;F6EE
+ltshade;2591
+luthai;0E26
+lvocalicbengali;098C
+lvocalicdeva;090C
+lvocalicvowelsignbengali;09E2
+lvocalicvowelsigndeva;0962
+lxsquare;33D3
+m;006D
+mabengali;09AE
+macron;00AF
+macronbelowcmb;0331
+macroncmb;0304
+macronlowmod;02CD
+macronmonospace;FFE3
+macute;1E3F
+madeva;092E
+magujarati;0AAE
+magurmukhi;0A2E
+mahapakhhebrew;05A4
+mahapakhlefthebrew;05A4
+mahiragana;307E
+maichattawalowleftthai;F895
+maichattawalowrightthai;F894
+maichattawathai;0E4B
+maichattawaupperleftthai;F893
+maieklowleftthai;F88C
+maieklowrightthai;F88B
+maiekthai;0E48
+maiekupperleftthai;F88A
+maihanakatleftthai;F884
+maihanakatthai;0E31
+maitaikhuleftthai;F889
+maitaikhuthai;0E47
+maitholowleftthai;F88F
+maitholowrightthai;F88E
+maithothai;0E49
+maithoupperleftthai;F88D
+maitrilowleftthai;F892
+maitrilowrightthai;F891
+maitrithai;0E4A
+maitriupperleftthai;F890
+maiyamokthai;0E46
+makatakana;30DE
+makatakanahalfwidth;FF8F
+male;2642
+mansyonsquare;3347
+maqafhebrew;05BE
+mars;2642
+masoracirclehebrew;05AF
+masquare;3383
+mbopomofo;3107
+mbsquare;33D4
+mcircle;24DC
+mcubedsquare;33A5
+mdotaccent;1E41
+mdotbelow;1E43
+meemarabic;0645
+meemfinalarabic;FEE2
+meeminitialarabic;FEE3
+meemmedialarabic;FEE4
+meemmeeminitialarabic;FCD1
+meemmeemisolatedarabic;FC48
+meetorusquare;334D
+mehiragana;3081
+meizierasquare;337E
+mekatakana;30E1
+mekatakanahalfwidth;FF92
+mem;05DE
+memdagesh;FB3E
+memdageshhebrew;FB3E
+memhebrew;05DE
+menarmenian;0574
+merkhahebrew;05A5
+merkhakefulahebrew;05A6
+merkhakefulalefthebrew;05A6
+merkhalefthebrew;05A5
+mhook;0271
+mhzsquare;3392
+middledotkatakanahalfwidth;FF65
+middot;00B7
+mieumacirclekorean;3272
+mieumaparenkorean;3212
+mieumcirclekorean;3264
+mieumkorean;3141
+mieumpansioskorean;3170
+mieumparenkorean;3204
+mieumpieupkorean;316E
+mieumsioskorean;316F
+mihiragana;307F
+mikatakana;30DF
+mikatakanahalfwidth;FF90
+minus;2212
+minusbelowcmb;0320
+minuscircle;2296
+minusmod;02D7
+minusplus;2213
+minute;2032
+miribaarusquare;334A
+mirisquare;3349
+mlonglegturned;0270
+mlsquare;3396
+mmcubedsquare;33A3
+mmonospace;FF4D
+mmsquaredsquare;339F
+mohiragana;3082
+mohmsquare;33C1
+mokatakana;30E2
+mokatakanahalfwidth;FF93
+molsquare;33D6
+momathai;0E21
+moverssquare;33A7
+moverssquaredsquare;33A8
+mparen;24A8
+mpasquare;33AB
+mssquare;33B3
+msuperior;F6EF
+mturned;026F
+mu;00B5
+mu1;00B5
+muasquare;3382
+muchgreater;226B
+muchless;226A
+mufsquare;338C
+mugreek;03BC
+mugsquare;338D
+muhiragana;3080
+mukatakana;30E0
+mukatakanahalfwidth;FF91
+mulsquare;3395
+multiply;00D7
+mumsquare;339B
+munahhebrew;05A3
+munahlefthebrew;05A3
+musicalnote;266A
+musicalnotedbl;266B
+musicflatsign;266D
+musicsharpsign;266F
+mussquare;33B2
+muvsquare;33B6
+muwsquare;33BC
+mvmegasquare;33B9
+mvsquare;33B7
+mwmegasquare;33BF
+mwsquare;33BD
+n;006E
+nabengali;09A8
+nabla;2207
+nacute;0144
+nadeva;0928
+nagujarati;0AA8
+nagurmukhi;0A28
+nahiragana;306A
+nakatakana;30CA
+nakatakanahalfwidth;FF85
+napostrophe;0149
+nasquare;3381
+nbopomofo;310B
+nbspace;00A0
+ncaron;0148
+ncedilla;0146
+ncircle;24DD
+ncircumflexbelow;1E4B
+ncommaaccent;0146
+ndotaccent;1E45
+ndotbelow;1E47
+nehiragana;306D
+nekatakana;30CD
+nekatakanahalfwidth;FF88
+newsheqelsign;20AA
+nfsquare;338B
+ngabengali;0999
+ngadeva;0919
+ngagujarati;0A99
+ngagurmukhi;0A19
+ngonguthai;0E07
+nhiragana;3093
+nhookleft;0272
+nhookretroflex;0273
+nieunacirclekorean;326F
+nieunaparenkorean;320F
+nieuncieuckorean;3135
+nieuncirclekorean;3261
+nieunhieuhkorean;3136
+nieunkorean;3134
+nieunpansioskorean;3168
+nieunparenkorean;3201
+nieunsioskorean;3167
+nieuntikeutkorean;3166
+nihiragana;306B
+nikatakana;30CB
+nikatakanahalfwidth;FF86
+nikhahitleftthai;F899
+nikhahitthai;0E4D
+nine;0039
+ninearabic;0669
+ninebengali;09EF
+ninecircle;2468
+ninecircleinversesansserif;2792
+ninedeva;096F
+ninegujarati;0AEF
+ninegurmukhi;0A6F
+ninehackarabic;0669
+ninehangzhou;3029
+nineideographicparen;3228
+nineinferior;2089
+ninemonospace;FF19
+nineoldstyle;F739
+nineparen;247C
+nineperiod;2490
+ninepersian;06F9
+nineroman;2178
+ninesuperior;2079
+nineteencircle;2472
+nineteenparen;2486
+nineteenperiod;249A
+ninethai;0E59
+nj;01CC
+njecyrillic;045A
+nkatakana;30F3
+nkatakanahalfwidth;FF9D
+nlegrightlong;019E
+nlinebelow;1E49
+nmonospace;FF4E
+nmsquare;339A
+nnabengali;09A3
+nnadeva;0923
+nnagujarati;0AA3
+nnagurmukhi;0A23
+nnnadeva;0929
+nohiragana;306E
+nokatakana;30CE
+nokatakanahalfwidth;FF89
+nonbreakingspace;00A0
+nonenthai;0E13
+nonuthai;0E19
+noonarabic;0646
+noonfinalarabic;FEE6
+noonghunnaarabic;06BA
+noonghunnafinalarabic;FB9F
+noonhehinitialarabic;FEE7 FEEC
+nooninitialarabic;FEE7
+noonjeeminitialarabic;FCD2
+noonjeemisolatedarabic;FC4B
+noonmedialarabic;FEE8
+noonmeeminitialarabic;FCD5
+noonmeemisolatedarabic;FC4E
+noonnoonfinalarabic;FC8D
+notcontains;220C
+notelement;2209
+notelementof;2209
+notequal;2260
+notgreater;226F
+notgreaternorequal;2271
+notgreaternorless;2279
+notidentical;2262
+notless;226E
+notlessnorequal;2270
+notparallel;2226
+notprecedes;2280
+notsubset;2284
+notsucceeds;2281
+notsuperset;2285
+nowarmenian;0576
+nparen;24A9
+nssquare;33B1
+nsuperior;207F
+ntilde;00F1
+nu;03BD
+nuhiragana;306C
+nukatakana;30CC
+nukatakanahalfwidth;FF87
+nuktabengali;09BC
+nuktadeva;093C
+nuktagujarati;0ABC
+nuktagurmukhi;0A3C
+numbersign;0023
+numbersignmonospace;FF03
+numbersignsmall;FE5F
+numeralsigngreek;0374
+numeralsignlowergreek;0375
+numero;2116
+nun;05E0
+nundagesh;FB40
+nundageshhebrew;FB40
+nunhebrew;05E0
+nvsquare;33B5
+nwsquare;33BB
+nyabengali;099E
+nyadeva;091E
+nyagujarati;0A9E
+nyagurmukhi;0A1E
+o;006F
+oacute;00F3
+oangthai;0E2D
+obarred;0275
+obarredcyrillic;04E9
+obarreddieresiscyrillic;04EB
+obengali;0993
+obopomofo;311B
+obreve;014F
+ocandradeva;0911
+ocandragujarati;0A91
+ocandravowelsigndeva;0949
+ocandravowelsigngujarati;0AC9
+ocaron;01D2
+ocircle;24DE
+ocircumflex;00F4
+ocircumflexacute;1ED1
+ocircumflexdotbelow;1ED9
+ocircumflexgrave;1ED3
+ocircumflexhookabove;1ED5
+ocircumflextilde;1ED7
+ocyrillic;043E
+odblacute;0151
+odblgrave;020D
+odeva;0913
+odieresis;00F6
+odieresiscyrillic;04E7
+odotbelow;1ECD
+oe;0153
+oekorean;315A
+ogonek;02DB
+ogonekcmb;0328
+ograve;00F2
+ogujarati;0A93
+oharmenian;0585
+ohiragana;304A
+ohookabove;1ECF
+ohorn;01A1
+ohornacute;1EDB
+ohorndotbelow;1EE3
+ohorngrave;1EDD
+ohornhookabove;1EDF
+ohorntilde;1EE1
+ohungarumlaut;0151
+oi;01A3
+oinvertedbreve;020F
+okatakana;30AA
+okatakanahalfwidth;FF75
+okorean;3157
+olehebrew;05AB
+omacron;014D
+omacronacute;1E53
+omacrongrave;1E51
+omdeva;0950
+omega;03C9
+omega1;03D6
+omegacyrillic;0461
+omegalatinclosed;0277
+omegaroundcyrillic;047B
+omegatitlocyrillic;047D
+omegatonos;03CE
+omgujarati;0AD0
+omicron;03BF
+omicrontonos;03CC
+omonospace;FF4F
+one;0031
+onearabic;0661
+onebengali;09E7
+onecircle;2460
+onecircleinversesansserif;278A
+onedeva;0967
+onedotenleader;2024
+oneeighth;215B
+onefitted;F6DC
+onegujarati;0AE7
+onegurmukhi;0A67
+onehackarabic;0661
+onehalf;00BD
+onehangzhou;3021
+oneideographicparen;3220
+oneinferior;2081
+onemonospace;FF11
+onenumeratorbengali;09F4
+oneoldstyle;F731
+oneparen;2474
+oneperiod;2488
+onepersian;06F1
+onequarter;00BC
+oneroman;2170
+onesuperior;00B9
+onethai;0E51
+onethird;2153
+oogonek;01EB
+oogonekmacron;01ED
+oogurmukhi;0A13
+oomatragurmukhi;0A4B
+oopen;0254
+oparen;24AA
+openbullet;25E6
+option;2325
+ordfeminine;00AA
+ordmasculine;00BA
+orthogonal;221F
+oshortdeva;0912
+oshortvowelsigndeva;094A
+oslash;00F8
+oslashacute;01FF
+osmallhiragana;3049
+osmallkatakana;30A9
+osmallkatakanahalfwidth;FF6B
+ostrokeacute;01FF
+osuperior;F6F0
+otcyrillic;047F
+otilde;00F5
+otildeacute;1E4D
+otildedieresis;1E4F
+oubopomofo;3121
+overline;203E
+overlinecenterline;FE4A
+overlinecmb;0305
+overlinedashed;FE49
+overlinedblwavy;FE4C
+overlinewavy;FE4B
+overscore;00AF
+ovowelsignbengali;09CB
+ovowelsigndeva;094B
+ovowelsigngujarati;0ACB
+p;0070
+paampssquare;3380
+paasentosquare;332B
+pabengali;09AA
+pacute;1E55
+padeva;092A
+pagedown;21DF
+pageup;21DE
+pagujarati;0AAA
+pagurmukhi;0A2A
+pahiragana;3071
+paiyannoithai;0E2F
+pakatakana;30D1
+palatalizationcyrilliccmb;0484
+palochkacyrillic;04C0
+pansioskorean;317F
+paragraph;00B6
+parallel;2225
+parenleft;0028
+parenleftaltonearabic;FD3E
+parenleftbt;F8ED
+parenleftex;F8EC
+parenleftinferior;208D
+parenleftmonospace;FF08
+parenleftsmall;FE59
+parenleftsuperior;207D
+parenlefttp;F8EB
+parenleftvertical;FE35
+parenright;0029
+parenrightaltonearabic;FD3F
+parenrightbt;F8F8
+parenrightex;F8F7
+parenrightinferior;208E
+parenrightmonospace;FF09
+parenrightsmall;FE5A
+parenrightsuperior;207E
+parenrighttp;F8F6
+parenrightvertical;FE36
+partialdiff;2202
+paseqhebrew;05C0
+pashtahebrew;0599
+pasquare;33A9
+patah;05B7
+patah11;05B7
+patah1d;05B7
+patah2a;05B7
+patahhebrew;05B7
+patahnarrowhebrew;05B7
+patahquarterhebrew;05B7
+patahwidehebrew;05B7
+pazerhebrew;05A1
+pbopomofo;3106
+pcircle;24DF
+pdotaccent;1E57
+pe;05E4
+pecyrillic;043F
+pedagesh;FB44
+pedageshhebrew;FB44
+peezisquare;333B
+pefinaldageshhebrew;FB43
+peharabic;067E
+peharmenian;057A
+pehebrew;05E4
+pehfinalarabic;FB57
+pehinitialarabic;FB58
+pehiragana;307A
+pehmedialarabic;FB59
+pekatakana;30DA
+pemiddlehookcyrillic;04A7
+perafehebrew;FB4E
+percent;0025
+percentarabic;066A
+percentmonospace;FF05
+percentsmall;FE6A
+period;002E
+periodarmenian;0589
+periodcentered;00B7
+periodhalfwidth;FF61
+periodinferior;F6E7
+periodmonospace;FF0E
+periodsmall;FE52
+periodsuperior;F6E8
+perispomenigreekcmb;0342
+perpendicular;22A5
+perthousand;2030
+peseta;20A7
+pfsquare;338A
+phabengali;09AB
+phadeva;092B
+phagujarati;0AAB
+phagurmukhi;0A2B
+phi;03C6
+phi1;03D5
+phieuphacirclekorean;327A
+phieuphaparenkorean;321A
+phieuphcirclekorean;326C
+phieuphkorean;314D
+phieuphparenkorean;320C
+philatin;0278
+phinthuthai;0E3A
+phisymbolgreek;03D5
+phook;01A5
+phophanthai;0E1E
+phophungthai;0E1C
+phosamphaothai;0E20
+pi;03C0
+pieupacirclekorean;3273
+pieupaparenkorean;3213
+pieupcieuckorean;3176
+pieupcirclekorean;3265
+pieupkiyeokkorean;3172
+pieupkorean;3142
+pieupparenkorean;3205
+pieupsioskiyeokkorean;3174
+pieupsioskorean;3144
+pieupsiostikeutkorean;3175
+pieupthieuthkorean;3177
+pieuptikeutkorean;3173
+pihiragana;3074
+pikatakana;30D4
+pisymbolgreek;03D6
+piwrarmenian;0583
+plus;002B
+plusbelowcmb;031F
+pluscircle;2295
+plusminus;00B1
+plusmod;02D6
+plusmonospace;FF0B
+plussmall;FE62
+plussuperior;207A
+pmonospace;FF50
+pmsquare;33D8
+pohiragana;307D
+pointingindexdownwhite;261F
+pointingindexleftwhite;261C
+pointingindexrightwhite;261E
+pointingindexupwhite;261D
+pokatakana;30DD
+poplathai;0E1B
+postalmark;3012
+postalmarkface;3020
+pparen;24AB
+precedes;227A
+prescription;211E
+primemod;02B9
+primereversed;2035
+product;220F
+projective;2305
+prolongedkana;30FC
+propellor;2318
+propersubset;2282
+propersuperset;2283
+proportion;2237
+proportional;221D
+psi;03C8
+psicyrillic;0471
+psilipneumatacyrilliccmb;0486
+pssquare;33B0
+puhiragana;3077
+pukatakana;30D7
+pvsquare;33B4
+pwsquare;33BA
+q;0071
+qadeva;0958
+qadmahebrew;05A8
+qafarabic;0642
+qaffinalarabic;FED6
+qafinitialarabic;FED7
+qafmedialarabic;FED8
+qamats;05B8
+qamats10;05B8
+qamats1a;05B8
+qamats1c;05B8
+qamats27;05B8
+qamats29;05B8
+qamats33;05B8
+qamatsde;05B8
+qamatshebrew;05B8
+qamatsnarrowhebrew;05B8
+qamatsqatanhebrew;05B8
+qamatsqatannarrowhebrew;05B8
+qamatsqatanquarterhebrew;05B8
+qamatsqatanwidehebrew;05B8
+qamatsquarterhebrew;05B8
+qamatswidehebrew;05B8
+qarneyparahebrew;059F
+qbopomofo;3111
+qcircle;24E0
+qhook;02A0
+qmonospace;FF51
+qof;05E7
+qofdagesh;FB47
+qofdageshhebrew;FB47
+qofhatafpatah;05E7 05B2
+qofhatafpatahhebrew;05E7 05B2
+qofhatafsegol;05E7 05B1
+qofhatafsegolhebrew;05E7 05B1
+qofhebrew;05E7
+qofhiriq;05E7 05B4
+qofhiriqhebrew;05E7 05B4
+qofholam;05E7 05B9
+qofholamhebrew;05E7 05B9
+qofpatah;05E7 05B7
+qofpatahhebrew;05E7 05B7
+qofqamats;05E7 05B8
+qofqamatshebrew;05E7 05B8
+qofqubuts;05E7 05BB
+qofqubutshebrew;05E7 05BB
+qofsegol;05E7 05B6
+qofsegolhebrew;05E7 05B6
+qofsheva;05E7 05B0
+qofshevahebrew;05E7 05B0
+qoftsere;05E7 05B5
+qoftserehebrew;05E7 05B5
+qparen;24AC
+quarternote;2669
+qubuts;05BB
+qubuts18;05BB
+qubuts25;05BB
+qubuts31;05BB
+qubutshebrew;05BB
+qubutsnarrowhebrew;05BB
+qubutsquarterhebrew;05BB
+qubutswidehebrew;05BB
+question;003F
+questionarabic;061F
+questionarmenian;055E
+questiondown;00BF
+questiondownsmall;F7BF
+questiongreek;037E
+questionmonospace;FF1F
+questionsmall;F73F
+quotedbl;0022
+quotedblbase;201E
+quotedblleft;201C
+quotedblmonospace;FF02
+quotedblprime;301E
+quotedblprimereversed;301D
+quotedblright;201D
+quoteleft;2018
+quoteleftreversed;201B
+quotereversed;201B
+quoteright;2019
+quoterightn;0149
+quotesinglbase;201A
+quotesingle;0027
+quotesinglemonospace;FF07
+r;0072
+raarmenian;057C
+rabengali;09B0
+racute;0155
+radeva;0930
+radical;221A
+radicalex;F8E5
+radoverssquare;33AE
+radoverssquaredsquare;33AF
+radsquare;33AD
+rafe;05BF
+rafehebrew;05BF
+ragujarati;0AB0
+ragurmukhi;0A30
+rahiragana;3089
+rakatakana;30E9
+rakatakanahalfwidth;FF97
+ralowerdiagonalbengali;09F1
+ramiddlediagonalbengali;09F0
+ramshorn;0264
+ratio;2236
+rbopomofo;3116
+rcaron;0159
+rcedilla;0157
+rcircle;24E1
+rcommaaccent;0157
+rdblgrave;0211
+rdotaccent;1E59
+rdotbelow;1E5B
+rdotbelowmacron;1E5D
+referencemark;203B
+reflexsubset;2286
+reflexsuperset;2287
+registered;00AE
+registersans;F8E8
+registerserif;F6DA
+reharabic;0631
+reharmenian;0580
+rehfinalarabic;FEAE
+rehiragana;308C
+rehyehaleflamarabic;0631 FEF3 FE8E 0644
+rekatakana;30EC
+rekatakanahalfwidth;FF9A
+resh;05E8
+reshdageshhebrew;FB48
+reshhatafpatah;05E8 05B2
+reshhatafpatahhebrew;05E8 05B2
+reshhatafsegol;05E8 05B1
+reshhatafsegolhebrew;05E8 05B1
+reshhebrew;05E8
+reshhiriq;05E8 05B4
+reshhiriqhebrew;05E8 05B4
+reshholam;05E8 05B9
+reshholamhebrew;05E8 05B9
+reshpatah;05E8 05B7
+reshpatahhebrew;05E8 05B7
+reshqamats;05E8 05B8
+reshqamatshebrew;05E8 05B8
+reshqubuts;05E8 05BB
+reshqubutshebrew;05E8 05BB
+reshsegol;05E8 05B6
+reshsegolhebrew;05E8 05B6
+reshsheva;05E8 05B0
+reshshevahebrew;05E8 05B0
+reshtsere;05E8 05B5
+reshtserehebrew;05E8 05B5
+reversedtilde;223D
+reviahebrew;0597
+reviamugrashhebrew;0597
+revlogicalnot;2310
+rfishhook;027E
+rfishhookreversed;027F
+rhabengali;09DD
+rhadeva;095D
+rho;03C1
+rhook;027D
+rhookturned;027B
+rhookturnedsuperior;02B5
+rhosymbolgreek;03F1
+rhotichookmod;02DE
+rieulacirclekorean;3271
+rieulaparenkorean;3211
+rieulcirclekorean;3263
+rieulhieuhkorean;3140
+rieulkiyeokkorean;313A
+rieulkiyeoksioskorean;3169
+rieulkorean;3139
+rieulmieumkorean;313B
+rieulpansioskorean;316C
+rieulparenkorean;3203
+rieulphieuphkorean;313F
+rieulpieupkorean;313C
+rieulpieupsioskorean;316B
+rieulsioskorean;313D
+rieulthieuthkorean;313E
+rieultikeutkorean;316A
+rieulyeorinhieuhkorean;316D
+rightangle;221F
+righttackbelowcmb;0319
+righttriangle;22BF
+rihiragana;308A
+rikatakana;30EA
+rikatakanahalfwidth;FF98
+ring;02DA
+ringbelowcmb;0325
+ringcmb;030A
+ringhalfleft;02BF
+ringhalfleftarmenian;0559
+ringhalfleftbelowcmb;031C
+ringhalfleftcentered;02D3
+ringhalfright;02BE
+ringhalfrightbelowcmb;0339
+ringhalfrightcentered;02D2
+rinvertedbreve;0213
+rittorusquare;3351
+rlinebelow;1E5F
+rlongleg;027C
+rlonglegturned;027A
+rmonospace;FF52
+rohiragana;308D
+rokatakana;30ED
+rokatakanahalfwidth;FF9B
+roruathai;0E23
+rparen;24AD
+rrabengali;09DC
+rradeva;0931
+rragurmukhi;0A5C
+rreharabic;0691
+rrehfinalarabic;FB8D
+rrvocalicbengali;09E0
+rrvocalicdeva;0960
+rrvocalicgujarati;0AE0
+rrvocalicvowelsignbengali;09C4
+rrvocalicvowelsigndeva;0944
+rrvocalicvowelsigngujarati;0AC4
+rsuperior;F6F1
+rtblock;2590
+rturned;0279
+rturnedsuperior;02B4
+ruhiragana;308B
+rukatakana;30EB
+rukatakanahalfwidth;FF99
+rupeemarkbengali;09F2
+rupeesignbengali;09F3
+rupiah;F6DD
+ruthai;0E24
+rvocalicbengali;098B
+rvocalicdeva;090B
+rvocalicgujarati;0A8B
+rvocalicvowelsignbengali;09C3
+rvocalicvowelsigndeva;0943
+rvocalicvowelsigngujarati;0AC3
+s;0073
+sabengali;09B8
+sacute;015B
+sacutedotaccent;1E65
+sadarabic;0635
+sadeva;0938
+sadfinalarabic;FEBA
+sadinitialarabic;FEBB
+sadmedialarabic;FEBC
+sagujarati;0AB8
+sagurmukhi;0A38
+sahiragana;3055
+sakatakana;30B5
+sakatakanahalfwidth;FF7B
+sallallahoualayhewasallamarabic;FDFA
+samekh;05E1
+samekhdagesh;FB41
+samekhdageshhebrew;FB41
+samekhhebrew;05E1
+saraaathai;0E32
+saraaethai;0E41
+saraaimaimalaithai;0E44
+saraaimaimuanthai;0E43
+saraamthai;0E33
+saraathai;0E30
+saraethai;0E40
+saraiileftthai;F886
+saraiithai;0E35
+saraileftthai;F885
+saraithai;0E34
+saraothai;0E42
+saraueeleftthai;F888
+saraueethai;0E37
+saraueleftthai;F887
+sarauethai;0E36
+sarauthai;0E38
+sarauuthai;0E39
+sbopomofo;3119
+scaron;0161
+scarondotaccent;1E67
+scedilla;015F
+schwa;0259
+schwacyrillic;04D9
+schwadieresiscyrillic;04DB
+schwahook;025A
+scircle;24E2
+scircumflex;015D
+scommaaccent;0219
+sdotaccent;1E61
+sdotbelow;1E63
+sdotbelowdotaccent;1E69
+seagullbelowcmb;033C
+second;2033
+secondtonechinese;02CA
+section;00A7
+seenarabic;0633
+seenfinalarabic;FEB2
+seeninitialarabic;FEB3
+seenmedialarabic;FEB4
+segol;05B6
+segol13;05B6
+segol1f;05B6
+segol2c;05B6
+segolhebrew;05B6
+segolnarrowhebrew;05B6
+segolquarterhebrew;05B6
+segoltahebrew;0592
+segolwidehebrew;05B6
+seharmenian;057D
+sehiragana;305B
+sekatakana;30BB
+sekatakanahalfwidth;FF7E
+semicolon;003B
+semicolonarabic;061B
+semicolonmonospace;FF1B
+semicolonsmall;FE54
+semivoicedmarkkana;309C
+semivoicedmarkkanahalfwidth;FF9F
+sentisquare;3322
+sentosquare;3323
+seven;0037
+sevenarabic;0667
+sevenbengali;09ED
+sevencircle;2466
+sevencircleinversesansserif;2790
+sevendeva;096D
+seveneighths;215E
+sevengujarati;0AED
+sevengurmukhi;0A6D
+sevenhackarabic;0667
+sevenhangzhou;3027
+sevenideographicparen;3226
+seveninferior;2087
+sevenmonospace;FF17
+sevenoldstyle;F737
+sevenparen;247A
+sevenperiod;248E
+sevenpersian;06F7
+sevenroman;2176
+sevensuperior;2077
+seventeencircle;2470
+seventeenparen;2484
+seventeenperiod;2498
+seventhai;0E57
+sfthyphen;00AD
+shaarmenian;0577
+shabengali;09B6
+shacyrillic;0448
+shaddaarabic;0651
+shaddadammaarabic;FC61
+shaddadammatanarabic;FC5E
+shaddafathaarabic;FC60
+shaddafathatanarabic;0651 064B
+shaddakasraarabic;FC62
+shaddakasratanarabic;FC5F
+shade;2592
+shadedark;2593
+shadelight;2591
+shademedium;2592
+shadeva;0936
+shagujarati;0AB6
+shagurmukhi;0A36
+shalshelethebrew;0593
+shbopomofo;3115
+shchacyrillic;0449
+sheenarabic;0634
+sheenfinalarabic;FEB6
+sheeninitialarabic;FEB7
+sheenmedialarabic;FEB8
+sheicoptic;03E3
+sheqel;20AA
+sheqelhebrew;20AA
+sheva;05B0
+sheva115;05B0
+sheva15;05B0
+sheva22;05B0
+sheva2e;05B0
+shevahebrew;05B0
+shevanarrowhebrew;05B0
+shevaquarterhebrew;05B0
+shevawidehebrew;05B0
+shhacyrillic;04BB
+shimacoptic;03ED
+shin;05E9
+shindagesh;FB49
+shindageshhebrew;FB49
+shindageshshindot;FB2C
+shindageshshindothebrew;FB2C
+shindageshsindot;FB2D
+shindageshsindothebrew;FB2D
+shindothebrew;05C1
+shinhebrew;05E9
+shinshindot;FB2A
+shinshindothebrew;FB2A
+shinsindot;FB2B
+shinsindothebrew;FB2B
+shook;0282
+sigma;03C3
+sigma1;03C2
+sigmafinal;03C2
+sigmalunatesymbolgreek;03F2
+sihiragana;3057
+sikatakana;30B7
+sikatakanahalfwidth;FF7C
+siluqhebrew;05BD
+siluqlefthebrew;05BD
+similar;223C
+sindothebrew;05C2
+siosacirclekorean;3274
+siosaparenkorean;3214
+sioscieuckorean;317E
+sioscirclekorean;3266
+sioskiyeokkorean;317A
+sioskorean;3145
+siosnieunkorean;317B
+siosparenkorean;3206
+siospieupkorean;317D
+siostikeutkorean;317C
+six;0036
+sixarabic;0666
+sixbengali;09EC
+sixcircle;2465
+sixcircleinversesansserif;278F
+sixdeva;096C
+sixgujarati;0AEC
+sixgurmukhi;0A6C
+sixhackarabic;0666
+sixhangzhou;3026
+sixideographicparen;3225
+sixinferior;2086
+sixmonospace;FF16
+sixoldstyle;F736
+sixparen;2479
+sixperiod;248D
+sixpersian;06F6
+sixroman;2175
+sixsuperior;2076
+sixteencircle;246F
+sixteencurrencydenominatorbengali;09F9
+sixteenparen;2483
+sixteenperiod;2497
+sixthai;0E56
+slash;002F
+slashmonospace;FF0F
+slong;017F
+slongdotaccent;1E9B
+smileface;263A
+smonospace;FF53
+sofpasuqhebrew;05C3
+softhyphen;00AD
+softsigncyrillic;044C
+sohiragana;305D
+sokatakana;30BD
+sokatakanahalfwidth;FF7F
+soliduslongoverlaycmb;0338
+solidusshortoverlaycmb;0337
+sorusithai;0E29
+sosalathai;0E28
+sosothai;0E0B
+sosuathai;0E2A
+space;0020
+spacehackarabic;0020
+spade;2660
+spadesuitblack;2660
+spadesuitwhite;2664
+sparen;24AE
+squarebelowcmb;033B
+squarecc;33C4
+squarecm;339D
+squarediagonalcrosshatchfill;25A9
+squarehorizontalfill;25A4
+squarekg;338F
+squarekm;339E
+squarekmcapital;33CE
+squareln;33D1
+squarelog;33D2
+squaremg;338E
+squaremil;33D5
+squaremm;339C
+squaremsquared;33A1
+squareorthogonalcrosshatchfill;25A6
+squareupperlefttolowerrightfill;25A7
+squareupperrighttolowerleftfill;25A8
+squareverticalfill;25A5
+squarewhitewithsmallblack;25A3
+srsquare;33DB
+ssabengali;09B7
+ssadeva;0937
+ssagujarati;0AB7
+ssangcieuckorean;3149
+ssanghieuhkorean;3185
+ssangieungkorean;3180
+ssangkiyeokkorean;3132
+ssangnieunkorean;3165
+ssangpieupkorean;3143
+ssangsioskorean;3146
+ssangtikeutkorean;3138
+ssuperior;F6F2
+sterling;00A3
+sterlingmonospace;FFE1
+strokelongoverlaycmb;0336
+strokeshortoverlaycmb;0335
+subset;2282
+subsetnotequal;228A
+subsetorequal;2286
+succeeds;227B
+suchthat;220B
+suhiragana;3059
+sukatakana;30B9
+sukatakanahalfwidth;FF7D
+sukunarabic;0652
+summation;2211
+sun;263C
+superset;2283
+supersetnotequal;228B
+supersetorequal;2287
+svsquare;33DC
+syouwaerasquare;337C
+t;0074
+tabengali;09A4
+tackdown;22A4
+tackleft;22A3
+tadeva;0924
+tagujarati;0AA4
+tagurmukhi;0A24
+taharabic;0637
+tahfinalarabic;FEC2
+tahinitialarabic;FEC3
+tahiragana;305F
+tahmedialarabic;FEC4
+taisyouerasquare;337D
+takatakana;30BF
+takatakanahalfwidth;FF80
+tatweelarabic;0640
+tau;03C4
+tav;05EA
+tavdages;FB4A
+tavdagesh;FB4A
+tavdageshhebrew;FB4A
+tavhebrew;05EA
+tbar;0167
+tbopomofo;310A
+tcaron;0165
+tccurl;02A8
+tcedilla;0163
+tcheharabic;0686
+tchehfinalarabic;FB7B
+tchehinitialarabic;FB7C
+tchehmedialarabic;FB7D
+tchehmeeminitialarabic;FB7C FEE4
+tcircle;24E3
+tcircumflexbelow;1E71
+tcommaaccent;0163
+tdieresis;1E97
+tdotaccent;1E6B
+tdotbelow;1E6D
+tecyrillic;0442
+tedescendercyrillic;04AD
+teharabic;062A
+tehfinalarabic;FE96
+tehhahinitialarabic;FCA2
+tehhahisolatedarabic;FC0C
+tehinitialarabic;FE97
+tehiragana;3066
+tehjeeminitialarabic;FCA1
+tehjeemisolatedarabic;FC0B
+tehmarbutaarabic;0629
+tehmarbutafinalarabic;FE94
+tehmedialarabic;FE98
+tehmeeminitialarabic;FCA4
+tehmeemisolatedarabic;FC0E
+tehnoonfinalarabic;FC73
+tekatakana;30C6
+tekatakanahalfwidth;FF83
+telephone;2121
+telephoneblack;260E
+telishagedolahebrew;05A0
+telishaqetanahebrew;05A9
+tencircle;2469
+tenideographicparen;3229
+tenparen;247D
+tenperiod;2491
+tenroman;2179
+tesh;02A7
+tet;05D8
+tetdagesh;FB38
+tetdageshhebrew;FB38
+tethebrew;05D8
+tetsecyrillic;04B5
+tevirhebrew;059B
+tevirlefthebrew;059B
+thabengali;09A5
+thadeva;0925
+thagujarati;0AA5
+thagurmukhi;0A25
+thalarabic;0630
+thalfinalarabic;FEAC
+thanthakhatlowleftthai;F898
+thanthakhatlowrightthai;F897
+thanthakhatthai;0E4C
+thanthakhatupperleftthai;F896
+theharabic;062B
+thehfinalarabic;FE9A
+thehinitialarabic;FE9B
+thehmedialarabic;FE9C
+thereexists;2203
+therefore;2234
+theta;03B8
+theta1;03D1
+thetasymbolgreek;03D1
+thieuthacirclekorean;3279
+thieuthaparenkorean;3219
+thieuthcirclekorean;326B
+thieuthkorean;314C
+thieuthparenkorean;320B
+thirteencircle;246C
+thirteenparen;2480
+thirteenperiod;2494
+thonangmonthothai;0E11
+thook;01AD
+thophuthaothai;0E12
+thorn;00FE
+thothahanthai;0E17
+thothanthai;0E10
+thothongthai;0E18
+thothungthai;0E16
+thousandcyrillic;0482
+thousandsseparatorarabic;066C
+thousandsseparatorpersian;066C
+three;0033
+threearabic;0663
+threebengali;09E9
+threecircle;2462
+threecircleinversesansserif;278C
+threedeva;0969
+threeeighths;215C
+threegujarati;0AE9
+threegurmukhi;0A69
+threehackarabic;0663
+threehangzhou;3023
+threeideographicparen;3222
+threeinferior;2083
+threemonospace;FF13
+threenumeratorbengali;09F6
+threeoldstyle;F733
+threeparen;2476
+threeperiod;248A
+threepersian;06F3
+threequarters;00BE
+threequartersemdash;F6DE
+threeroman;2172
+threesuperior;00B3
+threethai;0E53
+thzsquare;3394
+tihiragana;3061
+tikatakana;30C1
+tikatakanahalfwidth;FF81
+tikeutacirclekorean;3270
+tikeutaparenkorean;3210
+tikeutcirclekorean;3262
+tikeutkorean;3137
+tikeutparenkorean;3202
+tilde;02DC
+tildebelowcmb;0330
+tildecmb;0303
+tildecomb;0303
+tildedoublecmb;0360
+tildeoperator;223C
+tildeoverlaycmb;0334
+tildeverticalcmb;033E
+timescircle;2297
+tipehahebrew;0596
+tipehalefthebrew;0596
+tippigurmukhi;0A70
+titlocyrilliccmb;0483
+tiwnarmenian;057F
+tlinebelow;1E6F
+tmonospace;FF54
+toarmenian;0569
+tohiragana;3068
+tokatakana;30C8
+tokatakanahalfwidth;FF84
+tonebarextrahighmod;02E5
+tonebarextralowmod;02E9
+tonebarhighmod;02E6
+tonebarlowmod;02E8
+tonebarmidmod;02E7
+tonefive;01BD
+tonesix;0185
+tonetwo;01A8
+tonos;0384
+tonsquare;3327
+topatakthai;0E0F
+tortoiseshellbracketleft;3014
+tortoiseshellbracketleftsmall;FE5D
+tortoiseshellbracketleftvertical;FE39
+tortoiseshellbracketright;3015
+tortoiseshellbracketrightsmall;FE5E
+tortoiseshellbracketrightvertical;FE3A
+totaothai;0E15
+tpalatalhook;01AB
+tparen;24AF
+trademark;2122
+trademarksans;F8EA
+trademarkserif;F6DB
+tretroflexhook;0288
+triagdn;25BC
+triaglf;25C4
+triagrt;25BA
+triagup;25B2
+ts;02A6
+tsadi;05E6
+tsadidagesh;FB46
+tsadidageshhebrew;FB46
+tsadihebrew;05E6
+tsecyrillic;0446
+tsere;05B5
+tsere12;05B5
+tsere1e;05B5
+tsere2b;05B5
+tserehebrew;05B5
+tserenarrowhebrew;05B5
+tserequarterhebrew;05B5
+tserewidehebrew;05B5
+tshecyrillic;045B
+tsuperior;F6F3
+ttabengali;099F
+ttadeva;091F
+ttagujarati;0A9F
+ttagurmukhi;0A1F
+tteharabic;0679
+ttehfinalarabic;FB67
+ttehinitialarabic;FB68
+ttehmedialarabic;FB69
+tthabengali;09A0
+tthadeva;0920
+tthagujarati;0AA0
+tthagurmukhi;0A20
+tturned;0287
+tuhiragana;3064
+tukatakana;30C4
+tukatakanahalfwidth;FF82
+tusmallhiragana;3063
+tusmallkatakana;30C3
+tusmallkatakanahalfwidth;FF6F
+twelvecircle;246B
+twelveparen;247F
+twelveperiod;2493
+twelveroman;217B
+twentycircle;2473
+twentyhangzhou;5344
+twentyparen;2487
+twentyperiod;249B
+two;0032
+twoarabic;0662
+twobengali;09E8
+twocircle;2461
+twocircleinversesansserif;278B
+twodeva;0968
+twodotenleader;2025
+twodotleader;2025
+twodotleadervertical;FE30
+twogujarati;0AE8
+twogurmukhi;0A68
+twohackarabic;0662
+twohangzhou;3022
+twoideographicparen;3221
+twoinferior;2082
+twomonospace;FF12
+twonumeratorbengali;09F5
+twooldstyle;F732
+twoparen;2475
+twoperiod;2489
+twopersian;06F2
+tworoman;2171
+twostroke;01BB
+twosuperior;00B2
+twothai;0E52
+twothirds;2154
+u;0075
+uacute;00FA
+ubar;0289
+ubengali;0989
+ubopomofo;3128
+ubreve;016D
+ucaron;01D4
+ucircle;24E4
+ucircumflex;00FB
+ucircumflexbelow;1E77
+ucyrillic;0443
+udattadeva;0951
+udblacute;0171
+udblgrave;0215
+udeva;0909
+udieresis;00FC
+udieresisacute;01D8
+udieresisbelow;1E73
+udieresiscaron;01DA
+udieresiscyrillic;04F1
+udieresisgrave;01DC
+udieresismacron;01D6
+udotbelow;1EE5
+ugrave;00F9
+ugujarati;0A89
+ugurmukhi;0A09
+uhiragana;3046
+uhookabove;1EE7
+uhorn;01B0
+uhornacute;1EE9
+uhorndotbelow;1EF1
+uhorngrave;1EEB
+uhornhookabove;1EED
+uhorntilde;1EEF
+uhungarumlaut;0171
+uhungarumlautcyrillic;04F3
+uinvertedbreve;0217
+ukatakana;30A6
+ukatakanahalfwidth;FF73
+ukcyrillic;0479
+ukorean;315C
+umacron;016B
+umacroncyrillic;04EF
+umacrondieresis;1E7B
+umatragurmukhi;0A41
+umonospace;FF55
+underscore;005F
+underscoredbl;2017
+underscoremonospace;FF3F
+underscorevertical;FE33
+underscorewavy;FE4F
+union;222A
+universal;2200
+uogonek;0173
+uparen;24B0
+upblock;2580
+upperdothebrew;05C4
+upsilon;03C5
+upsilondieresis;03CB
+upsilondieresistonos;03B0
+upsilonlatin;028A
+upsilontonos;03CD
+uptackbelowcmb;031D
+uptackmod;02D4
+uragurmukhi;0A73
+uring;016F
+ushortcyrillic;045E
+usmallhiragana;3045
+usmallkatakana;30A5
+usmallkatakanahalfwidth;FF69
+ustraightcyrillic;04AF
+ustraightstrokecyrillic;04B1
+utilde;0169
+utildeacute;1E79
+utildebelow;1E75
+uubengali;098A
+uudeva;090A
+uugujarati;0A8A
+uugurmukhi;0A0A
+uumatragurmukhi;0A42
+uuvowelsignbengali;09C2
+uuvowelsigndeva;0942
+uuvowelsigngujarati;0AC2
+uvowelsignbengali;09C1
+uvowelsigndeva;0941
+uvowelsigngujarati;0AC1
+v;0076
+vadeva;0935
+vagujarati;0AB5
+vagurmukhi;0A35
+vakatakana;30F7
+vav;05D5
+vavdagesh;FB35
+vavdagesh65;FB35
+vavdageshhebrew;FB35
+vavhebrew;05D5
+vavholam;FB4B
+vavholamhebrew;FB4B
+vavvavhebrew;05F0
+vavyodhebrew;05F1
+vcircle;24E5
+vdotbelow;1E7F
+vecyrillic;0432
+veharabic;06A4
+vehfinalarabic;FB6B
+vehinitialarabic;FB6C
+vehmedialarabic;FB6D
+vekatakana;30F9
+venus;2640
+verticalbar;007C
+verticallineabovecmb;030D
+verticallinebelowcmb;0329
+verticallinelowmod;02CC
+verticallinemod;02C8
+vewarmenian;057E
+vhook;028B
+vikatakana;30F8
+viramabengali;09CD
+viramadeva;094D
+viramagujarati;0ACD
+visargabengali;0983
+visargadeva;0903
+visargagujarati;0A83
+vmonospace;FF56
+voarmenian;0578
+voicediterationhiragana;309E
+voicediterationkatakana;30FE
+voicedmarkkana;309B
+voicedmarkkanahalfwidth;FF9E
+vokatakana;30FA
+vparen;24B1
+vtilde;1E7D
+vturned;028C
+vuhiragana;3094
+vukatakana;30F4
+w;0077
+wacute;1E83
+waekorean;3159
+wahiragana;308F
+wakatakana;30EF
+wakatakanahalfwidth;FF9C
+wakorean;3158
+wasmallhiragana;308E
+wasmallkatakana;30EE
+wattosquare;3357
+wavedash;301C
+wavyunderscorevertical;FE34
+wawarabic;0648
+wawfinalarabic;FEEE
+wawhamzaabovearabic;0624
+wawhamzaabovefinalarabic;FE86
+wbsquare;33DD
+wcircle;24E6
+wcircumflex;0175
+wdieresis;1E85
+wdotaccent;1E87
+wdotbelow;1E89
+wehiragana;3091
+weierstrass;2118
+wekatakana;30F1
+wekorean;315E
+weokorean;315D
+wgrave;1E81
+whitebullet;25E6
+whitecircle;25CB
+whitecircleinverse;25D9
+whitecornerbracketleft;300E
+whitecornerbracketleftvertical;FE43
+whitecornerbracketright;300F
+whitecornerbracketrightvertical;FE44
+whitediamond;25C7
+whitediamondcontainingblacksmalldiamond;25C8
+whitedownpointingsmalltriangle;25BF
+whitedownpointingtriangle;25BD
+whiteleftpointingsmalltriangle;25C3
+whiteleftpointingtriangle;25C1
+whitelenticularbracketleft;3016
+whitelenticularbracketright;3017
+whiterightpointingsmalltriangle;25B9
+whiterightpointingtriangle;25B7
+whitesmallsquare;25AB
+whitesmilingface;263A
+whitesquare;25A1
+whitestar;2606
+whitetelephone;260F
+whitetortoiseshellbracketleft;3018
+whitetortoiseshellbracketright;3019
+whiteuppointingsmalltriangle;25B5
+whiteuppointingtriangle;25B3
+wihiragana;3090
+wikatakana;30F0
+wikorean;315F
+wmonospace;FF57
+wohiragana;3092
+wokatakana;30F2
+wokatakanahalfwidth;FF66
+won;20A9
+wonmonospace;FFE6
+wowaenthai;0E27
+wparen;24B2
+wring;1E98
+wsuperior;02B7
+wturned;028D
+wynn;01BF
+x;0078
+xabovecmb;033D
+xbopomofo;3112
+xcircle;24E7
+xdieresis;1E8D
+xdotaccent;1E8B
+xeharmenian;056D
+xi;03BE
+xmonospace;FF58
+xparen;24B3
+xsuperior;02E3
+y;0079
+yaadosquare;334E
+yabengali;09AF
+yacute;00FD
+yadeva;092F
+yaekorean;3152
+yagujarati;0AAF
+yagurmukhi;0A2F
+yahiragana;3084
+yakatakana;30E4
+yakatakanahalfwidth;FF94
+yakorean;3151
+yamakkanthai;0E4E
+yasmallhiragana;3083
+yasmallkatakana;30E3
+yasmallkatakanahalfwidth;FF6C
+yatcyrillic;0463
+ycircle;24E8
+ycircumflex;0177
+ydieresis;00FF
+ydotaccent;1E8F
+ydotbelow;1EF5
+yeharabic;064A
+yehbarreearabic;06D2
+yehbarreefinalarabic;FBAF
+yehfinalarabic;FEF2
+yehhamzaabovearabic;0626
+yehhamzaabovefinalarabic;FE8A
+yehhamzaaboveinitialarabic;FE8B
+yehhamzaabovemedialarabic;FE8C
+yehinitialarabic;FEF3
+yehmedialarabic;FEF4
+yehmeeminitialarabic;FCDD
+yehmeemisolatedarabic;FC58
+yehnoonfinalarabic;FC94
+yehthreedotsbelowarabic;06D1
+yekorean;3156
+yen;00A5
+yenmonospace;FFE5
+yeokorean;3155
+yeorinhieuhkorean;3186
+yerahbenyomohebrew;05AA
+yerahbenyomolefthebrew;05AA
+yericyrillic;044B
+yerudieresiscyrillic;04F9
+yesieungkorean;3181
+yesieungpansioskorean;3183
+yesieungsioskorean;3182
+yetivhebrew;059A
+ygrave;1EF3
+yhook;01B4
+yhookabove;1EF7
+yiarmenian;0575
+yicyrillic;0457
+yikorean;3162
+yinyang;262F
+yiwnarmenian;0582
+ymonospace;FF59
+yod;05D9
+yoddagesh;FB39
+yoddageshhebrew;FB39
+yodhebrew;05D9
+yodyodhebrew;05F2
+yodyodpatahhebrew;FB1F
+yohiragana;3088
+yoikorean;3189
+yokatakana;30E8
+yokatakanahalfwidth;FF96
+yokorean;315B
+yosmallhiragana;3087
+yosmallkatakana;30E7
+yosmallkatakanahalfwidth;FF6E
+yotgreek;03F3
+yoyaekorean;3188
+yoyakorean;3187
+yoyakthai;0E22
+yoyingthai;0E0D
+yparen;24B4
+ypogegrammeni;037A
+ypogegrammenigreekcmb;0345
+yr;01A6
+yring;1E99
+ysuperior;02B8
+ytilde;1EF9
+yturned;028E
+yuhiragana;3086
+yuikorean;318C
+yukatakana;30E6
+yukatakanahalfwidth;FF95
+yukorean;3160
+yusbigcyrillic;046B
+yusbigiotifiedcyrillic;046D
+yuslittlecyrillic;0467
+yuslittleiotifiedcyrillic;0469
+yusmallhiragana;3085
+yusmallkatakana;30E5
+yusmallkatakanahalfwidth;FF6D
+yuyekorean;318B
+yuyeokorean;318A
+yyabengali;09DF
+yyadeva;095F
+z;007A
+zaarmenian;0566
+zacute;017A
+zadeva;095B
+zagurmukhi;0A5B
+zaharabic;0638
+zahfinalarabic;FEC6
+zahinitialarabic;FEC7
+zahiragana;3056
+zahmedialarabic;FEC8
+zainarabic;0632
+zainfinalarabic;FEB0
+zakatakana;30B6
+zaqefgadolhebrew;0595
+zaqefqatanhebrew;0594
+zarqahebrew;0598
+zayin;05D6
+zayindagesh;FB36
+zayindageshhebrew;FB36
+zayinhebrew;05D6
+zbopomofo;3117
+zcaron;017E
+zcircle;24E9
+zcircumflex;1E91
+zcurl;0291
+zdot;017C
+zdotaccent;017C
+zdotbelow;1E93
+zecyrillic;0437
+zedescendercyrillic;0499
+zedieresiscyrillic;04DF
+zehiragana;305C
+zekatakana;30BC
+zero;0030
+zeroarabic;0660
+zerobengali;09E6
+zerodeva;0966
+zerogujarati;0AE6
+zerogurmukhi;0A66
+zerohackarabic;0660
+zeroinferior;2080
+zeromonospace;FF10
+zerooldstyle;F730
+zeropersian;06F0
+zerosuperior;2070
+zerothai;0E50
+zerowidthjoiner;FEFF
+zerowidthnonjoiner;200C
+zerowidthspace;200B
+zeta;03B6
+zhbopomofo;3113
+zhearmenian;056A
+zhebrevecyrillic;04C2
+zhecyrillic;0436
+zhedescendercyrillic;0497
+zhedieresiscyrillic;04DD
+zihiragana;3058
+zikatakana;30B8
+zinorhebrew;05AE
+zlinebelow;1E95
+zmonospace;FF5A
+zohiragana;305E
+zokatakana;30BE
+zparen;24B5
+zretroflexhook;0290
+zstroke;01B6
+zuhiragana;305A
+zukatakana;30BA
"""
@@ -1481,8 +4711,8 @@ def adobe_glyph_names():
for line in lines:
if line:
fields = string.split( line, ';' )
-# print fields[0] + ' - ' + fields[1]
- glyphs.append( fields[1] )
+# print fields[1] + ' - ' + fields[0]
+ glyphs.append( fields[0] )
return glyphs
@@ -1497,9 +4727,11 @@ def adobe_glyph_values():
for line in lines:
if line:
fields = string.split( line, ';' )
-# print fields[0] + ' - ' + fields[1]
- glyphs.append( fields[1] )
- values.append( fields[0] )
+# print fields[1] + ' - ' + fields[0]
+ subfields = string.split( fields[1], ' ' )
+ if len( subfields ) == 1:
+ glyphs.append( fields[0] )
+ values.append( fields[1] )
return glyphs, values
@@ -1523,7 +4755,7 @@ def dump_mac_indices( file, all_glyphs ):
write = file.write
write( " static const unsigned short mac_standard_names[" + \
- repr( len( mac_standard_names ) + 1 ) + "] =\n" )
+ repr( len( mac_standard_names ) + 1 ) + "] =\n" )
write( " {\n" )
for name in mac_standard_names:
@@ -1581,7 +4813,7 @@ def dump_unicode_values( file, sid_list, adobe_list ):
for name in sid_list:
try:
index = agl_names.index( name )
- write( " 0x" + agl_unicodes[index] + ",\n" )
+ write( " 0x" + agl_unicodes[index] + "U,\n" )
except:
write( " 0,\n" )
@@ -1592,7 +4824,7 @@ def dump_unicode_values( file, sid_list, adobe_list ):
for name in adobe_list:
try:
index = agl_names.index( name )
- write( " 0x" + agl_unicodes[index] + ",\n" )
+ write( " 0x" + agl_unicodes[index] + "U,\n" )
except:
write( " 0,\n" )
@@ -1664,7 +4896,7 @@ def main():
write( "/* */\n" )
write( "/* PostScript glyph names (specification only). */\n" )
write( "/* */\n" )
- write( "/* Copyright 2000-2001 by */\n" )
+ write( "/* Copyright 2000-2001, 2003 by */\n" )
write( "/* David Turner, Robert Wilhelm, and Werner Lemberg. */\n" )
write( "/* */\n" )
write( "/* This file is part of the FreeType project, and may only be used, */\n" )
diff --git a/extras/freetype2/src/truetype/rules.mk b/extras/freetype2/src/truetype/rules.mk
index 7c1f3e3a6..bbb0c9f8e 100644
--- a/extras/freetype2/src/truetype/rules.mk
+++ b/extras/freetype2/src/truetype/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001 by
+# Copyright 1996-2000, 2001, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,27 +15,26 @@
# TrueType driver directory
#
-TT_DIR := $(SRC_)truetype
-TT_DIR_ := $(TT_DIR)$(SEP)
+TT_DIR := $(SRC_DIR)/truetype
# compilation flags for the driver
#
-TT_COMPILE := $(FT_COMPILE) $I$(TT_DIR)
+TT_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(TT_DIR))
# TrueType driver sources (i.e., C files)
#
-TT_DRV_SRC := $(TT_DIR_)ttobjs.c \
- $(TT_DIR_)ttpload.c \
- $(TT_DIR_)ttgload.c \
- $(TT_DIR_)ttinterp.c \
- $(TT_DIR_)ttdriver.c
+TT_DRV_SRC := $(TT_DIR)/ttobjs.c \
+ $(TT_DIR)/ttpload.c \
+ $(TT_DIR)/ttgload.c \
+ $(TT_DIR)/ttinterp.c \
+ $(TT_DIR)/ttdriver.c
# TrueType driver headers
#
TT_DRV_H := $(TT_DRV_SRC:%.c=%.h) \
- $(TT_DIR_)tterrors.h
+ $(TT_DIR)/tterrors.h
# TrueType driver object(s)
@@ -43,24 +42,24 @@ TT_DRV_H := $(TT_DRV_SRC:%.c=%.h) \
# TT_DRV_OBJ_M is used during `multi' builds
# TT_DRV_OBJ_S is used during `single' builds
#
-TT_DRV_OBJ_M := $(TT_DRV_SRC:$(TT_DIR_)%.c=$(OBJ_)%.$O)
-TT_DRV_OBJ_S := $(OBJ_)truetype.$O
+TT_DRV_OBJ_M := $(TT_DRV_SRC:$(TT_DIR)/%.c=$(OBJ_DIR)/%.$O)
+TT_DRV_OBJ_S := $(OBJ_DIR)/truetype.$O
# TrueType driver source file for single build
#
-TT_DRV_SRC_S := $(TT_DIR_)truetype.c
+TT_DRV_SRC_S := $(TT_DIR)/truetype.c
# TrueType driver - single object
#
$(TT_DRV_OBJ_S): $(TT_DRV_SRC_S) $(TT_DRV_SRC) $(FREETYPE_H) $(TT_DRV_H)
- $(TT_COMPILE) $T$@ $(TT_DRV_SRC_S)
+ $(TT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(TT_DRV_SRC_S))
# driver - multiple objects
#
-$(OBJ_)%.$O: $(TT_DIR_)%.c $(FREETYPE_H) $(TT_DRV_H)
- $(TT_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(TT_DIR)/%.c $(FREETYPE_H) $(TT_DRV_H)
+ $(TT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
@@ -68,4 +67,5 @@ $(OBJ_)%.$O: $(TT_DIR_)%.c $(FREETYPE_H) $(TT_DRV_H)
DRV_OBJS_S += $(TT_DRV_OBJ_S)
DRV_OBJS_M += $(TT_DRV_OBJ_M)
+
# EOF
diff --git a/extras/freetype2/src/truetype/ttdriver.c b/extras/freetype2/src/truetype/ttdriver.c
index 0b5660228..a5b800d53 100644
--- a/extras/freetype2/src/truetype/ttdriver.c
+++ b/extras/freetype2/src/truetype/ttdriver.c
@@ -4,7 +4,7 @@
/* */
/* TrueType font driver implementation (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,6 +21,7 @@
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_SFNT_H
#include FT_TRUETYPE_IDS_H
+#include FT_SERVICE_XFREE86_NAME_H
#include "ttdriver.h"
#include "ttgload.h"
@@ -115,7 +116,7 @@
while ( left <= right )
{
- FT_Int middle = left + ( ( right - left ) >> 1 );
+ FT_Long middle = left + ( ( right - left ) >> 1 );
FT_ULong cur_pair;
@@ -207,8 +208,8 @@
/* we need to use rounding in the following computations. Otherwise,
* the resulting hinted outlines will be very slightly distorted
*/
- dim_x = ( ( char_width * horz_resolution + (36+32*72) ) / 72 ) & -64;
- dim_y = ( ( char_height * vert_resolution + (36+32*72) ) / 72 ) & -64;
+ dim_x = ( ( char_width * horz_resolution + (36+32*72) ) / 72 ) & ~63;
+ dim_y = ( ( char_height * vert_resolution + (36+32*72) ) / 72 ) & ~63;
}
else
{
@@ -226,7 +227,7 @@
size->ttmetrics.valid = FALSE;
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
- size->strike_index = 0xFFFF;
+ size->strike_index = 0xFFFFU;
#endif
return tt_size_reset( size );
@@ -242,11 +243,6 @@
/* A driver method used to reset a size's character sizes (horizontal */
/* and vertical) expressed in integer pixels. */
/* */
- /* <Input> */
- /* pixel_width :: The character width expressed in integer pixels. */
- /* */
- /* pixel_height :: The character height expressed in integer pixels. */
- /* */
/* <InOut> */
/* size :: A handle to the target size object. */
/* */
@@ -254,19 +250,14 @@
/* FreeType error code. 0 means success. */
/* */
static FT_Error
- Set_Pixel_Sizes( TT_Size size,
- FT_UInt pixel_width,
- FT_UInt pixel_height )
+ Set_Pixel_Sizes( TT_Size size )
{
- FT_UNUSED( pixel_width );
- FT_UNUSED( pixel_height );
-
/* many things have been pre-computed by the base layer */
size->metrics = size->root.metrics;
size->ttmetrics.valid = FALSE;
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
- size->strike_index = 0xFFFF;
+ size->strike_index = 0xFFFFU;
#endif
return tt_size_reset( size );
@@ -302,7 +293,7 @@
static FT_Error
Load_Glyph( TT_GlyphSlot slot,
TT_Size size,
- FT_UShort glyph_index,
+ FT_UInt glyph_index,
FT_Int32 load_flags )
{
FT_Error error;
@@ -354,17 +345,27 @@
/*************************************************************************/
/*************************************************************************/
+ static const FT_ServiceDescRec tt_services[] =
+ {
+ { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TRUETYPE },
+ { NULL, NULL }
+ };
static FT_Module_Interface
tt_get_interface( TT_Driver driver,
const char* tt_interface )
{
- FT_Module sfntd = FT_Get_Module( driver->root.root.library,
- "sfnt" );
- SFNT_Service sfnt;
+ FT_Module_Interface result;
+ FT_Module sfntd;
+ SFNT_Service sfnt;
+
+ result = ft_service_list_lookup( tt_services, tt_interface );
+ if ( result != NULL )
+ return result;
/* only return the default interface from the SFNT module */
+ sfntd = FT_Get_Module( driver->root.root.library, "sfnt" );
if ( sfntd )
{
sfnt = (SFNT_Service)( sfntd->clazz->module_interface );
@@ -382,10 +383,10 @@
const FT_Driver_ClassRec tt_driver_class =
{
{
- ft_module_font_driver |
- ft_module_driver_scalable |
+ FT_MODULE_FONT_DRIVER |
+ FT_MODULE_DRIVER_SCALABLE |
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
- ft_module_driver_has_hinter,
+ FT_MODULE_DRIVER_HAS_HINTER,
#else
0,
#endif
@@ -408,20 +409,20 @@
sizeof ( FT_GlyphSlotRec ),
- (FT_Face_InitFunc) tt_face_init,
- (FT_Face_DoneFunc) tt_face_done,
- (FT_Size_InitFunc) tt_size_init,
- (FT_Size_DoneFunc) tt_size_done,
- (FT_Slot_InitFunc) 0,
- (FT_Slot_DoneFunc) 0,
+ (FT_Face_InitFunc) tt_face_init,
+ (FT_Face_DoneFunc) tt_face_done,
+ (FT_Size_InitFunc) tt_size_init,
+ (FT_Size_DoneFunc) tt_size_done,
+ (FT_Slot_InitFunc) 0,
+ (FT_Slot_DoneFunc) 0,
- (FT_Size_ResetPointsFunc) Set_Char_Sizes,
- (FT_Size_ResetPixelsFunc) Set_Pixel_Sizes,
- (FT_Slot_LoadFunc) Load_Glyph,
+ (FT_Size_ResetPointsFunc)Set_Char_Sizes,
+ (FT_Size_ResetPixelsFunc)Set_Pixel_Sizes,
+ (FT_Slot_LoadFunc) Load_Glyph,
- (FT_Face_GetKerningFunc) Get_Kerning,
- (FT_Face_AttachFunc) 0,
- (FT_Face_GetAdvancesFunc) 0
+ (FT_Face_GetKerningFunc) Get_Kerning,
+ (FT_Face_AttachFunc) 0,
+ (FT_Face_GetAdvancesFunc)0
};
diff --git a/extras/freetype2/src/truetype/ttgload.c b/extras/freetype2/src/truetype/ttgload.c
index 42cf13ac7..00da0c224 100644
--- a/extras/freetype2/src/truetype/ttgload.c
+++ b/extras/freetype2/src/truetype/ttgload.c
@@ -4,7 +4,7 @@
/* */
/* TrueType Glyph Loader (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -162,11 +162,62 @@
}
+ /*************************************************************************/
+ /* */
+ /* Returns the vertical metrics in font units for a given glyph. */
+ /* Greg Hitchcock from Microsoft told us that if there were no `vmtx' */
+ /* table, typoAscender/Descender from the `OS/2' table would be used */
+ /* instead, and if there were no `OS/2' table, use ascender/descender */
+ /* from the `hhea' table. But that is not what Microsoft's rasterizer */
+ /* apparently does: It uses the ppem value as the advance height, and */
+ /* sets the top side bearing to be zero. */
+ /* */
+ /* The monospace `check' is probably not meaningful here, but we leave */
+ /* it in for a consistent interface. */
+ /* */
+ static void
+ Get_VMetrics( TT_Face face,
+ FT_UInt idx,
+ FT_Bool check,
+ FT_Short* tsb,
+ FT_UShort* ah )
+ {
+ FT_UNUSED( check );
+
+ if ( face->vertical_info )
+ TT_Get_Metrics( (TT_HoriHeader *)&face->vertical, idx, tsb, ah );
+
+#if 1 /* Emperically determined, at variance with what MS said */
+
+ else
+ {
+ *tsb = 0;
+ *ah = face->root.units_per_EM;
+ }
+
+#else /* This is what MS said to do. It isn't what they do, however. */
+
+ else if ( face->os2.version != 0xFFFFU )
+ {
+ *tsb = face->os2.sTypoAscender;
+ *ah = face->os2.sTypoAscender - face->os2.sTypoDescender;
+ }
+ else
+ {
+ *tsb = face->horizontal.Ascender;
+ *ah = face->horizontal.Ascender - face->horizontal.Descender;
+ }
+
+#endif
+
+ }
+
+
#define cur_to_org( n, zone ) \
- FT_MEM_COPY( (zone)->org, (zone)->cur, (n) * sizeof ( FT_Vector ) )
+ FT_ARRAY_COPY( (zone)->org, (zone)->cur, (n) )
#define org_to_cur( n, zone ) \
- FT_MEM_COPY( (zone)->cur, (zone)->org, (n) * sizeof ( FT_Vector ) )
+ FT_ARRAY_COPY( (zone)->cur, (zone)->org, (n) )
/*************************************************************************/
@@ -294,36 +345,39 @@
FT_Int n, n_points;
FT_Int byte_len = load->byte_len;
+ FT_Byte *flag, *flag_limit;
+ FT_Byte c, count;
+ FT_Vector *vec, *vec_limit;
+ FT_Pos x;
+ FT_Short *cont, *cont_limit;
- /* reading the contours endpoints & number of points */
- {
- short* cur = gloader->current.outline.contours;
- short* limit = cur + n_contours;
+ /* reading the contours endpoints & number of points */
+ cont = gloader->current.outline.contours;
+ cont_limit = cont + n_contours;
- /* check space for contours array + instructions count */
- byte_len -= 2 * ( n_contours + 1 );
- if ( byte_len < 0 )
- goto Invalid_Outline;
+ /* check space for contours array + instructions count */
+ byte_len -= 2 * ( n_contours + 1 );
+ if ( byte_len < 0 )
+ goto Invalid_Outline;
- for ( ; cur < limit; cur++ )
- cur[0] = FT_GET_USHORT();
+ for ( ; cont < cont_limit; cont++ )
+ cont[0] = FT_GET_USHORT();
- n_points = 0;
- if ( n_contours > 0 )
- n_points = cur[-1] + 1;
+ n_points = 0;
+ if ( n_contours > 0 )
+ n_points = cont[-1] + 1;
- error = FT_GlyphLoader_CheckPoints( gloader, n_points + 2, 0 );
- if ( error )
- goto Fail;
+ error = FT_GlyphLoader_CheckPoints( gloader, n_points + 4, 0 );
+ if ( error )
+ goto Fail;
- /* we'd better check the contours table right now */
- outline = &gloader->current.outline;
+ /* we'd better check the contours table right now */
+ outline = &gloader->current.outline;
- for ( cur = outline->contours + 1; cur < limit; cur++ )
- if ( cur[-1] >= cur[0] )
- goto Invalid_Outline;
- }
+ for ( cont = outline->contours + 1; cont < cont_limit; cont++ )
+ if ( cont[-1] >= cont[0] )
+ goto Invalid_Outline;
/* reading the bytecode instructions */
slot->control_len = 0;
@@ -331,7 +385,7 @@
n_ins = FT_GET_USHORT();
- FT_TRACE5(( " Instructions size: %d\n", n_ins ));
+ FT_TRACE5(( " Instructions size: %u\n", n_ins ));
if ( n_ins > face->max_profile.maxSizeOfInstructions )
{
@@ -340,7 +394,7 @@
goto Fail;
}
- byte_len -= n_ins;
+ byte_len -= (FT_Int)n_ins;
if ( byte_len < 0 )
{
FT_TRACE0(( "TT_Load_Simple_Glyph: Instruction count mismatch!\n" ));
@@ -357,112 +411,102 @@
slot->control_len = n_ins;
slot->control_data = load->instructions;
- FT_MEM_COPY( load->instructions, stream->cursor, n_ins );
+ FT_MEM_COPY( load->instructions, stream->cursor, (FT_Long)n_ins );
}
#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
- stream->cursor += n_ins;
+ stream->cursor += (FT_Int)n_ins;
/* reading the point tags */
- {
- FT_Byte* flag = (FT_Byte*)outline->tags;
- FT_Byte* limit = flag + n_points;
- FT_Byte c, count;
+ flag = (FT_Byte*)outline->tags;
+ flag_limit = flag + n_points;
+ while ( flag < flag_limit )
+ {
+ if ( --byte_len < 0 )
+ goto Invalid_Outline;
- while ( flag < limit )
+ *flag++ = c = FT_GET_BYTE();
+ if ( c & 8 )
{
if ( --byte_len < 0 )
goto Invalid_Outline;
- *flag++ = c = FT_GET_BYTE();
- if ( c & 8 )
- {
- if ( --byte_len < 0 )
- goto Invalid_Outline;
-
- count = FT_GET_BYTE();
- if ( flag + count > limit )
- goto Invalid_Outline;
+ count = FT_GET_BYTE();
+ if ( flag + (FT_Int)count > flag_limit )
+ goto Invalid_Outline;
- for ( ; count > 0; count-- )
- *flag++ = c;
- }
+ for ( ; count > 0; count-- )
+ *flag++ = c;
}
+ }
- /* check that there is enough room to load the coordinates */
- for ( flag = (FT_Byte*)outline->tags; flag < limit; flag++ )
- {
- if ( *flag & 2 )
- byte_len -= 1;
- else if ( ( *flag & 16 ) == 0 )
- byte_len -= 2;
-
- if ( *flag & 4 )
- byte_len -= 1;
- else if ( ( *flag & 32 ) == 0 )
- byte_len -= 2;
- }
+ /* check that there is enough room to load the coordinates */
+ for ( flag = (FT_Byte*)outline->tags; flag < flag_limit; flag++ )
+ {
+ if ( *flag & 2 )
+ byte_len -= 1;
+ else if ( ( *flag & 16 ) == 0 )
+ byte_len -= 2;
- if ( byte_len < 0 )
- goto Invalid_Outline;
+ if ( *flag & 4 )
+ byte_len -= 1;
+ else if ( ( *flag & 32 ) == 0 )
+ byte_len -= 2;
}
+ if ( byte_len < 0 )
+ goto Invalid_Outline;
+
/* reading the X coordinates */
+ vec = outline->points;
+ vec_limit = vec + n_points;
+ flag = (FT_Byte*)outline->tags;
+ x = 0;
+
+ for ( ; vec < vec_limit; vec++, flag++ )
{
- FT_Vector* vec = outline->points;
- FT_Vector* limit = vec + n_points;
- FT_Byte* flag = (FT_Byte*)outline->tags;
- FT_Pos x = 0;
+ FT_Pos y = 0;
- for ( ; vec < limit; vec++, flag++ )
+ if ( *flag & 2 )
{
- FT_Pos y = 0;
-
-
- if ( *flag & 2 )
- {
- y = FT_GET_BYTE();
- if ( ( *flag & 16 ) == 0 )
- y = -y;
- }
- else if ( ( *flag & 16 ) == 0 )
- y = FT_GET_SHORT();
-
- x += y;
- vec->x = x;
+ y = (FT_Pos)FT_GET_BYTE();
+ if ( ( *flag & 16 ) == 0 )
+ y = -y;
}
+ else if ( ( *flag & 16 ) == 0 )
+ y = (FT_Pos)FT_GET_SHORT();
+
+ x += y;
+ vec->x = x;
}
/* reading the Y coordinates */
+ vec = gloader->current.outline.points;
+ vec_limit = vec + n_points;
+ flag = (FT_Byte*)outline->tags;
+ x = 0;
+
+ for ( ; vec < vec_limit; vec++, flag++ )
{
- FT_Vector* vec = gloader->current.outline.points;
- FT_Vector* limit = vec + n_points;
- FT_Byte* flag = (FT_Byte*)outline->tags;
- FT_Pos x = 0;
+ FT_Pos y = 0;
- for ( ; vec < limit; vec++, flag++ )
+ if ( *flag & 4 )
{
- FT_Pos y = 0;
-
-
- if ( *flag & 4 )
- {
- y = FT_GET_BYTE();
- if ( ( *flag & 32 ) == 0 )
- y = -y;
- }
- else if ( ( *flag & 32 ) == 0 )
- y = FT_GET_SHORT();
-
- x += y;
- vec->y = x;
+ y = (FT_Pos)FT_GET_BYTE();
+ if ( ( *flag & 32 ) == 0 )
+ y = -y;
}
+ else if ( ( *flag & 32 ) == 0 )
+ y = (FT_Pos)FT_GET_SHORT();
+
+ x += y;
+ vec->y = x;
}
/* clear the touch tags */
@@ -642,12 +686,16 @@
/* add shadow points */
- /* Now add the two shadow points at n and n + 1. */
+ /* Add two horizontal shadow points at n and n+1. */
/* We need the left side bearing and advance width. */
+ /* Add two vertical shadow points at n+2 and n+3. */
+ /* We need the top side bearing and advance height. */
{
FT_Vector* pp1;
FT_Vector* pp2;
+ FT_Vector* pp3;
+ FT_Vector* pp4;
/* pp1 = xMin - lsb */
@@ -660,14 +708,26 @@
pp2->x = pp1->x + load->advance;
pp2->y = 0;
+ /* pp3 = top side bearing */
+ pp3 = pp1 + 2;
+ pp3->x = 0;
+ pp3->y = load->top_bearing + load->bbox.yMax;
+
+ /* pp4 = pp3 - ah */
+ pp4 = pp1 + 3;
+ pp4->x = 0;
+ pp4->y = pp3->y - load->vadvance;
+
outline->tags[n_points ] = 0;
outline->tags[n_points + 1] = 0;
+ outline->tags[n_points + 2] = 0;
+ outline->tags[n_points + 3] = 0;
}
/* Note that we return two more points that are not */
/* part of the glyph outline. */
- n_points += 2;
+ n_points += 4;
/* set up zone for hinting */
tt_prepare_zone( zone, &gloader->current, 0, 0 );
@@ -694,15 +754,18 @@
/* eventually hint the glyph */
if ( IS_HINTED( load->load_flags ) )
{
- FT_Pos x = zone->org[n_points-2].x;
+ FT_Pos x = zone->org[n_points-4].x;
+ FT_Pos y = zone->org[n_points-2].y;
- x = ( ( x + 32 ) & -64 ) - x;
- translate_array( n_points, zone->org, x, 0 );
+ x = FT_PIX_ROUND( x ) - x;
+ y = FT_PIX_ROUND( y ) - y;
+ translate_array( n_points, zone->org, x, y );
org_to_cur( n_points, zone );
- zone->cur[n_points - 1].x = ( zone->cur[n_points - 1].x + 32 ) & -64;
+ zone->cur[n_points - 3].x = FT_PIX_ROUND( zone->cur[n_points - 3].x );
+ zone->cur[n_points - 1].y = FT_PIX_ROUND( zone->cur[n_points - 1].y );
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
@@ -718,7 +781,7 @@
load->exec->pedantic_hinting = (FT_Bool)( load->load_flags &
FT_LOAD_PEDANTIC );
load->exec->pts = *zone;
- load->exec->pts.n_points += 2;
+ load->exec->pts.n_points += 4;
error = TT_Run_Context( load->exec, debug );
if ( error && load->exec->pedantic_hinting )
@@ -734,8 +797,10 @@
/* save glyph phantom points */
if ( !load->preserve_pps )
{
- load->pp1 = zone->cur[n_points - 2];
- load->pp2 = zone->cur[n_points - 1];
+ load->pp1 = zone->cur[n_points - 4];
+ load->pp2 = zone->cur[n_points - 3];
+ load->pp3 = zone->cur[n_points - 2];
+ load->pp4 = zone->cur[n_points - 1];
}
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
@@ -779,6 +844,7 @@
FT_Bool glyph_data_loaded = 0;
#endif
+
if ( recurse_count >= TT_MAX_COMPOSITE_RECURSE )
{
error = TT_Err_Invalid_Composite;
@@ -803,16 +869,22 @@
y_scale = loader->size->metrics.y_scale;
}
- /* get horizontal metrics */
+ /* get metrics, horizontal and vertical */
{
- FT_Short left_bearing = 0;
- FT_UShort advance_width = 0;
+ FT_Short left_bearing = 0, top_bearing = 0;
+ FT_UShort advance_width = 0, advance_height = 0;
+
Get_HMetrics( face, glyph_index,
(FT_Bool)!( loader->load_flags &
FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ),
&left_bearing,
&advance_width );
+ Get_VMetrics( face, glyph_index,
+ (FT_Bool)!( loader->load_flags &
+ FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ),
+ &top_bearing,
+ &advance_height );
#ifdef FT_CONFIG_OPTION_INCREMENTAL
@@ -823,9 +895,10 @@
{
FT_Incremental_MetricsRec metrics;
- metrics.bearing_x = left_bearing;
- metrics.bearing_y = 0;
- metrics.advance = advance_width;
+
+ metrics.bearing_x = left_bearing;
+ metrics.bearing_y = 0;
+ metrics.advance = advance_width;
error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
face->root.internal->incremental_interface->object,
glyph_index, FALSE, &metrics );
@@ -835,10 +908,33 @@
advance_width = (FT_UShort)metrics.advance;
}
+# if 0
+ /* GWW: Do I do the same for vertical metrics ??? */
+ if ( face->root.internal->incremental_interface &&
+ face->root.internal->incremental_interface->funcs->get_glyph_metrics )
+ {
+ FT_Incremental_MetricsRec metrics;
+
+
+ metrics.bearing_x = 0;
+ metrics.bearing_y = top_bearing;
+ metrics.advance = advance_height;
+ error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
+ face->root.internal->incremental_interface->object,
+ glyph_index, TRUE, &metrics );
+ if ( error )
+ goto Exit;
+ top_bearing = (FT_Short)metrics.bearing_y;
+ advance_height = (FT_UShort)metrics.advance;
+ }
+# endif
+
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
loader->left_bearing = left_bearing;
loader->advance = advance_width;
+ loader->top_bearing = top_bearing;
+ loader->vadvance = advance_height;
if ( !loader->linear_def )
{
@@ -884,7 +980,7 @@
count = 0;
if ( glyph_index < (FT_UInt)face->num_locations - 1 )
- count = face->glyph_locations[glyph_index + 1] - offset;
+ count = (FT_UInt)( face->glyph_locations[glyph_index + 1] - offset );
}
if ( count == 0 )
@@ -898,9 +994,14 @@
loader->pp1.x = 0;
loader->pp2.x = loader->advance;
+ loader->pp3.y = 0;
+ loader->pp4.y = loader->pp3.y-loader->vadvance;
if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
+ {
loader->pp2.x = FT_MulFix( loader->pp2.x, x_scale );
+ loader->pp4.y = FT_MulFix( loader->pp4.y, y_scale );
+ }
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
@@ -938,10 +1039,17 @@
loader->pp2.x = loader->pp1.x + loader->advance;
loader->pp2.y = 0;
+ loader->pp3.x = 0;
+ loader->pp3.y = loader->top_bearing + loader->bbox.yMax;
+ loader->pp4.x = 0;
+ loader->pp4.y = loader->pp3.y - loader->vadvance;
+
if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
{
loader->pp1.x = FT_MulFix( loader->pp1.x, x_scale );
loader->pp2.x = FT_MulFix( loader->pp2.x, x_scale );
+ loader->pp3.y = FT_MulFix( loader->pp3.y, y_scale );
+ loader->pp4.y = FT_MulFix( loader->pp4.y, y_scale );
}
/***********************************************************************/
@@ -1050,7 +1158,7 @@
for ( n = 0; n < (FT_Int)num_subglyphs; n++ )
{
- FT_Vector pp1, pp2;
+ FT_Vector pp1, pp2, pp3, pp4;
FT_Pos x, y;
@@ -1062,11 +1170,13 @@
pp1 = loader->pp1;
pp2 = loader->pp2;
+ pp3 = loader->pp3;
+ pp4 = loader->pp4;
num_base_points = gloader->base.outline.n_points;
error = load_truetype_glyph( loader, subglyph->index,
- recurse_count+1 );
+ recurse_count + 1 );
if ( error )
goto Fail;
@@ -1077,11 +1187,15 @@
{
pp1 = loader->pp1;
pp2 = loader->pp2;
+ pp3 = loader->pp3;
+ pp4 = loader->pp4;
}
else
{
loader->pp1 = pp1;
loader->pp2 = pp2;
+ loader->pp3 = pp3;
+ loader->pp4 = pp4;
}
num_points = gloader->base.outline.n_points;
@@ -1182,16 +1296,16 @@
/* */
/* This algorithm is a guess and works much better than the above. */
/* */
- int mac_xscale = FT_SqrtFixed(
- FT_MulFix( subglyph->transform.xx,
- subglyph->transform.xx ) +
- FT_MulFix( subglyph->transform.xy,
- subglyph->transform.xy) );
- int mac_yscale = FT_SqrtFixed(
- FT_MulFix( subglyph->transform.yy,
- subglyph->transform.yy ) +
- FT_MulFix( subglyph->transform.yx,
- subglyph->transform.yx ) );
+ FT_Fixed mac_xscale = FT_SqrtFixed(
+ FT_MulFix( subglyph->transform.xx,
+ subglyph->transform.xx ) +
+ FT_MulFix( subglyph->transform.xy,
+ subglyph->transform.xy) );
+ FT_Fixed mac_yscale = FT_SqrtFixed(
+ FT_MulFix( subglyph->transform.yy,
+ subglyph->transform.yy ) +
+ FT_MulFix( subglyph->transform.yx,
+ subglyph->transform.yx ) );
x = FT_MulFix( x, mac_xscale );
@@ -1207,8 +1321,8 @@
if ( subglyph->flags & ROUND_XY_TO_GRID )
{
- x = ( x + 32 ) & -64;
- y = ( y + 32 ) & -64;
+ x = FT_PIX_ROUND( x );
+ y = FT_PIX_ROUND( y );
}
}
}
@@ -1278,27 +1392,37 @@
if ( error )
goto Fail;
+ error = FT_GlyphLoader_CheckPoints( gloader, num_points + 4, 0 );
+ if ( error )
+ goto Fail;
+
/* prepare the execution context */
tt_prepare_zone( &exec->pts, &gloader->base,
start_point, start_contour );
pts = &exec->pts;
- pts->n_points = (short)(num_points + 2);
+ pts->n_points = (short)( num_points + 4 );
pts->n_contours = gloader->base.outline.n_contours;
/* add phantom points */
pp1 = pts->cur + num_points;
pp1[0] = loader->pp1;
pp1[1] = loader->pp2;
+ pp1[2] = loader->pp3;
+ pp1[3] = loader->pp4;
pts->tags[num_points ] = 0;
pts->tags[num_points + 1] = 0;
+ pts->tags[num_points + 2] = 0;
+ pts->tags[num_points + 3] = 0;
/* if hinting, round the phantom points */
if ( IS_HINTED( loader->load_flags ) )
{
- pp1[0].x = ( ( loader->pp1.x + 32 ) & -64 );
- pp1[1].x = ( ( loader->pp2.x + 32 ) & -64 );
+ pp1[0].x = FT_PIX_ROUND( loader->pp1.x );
+ pp1[1].x = FT_PIX_ROUND( loader->pp2.x );
+ pp1[2].y = FT_PIX_ROUND( loader->pp3.y );
+ pp1[3].y = FT_PIX_ROUND( loader->pp4.y );
}
{
@@ -1309,7 +1433,7 @@
pts->tags[k] &= FT_CURVE_TAG_ON;
}
- cur_to_org( num_points + 2, pts );
+ cur_to_org( num_points + 4, pts );
/* now consider hinting */
if ( IS_HINTED( loader->load_flags ) && n_ins > 0 )
@@ -1325,6 +1449,8 @@
/* save glyph origin and advance points */
loader->pp1 = pp1[0];
loader->pp2 = pp1[1];
+ loader->pp3 = pp1[2];
+ loader->pp4 = pp1[3];
}
#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
@@ -1391,10 +1517,10 @@
if ( IS_HINTED( loader->load_flags ) )
{
/* grid-fit the bounding box */
- bbox.xMin &= -64;
- bbox.yMin &= -64;
- bbox.xMax = ( bbox.xMax + 63 ) & -64;
- bbox.yMax = ( bbox.yMax + 63 ) & -64;
+ bbox.xMin = FT_PIX_FLOOR( bbox.xMin );
+ bbox.yMin = FT_PIX_FLOOR( bbox.yMin );
+ bbox.xMax = FT_PIX_CEIL( bbox.xMax );
+ bbox.yMax = FT_PIX_CEIL( bbox.yMax );
}
}
else
@@ -1426,7 +1552,7 @@
/* don't forget to hint the advance when we need to */
if ( IS_HINTED( loader->load_flags ) )
- glyph->metrics.horiAdvance = ( glyph->metrics.horiAdvance + 32 ) & -64;
+ glyph->metrics.horiAdvance = FT_PIX_ROUND( glyph->metrics.horiAdvance );
/* Now take care of vertical metrics. In the case where there is */
/* no vertical information within the font (relatively common), make */
@@ -1444,13 +1570,9 @@
if ( face->vertical_info &&
face->vertical.number_Of_VMetrics > 0 )
{
- /* Don't assume that both the vertical header and vertical */
- /* metrics are present in the same font :-) */
+ advance_height = loader->pp4.y - loader->pp3.y;
+ top_bearing = loader->pp3.y - bbox.yMax;
- TT_Get_Metrics( (TT_HoriHeader*)&face->vertical,
- glyph_index,
- &top_bearing,
- &advance_height );
}
else
{
@@ -1466,6 +1588,12 @@
/* here with: */
/* ascender - descender + linegap */
/* */
+ /* NOTE3: This is different from what MS's rasterizer */
+ /* appears to do when getting default values */
+ /* for the vertical phantom points. We leave */
+ /* the old code untouched, but relying on */
+ /* phantom points alone might be reasonable */
+ /* (i.e., removing the `if' above). */
if ( face->os2.version != 0xFFFFU )
{
top_bearing = (FT_Short)( face->os2.sTypoLineGap / 2 );
@@ -1492,9 +1620,10 @@
FT_Incremental_MetricsRec metrics;
FT_Error error = 0;
- metrics.bearing_x = 0;
- metrics.bearing_y = top_bearing;
- metrics.advance = advance_height;
+
+ metrics.bearing_x = 0;
+ metrics.bearing_y = top_bearing;
+ metrics.advance = advance_height;
error =
face->root.internal->incremental_interface->funcs->get_glyph_metrics(
face->root.internal->incremental_interface->object,
@@ -1507,6 +1636,8 @@
advance_height = (FT_UShort)metrics.advance;
}
+ /* GWW: Do vertical metrics get loaded incrementally too? */
+
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
/* We must adjust the top_bearing value from the bounding box given */
@@ -1538,9 +1669,9 @@
/* grid-fit them if necessary */
if ( IS_HINTED( loader->load_flags ) )
{
- left &= -64;
- top = ( top + 63 ) & -64;
- advance = ( advance + 32 ) & -64;
+ left = FT_PIX_FLOOR( left );
+ top = FT_PIX_CEIL( top );
+ advance = FT_PIX_ROUND( advance );
}
glyph->metrics.vertBearingX = left;
@@ -1598,7 +1729,7 @@
FT_LOCAL_DEF( FT_Error )
TT_Load_Glyph( TT_Size size,
TT_GlyphSlot glyph,
- FT_UShort glyph_index,
+ FT_UInt glyph_index,
FT_Int32 load_flags )
{
SFNT_Service sfnt;
@@ -1640,9 +1771,9 @@
error = sfnt->load_sbit_image( face,
- size->strike_index,
+ (FT_ULong)size->strike_index,
glyph_index,
- load_flags,
+ (FT_Int)load_flags,
stream,
&glyph->bitmap,
&metrics );
@@ -1681,7 +1812,7 @@
/* return immediately if we only want the embedded bitmaps */
if ( load_flags & FT_LOAD_SBITS_ONLY )
- return FT_Err_Invalid_Argument;
+ return TT_Err_Invalid_Argument;
/* seek to the beginning of the glyph table. For Type 42 fonts */
/* the table might be accessed from a Postscript stream or something */
diff --git a/extras/freetype2/src/truetype/ttgload.h b/extras/freetype2/src/truetype/ttgload.h
index 04097134f..dfa2a60a5 100644
--- a/extras/freetype2/src/truetype/ttgload.h
+++ b/extras/freetype2/src/truetype/ttgload.h
@@ -4,7 +4,7 @@
/* */
/* TrueType Glyph Loader (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -33,7 +33,7 @@ FT_BEGIN_HEADER
FT_LOCAL( void )
TT_Get_Metrics( TT_HoriHeader* header,
- FT_UInt index,
+ FT_UInt idx,
FT_Short* bearing,
FT_UShort* advance );
@@ -43,7 +43,7 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
TT_Load_Glyph( TT_Size size,
TT_GlyphSlot glyph,
- FT_UShort glyph_index,
+ FT_UInt glyph_index,
FT_Int32 load_flags );
diff --git a/extras/freetype2/src/truetype/ttinterp.c b/extras/freetype2/src/truetype/ttinterp.c
index 74726a136..889ebbf4f 100644
--- a/extras/freetype2/src/truetype/ttinterp.c
+++ b/extras/freetype2/src/truetype/ttinterp.c
@@ -4,7 +4,7 @@
/* */
/* TrueType bytecode interpreter (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -30,9 +30,10 @@
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
-#define TT_MULFIX FT_MulFix
-#define TT_MULDIV FT_MulDiv
-#define TT_INT64 FT_Int64
+#define TT_MULFIX FT_MulFix
+#define TT_MULDIV FT_MulDiv
+#define TT_MULDIV_NO_ROUND FT_MulDiv_No_Round
+
/*************************************************************************/
/* */
@@ -43,9 +44,6 @@
#undef FT_COMPONENT
#define FT_COMPONENT trace_ttinterp
-#undef NO_APPLE_PATENT
-#define APPLE_THRESHOLD 0x4000000L
-
/*************************************************************************/
/* */
/* In order to detect infinite loops in the code, we set up a counter */
@@ -165,12 +163,12 @@
#define CUR_Func_move( z, p, d ) \
CUR.func_move( EXEC_ARG_ z, p, d )
+#define CUR_Func_move_orig( z, p, d ) \
+ CUR.func_move_orig( EXEC_ARG_ z, p, d )
+
#define CUR_Func_dualproj( x, y ) \
CUR.func_dualproj( EXEC_ARG_ x, y )
-#define CUR_Func_freeProj( x, y ) \
- CUR.func_freeProj( EXEC_ARG_ x, y )
-
#define CUR_Func_round( d, c ) \
CUR.func_round( EXEC_ARG_ d, c )
@@ -221,13 +219,22 @@
/* */
#define BOUNDS( x, n ) ( (FT_UInt)(x) >= (FT_UInt)(n) )
-
#undef SUCCESS
#define SUCCESS 0
#undef FAILURE
#define FAILURE 1
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+#define GUESS_VECTOR( V ) \
+ if ( CUR.face->unpatented_hinting ) \
+ { \
+ CUR.GS.V.x = (FT_F2Dot14)( CUR.GS.both_x_axis ? 0x4000 : 0 ); \
+ CUR.GS.V.y = (FT_F2Dot14)( CUR.GS.both_x_axis ? 0 : 0x4000 ); \
+ }
+#else
+#define GUESS_VECTOR( V )
+#endif
/*************************************************************************/
/* */
@@ -512,8 +519,7 @@
if ( *size < new_max )
{
- FT_FREE( *buff );
- if ( FT_ALLOC( *buff, new_max * multiplier ) )
+ if ( FT_REALLOC( *buff, *size, new_max * multiplier ) )
return error;
*size = new_max;
}
@@ -719,6 +725,10 @@
exec->GS.freeVector = exec->GS.projVector;
exec->GS.dualVector = exec->GS.projVector;
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ exec->GS.both_x_axis = TRUE;
+#endif
+
exec->GS.round_state = 1;
exec->GS.loop = 1;
@@ -746,6 +756,11 @@
{ 0x4000, 0 },
{ 0x4000, 0 },
{ 0x4000, 0 },
+
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ TRUE,
+#endif
+
1, 64, 1,
TRUE, 68, 0, 0, 9, 3,
0, FALSE, 2, 1, 1, 1
@@ -1344,24 +1359,38 @@
static FT_Long
Current_Ratio( EXEC_OP )
{
- if ( CUR.tt_metrics.ratio )
- return CUR.tt_metrics.ratio;
+ if ( !CUR.tt_metrics.ratio )
+ {
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ if ( CUR.face->unpatented_hinting )
+ {
+ if ( CUR.GS.both_x_axis )
+ CUR.tt_metrics.ratio = CUR.tt_metrics.x_ratio;
+ else
+ CUR.tt_metrics.ratio = CUR.tt_metrics.y_ratio;
+ }
+ else
+#endif
+ {
+ if ( CUR.GS.projVector.y == 0 )
+ CUR.tt_metrics.ratio = CUR.tt_metrics.x_ratio;
- if ( CUR.GS.projVector.y == 0 )
- CUR.tt_metrics.ratio = CUR.tt_metrics.x_ratio;
+ else if ( CUR.GS.projVector.x == 0 )
+ CUR.tt_metrics.ratio = CUR.tt_metrics.y_ratio;
- else if ( CUR.GS.projVector.x == 0 )
- CUR.tt_metrics.ratio = CUR.tt_metrics.y_ratio;
+ else
+ {
+ FT_Long x, y;
- else
- {
- FT_Long x, y;
- x = TT_MULDIV( CUR.GS.projVector.x, CUR.tt_metrics.x_ratio, 0x4000 );
- y = TT_MULDIV( CUR.GS.projVector.y, CUR.tt_metrics.y_ratio, 0x4000 );
- CUR.tt_metrics.ratio = TT_VecLen( x, y );
+ x = TT_MULDIV( CUR.GS.projVector.x,
+ CUR.tt_metrics.x_ratio, 0x4000 );
+ y = TT_MULDIV( CUR.GS.projVector.y,
+ CUR.tt_metrics.y_ratio, 0x4000 );
+ CUR.tt_metrics.ratio = TT_VecLen( x, y );
+ }
+ }
}
-
return CUR.tt_metrics.ratio;
}
@@ -1532,24 +1561,18 @@
FT_F26Dot6 v;
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ FT_ASSERT( !CUR.face->unpatented_hinting );
+#endif
+
v = CUR.GS.freeVector.x;
if ( v != 0 )
{
-
-#ifdef NO_APPLE_PATENT
-
- if ( ABS( CUR.F_dot_P ) > APPLE_THRESHOLD )
- zone->cur[point].x += distance;
-
-#else
-
zone->cur[point].x += TT_MULDIV( distance,
v * 0x10000L,
CUR.F_dot_P );
-#endif
-
zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
}
@@ -1557,22 +1580,57 @@
if ( v != 0 )
{
+ zone->cur[point].y += TT_MULDIV( distance,
+ v * 0x10000L,
+ CUR.F_dot_P );
-#ifdef NO_APPLE_PATENT
+ zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y;
+ }
+ }
- if ( ABS( CUR.F_dot_P ) > APPLE_THRESHOLD )
- zone->cur[point].y += distance;
-#else
+ /*************************************************************************/
+ /* */
+ /* <Function> */
+ /* Direct_Move_Orig */
+ /* */
+ /* <Description> */
+ /* Moves the *original* position of a point by a given distance along */
+ /* the freedom vector. Obviously, the point will not be `touched'. */
+ /* */
+ /* <Input> */
+ /* point :: The index of the point to move. */
+ /* */
+ /* distance :: The distance to apply. */
+ /* */
+ /* <InOut> */
+ /* zone :: The affected glyph zone. */
+ /* */
+ static void
+ Direct_Move_Orig( EXEC_OP_ TT_GlyphZone zone,
+ FT_UShort point,
+ FT_F26Dot6 distance )
+ {
+ FT_F26Dot6 v;
- zone->cur[point].y += TT_MULDIV( distance,
+
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ FT_ASSERT( !CUR.face->unpatented_hinting );
+#endif
+
+ v = CUR.GS.freeVector.x;
+
+ if ( v != 0 )
+ zone->org[point].x += TT_MULDIV( distance,
v * 0x10000L,
CUR.F_dot_P );
-#endif
+ v = CUR.GS.freeVector.y;
- zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y;
- }
+ if ( v != 0 )
+ zone->org[point].y += TT_MULDIV( distance,
+ v * 0x10000L,
+ CUR.F_dot_P );
}
@@ -1612,6 +1670,38 @@
/*************************************************************************/
/* */
+ /* Special versions of Direct_Move_Orig() */
+ /* */
+ /* The following versions are used whenever both vectors are both */
+ /* along one of the coordinate unit vectors, i.e. in 90% of the cases. */
+ /* */
+ /*************************************************************************/
+
+
+ static void
+ Direct_Move_Orig_X( EXEC_OP_ TT_GlyphZone zone,
+ FT_UShort point,
+ FT_F26Dot6 distance )
+ {
+ FT_UNUSED_EXEC;
+
+ zone->org[point].x += distance;
+ }
+
+
+ static void
+ Direct_Move_Orig_Y( EXEC_OP_ TT_GlyphZone zone,
+ FT_UShort point,
+ FT_F26Dot6 distance )
+ {
+ FT_UNUSED_EXEC;
+
+ zone->org[point].y += distance;
+ }
+
+
+ /*************************************************************************/
+ /* */
/* <Function> */
/* Round_None */
/* */
@@ -1644,7 +1734,7 @@
if ( distance >= 0 )
{
val = distance + compensation;
- if ( val < 0 )
+ if ( distance && val < 0 )
val = 0;
}
else {
@@ -1684,14 +1774,14 @@
if ( distance >= 0 )
{
val = distance + compensation + 32;
- if ( val > 0 )
+ if ( distance && val > 0 )
val &= ~63;
else
val = 0;
}
else
{
- val = -( ( compensation - distance + 32 ) & -64 );
+ val = -FT_PIX_ROUND( compensation - distance );
if ( val > 0 )
val = 0;
}
@@ -1727,13 +1817,13 @@
if ( distance >= 0 )
{
- val = ( ( distance + compensation ) & -64 ) + 32;
- if ( val < 0 )
+ val = FT_PIX_FLOOR( distance + compensation ) + 32;
+ if ( distance && val < 0 )
val = 0;
}
else
{
- val = -( ( (compensation - distance) & -64 ) + 32 );
+ val = -( FT_PIX_FLOOR( compensation - distance ) + 32 );
if ( val > 0 )
val = 0;
}
@@ -1770,7 +1860,7 @@
if ( distance >= 0 )
{
val = distance + compensation;
- if ( val > 0 )
+ if ( distance && val > 0 )
val &= ~63;
else
val = 0;
@@ -1814,14 +1904,14 @@
if ( distance >= 0 )
{
val = distance + compensation + 63;
- if ( val > 0 )
+ if ( distance && val > 0 )
val &= ~63;
else
val = 0;
}
else
{
- val = -( ( compensation - distance + 63 ) & -64 );
+ val = - FT_PIX_CEIL( compensation - distance );
if ( val > 0 )
val = 0;
}
@@ -1858,14 +1948,14 @@
if ( distance >= 0 )
{
val = distance + compensation + 16;
- if ( val > 0 )
+ if ( distance && val > 0 )
val &= ~31;
else
val = 0;
}
else
{
- val = -( ( compensation - distance + 16 ) & -32 );
+ val = -FT_PAD_ROUND( compensation - distance, 32 );
if ( val > 0 )
val = 0;
}
@@ -1907,7 +1997,7 @@
{
val = ( distance - CUR.phase + CUR.threshold + compensation ) &
-CUR.period;
- if ( val < 0 )
+ if ( distance && val < 0 )
val = 0;
val += CUR.phase;
}
@@ -1955,7 +2045,7 @@
{
val = ( ( distance - CUR.phase + CUR.threshold + compensation ) /
CUR.period ) * CUR.period;
- if ( val < 0 )
+ if ( distance && val < 0 )
val = 0;
val += CUR.phase;
}
@@ -2075,7 +2165,7 @@
break;
case 0x30:
- CUR.phase = GridPeriod * 3 / 4;
+ CUR.phase = CUR.period * 3 / 4;
break;
}
@@ -2110,13 +2200,16 @@
Project( EXEC_OP_ FT_Vector* v1,
FT_Vector* v2 )
{
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ FT_ASSERT( !CUR.face->unpatented_hinting );
+#endif
+
return TT_DotFix14( v1->x - v2->x,
v1->y - v2->y,
CUR.GS.projVector.x,
CUR.GS.projVector.y );
}
-
/*************************************************************************/
/* */
/* <Function> */
@@ -2147,33 +2240,6 @@
/*************************************************************************/
/* */
/* <Function> */
- /* Free_Project */
- /* */
- /* <Description> */
- /* Computes the projection of the vector given by (v2-v1) along the */
- /* current freedom vector. */
- /* */
- /* <Input> */
- /* v1 :: First input vector. */
- /* v2 :: Second input vector. */
- /* */
- /* <Return> */
- /* The distance in F26dot6 format. */
- /* */
- static FT_F26Dot6
- Free_Project( EXEC_OP_ FT_Vector* v1,
- FT_Vector* v2 )
- {
- return TT_DotFix14( v1->x - v2->x,
- v1->y - v2->y,
- CUR.GS.freeVector.x,
- CUR.GS.freeVector.y );
- }
-
-
- /*************************************************************************/
- /* */
- /* <Function> */
/* Project_x */
/* */
/* <Description> */
@@ -2235,24 +2301,63 @@
static void
Compute_Funcs( EXEC_OP )
{
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ if ( CUR.face->unpatented_hinting )
+ {
+ /* If both vectors point rightwards along the x axis, set */
+ /* `both-x-axis' true, otherwise set it false. The x values only */
+ /* need be tested because the vector has been normalised to a unit */
+ /* vector of length 0x4000 = unity. */
+ CUR.GS.both_x_axis = (FT_Bool)( CUR.GS.projVector.x == 0x4000 &&
+ CUR.GS.freeVector.x == 0x4000 );
+
+ /* Throw away projection and freedom vector information */
+ /* because the patents don't allow them to be stored. */
+ /* The relevant US Patents are 5155805 and 5325479. */
+ CUR.GS.projVector.x = 0;
+ CUR.GS.projVector.y = 0;
+ CUR.GS.freeVector.x = 0;
+ CUR.GS.freeVector.y = 0;
+
+ if ( CUR.GS.both_x_axis )
+ {
+ CUR.func_project = Project_x;
+ CUR.func_move = Direct_Move_X;
+ CUR.func_move_orig = Direct_Move_Orig_X;
+ }
+ else
+ {
+ CUR.func_project = Project_y;
+ CUR.func_move = Direct_Move_Y;
+ CUR.func_move_orig = Direct_Move_Orig_Y;
+ }
+
+ if ( CUR.GS.dualVector.x == 0x4000 )
+ CUR.func_dualproj = Project_x;
+ else
+ {
+ if ( CUR.GS.dualVector.y == 0x4000 )
+ CUR.func_dualproj = Project_y;
+ else
+ CUR.func_dualproj = Dual_Project;
+ }
+
+ /* Force recalculation of cached aspect ratio */
+ CUR.tt_metrics.ratio = 0;
+
+ return;
+ }
+#endif /* TT_CONFIG_OPTION_UNPATENTED_HINTING */
+
if ( CUR.GS.freeVector.x == 0x4000 )
- {
- CUR.func_freeProj = (TT_Project_Func)Project_x;
CUR.F_dot_P = CUR.GS.projVector.x * 0x10000L;
- }
else
{
if ( CUR.GS.freeVector.y == 0x4000 )
- {
- CUR.func_freeProj = (TT_Project_Func)Project_y;
CUR.F_dot_P = CUR.GS.projVector.y * 0x10000L;
- }
else
- {
- CUR.func_freeProj = (TT_Project_Func)Free_Project;
CUR.F_dot_P = (FT_Long)CUR.GS.projVector.x * CUR.GS.freeVector.x * 4 +
(FT_Long)CUR.GS.projVector.y * CUR.GS.freeVector.y * 4;
- }
}
if ( CUR.GS.projVector.x == 0x4000 )
@@ -2275,23 +2380,30 @@
CUR.func_dualproj = (TT_Project_Func)Dual_Project;
}
- CUR.func_move = (TT_Move_Func)Direct_Move;
+ CUR.func_move = (TT_Move_Func)Direct_Move;
+ CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig;
if ( CUR.F_dot_P == 0x40000000L )
{
if ( CUR.GS.freeVector.x == 0x4000 )
- CUR.func_move = (TT_Move_Func)Direct_Move_X;
+ {
+ CUR.func_move = (TT_Move_Func)Direct_Move_X;
+ CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig_X;
+ }
else
{
if ( CUR.GS.freeVector.y == 0x4000 )
- CUR.func_move = (TT_Move_Func)Direct_Move_Y;
+ {
+ CUR.func_move = (TT_Move_Func)Direct_Move_Y;
+ CUR.func_move_orig = (TT_Move_Func)Direct_Move_Orig_Y;
+ }
}
}
/* at small sizes, F_dot_P can become too small, resulting */
/* in overflows and `spikes' in a number of glyphs like `w'. */
- if ( ABS( CUR.F_dot_P ) < 0x4000000L )
+ if ( FT_ABS( CUR.F_dot_P ) < 0x4000000L )
CUR.F_dot_P = 0x40000000L;
/* Disable cached aspect ratio */
@@ -2334,7 +2446,7 @@
FT_UNUSED_EXEC;
- if ( ABS( Vx ) < 0x10000L && ABS( Vy ) < 0x10000L )
+ if ( FT_ABS( Vx ) < 0x10000L && FT_ABS( Vy ) < 0x10000L )
{
Vx *= 0x100;
Vy *= 0x100;
@@ -2503,6 +2615,8 @@
CUR.GS.projVector.y = B; \
CUR.GS.dualVector.y = B; \
\
+ GUESS_VECTOR( freeVector ); \
+ \
COMPUTE_Funcs(); \
}
@@ -2518,6 +2632,8 @@
CUR.GS.freeVector.x = A; \
CUR.GS.freeVector.y = B; \
\
+ GUESS_VECTOR( projVector ); \
+ \
COMPUTE_Funcs(); \
}
@@ -2529,6 +2645,7 @@
&CUR.GS.projVector ) == SUCCESS ) \
{ \
CUR.GS.dualVector = CUR.GS.projVector; \
+ GUESS_VECTOR( freeVector ); \
COMPUTE_Funcs(); \
}
@@ -2538,10 +2655,14 @@
(FT_UShort)args[0], \
CUR.opcode, \
&CUR.GS.freeVector ) == SUCCESS ) \
- COMPUTE_Funcs();
+ { \
+ GUESS_VECTOR( projVector ); \
+ COMPUTE_Funcs(); \
+ }
#define DO_SFVTPV \
+ GUESS_VECTOR( projVector ); \
CUR.GS.freeVector = CUR.GS.projVector; \
COMPUTE_Funcs();
@@ -2561,6 +2682,7 @@
NORMalize( X, Y, &CUR.GS.projVector ); \
\
CUR.GS.dualVector = CUR.GS.projVector; \
+ GUESS_VECTOR( freeVector ); \
COMPUTE_Funcs(); \
}
@@ -2578,18 +2700,47 @@
X = S; \
\
NORMalize( X, Y, &CUR.GS.freeVector ); \
+ GUESS_VECTOR( projVector ); \
COMPUTE_Funcs(); \
}
-#define DO_GPV \
- args[0] = CUR.GS.projVector.x; \
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+#define DO_GPV \
+ if ( CUR.face->unpatented_hinting ) \
+ { \
+ args[0] = CUR.GS.both_x_axis ? 0x4000 : 0; \
+ args[1] = CUR.GS.both_x_axis ? 0 : 0x4000; \
+ } \
+ else \
+ { \
+ args[0] = CUR.GS.projVector.x; \
+ args[1] = CUR.GS.projVector.y; \
+ }
+#else
+#define DO_GPV \
+ args[0] = CUR.GS.projVector.x; \
args[1] = CUR.GS.projVector.y;
+#endif
-#define DO_GFV \
- args[0] = CUR.GS.freeVector.x; \
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+#define DO_GFV \
+ if ( CUR.face->unpatented_hinting ) \
+ { \
+ args[0] = CUR.GS.both_x_axis ? 0x4000 : 0; \
+ args[1] = CUR.GS.both_x_axis ? 0 : 0x4000; \
+ } \
+ else \
+ { \
+ args[0] = CUR.GS.freeVector.x; \
+ args[1] = CUR.GS.freeVector.y; \
+ }
+#else
+#define DO_GFV \
+ args[0] = CUR.GS.freeVector.x; \
args[1] = CUR.GS.freeVector.y;
+#endif
#define DO_SRP0 \
@@ -2823,19 +2974,19 @@
args[0] -= args[1];
-#define DO_DIV \
- if ( args[1] == 0 ) \
- CUR.error = TT_Err_Divide_By_Zero; \
- else \
- args[0] = TT_MULDIV( args[0], 64L, args[1] );
+#define DO_DIV \
+ if ( args[1] == 0 ) \
+ CUR.error = TT_Err_Divide_By_Zero; \
+ else \
+ args[0] = TT_MULDIV_NO_ROUND( args[0], 64L, args[1] );
#define DO_MUL \
args[0] = TT_MULDIV( args[0], args[1], 64L );
-#define DO_ABS \
- args[0] = ABS( args[0] );
+#define DO_ABS \
+ args[0] = FT_ABS( args[0] );
#define DO_NEG \
@@ -2843,11 +2994,11 @@
#define DO_FLOOR \
- args[0] &= -64;
+ args[0] = FT_PIX_FLOOR( args[0] );
#define DO_CEILING \
- args[0] = ( args[0] + 63 ) & -64;
+ args[0] = FT_PIX_CEIL( args[0] );
#define DO_RS \
@@ -3955,9 +4106,9 @@
K = CUR.stack[CUR.args - L];
- FT_MEM_MOVE( &CUR.stack[CUR.args - L ],
- &CUR.stack[CUR.args - L + 1],
- ( L - 1 ) * sizeof ( FT_Long ) );
+ FT_ARRAY_MOVE( &CUR.stack[CUR.args - L ],
+ &CUR.stack[CUR.args - L + 1],
+ ( L - 1 ) );
CUR.stack[CUR.args - 1] = K;
}
@@ -4750,6 +4901,8 @@
NORMalize( A, B, &CUR.GS.projVector );
+ GUESS_VECTOR( freeVector );
+
COMPUTE_Funcs();
}
@@ -5123,21 +5276,30 @@
d = CUR_Func_project( zp.cur + p, zp.org + p );
-#ifdef NO_APPLE_PATENT
-
- *x = TT_MulFix14( d, CUR.GS.freeVector.x );
- *y = TT_MulFix14( d, CUR.GS.freeVector.y );
-
-#else
-
- *x = TT_MULDIV( d,
- (FT_Long)CUR.GS.freeVector.x * 0x10000L,
- CUR.F_dot_P );
- *y = TT_MULDIV( d,
- (FT_Long)CUR.GS.freeVector.y * 0x10000L,
- CUR.F_dot_P );
-
-#endif /* NO_APPLE_PATENT */
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ if ( CUR.face->unpatented_hinting )
+ {
+ if ( CUR.GS.both_x_axis )
+ {
+ *x = d;
+ *y = 0;
+ }
+ else
+ {
+ *x = 0;
+ *y = d;
+ }
+ }
+ else
+#endif
+ {
+ *x = TT_MULDIV( d,
+ (FT_Long)CUR.GS.freeVector.x * 0x10000L,
+ CUR.F_dot_P );
+ *y = TT_MULDIV( d,
+ (FT_Long)CUR.GS.freeVector.y * 0x10000L,
+ CUR.F_dot_P );
+ }
return SUCCESS;
}
@@ -5149,6 +5311,25 @@
FT_F26Dot6 dy,
FT_Bool touch )
{
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ if ( CUR.face->unpatented_hinting )
+ {
+ if ( CUR.GS.both_x_axis )
+ {
+ CUR.zp2.cur[point].x += dx;
+ if ( touch )
+ CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X;
+ }
+ else
+ {
+ CUR.zp2.cur[point].y += dy;
+ if ( touch )
+ CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y;
+ }
+ return;
+ }
+#endif
+
if ( CUR.GS.freeVector.x != 0 )
{
CUR.zp2.cur[point].x += dx;
@@ -5265,11 +5446,11 @@
last_point = 0;
}
- /* XXX: UNDOCUMENTED! SHC doesn't touch the points */
+ /* XXX: UNDOCUMENTED! SHC does touch the points */
for ( i = first_point; i <= last_point; i++ )
{
if ( zp.cur != CUR.zp2.cur || refp != i )
- MOVE_Zp2_Point( i, dx, dy, FALSE );
+ MOVE_Zp2_Point( i, dx, dy, TRUE );
}
}
@@ -5334,8 +5515,26 @@
return;
}
- dx = TT_MulFix14( args[0], CUR.GS.freeVector.x );
- dy = TT_MulFix14( args[0], CUR.GS.freeVector.y );
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ if ( CUR.face->unpatented_hinting )
+ {
+ if ( CUR.GS.both_x_axis )
+ {
+ dx = TT_MulFix14( args[0], 0x4000 );
+ dy = 0;
+ }
+ else
+ {
+ dx = 0;
+ dy = TT_MulFix14( args[0], 0x4000 );
+ }
+ }
+ else
+#endif
+ {
+ dx = TT_MulFix14( args[0], CUR.GS.freeVector.x );
+ dy = TT_MulFix14( args[0], CUR.GS.freeVector.y );
+ }
while ( CUR.GS.loop > 0 )
{
@@ -5386,9 +5585,11 @@
}
/* XXX: UNDOCUMENTED! behaviour */
- if ( CUR.GS.gep0 == 0 ) /* if in twilight zone */
+ if ( CUR.GS.gep1 == 0 ) /* if the point that is to be moved */
+ /* is in twilight zone */
{
CUR.zp1.org[point] = CUR.zp0.org[CUR.GS.rp0];
+ CUR_Func_move_orig( &CUR.zp1, point, args[1] );
CUR.zp1.cur[point] = CUR.zp1.org[point];
}
@@ -5507,7 +5708,7 @@
if ( ( CUR.opcode & 1 ) != 0 ) /* rounding and control cutin flag */
{
- if ( ABS( distance - org_dist ) > CUR.GS.control_value_cutin )
+ if ( FT_ABS( distance - org_dist ) > CUR.GS.control_value_cutin )
distance = org_dist;
distance = CUR_Func_round( distance, CUR.tt_metrics.compensations[0] );
@@ -5551,7 +5752,8 @@
/* single width cutin test */
- if ( ABS( org_dist ) < CUR.GS.single_width_cutin )
+ if ( FT_ABS( org_dist - CUR.GS.single_width_value ) <
+ CUR.GS.single_width_cutin )
{
if ( org_dist >= 0 )
org_dist = CUR.GS.single_width_value;
@@ -5640,7 +5842,8 @@
/* single width test */
- if ( ABS( cvt_dist ) < CUR.GS.single_width_cutin )
+ if ( FT_ABS( cvt_dist - CUR.GS.single_width_value ) <
+ CUR.GS.single_width_cutin )
{
if ( cvt_dist >= 0 )
cvt_dist = CUR.GS.single_width_value;
@@ -5683,7 +5886,7 @@
/* refer to the same zone. */
if ( CUR.GS.gep0 == CUR.GS.gep1 )
- if ( ABS( cvt_dist - org_dist ) >= CUR.GS.control_value_cutin )
+ if ( FT_ABS( cvt_dist - org_dist ) >= CUR.GS.control_value_cutin )
cvt_dist = org_dist;
distance = CUR_Func_round(
@@ -5833,7 +6036,7 @@
discriminant = TT_MULDIV( dax, -dby, 0x40 ) +
TT_MULDIV( day, dbx, 0x40 );
- if ( ABS( discriminant ) >= 0x40 )
+ if ( FT_ABS( discriminant ) >= 0x40 )
{
val = TT_MULDIV( dx, -dby, 0x40 ) + TT_MULDIV( dy, dbx, 0x40 );
@@ -6231,6 +6434,22 @@
FT_ULong C;
FT_Long B;
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ /* Delta hinting is covered by US Patent 5159668. */
+ if ( CUR.face->unpatented_hinting )
+ {
+ FT_Long n = args[0] * 2;
+ if ( CUR.args < n )
+ {
+ CUR.error = TT_Err_Too_Few_Arguments;
+ return;
+ }
+
+ CUR.args -= n;
+ CUR.new_top = CUR.args;
+ return;
+ }
+#endif
nump = (FT_ULong)args[0]; /* some points theoretically may occur more
than once, thus UShort isn't enough */
@@ -6307,6 +6526,25 @@
FT_Long B;
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ /* Delta hinting is covered by US Patent 5159668. */
+ if ( CUR.face->unpatented_hinting )
+ {
+ FT_Long n = args[0] * 2;
+
+
+ if ( CUR.args < n )
+ {
+ CUR.error = TT_Err_Too_Few_Arguments;
+ return;
+ }
+
+ CUR.args -= n;
+ CUR.new_top = CUR.args;
+ return;
+ }
+#endif
+
nump = (FT_ULong)args[0];
for ( k = 1; k <= nump; k++ )
@@ -6870,12 +7108,20 @@
CUR.GS.dualVector.x = AA;
CUR.GS.dualVector.y = BB;
}
+ else
+ {
+ GUESS_VECTOR( projVector );
+ }
if ( ( opcode & 2 ) == 0 )
{
CUR.GS.freeVector.x = AA;
CUR.GS.freeVector.y = BB;
}
+ else
+ {
+ GUESS_VECTOR( freeVector );
+ }
COMPUTE_Funcs();
}
diff --git a/extras/freetype2/src/truetype/ttinterp.h b/extras/freetype2/src/truetype/ttinterp.h
index e750963ff..eb0bb0bb6 100644
--- a/extras/freetype2/src/truetype/ttinterp.h
+++ b/extras/freetype2/src/truetype/ttinterp.h
@@ -4,7 +4,7 @@
/* */
/* TrueType bytecode interpreter (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -210,6 +210,7 @@ FT_BEGIN_HEADER
func_freeProj; /* current freedom proj. func */
TT_Move_Func func_move; /* current point move function */
+ TT_Move_Func func_move_orig; /* move original position function */
TT_Get_CVT_Func func_read_cvt; /* read a cvt entry */
TT_Set_CVT_Func func_write_cvt; /* write a cvt entry (in pixels) */
diff --git a/extras/freetype2/src/truetype/ttobjs.c b/extras/freetype2/src/truetype/ttobjs.c
index 9d78baee7..d5210f2cd 100644
--- a/extras/freetype2/src/truetype/ttobjs.c
+++ b/extras/freetype2/src/truetype/ttobjs.c
@@ -4,7 +4,7 @@
/* */
/* Objects manager (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,7 +23,6 @@
#include FT_TRUETYPE_IDS_H
#include FT_TRUETYPE_TAGS_H
#include FT_INTERNAL_SFNT_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
#include "ttgload.h"
#include "ttpload.h"
@@ -34,6 +33,9 @@
#include "ttinterp.h"
#endif
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+#include FT_TRUETYPE_UNPATENTED_H
+#endif
/*************************************************************************/
/* */
@@ -70,6 +72,7 @@
{
FT_Memory memory = zone->memory;
+
if ( memory )
{
FT_FREE( zone->contours );
@@ -200,26 +203,43 @@
goto Exit;
if ( face->root.face_flags & FT_FACE_FLAG_SCALABLE )
- {
+ {
#ifdef FT_CONFIG_OPTION_INCREMENTAL
- if ( !face->root.internal->incremental_interface )
- error = tt_face_load_loca( face, stream );
- if ( !error )
- error = tt_face_load_cvt ( face, stream ) ||
- tt_face_load_fpgm ( face, stream );
+ if ( !face->root.internal->incremental_interface )
+ error = tt_face_load_loca( face, stream );
+ if ( !error )
+ error = tt_face_load_cvt( face, stream ) ||
+ tt_face_load_fpgm( face, stream );
#else
- if ( !error )
- error = tt_face_load_loca( face, stream ) ||
- tt_face_load_cvt ( face, stream ) ||
- tt_face_load_fpgm ( face, stream );
+ if ( !error )
+ error = tt_face_load_loca( face, stream ) ||
+ tt_face_load_cvt( face, stream ) ||
+ tt_face_load_fpgm( face, stream );
#endif
- }
+ }
+
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+
+ /* Determine whether unpatented hinting is to be used for this face. */
+ face->unpatented_hinting = FT_BOOL
+ ( library->debug_hooks[ FT_DEBUG_HOOK_UNPATENTED_HINTING ] != NULL );
+
+ {
+ int i;
+
+
+ for ( i = 0; i < num_params && !face->unpatented_hinting; i++ )
+ if ( params[i].tag == FT_PARAM_TAG_UNPATENTED_HINTING )
+ face->unpatented_hinting = TRUE;
+ }
+
+#endif /* TT_CONFIG_OPTION_UNPATENTED_HINTING */
/* initialize standard glyph loading routines */
TT_Init_Glyph_Loading( face );
@@ -569,15 +589,16 @@
size->ttmetrics.y_ratio = 0x10000L;
}
- /* Compute root ascender, descender, test height, and max_advance */
- metrics->ascender = ( FT_MulFix( face->root.ascender,
- metrics->y_scale ) + 32 ) & -64;
- metrics->descender = ( FT_MulFix( face->root.descender,
- metrics->y_scale ) + 32 ) & -64;
- metrics->height = ( FT_MulFix( face->root.height,
- metrics->y_scale ) + 32 ) & -64;
- metrics->max_advance = ( FT_MulFix( face->root.max_advance_width,
- metrics->x_scale ) + 32 ) & -64;
+ /* Compute root ascender, descender, text height, and max_advance */
+ metrics->ascender =
+ FT_PIX_ROUND( FT_MulFix( face->root.ascender, metrics->y_scale ) );
+ metrics->descender =
+ FT_PIX_ROUND( FT_MulFix( face->root.descender, metrics->y_scale ) );
+ metrics->height =
+ FT_PIX_ROUND( FT_MulFix( face->root.height, metrics->y_scale ) );
+ metrics->max_advance =
+ FT_PIX_ROUND( FT_MulFix( face->root.max_advance_width,
+ metrics->x_scale ) );
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
@@ -704,39 +725,39 @@
sbit_metrics = &size->strike_metrics;
- error = sfnt->set_sbit_strike(face,
- metrics->x_ppem, metrics->y_ppem,
- &strike_index);
+ error = sfnt->set_sbit_strike( face,
+ metrics->x_ppem, metrics->y_ppem,
+ &strike_index );
if ( !error )
{
TT_SBit_Strike strike = face->sbit_strikes + strike_index;
- sbit_metrics->x_ppem = metrics->x_ppem;
- sbit_metrics->y_ppem = metrics->y_ppem;
+ sbit_metrics->x_ppem = metrics->x_ppem;
+ sbit_metrics->y_ppem = metrics->y_ppem;
#if 0
/*
* sbit_metrics->?_scale
* are not used now.
*/
- sbit_metrics->x_scale = 1 << 16;
- sbit_metrics->y_scale = 1 << 16;
+ sbit_metrics->x_scale = 1 << 16;
+ sbit_metrics->y_scale = 1 << 16;
#endif
- sbit_metrics->ascender = strike->hori.ascender << 6;
- sbit_metrics->descender = strike->hori.descender << 6;
+ sbit_metrics->ascender = strike->hori.ascender << 6;
+ sbit_metrics->descender = strike->hori.descender << 6;
/* XXX: Is this correct? */
- sbit_metrics->height = sbit_metrics->ascender -
- sbit_metrics->descender;
+ sbit_metrics->height = sbit_metrics->ascender -
+ sbit_metrics->descender;
/* XXX: Is this correct? */
sbit_metrics->max_advance = ( strike->hori.min_origin_SB +
strike->hori.max_width +
strike->hori.min_advance_SB ) << 6;
- size->strike_index = strike_index;
+ size->strike_index = (FT_UInt)strike_index;
}
else
{
diff --git a/extras/freetype2/src/truetype/ttobjs.h b/extras/freetype2/src/truetype/ttobjs.h
index e462d6404..30cf1cb36 100644
--- a/extras/freetype2/src/truetype/ttobjs.h
+++ b/extras/freetype2/src/truetype/ttobjs.h
@@ -4,7 +4,7 @@
/* */
/* Objects manager (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -83,6 +83,10 @@ FT_BEGIN_HEADER
FT_UnitVector projVector;
FT_UnitVector freeVector;
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+ FT_Bool both_x_axis;
+#endif
+
FT_Long loop;
FT_F26Dot6 minimum_distance;
FT_Int round_state;
@@ -212,7 +216,8 @@ FT_BEGIN_HEADER
TT_Transform transform; /* transformation matrix */
- FT_Vector pp1, pp2; /* phantom points */
+ FT_Vector pp1, pp2; /* phantom points (horizontal) */
+ FT_Vector pp3, pp4; /* phantom points (vertical) */
} TT_SubGlyphRec, *TT_SubGlyph_Stack;
@@ -311,7 +316,7 @@ FT_BEGIN_HEADER
{
FT_SizeRec root;
- FT_Size_Metrics metrics; /* slightly different from the root metrics */
+ FT_Size_Metrics metrics; /* slightly different from the root metrics */
TT_Size_Metrics ttmetrics;
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
diff --git a/extras/freetype2/src/type1/rules.mk b/extras/freetype2/src/type1/rules.mk
index 49a4e4ad1..15087b030 100644
--- a/extras/freetype2/src/type1/rules.mk
+++ b/extras/freetype2/src/type1/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001 by
+# Copyright 1996-2000, 2001, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,29 +15,28 @@
# Type1 driver directory
#
-T1_DIR := $(SRC_)type1
-T1_DIR_ := $(T1_DIR)$(SEP)
+T1_DIR := $(SRC_DIR)/type1
# compilation flags for the driver
#
-T1_COMPILE := $(FT_COMPILE) $I$(T1_DIR)
+T1_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(T1_DIR))
# Type1 driver sources (i.e., C files)
#
-T1_DRV_SRC := $(T1_DIR_)t1parse.c \
- $(T1_DIR_)t1load.c \
- $(T1_DIR_)t1driver.c \
- $(T1_DIR_)t1afm.c \
- $(T1_DIR_)t1gload.c \
- $(T1_DIR_)t1objs.c
+T1_DRV_SRC := $(T1_DIR)/t1parse.c \
+ $(T1_DIR)/t1load.c \
+ $(T1_DIR)/t1driver.c \
+ $(T1_DIR)/t1afm.c \
+ $(T1_DIR)/t1gload.c \
+ $(T1_DIR)/t1objs.c
# Type1 driver headers
#
T1_DRV_H := $(T1_DRV_SRC:%.c=%.h) \
- $(T1_DIR_)t1tokens.h \
- $(T1_DIR_)t1errors.h
+ $(T1_DIR)/t1tokens.h \
+ $(T1_DIR)/t1errors.h
# Type1 driver object(s)
@@ -45,24 +44,24 @@ T1_DRV_H := $(T1_DRV_SRC:%.c=%.h) \
# T1_DRV_OBJ_M is used during `multi' builds
# T1_DRV_OBJ_S is used during `single' builds
#
-T1_DRV_OBJ_M := $(T1_DRV_SRC:$(T1_DIR_)%.c=$(OBJ_)%.$O)
-T1_DRV_OBJ_S := $(OBJ_)type1.$O
+T1_DRV_OBJ_M := $(T1_DRV_SRC:$(T1_DIR)/%.c=$(OBJ_DIR)/%.$O)
+T1_DRV_OBJ_S := $(OBJ_DIR)/type1.$O
# Type1 driver source file for single build
#
-T1_DRV_SRC_S := $(T1_DIR_)type1.c
+T1_DRV_SRC_S := $(T1_DIR)/type1.c
# Type1 driver - single object
#
$(T1_DRV_OBJ_S): $(T1_DRV_SRC_S) $(T1_DRV_SRC) $(FREETYPE_H) $(T1_DRV_H)
- $(T1_COMPILE) $T$@ $(T1_DRV_SRC_S)
+ $(T1_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(T1_DRV_SRC_S))
# Type1 driver - multiple objects
#
-$(OBJ_)%.$O: $(T1_DIR_)%.c $(FREETYPE_H) $(T1_DRV_H)
- $(T1_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(T1_DIR)/%.c $(FREETYPE_H) $(T1_DRV_H)
+ $(T1_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
@@ -70,4 +69,5 @@ $(OBJ_)%.$O: $(T1_DIR_)%.c $(FREETYPE_H) $(T1_DRV_H)
DRV_OBJS_S += $(T1_DRV_OBJ_S)
DRV_OBJS_M += $(T1_DRV_OBJ_M)
+
# EOF
diff --git a/extras/freetype2/src/type1/t1afm.c b/extras/freetype2/src/type1/t1afm.c
index 71ccd1ea7..9945ebdf6 100644
--- a/extras/freetype2/src/type1/t1afm.c
+++ b/extras/freetype2/src/type1/t1afm.c
@@ -4,7 +4,7 @@
/* */
/* AFM support for Type 1 fonts (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -148,7 +148,7 @@
FT_ULong index2 = KERN_INDEX( pair2->glyph1, pair2->glyph2 );
- return ( index1 - index2 );
+ return (int)( index1 - index2 );
}
diff --git a/extras/freetype2/src/type1/t1driver.c b/extras/freetype2/src/type1/t1driver.c
index b255f9d7c..fd201db8e 100644
--- a/extras/freetype2/src/type1/t1driver.c
+++ b/extras/freetype2/src/type1/t1driver.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 driver interface (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,8 +29,13 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
+#include FT_SERVICE_MULTIPLE_MASTERS_H
+#include FT_SERVICE_GLYPH_DICT_H
+#include FT_SERVICE_XFREE86_NAME_H
+#include FT_SERVICE_POSTSCRIPT_NAME_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+#include FT_SERVICE_POSTSCRIPT_INFO_H
/*************************************************************************/
/* */
@@ -41,6 +46,10 @@
#undef FT_COMPONENT
#define FT_COMPONENT trace_t1driver
+ /*
+ * GLYPH DICT SERVICE
+ *
+ */
static FT_Error
t1_get_glyph_name( T1_Face face,
@@ -69,23 +78,6 @@
}
- /*************************************************************************/
- /* */
- /* <Function> */
- /* t1_get_name_index */
- /* */
- /* <Description> */
- /* Uses the Type 1 font's `glyph_names' table to find a given glyph */
- /* name's glyph index. */
- /* */
- /* <Input> */
- /* face :: A handle to the source face object. */
- /* */
- /* glyph_name :: The glyph name. */
- /* */
- /* <Return> */
- /* Glyph index. 0 means `undefined character code'. */
- /* */
static FT_UInt
t1_get_name_index( T1_Face face,
FT_String* glyph_name )
@@ -105,6 +97,17 @@
return 0;
}
+ static const FT_Service_GlyphDictRec t1_service_glyph_dict =
+ {
+ (FT_GlyphDict_GetNameFunc) t1_get_glyph_name,
+ (FT_GlyphDict_NameIndexFunc)t1_get_name_index
+ };
+
+
+ /*
+ * POSTSCRIPT NAME SERVICE
+ *
+ */
static const char*
t1_get_ps_name( T1_Face face )
@@ -112,61 +115,82 @@
return (const char*) face->type1.font_name;
}
+ static const FT_Service_PsFontNameRec t1_service_ps_name =
+ {
+ (FT_PsName_GetFunc)t1_get_ps_name
+ };
- /*************************************************************************/
- /* */
- /* <Function> */
- /* Get_Interface */
- /* */
- /* <Description> */
- /* Each driver can provide one or more extensions to the base */
- /* FreeType API. These can be used to access format specific */
- /* features (e.g., all TrueType/OpenType resources share a common */
- /* file structure and common tables which can be accessed through the */
- /* `sfnt' interface), or more simply generic ones (e.g., the */
- /* `postscript names' interface which can be used to retrieve the */
- /* PostScript name of a given glyph index). */
- /* */
- /* <InOut> */
- /* driver :: A handle to a driver object. */
- /* */
- /* <Input> */
- /* t1_interface :: A string designing the interface. Examples are */
- /* `sfnt', `post_names', `charmaps', etc. */
- /* */
- /* <Return> */
- /* A typeless pointer to the extension's interface (normally a table */
- /* of function pointers). Returns NULL if the requested extension */
- /* isn't available (i.e., wasn't compiled in the driver at build */
- /* time). */
- /* */
- static FT_Module_Interface
- Get_Interface( FT_Driver driver,
- const FT_String* t1_interface )
+
+ /*
+ * MULTIPLE MASTERS SERVICE
+ *
+ */
+
+#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
+ static const FT_Service_MultiMastersRec t1_service_multi_masters =
{
- FT_UNUSED( driver );
- FT_UNUSED( t1_interface );
+ (FT_Get_MM_Func) T1_Get_Multi_Master,
+ (FT_Set_MM_Design_Func)T1_Set_MM_Design,
+ (FT_Set_MM_Blend_Func) T1_Set_MM_Blend
+ };
+#endif
+
+
+ /*
+ * POSTSCRIPT INFO SERVICE
+ *
+ */
+
+ static FT_Error
+ t1_ps_get_font_info( FT_Face face,
+ PS_FontInfoRec* afont_info )
+ {
+ *afont_info = ((T1_Face)face)->type1.font_info;
+ return 0;
+ }
- if ( ft_strcmp( (const char*)t1_interface, "glyph_name" ) == 0 )
- return (FT_Module_Interface)t1_get_glyph_name;
- if ( ft_strcmp( (const char*)t1_interface, "name_index" ) == 0 )
- return (FT_Module_Interface)t1_get_name_index;
+ static FT_Int
+ t1_ps_has_glyph_names( FT_Face face )
+ {
+ FT_UNUSED( face );
+ return 1;
+ }
- if ( ft_strcmp( (const char*)t1_interface, "postscript_name" ) == 0 )
- return (FT_Module_Interface)t1_get_ps_name;
-#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
- if ( ft_strcmp( (const char*)t1_interface, "get_mm" ) == 0 )
- return (FT_Module_Interface)T1_Get_Multi_Master;
+ static const FT_Service_PsInfoRec t1_service_ps_info =
+ {
+ (PS_GetFontInfoFunc) t1_ps_get_font_info,
+ (PS_HasGlyphNamesFunc)t1_ps_has_glyph_names
+ };
- if ( ft_strcmp( (const char*)t1_interface, "set_mm_design") == 0 )
- return (FT_Module_Interface)T1_Set_MM_Design;
- if ( ft_strcmp( (const char*)t1_interface, "set_mm_blend") == 0 )
- return (FT_Module_Interface)T1_Set_MM_Blend;
+ /*
+ * SERVICE LIST
+ *
+ */
+
+ static const FT_ServiceDescRec t1_services[] =
+ {
+ { FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &t1_service_ps_name },
+ { FT_SERVICE_ID_GLYPH_DICT, &t1_service_glyph_dict },
+ { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TYPE_1 },
+ { FT_SERVICE_ID_POSTSCRIPT_INFO, &t1_service_ps_info },
+
+#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
+ { FT_SERVICE_ID_MULTI_MASTERS, &t1_service_multi_masters },
#endif
- return 0;
+ { NULL, NULL }
+ };
+
+
+ static FT_Module_Interface
+ Get_Interface( FT_Driver driver,
+ const FT_String* t1_interface )
+ {
+ FT_UNUSED( driver );
+
+ return ft_service_list_lookup( t1_services, t1_interface );
}
@@ -227,15 +251,13 @@
#endif /* T1_CONFIG_OPTION_NO_AFM */
-
-
FT_CALLBACK_TABLE_DEF
const FT_Driver_ClassRec t1_driver_class =
{
{
- ft_module_font_driver |
- ft_module_driver_scalable |
- ft_module_driver_has_hinter,
+ FT_MODULE_FONT_DRIVER |
+ FT_MODULE_DRIVER_SCALABLE |
+ FT_MODULE_DRIVER_HAS_HINTER,
sizeof( FT_DriverRec ),
diff --git a/extras/freetype2/src/type1/t1gload.c b/extras/freetype2/src/type1/t1gload.c
index 6ebb8723c..98f8194b9 100644
--- a/extras/freetype2/src/type1/t1gload.c
+++ b/extras/freetype2/src/type1/t1gload.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 Glyph Loader (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -81,7 +81,7 @@
/* For ordinary fonts get the character data stored in the face record. */
{
char_string->pointer = type1->charstrings[glyph_index];
- char_string->length = type1->charstrings_len[glyph_index];
+ char_string->length = (FT_Int)type1->charstrings_len[glyph_index];
}
if ( !error )
@@ -97,9 +97,10 @@
{
FT_Incremental_MetricsRec metrics;
+
metrics.bearing_x = decoder->builder.left_bearing.x;
- metrics.bearing_y = decoder->builder.left_bearing.y;
- metrics.advance = decoder->builder.advance.x;
+ metrics.bearing_y = decoder->builder.left_bearing.y;
+ metrics.advance = decoder->builder.advance.x;
error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
face->root.internal->incremental_interface->object,
glyph_index, FALSE, &metrics );
@@ -111,7 +112,7 @@
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
- return error;
+ return error;
}
@@ -120,21 +121,23 @@
FT_UInt glyph_index )
{
FT_Data glyph_data;
- FT_Error error = T1_Parse_Glyph_And_Get_Char_String(
+ FT_Error error = T1_Parse_Glyph_And_Get_Char_String(
decoder, glyph_index, &glyph_data );
#ifdef FT_CONFIG_OPTION_INCREMENTAL
+
if ( !error )
{
T1_Face face = (T1_Face)decoder->builder.face;
- if ( face->root.internal->incremental_interface )
+ if ( face->root.internal->incremental_interface )
face->root.internal->incremental_interface->funcs->free_glyph_data(
face->root.internal->incremental_interface->object,
&glyph_data );
}
+
#endif /* FT_CONFIG_OPTION_INCREMENTAL */
return error;
@@ -143,7 +146,7 @@
FT_LOCAL_DEF( FT_Error )
T1_Compute_Max_Advance( T1_Face face,
- FT_Int* max_advance )
+ FT_Pos* max_advance )
{
FT_Error error;
T1_DecoderRec decoder;
@@ -184,8 +187,8 @@
error = T1_Parse_Glyph( &decoder, glyph_index );
if ( glyph_index == 0 || decoder.builder.advance.x > *max_advance )
*max_advance = decoder.builder.advance.x;
-
- /* ignore the error if one occured - skip to next glyph */
+
+ /* ignore the error if one occurred - skip to next glyph */
}
return T1_Err_Ok;
@@ -226,7 +229,9 @@
FT_Matrix font_matrix;
FT_Vector font_offset;
FT_Data glyph_data;
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
FT_Bool glyph_data_loaded = 0;
+#endif
if ( load_flags & FT_LOAD_NO_RECURSE )
@@ -250,7 +255,7 @@
(FT_Byte**)type1->glyph_names,
face->blend,
FT_BOOL( hinting ),
- FT_LOAD_TARGET_MODE(load_flags),
+ FT_LOAD_TARGET_MODE( load_flags ),
T1_Parse_Glyph );
if ( error )
goto Exit;
@@ -267,7 +272,9 @@
&glyph_data );
if ( error )
goto Exit;
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
glyph_data_loaded = 1;
+#endif
font_matrix = decoder.font_matrix;
font_offset = decoder.font_offset;
@@ -300,6 +307,7 @@
{
FT_BBox cbox;
FT_Glyph_Metrics* metrics = &glyph->root.metrics;
+ FT_Vector advance;
/* copy the _unscaled_ advance width */
@@ -326,6 +334,15 @@
FT_Outline_Translate( &glyph->root.outline,
font_offset.x,
font_offset.y );
+
+ advance.x = metrics->horiAdvance;
+ advance.y = 0;
+ FT_Vector_Transform( &advance, &font_matrix );
+ metrics->horiAdvance = advance.x + font_offset.x;
+ advance.x = 0;
+ advance.y = metrics->vertAdvance;
+ FT_Vector_Transform( &advance, &font_matrix );
+ metrics->vertAdvance = advance.y + font_offset.y;
#endif
if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 )
@@ -357,11 +374,11 @@
if ( hinting )
{
- metrics->horiAdvance = ( metrics->horiAdvance + 32 ) & -64;
- metrics->vertAdvance = ( metrics->vertAdvance + 32 ) & -64;
+ metrics->horiAdvance = FT_PIX_ROUND( metrics->horiAdvance );
+ metrics->vertAdvance = FT_PIX_ROUND( metrics->vertAdvance );
- metrics->vertBearingX = ( metrics->vertBearingX + 32 ) & -64;
- metrics->vertBearingY = ( metrics->vertBearingY + 32 ) & -64;
+ metrics->vertBearingX = FT_PIX_ROUND( metrics->vertBearingX );
+ metrics->vertBearingY = FT_PIX_ROUND( metrics->vertBearingY );
}
}
@@ -371,10 +388,10 @@
/* grid fit the bounding box if necessary */
if ( hinting )
{
- cbox.xMin &= -64;
- cbox.yMin &= -64;
- cbox.xMax = ( cbox.xMax+63 ) & -64;
- cbox.yMax = ( cbox.yMax+63 ) & -64;
+ cbox.xMin = FT_PIX_FLOOR( cbox.xMin );
+ cbox.yMin = FT_PIX_FLOOR( cbox.yMin );
+ cbox.xMax = FT_PIX_CEIL( cbox.xMax );
+ cbox.yMax = FT_PIX_CEIL( cbox.yMax );
}
metrics->width = cbox.xMax - cbox.xMin;
diff --git a/extras/freetype2/src/type1/t1gload.h b/extras/freetype2/src/type1/t1gload.h
index 0324a0d15..de87896dc 100644
--- a/extras/freetype2/src/type1/t1gload.h
+++ b/extras/freetype2/src/type1/t1gload.h
@@ -4,7 +4,7 @@
/* */
/* Type 1 Glyph Loader (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -29,7 +29,7 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
T1_Compute_Max_Advance( T1_Face face,
- FT_Int* max_advance );
+ FT_Pos* max_advance );
FT_LOCAL( FT_Error )
T1_Load_Glyph( T1_GlyphSlot glyph,
diff --git a/extras/freetype2/src/type1/t1load.c b/extras/freetype2/src/type1/t1load.c
index 5873ae00a..16a034155 100644
--- a/extras/freetype2/src/type1/t1load.c
+++ b/extras/freetype2/src/type1/t1load.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 font loader (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -41,11 +41,10 @@
/* */
/* All other common cases are handled very simply. The matching rules */
/* are defined in the file `t1tokens.h' through the use of several */
- /* macros calls PARSE_XXX. */
- /* */
- /* This file is included twice here; the first time to generate parsing */
- /* callback functions, the second to generate a table of keywords (with */
- /* pointers to the associated callback). */
+ /* macros calls PARSE_XXX. This file is included twice here; the first */
+ /* time to generate parsing callback functions, the second time to */
+ /* generate a table of keywords (with pointers to the associated */
+ /* callback functions). */
/* */
/* The function `parse_dict' simply scans *linearly* a given dictionary */
/* (either the top-level or private one) and calls the appropriate */
@@ -71,7 +70,6 @@
#include "t1errors.h"
-
/*************************************************************************/
/* */
/* The macro FT_COMPONENT is used in trace mode. It is an implicit */
@@ -100,7 +98,7 @@
{
PS_Blend blend;
FT_Memory memory = face->root.memory;
- FT_Error error = 0;
+ FT_Error error = T1_Err_Ok;
blend = face->blend;
@@ -174,7 +172,7 @@
return error;
Fail:
- error = -1;
+ error = T1_Err_Invalid_File_Format;
goto Exit;
}
@@ -205,8 +203,10 @@
axis->minimum = map->design_points[0];
axis->maximum = map->design_points[map->num_points - 1];
}
- error = 0;
+
+ error = T1_Err_Ok;
}
+
return error;
}
@@ -253,6 +253,7 @@
error = T1_Err_Ok;
}
+
return error;
}
@@ -289,7 +290,7 @@
FT_Fixed p_design = designs[p];
- /* exact match ? */
+ /* exact match? */
if ( design == p_design )
{
the_blend = blends[p];
@@ -305,7 +306,7 @@
before = p;
}
- /* now, interpolate if needed */
+ /* now interpolate if necessary */
if ( before < 0 )
the_blend = blends[0];
@@ -386,9 +387,9 @@
parse_blend_axis_types( T1_Face face,
T1_Loader loader )
{
- T1_TokenRec axis_tokens[ T1_MAX_MM_AXIS ];
+ T1_TokenRec axis_tokens[T1_MAX_MM_AXIS];
FT_Int n, num_axis;
- FT_Error error = 0;
+ FT_Error error = T1_Err_Ok;
PS_Blend blend;
FT_Memory memory;
@@ -396,7 +397,12 @@
/* take an array of objects */
T1_ToTokenArray( &loader->parser, axis_tokens,
T1_MAX_MM_AXIS, &num_axis );
- if ( num_axis <= 0 || num_axis > T1_MAX_MM_AXIS )
+ if ( num_axis < 0 )
+ {
+ error = T1_Err_Ignore;
+ goto Exit;
+ }
+ if ( num_axis == 0 || num_axis > T1_MAX_MM_AXIS )
{
FT_ERROR(( "parse_blend_axis_types: incorrect number of axes: %d\n",
num_axis ));
@@ -425,7 +431,7 @@
token->start++;
len = token->limit - token->start;
- if ( len <= 0 )
+ if ( len == 0 )
{
error = T1_Err_Invalid_File_Format;
goto Exit;
@@ -448,18 +454,24 @@
parse_blend_design_positions( T1_Face face,
T1_Loader loader )
{
- T1_TokenRec design_tokens[ T1_MAX_MM_DESIGNS ];
+ T1_TokenRec design_tokens[T1_MAX_MM_DESIGNS];
FT_Int num_designs;
FT_Int num_axis;
T1_Parser parser = &loader->parser;
- FT_Error error = 0;
+ FT_Error error = T1_Err_Ok;
PS_Blend blend;
- /* get the array of design tokens - compute number of designs */
- T1_ToTokenArray( parser, design_tokens, T1_MAX_MM_DESIGNS, &num_designs );
- if ( num_designs <= 0 || num_designs > T1_MAX_MM_DESIGNS )
+ /* get the array of design tokens -- compute number of designs */
+ T1_ToTokenArray( parser, design_tokens,
+ T1_MAX_MM_DESIGNS, &num_designs );
+ if ( num_designs < 0 )
+ {
+ error = T1_Err_Ignore;
+ goto Exit;
+ }
+ if ( num_designs == 0 || num_designs > T1_MAX_MM_DESIGNS )
{
FT_ERROR(( "parse_blend_design_positions:" ));
FT_ERROR(( " incorrect number of designs: %d\n",
@@ -471,23 +483,23 @@
{
FT_Byte* old_cursor = parser->root.cursor;
FT_Byte* old_limit = parser->root.limit;
- FT_UInt n;
+ FT_Int n;
blend = face->blend;
num_axis = 0; /* make compiler happy */
- for ( n = 0; n < (FT_UInt)num_designs; n++ )
+ for ( n = 0; n < num_designs; n++ )
{
- T1_TokenRec axis_tokens[ T1_MAX_MM_DESIGNS ];
+ T1_TokenRec axis_tokens[T1_MAX_MM_DESIGNS];
T1_Token token;
FT_Int axis, n_axis;
/* read axis/coordinates tokens */
token = design_tokens + n;
- parser->root.cursor = token->start - 1;
- parser->root.limit = token->limit + 1;
+ parser->root.cursor = token->start;
+ parser->root.limit = token->limit;
T1_ToTokenArray( parser, axis_tokens, T1_MAX_MM_AXIS, &n_axis );
if ( n == 0 )
@@ -505,7 +517,7 @@
goto Exit;
}
- /* now, read each axis token into the design position */
+ /* now read each axis token into the design position */
for ( axis = 0; axis < n_axis; axis++ )
{
T1_Token token2 = axis_tokens + axis;
@@ -530,7 +542,7 @@
parse_blend_design_map( T1_Face face,
T1_Loader loader )
{
- FT_Error error = 0;
+ FT_Error error = T1_Err_Ok;
T1_Parser parser = &loader->parser;
PS_Blend blend;
T1_TokenRec axis_tokens[T1_MAX_MM_AXIS];
@@ -540,14 +552,21 @@
FT_Memory memory = face->root.memory;
- T1_ToTokenArray( parser, axis_tokens, T1_MAX_MM_AXIS, &num_axis );
- if ( num_axis <= 0 || num_axis > T1_MAX_MM_AXIS )
+ T1_ToTokenArray( parser, axis_tokens,
+ T1_MAX_MM_AXIS, &num_axis );
+ if ( num_axis < 0 )
+ {
+ error = T1_Err_Ignore;
+ goto Exit;
+ }
+ if ( num_axis == 0 || num_axis > T1_MAX_MM_AXIS )
{
FT_ERROR(( "parse_blend_design_map: incorrect number of axes: %d\n",
num_axis ));
error = T1_Err_Invalid_File_Format;
goto Exit;
}
+
old_cursor = parser->root.cursor;
old_limit = parser->root.limit;
@@ -556,29 +575,22 @@
goto Exit;
blend = face->blend;
- /* now, read each axis design map */
+ /* now read each axis design map */
for ( n = 0; n < num_axis; n++ )
{
PS_DesignMap map = blend->design_map + n;
- T1_Token token;
+ T1_Token axis_token;
+ T1_TokenRec point_tokens[T1_MAX_MM_MAP_POINTS];
FT_Int p, num_points;
- token = axis_tokens + n;
- parser->root.cursor = token->start;
- parser->root.limit = token->limit;
+ axis_token = axis_tokens + n;
- /* count the number of map points */
- {
- FT_Byte* ptr = token->start;
- FT_Byte* limit = token->limit;
+ parser->root.cursor = axis_token->start;
+ parser->root.limit = axis_token->limit;
+ T1_ToTokenArray( parser, point_tokens,
+ T1_MAX_MM_MAP_POINTS, &num_points );
-
- num_points = 0;
- for ( ; ptr < limit; ptr++ )
- if ( ptr[0] == '[' )
- num_points++;
- }
if ( num_points <= 0 || num_points > T1_MAX_MM_MAP_POINTS )
{
FT_ERROR(( "parse_blend_design_map: incorrect table\n" ));
@@ -594,6 +606,15 @@
for ( p = 0; p < num_points; p++ )
{
+ T1_Token point_token;
+
+
+ point_token = point_tokens + p;
+
+ /* don't include delimiting brackets */
+ parser->root.cursor = point_token->start + 1;
+ parser->root.limit = point_token->limit - 1;
+
map->design_points[p] = T1_ToInt( parser );
map->blend_points [p] = T1_ToFixed( parser, 0 );
}
@@ -611,26 +632,46 @@
parse_weight_vector( T1_Face face,
T1_Loader loader )
{
- FT_Error error = 0;
+ T1_TokenRec design_tokens[T1_MAX_MM_DESIGNS];
+ FT_Int num_designs;
+ FT_Error error = T1_Err_Ok;
T1_Parser parser = &loader->parser;
PS_Blend blend = face->blend;
- T1_TokenRec master;
- FT_UInt n;
+ T1_Token token;
+ FT_Int n;
FT_Byte* old_cursor;
FT_Byte* old_limit;
- if ( !blend || blend->num_designs == 0 )
+ T1_ToTokenArray( parser, design_tokens,
+ T1_MAX_MM_DESIGNS, &num_designs );
+ if ( num_designs < 0 )
{
- FT_ERROR(( "parse_weight_vector: too early!\n" ));
+ error = T1_Err_Ignore;
+ goto Exit;
+ }
+ if ( num_designs == 0 || num_designs > T1_MAX_MM_DESIGNS )
+ {
+ FT_ERROR(( "parse_weight_vector:" ));
+ FT_ERROR(( " incorrect number of designs: %d\n",
+ num_designs ));
error = T1_Err_Invalid_File_Format;
goto Exit;
}
- T1_ToToken( parser, &master );
- if ( master.type != T1_TOKEN_TYPE_ARRAY )
+ if ( !blend || !blend->num_designs )
+ {
+ error = t1_allocate_blend( face, num_designs, 0 );
+ if ( error )
+ goto Exit;
+ blend = face->blend;
+ }
+ else if ( blend->num_designs != (FT_UInt)num_designs )
{
- FT_ERROR(( "parse_weight_vector: incorrect format!\n" ));
+ FT_ERROR(( "parse_weight_vector:"
+ " /BlendDesignPosition and /WeightVector have\n" ));
+ FT_ERROR(( " "
+ " different number of elements!\n" ));
error = T1_Err_Invalid_File_Format;
goto Exit;
}
@@ -638,11 +679,12 @@
old_cursor = parser->root.cursor;
old_limit = parser->root.limit;
- parser->root.cursor = master.start;
- parser->root.limit = master.limit;
-
- for ( n = 0; n < blend->num_designs; n++ )
+ for ( n = 0; n < num_designs; n++ )
{
+ token = design_tokens + n;
+ parser->root.cursor = token->start;
+ parser->root.limit = token->limit;
+
blend->default_weight_vector[n] =
blend->weight_vector[n] = T1_ToFixed( parser, 0 );
}
@@ -655,24 +697,9 @@
}
- /* the keyword `/shareddict' appears in some multiple master fonts */
- /* with a lot of Postscript garbage behind it (that's completely out */
- /* of spec!); we detect it and terminate the parsing */
- /* */
- static void
- parse_shared_dict( T1_Face face,
- T1_Loader loader )
- {
- T1_Parser parser = &loader->parser;
-
- FT_UNUSED( face );
+#endif /* T1_CONFIG_OPTION_NO_MM_SUPPORT */
- parser->root.cursor = parser->root.limit;
- parser->root.error = 0;
- }
-
-#endif /* T1_CONFIG_OPTION_NO_MM_SUPPORT */
/*************************************************************************/
@@ -683,19 +710,10 @@
/*************************************************************************/
/*************************************************************************/
-
- /*************************************************************************/
- /* */
- /* First of all, define the token field static variables. This is a set */
- /* of T1_FieldRec variables used later. */
- /* */
- /*************************************************************************/
-
-
static FT_Error
- t1_load_keyword( T1_Face face,
- T1_Loader loader,
- T1_Field field )
+ t1_load_keyword( T1_Face face,
+ T1_Loader loader,
+ const T1_Field field )
{
FT_Error error;
void* dummy_object;
@@ -774,33 +792,13 @@
static int
is_space( FT_Byte c )
{
- return ( c == ' ' || c == '\t' || c == '\r' || c == '\n' );
+ return ( c == ' ' || c == '\t' ||
+ c == '\r' || c == '\n' || c == '\f' ||
+ c == '\0' );
}
static int
- is_name_char( FT_Byte c )
- {
- /* Note: PostScript allows any non-delimiting, non-whitespace */
- /* in a name (PS Ref Manual, 3rd Ed, p31) */
- /* PostScript delimiters include (,),<,>,[,],{,},/ and % */
-
- return ( c != '(' &&
- c != ')' &&
- c != '<' &&
- c != '>' &&
- c != '[' &&
- c != ']' &&
- c != '{' &&
- c != '}' &&
- c != '/' &&
- c != '%' &&
- ! is_space( c )
- );
- }
-
-
- static int
read_binary_data( T1_Parser parser,
FT_Long* size,
FT_Byte** base )
@@ -809,20 +807,21 @@
FT_Byte* limit = parser->root.limit;
- /* the binary data has the following format */
- /* */
- /* `size' [white*] RD white ....... ND */
- /* */
+ /* the binary data has one of the following formats */
+ /* */
+ /* `size' [white*] RD white ....... ND */
+ /* `size' [white*] -| white ....... |- */
+ /* */
T1_Skip_Spaces( parser );
+
cur = parser->root.cursor;
- if ( cur < limit && (FT_Byte)( *cur - '0' ) < 10 )
+ if ( cur < limit && ft_isdigit( *cur ) )
{
*size = T1_ToInt( parser );
- T1_Skip_Spaces( parser );
- T1_Skip_Alpha ( parser ); /* `RD' or `-|' or something else */
+ T1_Skip_PS_Token( parser ); /* `RD' or `-|' or something else */
/* there is only one whitespace char after the */
/* `RD' or `-|' token */
@@ -838,74 +837,8 @@
}
- /* we will now define the routines used to handle */
- /* the `/Encoding', `/Subrs', and `/CharStrings' */
- /* dictionaries */
-
- static void
- parse_font_name( T1_Face face,
- T1_Loader loader )
- {
- T1_Parser parser = &loader->parser;
- FT_Error error;
- FT_Memory memory = parser->root.memory;
- FT_PtrDist len;
- FT_Byte* cur;
- FT_Byte* cur2;
- FT_Byte* limit;
-
-
- if ( face->type1.font_name )
- /* with synthetic fonts, it's possible we get here twice */
- return;
-
- T1_Skip_Spaces( parser );
-
- cur = parser->root.cursor;
- limit = parser->root.limit;
-
- if ( cur >= limit - 1 || *cur != '/' )
- return;
-
- cur++;
- cur2 = cur;
- while ( cur2 < limit && is_name_char( *cur2 ) )
- cur2++;
-
- len = cur2 - cur;
- if ( len > 0 )
- {
- if ( FT_ALLOC( face->type1.font_name, len + 1 ) )
- {
- parser->root.error = error;
- return;
- }
-
- FT_MEM_COPY( face->type1.font_name, cur, len );
- face->type1.font_name[len] = '\0';
- }
- parser->root.cursor = cur2;
- }
-
-
-#if 0
- static void
- parse_font_bbox( T1_Face face,
- T1_Loader loader )
- {
- T1_Parser parser = &loader->parser;
- FT_Fixed temp[4];
- FT_BBox* bbox = &face->type1.font_bbox;
-
-
- (void)T1_ToFixedArray( parser, 4, temp, 0 );
- bbox->xMin = FT_RoundFix( temp[0] );
- bbox->yMin = FT_RoundFix( temp[1] );
- bbox->xMax = FT_RoundFix( temp[2] );
- bbox->yMax = FT_RoundFix( temp[3] );
- }
-#endif
-
+ /* We now define the routines to handle the `/Encoding', `/Subrs', */
+ /* and `/CharStrings' dictionaries. */
static void
parse_font_matrix( T1_Face face,
@@ -919,13 +852,9 @@
FT_Fixed temp_scale;
- if ( matrix->xx || matrix->yx )
- /* with synthetic fonts, it's possible we get here twice */
- return;
-
(void)T1_ToFixedArray( parser, 6, temp, 3 );
- temp_scale = ABS( temp[3] );
+ temp_scale = FT_ABS( temp[3] );
/* Set Units per EM based on FontMatrix values. We set the value to */
/* 1000 / temp_scale, because temp_scale was already multiplied by */
@@ -951,8 +880,8 @@
matrix->yy = temp[3];
/* note that the offsets must be expressed in integer font units */
- offset->x = temp[4] >> 16;
- offset->y = temp[5] >> 16;
+ offset->x = temp[4] >> 16;
+ offset->y = temp[5] >> 16;
}
@@ -960,49 +889,52 @@
parse_encoding( T1_Face face,
T1_Loader loader )
{
- T1_Parser parser = &loader->parser;
- FT_Byte* cur = parser->root.cursor;
- FT_Byte* limit = parser->root.limit;
+ T1_Parser parser = &loader->parser;
+ FT_Byte* cur;
+ FT_Byte* limit = parser->root.limit;
- PSAux_Service psaux = (PSAux_Service)face->psaux;
+ PSAux_Service psaux = (PSAux_Service)face->psaux;
- /* skip whitespace */
- while ( is_space( *cur ) )
+ T1_Skip_Spaces( parser );
+ cur = parser->root.cursor;
+ if ( cur >= limit )
{
- cur++;
- if ( cur >= limit )
- {
- FT_ERROR(( "parse_encoding: out of bounds!\n" ));
- parser->root.error = T1_Err_Invalid_File_Format;
- return;
- }
+ FT_ERROR(( "parse_encoding: out of bounds!\n" ));
+ parser->root.error = T1_Err_Invalid_File_Format;
+ return;
}
- /* if we have a number, then the encoding is an array, */
- /* and we must load it now */
- if ( (FT_Byte)( *cur - '0' ) < 10 )
+ /* if we have a number or `[', the encoding is an array, */
+ /* and we must load it now */
+ if ( ft_isdigit( *cur ) || *cur == '[' )
{
- T1_Encoding encode = &face->type1.encoding;
+ T1_Encoding encode = &face->type1.encoding;
FT_Int count, n;
- PS_Table char_table = &loader->encoding_table;
- FT_Memory memory = parser->root.memory;
+ PS_Table char_table = &loader->encoding_table;
+ FT_Memory memory = parser->root.memory;
FT_Error error;
+ FT_Bool only_immediates = 0;
- if ( encode->char_index )
- /* with synthetic fonts, it's possible we get here twice */
- return;
+ /* read the number of entries in the encoding; should be 256 */
+ if ( *cur == '[' )
+ {
+ count = 256;
+ only_immediates = 1;
+ parser->root.cursor++;
+ }
+ else
+ count = (FT_Int)T1_ToInt( parser );
- /* read the number of entries in the encoding, should be 256 */
- count = (FT_Int)T1_ToInt( parser );
- if ( parser->root.error )
+ T1_Skip_Spaces( parser );
+ if ( parser->root.cursor >= limit )
return;
/* we use a T1_Table to store our charnames */
loader->num_chars = encode->num_chars = count;
- if ( FT_NEW_ARRAY( encode->char_index, count ) ||
- FT_NEW_ARRAY( encode->char_name, count ) ||
+ if ( FT_NEW_ARRAY( encode->char_index, count ) ||
+ FT_NEW_ARRAY( encode->char_name, count ) ||
FT_SET_ERROR( psaux->ps_table_funcs->init(
char_table, count, memory ) ) )
{
@@ -1019,8 +951,11 @@
T1_Add_Table( char_table, n, notdef, 8 );
}
- /* Now, we will need to read a record of the form */
- /* ... charcode /charname ... for each entry in our table */
+ /* Now we need to read records of the form */
+ /* */
+ /* ... charcode /charname ... */
+ /* */
+ /* for each entry in our table. */
/* */
/* We simply look for a number followed by an immediate */
/* name. Note that this ignores correctly the sequence */
@@ -1030,75 +965,85 @@
/* */
/* used to clean the encoding array before anything else. */
/* */
- /* We stop when we encounter a `def'. */
+ /* Alternatively, if the array is directly given as */
+ /* */
+ /* /Encoding [ ... ] */
+ /* */
+ /* we only read immediates. */
- cur = parser->root.cursor;
- limit = parser->root.limit;
- n = 0;
+ n = 0;
+ T1_Skip_Spaces( parser );
- for ( ; cur < limit; )
+ while ( parser->root.cursor < limit )
{
- FT_Byte c;
-
+ cur = parser->root.cursor;
- c = *cur;
-
- /* we stop when we encounter a `def' */
- if ( c == 'd' && cur + 3 < limit )
+ /* we stop when we encounter a `def' or `]' */
+ if ( *cur == 'd' && cur + 3 < limit )
{
- if ( cur[1] == 'e' &&
- cur[2] == 'f' &&
- is_space( cur[-1] ) &&
- is_space( cur[3] ) )
+ if ( cur[1] == 'e' &&
+ cur[2] == 'f' &&
+ is_space( cur[3] ) )
{
FT_TRACE6(( "encoding end\n" ));
+ cur += 3;
break;
}
}
+ if ( *cur == ']' )
+ {
+ FT_TRACE6(( "encoding end\n" ));
+ cur++;
+ break;
+ }
- /* otherwise, we must find a number before anything else */
- if ( (FT_Byte)( c - '0' ) < 10 )
+ /* check whether we've found an entry */
+ if ( ft_isdigit( *cur ) || only_immediates )
{
FT_Int charcode;
- parser->root.cursor = cur;
- charcode = (FT_Int)T1_ToInt( parser );
- cur = parser->root.cursor;
+ if ( only_immediates )
+ charcode = n;
+ else
+ {
+ charcode = (FT_Int)T1_ToInt( parser );
+ T1_Skip_Spaces( parser );
+ }
- /* skip whitespace */
- while ( cur < limit && is_space( *cur ) )
- cur++;
+ cur = parser->root.cursor;
- if ( cur < limit && *cur == '/' )
+ if ( *cur == '/' && cur + 2 < limit && n < count )
{
- /* bingo, we have an immediate name -- it must be a */
- /* character name */
- FT_Byte* cur2 = cur + 1;
FT_PtrDist len;
- while ( cur2 < limit && is_name_char( *cur2 ) )
- cur2++;
+ cur++;
- len = cur2 - cur - 1;
+ parser->root.cursor = cur;
+ T1_Skip_PS_Token( parser );
+
+ len = parser->root.cursor - cur;
parser->root.error = T1_Add_Table( char_table, charcode,
- cur + 1, len + 1 );
- char_table->elements[charcode][len] = '\0';
+ cur, len + 1 );
if ( parser->root.error )
return;
+ char_table->elements[charcode][len] = '\0';
- cur = cur2;
+ n++;
}
}
else
- cur++;
+ T1_Skip_PS_Token( parser );
+
+ T1_Skip_Spaces( parser );
}
face->type1.encoding_type = T1_ENCODING_TYPE_ARRAY;
parser->root.cursor = cur;
}
+
/* Otherwise, we should have either `StandardEncoding', */
/* `ExpertEncoding', or `ISOLatin1Encoding' */
else
@@ -1116,10 +1061,7 @@
face->type1.encoding_type = T1_ENCODING_TYPE_ISOLATIN1;
else
- {
- FT_ERROR(( "parse_encoding: invalid token!\n" ));
- parser->root.error = T1_Err_Invalid_File_Format;
- }
+ parser->root.error = T1_Err_Ignore;
}
}
@@ -1128,46 +1070,49 @@
parse_subrs( T1_Face face,
T1_Loader loader )
{
- T1_Parser parser = &loader->parser;
- PS_Table table = &loader->subrs;
- FT_Memory memory = parser->root.memory;
- FT_Error error;
- FT_Int n;
+ T1_Parser parser = &loader->parser;
+ PS_Table table = &loader->subrs;
+ FT_Memory memory = parser->root.memory;
+ FT_Error error;
+ FT_Int n, num_subrs;
PSAux_Service psaux = (PSAux_Service)face->psaux;
- if ( loader->num_subrs )
- /* with synthetic fonts, it's possible we get here twice */
- return;
+ T1_Skip_Spaces( parser );
- if ( parser->root.cursor + 2 > parser->root.limit &&
- parser->root.cursor[0] == '[' &&
- parser->root.cursor[1] == ']' )
+ /* test for empty array */
+ if ( parser->root.cursor < parser->root.limit &&
+ *parser->root.cursor == '[' )
{
- /* empty array */
+ T1_Skip_PS_Token( parser );
+ T1_Skip_Spaces ( parser );
+ if ( parser->root.cursor >= parser->root.limit ||
+ *parser->root.cursor != ']' )
+ parser->root.error = T1_Err_Invalid_File_Format;
return;
}
- loader->num_subrs = (FT_Int)T1_ToInt( parser );
- if ( parser->root.error )
- return;
+ num_subrs = (FT_Int)T1_ToInt( parser );
/* position the parser right before the `dup' of the first subr */
- T1_Skip_Spaces( parser );
- T1_Skip_Alpha( parser ); /* `array' */
- T1_Skip_Spaces( parser );
+ T1_Skip_PS_Token( parser ); /* `array' */
+ T1_Skip_Spaces ( parser );
- /* initialize subrs array */
- error = psaux->ps_table_funcs->init( table, loader->num_subrs, memory );
- if ( error )
- goto Fail;
+ /* initialize subrs array -- with synthetic fonts it is possible */
+ /* we get here twice */
+ if ( !loader->num_subrs )
+ {
+ error = psaux->ps_table_funcs->init( table, num_subrs, memory );
+ if ( error )
+ goto Fail;
+ }
/* the format is simple: */
/* */
/* `index' + binary data */
/* */
- for ( n = 0; n < loader->num_subrs; n++ )
+ for ( n = 0; n < num_subrs; n++ )
{
FT_Long idx, size;
FT_Byte* base;
@@ -1178,6 +1123,8 @@
if ( ft_strncmp( (char*)parser->root.cursor, "dup", 3 ) != 0 )
break;
+ T1_Skip_PS_Token( parser ); /* `dup' */
+
idx = T1_ToInt( parser );
if ( !read_binary_data( parser, &size, &base ) )
@@ -1187,16 +1134,19 @@
/* (bound to `noaccess put') or by two separate tokens: */
/* `noaccess' & `put'. We position the parser right */
/* before the next `dup', if any. */
- T1_Skip_Spaces( parser );
- T1_Skip_Alpha( parser ); /* `NP' or `I' or `noaccess' */
- T1_Skip_Spaces( parser );
+ T1_Skip_PS_Token( parser ); /* `NP' or `|' or `noaccess' */
+ T1_Skip_Spaces ( parser );
if ( ft_strncmp( (char*)parser->root.cursor, "put", 3 ) == 0 )
{
- T1_Skip_Alpha( parser ); /* skip `put' */
- T1_Skip_Spaces( parser );
+ T1_Skip_PS_Token( parser ); /* skip `put' */
+ T1_Skip_Spaces ( parser );
}
+ /* with synthetic fonts it is possible we get here twice */
+ if ( loader->num_subrs )
+ continue;
+
/* some fonts use a value of -1 for lenIV to indicate that */
/* the charstrings are unencoded */
/* */
@@ -1213,15 +1163,19 @@
FT_MEM_COPY( temp, base, size );
psaux->t1_decrypt( temp, size, 4330 );
size -= face->type1.private_dict.lenIV;
- error = T1_Add_Table( table, idx,
+ error = T1_Add_Table( table, (FT_Int)idx,
temp + face->type1.private_dict.lenIV, size );
FT_FREE( temp );
}
else
- error = T1_Add_Table( table, idx, base, size );
+ error = T1_Add_Table( table, (FT_Int)idx, base, size );
if ( error )
goto Fail;
}
+
+ if ( !loader->num_subrs )
+ loader->num_subrs = num_subrs;
+
return;
Fail:
@@ -1229,6 +1183,9 @@
}
+#define TABLE_EXTEND 5
+
+
static void
parse_charstrings( T1_Face face,
T1_Loader loader )
@@ -1244,41 +1201,43 @@
FT_Byte* cur;
FT_Byte* limit = parser->root.limit;
- FT_Int n;
+ FT_Int n, num_glyphs;
FT_UInt notdef_index = 0;
FT_Byte notdef_found = 0;
- if ( loader->num_glyphs )
- /* with synthetic fonts, it's possible we get here twice */
+ num_glyphs = (FT_Int)T1_ToInt( parser );
+ /* some fonts like Optima-Oblique not only define the /CharStrings */
+ /* array but access it also */
+ if ( num_glyphs == 0 || parser->root.error )
return;
- loader->num_glyphs = (FT_Int)T1_ToInt( parser );
- if ( parser->root.error )
- return;
-
- /* initialize tables (leaving room for addition of .notdef, */
- /* if necessary). */
-
- error = psaux->ps_table_funcs->init( code_table,
- loader->num_glyphs + 1,
- memory );
- if ( error )
- goto Fail;
+ /* initialize tables, leaving space for addition of .notdef, */
+ /* if necessary, and a few other glyphs to handle buggy */
+ /* fonts which have more glyphs than specified. */
- error = psaux->ps_table_funcs->init( name_table,
- loader->num_glyphs + 1,
- memory );
- if ( error )
- goto Fail;
+ /* for some non-standard fonts like `Optima' which provides */
+ /* different outlines depending on the resolution it is */
+ /* possible to get here twice */
+ if ( !loader->num_glyphs )
+ {
+ error = psaux->ps_table_funcs->init(
+ code_table, num_glyphs + 1 + TABLE_EXTEND, memory );
+ if ( error )
+ goto Fail;
- /* Initialize table for swapping index notdef_index and */
- /* index 0 names and codes (if necessary). */
+ error = psaux->ps_table_funcs->init(
+ name_table, num_glyphs + 1 + TABLE_EXTEND, memory );
+ if ( error )
+ goto Fail;
- error = psaux->ps_table_funcs->init( swap_table, 4, memory );
+ /* Initialize table for swapping index notdef_index and */
+ /* index 0 names and codes (if necessary). */
- if ( error )
- goto Fail;
+ error = psaux->ps_table_funcs->init( swap_table, 4, memory );
+ if ( error )
+ goto Fail;
+ }
n = 0;
@@ -1288,11 +1247,9 @@
FT_Byte* base;
- /* the format is simple: */
- /* `/glyphname' + binary data */
- /* */
- /* note that we stop when we find a `def' */
- /* */
+ /* the format is simple: */
+ /* `/glyphname' + binary data */
+
T1_Skip_Spaces( parser );
cur = parser->root.cursor;
@@ -1300,50 +1257,62 @@
break;
/* we stop when we find a `def' or `end' keyword */
- if ( *cur == 'd' &&
- cur + 3 < limit &&
- cur[1] == 'e' &&
- cur[2] == 'f' )
- break;
+ if ( cur + 3 < limit && is_space( cur[3] ) )
+ {
+ if ( cur[0] == 'd' &&
+ cur[1] == 'e' &&
+ cur[2] == 'f' )
+ break;
- if ( *cur == 'e' &&
- cur + 3 < limit &&
- cur[1] == 'n' &&
- cur[2] == 'd' )
- break;
+ if ( cur[0] == 'e' &&
+ cur[1] == 'n' &&
+ cur[2] == 'd' )
+ break;
+ }
- if ( *cur != '/' )
- T1_Skip_Alpha( parser );
- else
+ T1_Skip_PS_Token( parser );
+
+ if ( *cur == '/' )
{
- FT_Byte* cur2 = cur + 1;
FT_PtrDist len;
- while ( cur2 < limit && is_name_char( *cur2 ) )
- cur2++;
- len = cur2 - cur - 1;
+ if ( cur + 1 >= limit )
+ {
+ error = T1_Err_Invalid_File_Format;
+ goto Fail;
+ }
+
+ cur++; /* skip `/' */
+ len = parser->root.cursor - cur;
+
+ if ( !read_binary_data( parser, &size, &base ) )
+ return;
+
+ /* for some non-standard fonts like `Optima' which provides */
+ /* different outlines depending on the resolution it is */
+ /* possible to get here twice */
+ if ( loader->num_glyphs )
+ continue;
- error = T1_Add_Table( name_table, n, cur + 1, len + 1 );
+ error = T1_Add_Table( name_table, n, cur, len + 1 );
if ( error )
goto Fail;
/* add a trailing zero to the name table */
name_table->elements[n][len] = '\0';
- /* record index of /.notdef */
- if ( ft_strcmp( (const char*)".notdef",
+ /* record index of /.notdef */
+ if ( *cur == '.' &&
+ ft_strcmp( ".notdef",
(const char*)(name_table->elements[n]) ) == 0 )
{
notdef_index = n;
notdef_found = 1;
}
- parser->root.cursor = cur2;
- if ( !read_binary_data( parser, &size, &base ) )
- return;
-
- if ( face->type1.private_dict.lenIV >= 0 )
+ if ( face->type1.private_dict.lenIV >= 0 &&
+ n < num_glyphs + TABLE_EXTEND )
{
FT_Byte* temp;
@@ -1364,23 +1333,24 @@
goto Fail;
n++;
- if ( n >= loader->num_glyphs )
- break;
}
}
- loader->num_glyphs = n;
+ if ( loader->num_glyphs )
+ return;
+ else
+ loader->num_glyphs = n;
- /* if /.notdef is found but does not occupy index 0, do our magic. */
+ /* if /.notdef is found but does not occupy index 0, do our magic. */
if ( ft_strcmp( (const char*)".notdef",
(const char*)name_table->elements[0] ) &&
notdef_found )
{
- /* Swap glyph in index 0 with /.notdef glyph. First, add index 0 */
- /* name and code entries to swap_table. Then place notdef_index name */
- /* and code entries into swap_table. Then swap name and code */
- /* entries at indices notdef_index and 0 using values stored in */
- /* swap_table. */
+ /* Swap glyph in index 0 with /.notdef glyph. First, add index 0 */
+ /* name and code entries to swap_table. Then place notdef_index */
+ /* name and code entries into swap_table. Then swap name and code */
+ /* entries at indices notdef_index and 0 using values stored in */
+ /* swap_table. */
/* Index 0 name */
error = T1_Add_Table( swap_table, 0,
@@ -1442,7 +1412,7 @@
/* We take index 0 and add it to the end of the table(s) */
/* and add our own /.notdef glyph to index 0. */
- /* 0 333 hsbw endchar */
+ /* 0 333 hsbw endchar */
FT_Byte notdef_glyph[] = {0x8B, 0xF7, 0xE1, 0x0D, 0x0E};
char* notdef_name = (char *)".notdef";
@@ -1491,6 +1461,14 @@
}
+ /*************************************************************************/
+ /* */
+ /* Define the token field static variables. This is a set of */
+ /* T1_FieldRec variables. */
+ /* */
+ /*************************************************************************/
+
+
static
const T1_FieldRec t1_keywords[] =
{
@@ -1498,10 +1476,6 @@
#include "t1tokens.h"
/* now add the special functions... */
- T1_FIELD_CALLBACK( "FontName", parse_font_name )
-#if 0
- T1_FIELD_CALLBACK( "FontBBox", parse_font_bbox )
-#endif
T1_FIELD_CALLBACK( "FontMatrix", parse_font_matrix )
T1_FIELD_CALLBACK( "Encoding", parse_encoding )
T1_FIELD_CALLBACK( "Subrs", parse_subrs )
@@ -1512,126 +1486,208 @@
T1_FIELD_CALLBACK( "BlendDesignMap", parse_blend_design_map )
T1_FIELD_CALLBACK( "BlendAxisTypes", parse_blend_axis_types )
T1_FIELD_CALLBACK( "WeightVector", parse_weight_vector )
- T1_FIELD_CALLBACK( "shareddict", parse_shared_dict )
#endif
{ 0, T1_FIELD_LOCATION_CID_INFO, T1_FIELD_TYPE_NONE, 0, 0, 0, 0, 0 }
};
+#define T1_FIELD_COUNT \
+ ( sizeof ( t1_keywords ) / sizeof ( t1_keywords[0] ) )
+
+
static FT_Error
parse_dict( T1_Face face,
T1_Loader loader,
FT_Byte* base,
- FT_Long size )
+ FT_Long size,
+ FT_Byte* keyword_flags )
{
T1_Parser parser = &loader->parser;
+ FT_Byte *limit, *start_binary = NULL;
+ FT_Bool have_integer = 0;
parser->root.cursor = base;
parser->root.limit = base + size;
- parser->root.error = 0;
+ parser->root.error = T1_Err_Ok;
+
+ limit = parser->root.limit;
+
+ T1_Skip_Spaces( parser );
+ while ( parser->root.cursor < limit )
{
- FT_Byte* cur = base;
- FT_Byte* limit = cur + size;
+ FT_Byte* cur;
- for ( ; cur < limit; cur++ )
+ cur = parser->root.cursor;
+
+ /* look for `FontDirectory' which causes problems for some fonts */
+ if ( *cur == 'F' && cur + 25 < limit &&
+ ft_strncmp( (char*)cur, "FontDirectory", 13 ) == 0 )
{
- /* look for `FontDirectory', which causes problems on some fonts */
- if ( *cur == 'F' && cur + 25 < limit &&
- ft_strncmp( (char*)cur, "FontDirectory", 13 ) == 0 )
- {
- FT_Byte* cur2;
+ FT_Byte* cur2;
- /* skip the `FontDirectory' keyword */
- cur += 13;
- cur2 = cur;
+ /* skip the `FontDirectory' keyword */
+ T1_Skip_PS_Token( parser );
+ T1_Skip_Spaces ( parser );
+ cur = cur2 = parser->root.cursor;
- /* lookup the `known' keyword */
- while ( cur < limit && *cur != 'k' &&
- ft_strncmp( (char*)cur, "known", 5 ) )
- cur++;
+ /* look up the `known' keyword */
+ while ( cur < limit )
+ {
+ if ( *cur == 'k' && cur + 5 < limit &&
+ ft_strncmp( (char*)cur, "known", 5 ) == 0 )
+ break;
- if ( cur < limit )
- {
- T1_TokenRec token;
+ T1_Skip_PS_Token( parser );
+ T1_Skip_Spaces ( parser );
+ cur = parser->root.cursor;
+ }
+ if ( cur < limit )
+ {
+ T1_TokenRec token;
- /* skip the `known' keyword and the token following it */
- cur += 5;
- loader->parser.root.cursor = cur;
- T1_ToToken( &loader->parser, &token );
- /* if the last token was an array, skip it! */
- if ( token.type == T1_TOKEN_TYPE_ARRAY )
- cur2 = parser->root.cursor;
- }
- cur = cur2;
+ /* skip the `known' keyword and the token following it */
+ T1_Skip_PS_Token( parser );
+ T1_ToToken( parser, &token );
+
+ /* if the last token was an array, skip it! */
+ if ( token.type == T1_TOKEN_TYPE_ARRAY )
+ cur2 = parser->root.cursor;
}
- /* look for immediates */
- else if ( *cur == '/' && cur + 2 < limit )
- {
- FT_Byte* cur2;
- FT_PtrDist len;
+ parser->root.cursor = cur2;
+ have_integer = 0;
+ }
+ /* look for `eexec' */
+ else if ( *cur == 'e' && cur + 5 < limit &&
+ ft_strncmp( (char*)cur, "eexec", 5 ) == 0 )
+ break;
- cur++;
- cur2 = cur;
- while ( cur2 < limit && is_name_char( *cur2 ) )
- cur2++;
+ /* look for `closefile' which ends the eexec section */
+ else if ( *cur == 'c' && cur + 9 < limit &&
+ ft_strncmp( (char*)cur, "closefile", 9 ) == 0 )
+ break;
- len = cur2 - cur;
- if ( len > 0 && len < 22 )
- {
- {
- /* now, compare the immediate name to the keyword table */
- T1_Field keyword = (T1_Field)t1_keywords;
+ /* check whether we have an integer */
+ else if ( ft_isdigit( *cur ) )
+ {
+ start_binary = cur;
+ T1_Skip_PS_Token( parser );
+ have_integer = 1;
+ }
+ /* in valid Type 1 fonts we don't see `RD' or `-|' directly */
+ /* since those tokens are handled by parse_subrs and */
+ /* parse_charstrings */
+ else if ( *cur == 'R' && cur + 6 < limit && *(cur + 1) == 'D' &&
+ have_integer )
+ {
+ FT_Long s;
+ FT_Byte* b;
- for (;;)
- {
- FT_Byte* name;
+ parser->root.cursor = start_binary;
+ if ( !read_binary_data( parser, &s, &b ) )
+ return T1_Err_Invalid_File_Format;
+ have_integer = 0;
+ }
- name = (FT_Byte*)keyword->ident;
- if ( !name )
- break;
+ else if ( *cur == '-' && cur + 6 < limit && *(cur + 1) == '|' &&
+ have_integer )
+ {
+ FT_Long s;
+ FT_Byte* b;
+
+
+ parser->root.cursor = start_binary;
+ if ( !read_binary_data( parser, &s, &b ) )
+ return T1_Err_Invalid_File_Format;
+ have_integer = 0;
+ }
+
+ /* look for immediates */
+ else if ( *cur == '/' && cur + 2 < limit )
+ {
+ FT_PtrDist len;
+
+
+ cur++;
+
+ parser->root.cursor = cur;
+ T1_Skip_PS_Token( parser );
+
+ len = parser->root.cursor - cur;
+
+ if ( len > 0 && len < 22 && parser->root.cursor < limit )
+ {
+ /* now compare the immediate name to the keyword table */
+ T1_Field keyword = (T1_Field)t1_keywords;
+ FT_Byte* keyword_flag = keyword_flags;
+
+
+ for (;;)
+ {
+ FT_Byte* name;
+
+
+ name = (FT_Byte*)keyword->ident;
+ if ( !name )
+ break;
- if ( cur[0] == name[0] &&
- len == ft_strlen( (const char*)name ) )
+ if ( cur[0] == name[0] &&
+ len == ft_strlen( (const char *)name ) &&
+ ft_memcmp( cur, name, len ) == 0 )
+ {
+ /* We found it -- run the parsing callback! */
+ /* We only record the first instance of any */
+ /* field to deal adequately with synthetic */
+ /* fonts; /Subrs and /CharStrings are */
+ /* handled specially. */
+ if ( keyword_flag[0] == 0 ||
+ ft_strcmp( (const char*)name, "Subrs" ) == 0 ||
+ ft_strcmp( (const char*)name, "CharStrings") == 0 )
+ {
+ parser->root.error = t1_load_keyword( face,
+ loader,
+ keyword );
+ if ( parser->root.error == T1_Err_Ok )
+ keyword_flag[0] = 1;
+ else
{
- FT_PtrDist n;
-
-
- for ( n = 1; n < len; n++ )
- if ( cur[n] != name[n] )
- break;
-
- if ( n >= len )
- {
- /* we found it -- run the parsing callback! */
- parser->root.cursor = cur2;
- T1_Skip_Spaces( parser );
- parser->root.error = t1_load_keyword( face,
- loader,
- keyword );
- if ( parser->root.error )
- return parser->root.error;
-
- cur = parser->root.cursor;
- break;
- }
+ if ( FT_ERROR_BASE( parser->root.error ) == FT_Err_Ignore )
+ parser->root.error = T1_Err_Ok;
+ else
+ return parser->root.error;
}
- keyword++;
}
+ break;
}
+
+ keyword++;
+ keyword_flag++;
}
}
+
+ have_integer = 0;
}
+ else
+ {
+ T1_Skip_PS_Token( parser );
+ if ( parser->root.error )
+ goto Exit;
+ have_integer = 0;
+ }
+
+ T1_Skip_Spaces( parser );
}
+
+ Exit:
return parser->root.error;
}
@@ -1680,18 +1736,21 @@
T1_LoaderRec loader;
T1_Parser parser;
T1_Font type1 = &face->type1;
+ PS_Private priv = &type1->private_dict;
FT_Error error;
+ FT_Byte keyword_flags[T1_FIELD_COUNT];
PSAux_Service psaux = (PSAux_Service)face->psaux;
t1_init_loader( &loader, face );
- /* default lenIV */
- type1->private_dict.lenIV = 4;
-
- /* default blue fuzz, we put it there since 0 is a valid value */
- type1->private_dict.blue_fuzz = 1;
+ /* default values */
+ priv->blue_shift = 7;
+ priv->blue_fuzz = 1;
+ priv->lenIV = 4;
+ priv->expansion_factor = (FT_Fixed)( 0.06 * 0x10000L );
+ priv->blue_scale = (FT_Fixed)( 0.039625 * 0x10000L * 1000 );
parser = &loader.parser;
error = T1_New_Parser( parser,
@@ -1701,7 +1760,16 @@
if ( error )
goto Exit;
- error = parse_dict( face, &loader, parser->base_dict, parser->base_len );
+ {
+ FT_UInt n;
+
+
+ for ( n = 0; n < T1_FIELD_COUNT; n++ )
+ keyword_flags[n] = 0;
+ }
+
+ error = parse_dict( face, &loader, parser->base_dict, parser->base_len,
+ keyword_flags );
if ( error )
goto Exit;
@@ -1710,10 +1778,35 @@
goto Exit;
error = parse_dict( face, &loader, parser->private_dict,
- parser->private_len );
+ parser->private_len,
+ keyword_flags );
if ( error )
goto Exit;
+#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
+
+ /* the following can happen for MM instances; we then treat the */
+ /* font as a normal PS font */
+ if ( face->blend &&
+ ( !face->blend->num_designs || !face->blend->num_axis ) )
+ T1_Done_Blend( face );
+
+ /* another safety check */
+ if ( face->blend )
+ {
+ FT_UInt i;
+
+
+ for ( i = 0; i < face->blend->num_axis; i++ )
+ if ( !face->blend->design_map[i].num_points )
+ {
+ T1_Done_Blend( face );
+ break;
+ }
+ }
+
+#endif /* T1_CONFIG_OPTION_NO_MM_SUPPORT */
+
/* now, propagate the subrs, charstrings, and glyphnames tables */
/* to the Type1 data */
type1->num_glyphs = loader.num_glyphs;
@@ -1732,7 +1825,7 @@
#endif
if ( !loader.charstrings.init )
{
- FT_ERROR(( "T1_Open_Face: no charstrings array in face!\n" ));
+ FT_ERROR(( "T1_Open_Face: no `/CharStrings' array in face!\n" ));
error = T1_Err_Invalid_File_Format;
}
@@ -1786,13 +1879,27 @@
if ( ft_strcmp( (const char*)".notdef",
(const char*)glyph_name ) != 0 )
{
- if ( charcode < min_char ) min_char = charcode;
- if ( charcode > max_char ) max_char = charcode;
+ if ( charcode < min_char )
+ min_char = charcode;
+ if ( charcode > max_char )
+ max_char = charcode;
}
break;
}
}
}
+
+ /*
+ * Yes, this happens: Certain PDF-embedded fonts have only a
+ * `.notdef' glyph defined!
+ */
+
+ if ( min_char > max_char )
+ {
+ min_char = 0;
+ max_char = loader.encoding_table.max_elems;
+ }
+
type1->encoding.code_first = min_char;
type1->encoding.code_last = max_char;
type1->encoding.num_chars = loader.num_chars;
diff --git a/extras/freetype2/src/type1/t1objs.c b/extras/freetype2/src/type1/t1objs.c
index 59e7cb686..a832ee000 100644
--- a/extras/freetype2/src/type1/t1objs.c
+++ b/extras/freetype2/src/type1/t1objs.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 objects manager (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -19,6 +19,7 @@
#include <ft2build.h>
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
+#include FT_TRUETYPE_IDS_H
#include "t1gload.h"
#include "t1load.h"
@@ -29,7 +30,7 @@
#include "t1afm.h"
#endif
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include FT_INTERNAL_POSTSCRIPT_AUX_H
@@ -118,9 +119,9 @@
if ( funcs )
error = funcs->set_scale( (PSH_Globals)size->root.internal,
- size->root.metrics.x_scale,
- size->root.metrics.y_scale,
- 0, 0 );
+ size->root.metrics.x_scale,
+ size->root.metrics.y_scale,
+ 0, 0 );
return error;
}
@@ -275,10 +276,11 @@
FT_Int num_params,
FT_Parameter* params )
{
- FT_Error error;
- PSNames_Service psnames;
- PSAux_Service psaux;
- PSHinter_Service pshinter;
+ FT_Error error;
+ FT_Service_PsCMaps psnames;
+ PSAux_Service psaux;
+ T1_Font type1 = &face->type1;
+ PS_FontInfo info = &type1->font_info;
FT_UNUSED( num_params );
FT_UNUSED( params );
@@ -288,9 +290,8 @@
face->root.num_faces = 1;
- face->psnames = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ),
- "psnames" );
- psnames = (PSNames_Service)face->psnames;
+ FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
+ face->psnames = psnames;
face->psaux = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ),
"psaux" );
@@ -298,9 +299,8 @@
face->pshinter = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ),
"pshinter" );
- pshinter = (PSHinter_Service)face->pshinter;
- /* open the tokenizer, this will also check the font format */
+ /* open the tokenizer; this will also check the font format */
error = T1_Open_Face( face );
if ( error )
goto Exit;
@@ -317,22 +317,23 @@
goto Exit;
}
- /* Now, load the font program into the face object */
+ /* now load the font program into the face object */
- /* Init the face object fields */
- /* Now set up root face fields */
+ /* initialize the face object fields */
+
+ /* set up root face fields */
{
FT_Face root = (FT_Face)&face->root;
- root->num_glyphs = face->type1.num_glyphs;
+ root->num_glyphs = type1->num_glyphs;
root->face_index = face_index;
- root->face_flags = FT_FACE_FLAG_SCALABLE;
+ root->face_flags = FT_FACE_FLAG_SCALABLE;
root->face_flags |= FT_FACE_FLAG_HORIZONTAL;
root->face_flags |= FT_FACE_FLAG_GLYPH_NAMES;
- if ( face->type1.font_info.is_fixed_pitch )
+ if ( info->is_fixed_pitch )
root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
if ( face->blend )
@@ -342,45 +343,55 @@
/* get style name -- be careful, some broken fonts only */
/* have a `/FontName' dictionary entry! */
- root->family_name = face->type1.font_info.family_name;
+ root->family_name = info->family_name;
+ /* assume "Regular" style if we don't know better */
+ root->style_name = (char *)"Regular";
if ( root->family_name )
{
- char* full = face->type1.font_info.full_name;
+ char* full = info->full_name;
char* family = root->family_name;
if ( full )
{
- while ( *family && *full == *family )
+ while ( *full )
{
- family++;
- full++;
+ if ( *full == *family )
+ {
+ family++;
+ full++;
+ }
+ else
+ {
+ if ( *full == ' ' || *full == '-' )
+ full++;
+ else if ( *family == ' ' || *family == '-' )
+ family++;
+ else
+ {
+ if ( !*family )
+ root->style_name = full;
+ break;
+ }
+ }
}
-
- root->style_name = ( *full == ' ' ? full + 1
- : (char *)"Regular" );
}
- else
- root->style_name = (char *)"Regular";
}
else
{
/* do we have a `/FontName'? */
- if ( face->type1.font_name )
- {
- root->family_name = face->type1.font_name;
- root->style_name = (char *)"Regular";
- }
+ if ( type1->font_name )
+ root->family_name = type1->font_name;
}
/* compute style flags */
root->style_flags = 0;
- if ( face->type1.font_info.italic_angle )
+ if ( info->italic_angle )
root->style_flags |= FT_STYLE_FLAG_ITALIC;
- if ( face->type1.font_info.weight )
+ if ( info->weight )
{
- if ( !ft_strcmp( face->type1.font_info.weight, "Bold" ) ||
- !ft_strcmp( face->type1.font_info.weight, "Black" ) )
+ if ( !ft_strcmp( info->weight, "Bold" ) ||
+ !ft_strcmp( info->weight, "Black" ) )
root->style_flags |= FT_STYLE_FLAG_BOLD;
}
@@ -388,10 +399,10 @@
root->num_fixed_sizes = 0;
root->available_sizes = 0;
- root->bbox.xMin = face->type1.font_bbox.xMin >> 16;
- root->bbox.yMin = face->type1.font_bbox.yMin >> 16;
- root->bbox.xMax = ( face->type1.font_bbox.xMax + 0xFFFFU ) >> 16;
- root->bbox.yMax = ( face->type1.font_bbox.yMax + 0xFFFFU ) >> 16;
+ root->bbox.xMin = type1->font_bbox.xMin >> 16;
+ root->bbox.yMin = type1->font_bbox.yMin >> 16;
+ root->bbox.xMax = ( type1->font_bbox.xMax + 0xFFFFU ) >> 16;
+ root->bbox.yMax = ( type1->font_bbox.yMax + 0xFFFFU ) >> 16;
/* Set units_per_EM if we didn't set it in parse_font_matrix. */
if ( !root->units_per_EM )
@@ -400,13 +411,13 @@
root->ascender = (FT_Short)( root->bbox.yMax );
root->descender = (FT_Short)( root->bbox.yMin );
root->height = (FT_Short)(
- ( ( root->ascender - root->descender ) * 12 ) / 10 );
+ ( ( root->ascender - root->descender ) * 12 ) / 10 );
/* now compute the maximum advance width */
root->max_advance_width =
(FT_Short)( root->bbox.xMax );
{
- FT_Int max_advance;
+ FT_Pos max_advance;
error = T1_Compute_Max_Advance( face, &max_advance );
@@ -420,8 +431,8 @@
root->max_advance_height = root->height;
- root->underline_position = face->type1.font_info.underline_position;
- root->underline_thickness = face->type1.font_info.underline_thickness;
+ root->underline_position = (FT_Short)info->underline_position;
+ root->underline_thickness = (FT_Short)info->underline_thickness;
root->internal->max_points = 0;
root->internal->max_contours = 0;
@@ -451,29 +462,29 @@
charmap.platform_id = 7;
clazz = NULL;
- switch ( face->type1.encoding_type )
+ switch ( type1->encoding_type )
{
case T1_ENCODING_TYPE_STANDARD:
charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
- charmap.encoding_id = 0;
+ charmap.encoding_id = TT_ADOBE_ID_STANDARD;
clazz = cmap_classes->standard;
break;
case T1_ENCODING_TYPE_EXPERT:
charmap.encoding = FT_ENCODING_ADOBE_EXPERT;
- charmap.encoding_id = 1;
+ charmap.encoding_id = TT_ADOBE_ID_EXPERT;
clazz = cmap_classes->expert;
break;
case T1_ENCODING_TYPE_ARRAY:
charmap.encoding = FT_ENCODING_ADOBE_CUSTOM;
- charmap.encoding_id = 2;
+ charmap.encoding_id = TT_ADOBE_ID_CUSTOM;
clazz = cmap_classes->custom;
break;
case T1_ENCODING_TYPE_ISOLATIN1:
charmap.encoding = FT_ENCODING_ADOBE_LATIN_1;
- charmap.encoding_id = 3;
+ charmap.encoding_id = TT_ADOBE_ID_LATIN_1;
clazz = cmap_classes->unicode;
break;
diff --git a/extras/freetype2/src/type1/t1parse.c b/extras/freetype2/src/type1/t1parse.c
index c1783f029..544aa093f 100644
--- a/extras/freetype2/src/type1/t1parse.c
+++ b/extras/freetype2/src/type1/t1parse.c
@@ -4,7 +4,7 @@
/* */
/* Type 1 parser (body). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -65,53 +65,30 @@
/*************************************************************************/
-#define IS_T1_WHITESPACE( c ) ( (c) == ' ' || (c) == '\t' )
-#define IS_T1_LINESPACE( c ) ( (c) == '\r' || (c) == '\n' )
-
-#define IS_T1_SPACE( c ) ( IS_T1_WHITESPACE( c ) || IS_T1_LINESPACE( c ) )
-
-
- typedef struct PFB_Tag_
+ static FT_Error
+ read_pfb_tag( FT_Stream stream,
+ FT_UShort *atag,
+ FT_Long *asize )
{
+ FT_Error error;
FT_UShort tag;
FT_Long size;
- } PFB_Tag;
-
-#undef FT_STRUCTURE
-#define FT_STRUCTURE PFB_Tag
+ *atag = 0;
+ *asize = 0;
-
- static
- const FT_Frame_Field pfb_tag_fields[] =
- {
- FT_FRAME_START( 6 ),
- FT_FRAME_USHORT ( tag ),
- FT_FRAME_LONG_LE( size ),
- FT_FRAME_END
- };
-
-
- static FT_Error
- read_pfb_tag( FT_Stream stream,
- FT_UShort* tag,
- FT_Long* size )
- {
- FT_Error error;
- PFB_Tag head;
-
-
- *tag = 0;
- *size = 0;
- if ( !FT_STREAM_READ_FIELDS( pfb_tag_fields, &head ) )
+ if ( !FT_READ_USHORT( tag ) )
{
- if ( head.tag == 0x8001U || head.tag == 0x8002U )
+ if ( tag == 0x8001U || tag == 0x8002U )
{
- *tag = head.tag;
- *size = head.size;
+ if ( !FT_READ_LONG_LE( size ) )
+ *asize = size;
}
+
+ *atag = tag;
}
+
return error;
}
@@ -127,7 +104,7 @@
FT_Long size;
- psaux->ps_parser_funcs->init( &parser->root,0, 0, memory );
+ psaux->ps_parser_funcs->init( &parser->root, 0, 0, memory );
parser->stream = stream;
parser->base_len = 0;
@@ -242,36 +219,13 @@
}
- /* return the value of an hexadecimal digit */
- static int
- hexa_value( char c )
- {
- unsigned int d;
-
-
- d = (unsigned int)( c - '0' );
- if ( d <= 9 )
- return (int)d;
-
- d = (unsigned int)( c - 'a' );
- if ( d <= 5 )
- return (int)( d + 10 );
-
- d = (unsigned int)( c - 'A' );
- if ( d <= 5 )
- return (int)( d + 10 );
-
- return -1;
- }
-
-
FT_LOCAL_DEF( FT_Error )
T1_Get_Private_Dict( T1_Parser parser,
PSAux_Service psaux )
{
FT_Stream stream = parser->stream;
FT_Memory memory = parser->root.memory;
- FT_Error error = 0;
+ FT_Error error = T1_Err_Ok;
FT_Long size;
@@ -325,7 +279,8 @@
break;
}
- if ( FT_STREAM_READ( parser->private_dict + parser->private_len, size ) )
+ if ( FT_STREAM_READ( parser->private_dict + parser->private_len,
+ size ) )
goto Fail;
parser->private_len += size;
@@ -333,9 +288,9 @@
}
else
{
- /* we have already `loaded' the whole PFA font file into memory; */
+ /* We have already `loaded' the whole PFA font file into memory; */
/* if this is a memory resource, allocate a new block to hold */
- /* the private dict. Otherwise, simply overwrite into the base */
+ /* the private dict. Otherwise, simply overwrite into the base */
/* dictionary block in the heap. */
/* first of all, look at the `eexec' keyword */
@@ -344,24 +299,18 @@
FT_Byte c;
+ Again:
for (;;)
{
c = cur[0];
if ( c == 'e' && cur + 9 < limit ) /* 9 = 5 letters for `eexec' + */
/* newline + 4 chars */
{
- if ( cur[1] == 'e' && cur[2] == 'x' &&
- cur[3] == 'e' && cur[4] == 'c' )
- {
- cur += 6; /* we skip the newling after the `eexec' */
-
- /* XXX: Some fonts use DOS-linefeeds, i.e. \r\n; we need to */
- /* skip the extra \n if we find it */
- if ( cur[0] == '\n' )
- cur++;
-
+ if ( cur[1] == 'e' &&
+ cur[2] == 'x' &&
+ cur[3] == 'e' &&
+ cur[4] == 'c' )
break;
- }
}
cur++;
if ( cur >= limit )
@@ -373,10 +322,57 @@
}
}
+ /* check whether `eexec' was real -- it could be in a comment */
+ /* or string (as e.g. in u003043t.gsf from ghostscript) */
+
+ parser->root.cursor = parser->base_dict;
+ parser->root.limit = cur + 9;
+
+ cur = parser->root.cursor;
+ limit = parser->root.limit;
+
+ while ( cur < limit )
+ {
+ if ( *cur == 'e' && ft_strncmp( (char*)cur, "eexec", 5 ) == 0 )
+ goto Found;
+
+ T1_Skip_PS_Token( parser );
+ T1_Skip_Spaces ( parser );
+ cur = parser->root.cursor;
+ }
+
+ /* we haven't found the correct `eexec'; go back and continue */
+ /* searching */
+
+ cur = limit;
+ limit = parser->base_dict + parser->base_len;
+ goto Again;
+
/* now determine where to write the _encrypted_ binary private */
/* dictionary. We overwrite the base dictionary for disk-based */
/* resources and allocate a new block otherwise */
+ Found:
+ parser->root.limit = parser->base_dict + parser->base_len;
+
+ T1_Skip_PS_Token( parser );
+ cur = parser->root.cursor;
+ if ( *cur == '\r' )
+ {
+ cur++;
+ if ( *cur == '\n' )
+ cur++;
+ }
+ else if ( *cur == '\n' )
+ cur++;
+ else
+ {
+ FT_ERROR(( "T1_Get_Private_Dict:" ));
+ FT_ERROR(( " `eexec' not properly terminated\n" ));
+ error = T1_Err_Invalid_File_Format;
+ goto Exit;
+ }
+
size = (FT_Long)( parser->base_len - ( cur - parser->base_dict ) );
if ( parser->in_memory )
@@ -402,51 +398,38 @@
/* the `eexec' keyword); if they all are hexadecimal digits, then */
/* we have a case of ASCII storage */
- if ( ( hexa_value( cur[0] ) | hexa_value( cur[1] ) |
- hexa_value( cur[2] ) | hexa_value( cur[3] ) ) < 0 )
-
- /* binary encoding -- `simply' copy the private dict */
- FT_MEM_COPY( parser->private_dict, cur, size );
-
- else
+ if ( ft_isxdigit( cur[0] ) && ft_isxdigit( cur[1] ) &&
+ ft_isxdigit( cur[2] ) && ft_isxdigit( cur[3] ) )
{
/* ASCII hexadecimal encoding */
-
- FT_Byte* write;
- FT_Int count;
-
-
- write = parser->private_dict;
- count = 0;
-
- for ( ;cur < limit; cur++ )
- {
- int hex1;
+ FT_Long len;
- /* check for newline */
- if ( cur[0] == '\r' || cur[0] == '\n' )
- continue;
-
- /* exit if we have a non-hexadecimal digit that isn't a newline */
- hex1 = hexa_value( cur[0] );
- if ( hex1 < 0 || cur + 1 >= limit )
- break;
-
- /* otherwise, store byte */
- *write++ = (FT_Byte)( ( hex1 << 4 ) | hexa_value( cur[1] ) );
- count++;
- cur++;
- }
+ parser->root.cursor = cur;
+ (void)psaux->ps_parser_funcs->to_bytes( &parser->root,
+ parser->private_dict,
+ parser->private_len,
+ &len,
+ 0 );
+ parser->private_len = len;
/* put a safeguard */
- parser->private_len = write - parser->private_dict;
- *write++ = 0;
+ parser->private_dict[len] = '\0';
}
+ else
+ /* binary encoding -- copy the private dict */
+ FT_MEM_MOVE( parser->private_dict, cur, size );
}
/* we now decrypt the encoded binary private dictionary */
psaux->t1_decrypt( parser->private_dict, parser->private_len, 55665U );
+
+ /* replace the four random bytes at the beginning with whitespace */
+ parser->private_dict[0] = ' ';
+ parser->private_dict[1] = ' ';
+ parser->private_dict[2] = ' ';
+ parser->private_dict[3] = ' ';
+
parser->root.base = parser->private_dict;
parser->root.cursor = parser->private_dict;
parser->root.limit = parser->root.cursor + parser->private_len;
diff --git a/extras/freetype2/src/type1/t1parse.h b/extras/freetype2/src/type1/t1parse.h
index ecc206739..6fa4ca624 100644
--- a/extras/freetype2/src/type1/t1parse.h
+++ b/extras/freetype2/src/type1/t1parse.h
@@ -4,7 +4,7 @@
/* */
/* Type 1 parser (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -69,9 +69,9 @@ FT_BEGIN_HEADER
FT_Byte* private_dict;
FT_Long private_len;
- FT_Byte in_pfb;
- FT_Byte in_memory;
- FT_Byte single_block;
+ FT_Bool in_pfb;
+ FT_Bool in_memory;
+ FT_Bool single_block;
} T1_ParserRec, *T1_Parser;
@@ -91,8 +91,8 @@ FT_BEGIN_HEADER
} while ( 0 )
-#define T1_Skip_Spaces( p ) (p)->root.funcs.skip_spaces( &(p)->root )
-#define T1_Skip_Alpha( p ) (p)->root.funcs.skip_alpha ( &(p)->root )
+#define T1_Skip_Spaces( p ) (p)->root.funcs.skip_spaces( &(p)->root )
+#define T1_Skip_PS_Token( p ) (p)->root.funcs.skip_PS_token( &(p)->root )
#define T1_ToInt( p ) (p)->root.funcs.to_int( &(p)->root )
#define T1_ToFixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
diff --git a/extras/freetype2/src/type1/t1tokens.h b/extras/freetype2/src/type1/t1tokens.h
index dea50547b..a3cc952e0 100644
--- a/extras/freetype2/src/type1/t1tokens.h
+++ b/extras/freetype2/src/type1/t1tokens.h
@@ -4,7 +4,7 @@
/* */
/* Type 1 tokenizer (specification). */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,16 +21,17 @@
#undef T1CODE
#define T1CODE T1_FIELD_LOCATION_FONT_INFO
- T1_FIELD_STRING ( "version", version )
- T1_FIELD_STRING ( "Notice", notice )
- T1_FIELD_STRING ( "FullName", full_name )
- T1_FIELD_STRING ( "FamilyName", family_name )
- T1_FIELD_STRING ( "Weight", weight )
+ T1_FIELD_STRING( "version", version )
+ T1_FIELD_STRING( "Notice", notice )
+ T1_FIELD_STRING( "FullName", full_name )
+ T1_FIELD_STRING( "FamilyName", family_name )
+ T1_FIELD_STRING( "Weight", weight )
- T1_FIELD_NUM ( "ItalicAngle", italic_angle )
- T1_FIELD_TYPE_BOOL( "isFixedPitch", is_fixed_pitch )
- T1_FIELD_NUM ( "UnderlinePosition", underline_position )
- T1_FIELD_NUM ( "UnderlineThickness", underline_thickness )
+ /* we use pointers to detect modifications made by synthetic fonts */
+ T1_FIELD_NUM ( "ItalicAngle", italic_angle )
+ T1_FIELD_BOOL ( "isFixedPitch", is_fixed_pitch )
+ T1_FIELD_NUM ( "UnderlinePosition", underline_position )
+ T1_FIELD_NUM ( "UnderlineThickness", underline_thickness )
#undef FT_STRUCTURE
@@ -43,7 +44,7 @@
T1_FIELD_NUM ( "LanguageGroup", language_group )
T1_FIELD_NUM ( "password", password )
- T1_FIELD_FIXED ( "BlueScale", blue_scale )
+ T1_FIELD_FIXED_1000( "BlueScale", blue_scale )
T1_FIELD_NUM ( "BlueShift", blue_shift )
T1_FIELD_NUM ( "BlueFuzz", blue_fuzz )
@@ -59,15 +60,18 @@
T1_FIELD_NUM_TABLE ( "StemSnapH", snap_widths, 12 )
T1_FIELD_NUM_TABLE ( "StemSnapV", snap_heights, 12 )
+ T1_FIELD_FIXED ( "ExpansionFactor", expansion_factor )
+
#undef FT_STRUCTURE
#define FT_STRUCTURE T1_FontRec
#undef T1CODE
#define T1CODE T1_FIELD_LOCATION_FONT_DICT
- T1_FIELD_NUM( "PaintType", paint_type )
- T1_FIELD_NUM( "FontType", font_type )
- T1_FIELD_NUM( "StrokeWidth", stroke_width )
+ T1_FIELD_KEY ( "FontName", font_name )
+ T1_FIELD_NUM ( "PaintType", paint_type )
+ T1_FIELD_NUM ( "FontType", font_type )
+ T1_FIELD_FIXED( "StrokeWidth", stroke_width )
#undef FT_STRUCTURE
#define FT_STRUCTURE FT_BBox
diff --git a/extras/freetype2/src/type42/rules.mk b/extras/freetype2/src/type42/rules.mk
index f991449f5..556306195 100644
--- a/extras/freetype2/src/type42/rules.mk
+++ b/extras/freetype2/src/type42/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 2002 by
+# Copyright 2002, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,25 +15,24 @@
# Type42 driver directory
#
-T42_DIR := $(SRC_)type42
-T42_DIR_ := $(T42_DIR)$(SEP)
+T42_DIR := $(SRC_DIR)/type42
# compilation flags for the driver
#
-T42_COMPILE := $(FT_COMPILE) $I$(T42_DIR)
+T42_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(T42_DIR))
# Type42 driver source
#
-T42_DRV_SRC := $(T42_DIR_)t42objs.c \
- $(T42_DIR_)t42parse.c \
- $(T42_DIR_)t42drivr.c
+T42_DRV_SRC := $(T42_DIR)/t42objs.c \
+ $(T42_DIR)/t42parse.c \
+ $(T42_DIR)/t42drivr.c
# Type42 driver headers
#
T42_DRV_H := $(T42_DRV_SRC:%.c=%.h) \
- $(T42_DIR_)t42error.h
+ $(T42_DIR)/t42error.h
# Type42 driver object(s)
@@ -41,24 +40,24 @@ T42_DRV_H := $(T42_DRV_SRC:%.c=%.h) \
# T42_DRV_OBJ_M is used during `multi' builds
# T42_DRV_OBJ_S is used during `single' builds
#
-T42_DRV_OBJ_M := $(T42_DRV_SRC:$(T42_DIR_)%.c=$(OBJ_)%.$O)
-T42_DRV_OBJ_S := $(OBJ_)type42.$O
+T42_DRV_OBJ_M := $(T42_DRV_SRC:$(T42_DIR)/%.c=$(OBJ_DIR)/%.$O)
+T42_DRV_OBJ_S := $(OBJ_DIR)/type42.$O
# Type42 driver source file for single build
#
-T42_DRV_SRC_S := $(T42_DIR_)type42.c
+T42_DRV_SRC_S := $(T42_DIR)/type42.c
# Type42 driver - single object
#
$(T42_DRV_OBJ_S): $(T42_DRV_SRC_S) $(T42_DRV_SRC) $(FREETYPE_H) $(T42_DRV_H)
- $(T42_COMPILE) $T$@ $(T42_DRV_SRC_S)
+ $(T42_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(T42_DRV_SRC_S))
# Type42 driver - multiple objects
#
-$(OBJ_)%.$O: $(T42_DIR_)%.c $(FREETYPE_H) $(T42_DRV_H)
- $(T42_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(T42_DIR)/%.c $(FREETYPE_H) $(T42_DRV_H)
+ $(T42_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
@@ -66,4 +65,5 @@ $(OBJ_)%.$O: $(T42_DIR_)%.c $(FREETYPE_H) $(T42_DRV_H)
DRV_OBJS_S += $(T42_DRV_OBJ_S)
DRV_OBJS_M += $(T42_DRV_OBJ_M)
+
# EOF
diff --git a/extras/freetype2/src/type42/t42drivr.c b/extras/freetype2/src/type42/t42drivr.c
index 65bf2e8aa..2afe2db84 100644
--- a/extras/freetype2/src/type42/t42drivr.c
+++ b/extras/freetype2/src/type42/t42drivr.c
@@ -4,7 +4,7 @@
/* */
/* High-level Type 42 driver interface (body). */
/* */
-/* Copyright 2002 by Roberto Alameda. */
+/* Copyright 2002, 2003, 2004 by Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@@ -24,10 +24,9 @@
/* 2) Incremental fonts making use of the GlyphDirectory keyword */
/* will be loaded, but the rendering will be using the TrueType */
/* tables. */
- /* 3) The sfnts array is expected to be ASCII, not binary. */
- /* 4) As for Type1 fonts, CDevProc is not supported. */
- /* 5) The Metrics dictionary is not supported. */
- /* 6) AFM metrics are not supported. */
+ /* 3) As for Type1 fonts, CDevProc is not supported. */
+ /* 4) The Metrics dictionary is not supported. */
+ /* 5) AFM metrics are not supported. */
/* */
/* In other words, this driver supports Type42 fonts derived from */
/* TrueType fonts in a non-CID manner, as done by usual conversion */
@@ -41,11 +40,21 @@
#include "t42error.h"
#include FT_INTERNAL_DEBUG_H
+#include FT_SERVICE_XFREE86_NAME_H
+#include FT_SERVICE_GLYPH_DICT_H
+#include FT_SERVICE_POSTSCRIPT_NAME_H
+#include FT_SERVICE_POSTSCRIPT_INFO_H
#undef FT_COMPONENT
#define FT_COMPONENT trace_t42
+ /*
+ *
+ * GLYPH DICT SERVICE
+ *
+ */
+
static FT_Error
t42_get_glyph_name( T42_Face face,
FT_UInt glyph_index,
@@ -73,13 +82,6 @@
}
- static const char*
- t42_get_ps_name( T42_Face face )
- {
- return (const char*)face->type1.font_name;
- }
-
-
static FT_UInt
t42_get_name_index( T42_Face face,
FT_String* glyph_name )
@@ -93,40 +95,102 @@
gname = face->type1.glyph_names[i];
if ( !ft_strcmp( glyph_name, gname ) )
- return ft_atoi( (const char *)face->type1.charstrings[i] );
+ return (FT_UInt)ft_atol( (const char *)face->type1.charstrings[i] );
}
return 0;
}
- static FT_Module_Interface
- T42_Get_Interface( FT_Driver driver,
- const FT_String* t42_interface )
+ static const FT_Service_GlyphDictRec t42_service_glyph_dict =
{
- FT_UNUSED( driver );
+ (FT_GlyphDict_GetNameFunc) t42_get_glyph_name,
+ (FT_GlyphDict_NameIndexFunc)t42_get_name_index
+ };
- /* Any additional interface are defined here */
- if (ft_strcmp( (const char*)t42_interface, "glyph_name" ) == 0 )
- return (FT_Module_Interface)t42_get_glyph_name;
- if ( ft_strcmp( (const char*)t42_interface, "name_index" ) == 0 )
- return (FT_Module_Interface)t42_get_name_index;
+ /*
+ *
+ * POSTSCRIPT NAME SERVICE
+ *
+ */
+
+ static const char*
+ t42_get_ps_font_name( T42_Face face )
+ {
+ return (const char*)face->type1.font_name;
+ }
- if ( ft_strcmp( (const char*)t42_interface, "postscript_name" ) == 0 )
- return (FT_Module_Interface)t42_get_ps_name;
+ static const FT_Service_PsFontNameRec t42_service_ps_font_name =
+ {
+ (FT_PsName_GetFunc)t42_get_ps_font_name
+ };
+
+
+ /*
+ *
+ * POSTSCRIPT INFO SERVICE
+ *
+ */
+
+ static FT_Error
+ t42_ps_get_font_info( FT_Face face,
+ PS_FontInfoRec* afont_info )
+ {
+ *afont_info = ((T42_Face)face)->type1.font_info;
return 0;
}
+ static FT_Int
+ t42_ps_has_glyph_names( FT_Face face )
+ {
+ FT_UNUSED( face );
+ return 1;
+ }
+
+
+ static const FT_Service_PsInfoRec t42_service_ps_info =
+ {
+ (PS_GetFontInfoFunc) t42_ps_get_font_info,
+ (PS_HasGlyphNamesFunc)t42_ps_has_glyph_names
+ };
+
+
+ /*
+ *
+ * SERVICE LIST
+ *
+ */
+
+ static const FT_ServiceDescRec t42_services[] =
+ {
+ { FT_SERVICE_ID_GLYPH_DICT, &t42_service_glyph_dict },
+ { FT_SERVICE_ID_POSTSCRIPT_FONT_NAME, &t42_service_ps_font_name },
+ { FT_SERVICE_ID_POSTSCRIPT_INFO, &t42_service_ps_info },
+ { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_TYPE_42 },
+ { NULL, NULL }
+ };
+
+
+ static FT_Module_Interface
+ T42_Get_Interface( FT_Driver driver,
+ const FT_String* t42_interface )
+ {
+ FT_UNUSED( driver );
+
+ return ft_service_list_lookup( t42_services, t42_interface );
+ }
+
+
const FT_Driver_ClassRec t42_driver_class =
{
{
- ft_module_font_driver |
- ft_module_driver_scalable |
+ FT_MODULE_FONT_DRIVER |
+ FT_MODULE_DRIVER_SCALABLE |
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
- ft_module_driver_has_hinter,
+ FT_MODULE_DRIVER_HAS_HINTER,
#else
0,
#endif
diff --git a/extras/freetype2/src/type42/t42error.h b/extras/freetype2/src/type42/t42error.h
index cb6642b74..b23091001 100644
--- a/extras/freetype2/src/type42/t42error.h
+++ b/extras/freetype2/src/type42/t42error.h
@@ -4,7 +4,7 @@
/* */
/* Type 42 error codes (specification only). */
/* */
-/* Copyright 2002 by */
+/* Copyright 2002, 2003 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -30,7 +30,7 @@
#undef __FTERRORS_H__
#define FT_ERR_PREFIX T42_Err_
-#define FT_ERR_BASE FT_Mod_Err_T42
+#define FT_ERR_BASE FT_Mod_Err_Type42
#include FT_ERRORS_H
diff --git a/extras/freetype2/src/type42/t42objs.c b/extras/freetype2/src/type42/t42objs.c
index c4856344b..8837136ff 100644
--- a/extras/freetype2/src/type42/t42objs.c
+++ b/extras/freetype2/src/type42/t42objs.c
@@ -4,7 +4,7 @@
/* */
/* Type 42 objects manager (body). */
/* */
-/* Copyright 2002 by Roberto Alameda. */
+/* Copyright 2002, 2003, 2004 by Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@@ -53,7 +53,8 @@
if ( error )
goto Exit;
- error = t42_parse_dict( face, &loader, parser->base_dict, parser->base_len );
+ error = t42_parse_dict( face, &loader,
+ parser->base_dict, parser->base_len );
if ( type1->font_type != 42 )
{
@@ -65,7 +66,8 @@
/* to the Type1 data */
type1->num_glyphs = loader.num_glyphs;
- if ( !loader.charstrings.init ) {
+ if ( !loader.charstrings.init )
+ {
FT_ERROR(( "T42_Open_Face: no charstrings array in face!\n" ));
error = T42_Err_Invalid_File_Format;
}
@@ -121,8 +123,10 @@
if ( ft_strcmp( (const char*)".notdef",
(const char*)glyph_name ) != 0 )
{
- if ( charcode < min_char ) min_char = charcode;
- if ( charcode > max_char ) max_char = charcode;
+ if ( charcode < min_char )
+ min_char = charcode;
+ if ( charcode > max_char )
+ max_char = charcode;
}
break;
}
@@ -149,10 +153,12 @@
FT_Int num_params,
FT_Parameter* params )
{
- FT_Error error;
- PSNames_Service psnames;
- PSAux_Service psaux;
- FT_Face root = (FT_Face)&face->root;
+ FT_Error error;
+ FT_Service_PsCMaps psnames;
+ PSAux_Service psaux;
+ FT_Face root = (FT_Face)&face->root;
+ T1_Font type1 = &face->type1;
+ PS_FontInfo info = &type1->font_info;
FT_UNUSED( num_params );
FT_UNUSED( params );
@@ -163,9 +169,8 @@
face->ttf_face = NULL;
face->root.num_faces = 1;
- face->psnames = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ),
- "psnames" );
- psnames = (PSNames_Service)face->psnames;
+ FT_FACE_FIND_GLOBAL_SERVICE( face, psnames, POSTSCRIPT_CMAPS );
+ face->psnames = psnames;
face->psaux = FT_Get_Module_Interface( FT_FACE_LIBRARY( face ),
"psaux" );
@@ -188,12 +193,12 @@
goto Exit;
}
- /* Now, load the font program into the face object */
+ /* Now load the font program into the face object */
/* Init the face object fields */
/* Now set up root face fields */
- root->num_glyphs = face->type1.num_glyphs;
+ root->num_glyphs = type1->num_glyphs;
root->num_charmaps = 0;
root->face_index = face_index;
@@ -201,42 +206,52 @@
root->face_flags |= FT_FACE_FLAG_HORIZONTAL;
root->face_flags |= FT_FACE_FLAG_GLYPH_NAMES;
- if ( face->type1.font_info.is_fixed_pitch )
+ if ( info->is_fixed_pitch )
root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
/* XXX: TODO -- add kerning with .afm support */
/* get style name -- be careful, some broken fonts only */
/* have a `/FontName' dictionary entry! */
- root->family_name = face->type1.font_info.family_name;
+ root->family_name = info->family_name;
+ /* assume "Regular" style if we don't know better */
+ root->style_name = (char *)"Regular";
if ( root->family_name )
{
- char* full = face->type1.font_info.full_name;
+ char* full = info->full_name;
char* family = root->family_name;
if ( full )
{
- while ( *family && *full == *family )
+ while ( *full )
{
- family++;
- full++;
+ if ( *full == *family )
+ {
+ family++;
+ full++;
+ }
+ else
+ {
+ if ( *full == ' ' || *full == '-' )
+ full++;
+ else if ( *family == ' ' || *family == '-' )
+ family++;
+ else
+ {
+ if ( !*family )
+ root->style_name = full;
+ break;
+ }
+ }
}
-
- root->style_name = ( *full == ' ' ? full + 1
- : (char *)"Regular" );
}
- else
- root->style_name = (char *)"Regular";
}
else
{
/* do we have a `/FontName'? */
- if ( face->type1.font_name )
- {
- root->family_name = face->type1.font_name;
- root->style_name = (char *)"Regular";
- }
+ if ( type1->font_name )
+ root->family_name = type1->font_name;
}
/* no embedded bitmap support */
@@ -266,15 +281,15 @@
root->max_advance_width = face->ttf_face->max_advance_width;
root->max_advance_height = face->ttf_face->max_advance_height;
- root->underline_position = face->type1.font_info.underline_position;
- root->underline_thickness = face->type1.font_info.underline_thickness;
+ root->underline_position = (FT_Short)info->underline_position;
+ root->underline_thickness = (FT_Short)info->underline_thickness;
root->internal->max_points = 0;
root->internal->max_contours = 0;
/* compute style flags */
root->style_flags = 0;
- if ( face->type1.font_info.italic_angle )
+ if ( info->italic_angle )
root->style_flags |= FT_STYLE_FLAG_ITALIC;
if ( face->ttf_face->style_flags & FT_STYLE_FLAG_BOLD )
@@ -304,7 +319,7 @@
charmap.platform_id = 7;
clazz = NULL;
- switch ( face->type1.encoding_type )
+ switch ( type1->encoding_type )
{
case T1_ENCODING_TYPE_STANDARD:
charmap.encoding = FT_ENCODING_ADOBE_STANDARD;
@@ -339,7 +354,7 @@
#if 0
/* Select default charmap */
- if (root->num_charmaps)
+ if ( root->num_charmaps )
root->charmap = root->charmaps[0];
#endif
}
@@ -438,8 +453,6 @@
}
-
-
FT_LOCAL_DEF( FT_Error )
T42_Size_Init( T42_Size size )
{
@@ -532,7 +545,7 @@
T42_Face t42face = (T42_Face)face;
- FT_Activate_Size(size->ttsize);
+ FT_Activate_Size( size->ttsize );
return FT_Set_Char_Size( t42face->ttf_face,
char_width,
@@ -551,7 +564,7 @@
T42_Face t42face = (T42_Face)face;
- FT_Activate_Size(size->ttsize);
+ FT_Activate_Size( size->ttsize );
return FT_Set_Pixel_Sizes( t42face->ttf_face,
pixel_width,
@@ -587,7 +600,7 @@
FT_LOCAL_DEF( FT_Error )
T42_GlyphSlot_Load( FT_GlyphSlot glyph,
FT_Size size,
- FT_Int glyph_index,
+ FT_UInt glyph_index,
FT_Int32 load_flags )
{
FT_Error error;
diff --git a/extras/freetype2/src/type42/t42objs.h b/extras/freetype2/src/type42/t42objs.h
index 6fb176917..623809573 100644
--- a/extras/freetype2/src/type42/t42objs.h
+++ b/extras/freetype2/src/type42/t42objs.h
@@ -4,7 +4,7 @@
/* */
/* Type 42 objects manager (specification). */
/* */
-/* Copyright 2002 by Roberto Alameda. */
+/* Copyright 2002, 2003 by Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@@ -22,10 +22,10 @@
#include FT_FREETYPE_H
#include FT_TYPE1_TABLES_H
#include FT_INTERNAL_TYPE1_TYPES_H
-#include FT_INTERNAL_TYPE42_TYPES_H
+#include "t42types.h"
#include FT_INTERNAL_OBJECTS_H
#include FT_INTERNAL_DRIVER_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
#include FT_INTERNAL_POSTSCRIPT_HINTS_H
@@ -102,7 +102,7 @@ FT_BEGIN_HEADER
FT_LOCAL( FT_Error )
T42_GlyphSlot_Load( FT_GlyphSlot glyph,
FT_Size size,
- FT_Int glyph_index,
+ FT_UInt glyph_index,
FT_Int32 load_flags );
FT_LOCAL( void )
diff --git a/extras/freetype2/src/type42/t42parse.c b/extras/freetype2/src/type42/t42parse.c
index 8bb2e7ba6..ff53a3eb4 100644
--- a/extras/freetype2/src/type42/t42parse.c
+++ b/extras/freetype2/src/type42/t42parse.c
@@ -4,7 +4,7 @@
/* */
/* Type 42 font parser (body). */
/* */
-/* Copyright 2002 by Roberto Alameda. */
+/* Copyright 2002, 2003, 2004 by Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@@ -34,24 +34,16 @@
static void
- t42_parse_font_name( T42_Face face,
- T42_Loader loader );
-
- static void
- t42_parse_font_bbox( T42_Face face,
- T42_Loader loader );
-
- static void
t42_parse_font_matrix( T42_Face face,
T42_Loader loader );
static void
t42_parse_encoding( T42_Face face,
T42_Loader loader );
-
+
static void
t42_parse_charstrings( T42_Face face,
T42_Loader loader );
-
+
static void
t42_parse_sfnts( T42_Face face,
T42_Loader loader );
@@ -65,27 +57,33 @@
#undef T1CODE
#define T1CODE T1_FIELD_LOCATION_FONT_INFO
- T1_FIELD_STRING ( "version", version )
- T1_FIELD_STRING ( "Notice", notice )
- T1_FIELD_STRING ( "FullName", full_name )
- T1_FIELD_STRING ( "FamilyName", family_name )
- T1_FIELD_STRING ( "Weight", weight )
- T1_FIELD_NUM ( "ItalicAngle", italic_angle )
- T1_FIELD_TYPE_BOOL( "isFixedPitch", is_fixed_pitch )
- T1_FIELD_NUM ( "UnderlinePosition", underline_position )
- T1_FIELD_NUM ( "UnderlineThickness", underline_thickness )
+ T1_FIELD_STRING( "version", version )
+ T1_FIELD_STRING( "Notice", notice )
+ T1_FIELD_STRING( "FullName", full_name )
+ T1_FIELD_STRING( "FamilyName", family_name )
+ T1_FIELD_STRING( "Weight", weight )
+ T1_FIELD_NUM ( "ItalicAngle", italic_angle )
+ T1_FIELD_BOOL ( "isFixedPitch", is_fixed_pitch )
+ T1_FIELD_NUM ( "UnderlinePosition", underline_position )
+ T1_FIELD_NUM ( "UnderlineThickness", underline_thickness )
#undef FT_STRUCTURE
#define FT_STRUCTURE T1_FontRec
#undef T1CODE
#define T1CODE T1_FIELD_LOCATION_FONT_DICT
- T1_FIELD_NUM( "PaintType", paint_type )
- T1_FIELD_NUM( "FontType", font_type )
- T1_FIELD_NUM( "StrokeWidth", stroke_width )
+ T1_FIELD_KEY ( "FontName", font_name )
+ T1_FIELD_NUM ( "PaintType", paint_type )
+ T1_FIELD_NUM ( "FontType", font_type )
+ T1_FIELD_FIXED( "StrokeWidth", stroke_width )
+
+#undef FT_STRUCTURE
+#define FT_STRUCTURE FT_BBox
+#undef T1CODE
+#define T1CODE T1_FIELD_LOCATION_BBOX
+
+ T1_FIELD_BBOX("FontBBox", xMin )
- T1_FIELD_CALLBACK( "FontName", t42_parse_font_name )
- T1_FIELD_CALLBACK( "FontBBox", t42_parse_font_bbox )
T1_FIELD_CALLBACK( "FontMatrix", t42_parse_font_matrix )
T1_FIELD_CALLBACK( "Encoding", t42_parse_encoding )
T1_FIELD_CALLBACK( "CharStrings", t42_parse_charstrings )
@@ -109,20 +107,18 @@
(p)->funcs.release( p ); \
} while ( 0 )
-#define T1_Skip_Spaces( p ) (p)->root.funcs.skip_spaces( &(p)->root )
-#define T1_Skip_Alpha( p ) (p)->root.funcs.skip_alpha ( &(p)->root )
+#define T1_Skip_Spaces( p ) (p)->root.funcs.skip_spaces( &(p)->root )
+#define T1_Skip_PS_Token( p ) (p)->root.funcs.skip_PS_token( &(p)->root )
-#define T1_ToInt( p ) (p)->root.funcs.to_int( &(p)->root )
-#define T1_ToFixed( p, t ) (p)->root.funcs.to_fixed( &(p)->root, t )
+#define T1_ToInt( p ) \
+ (p)->root.funcs.to_int( &(p)->root )
+#define T1_ToBytes( p, b, m, n, d ) \
+ (p)->root.funcs.to_bytes( &(p)->root, b, m, n, d )
-#define T1_ToCoordArray( p, m, c ) \
- (p)->root.funcs.to_coord_array( &(p)->root, m, c )
#define T1_ToFixedArray( p, m, f, t ) \
(p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
#define T1_ToToken( p, t ) \
(p)->root.funcs.to_token( &(p)->root, t )
-#define T1_ToTokenArray( p, t, m, c ) \
- (p)->root.funcs.to_token_array( &(p)->root, t, m, c )
#define T1_Load_Field( p, f, o, m, pf ) \
(p)->root.funcs.load_field( &(p)->root, f, o, m, pf )
@@ -156,8 +152,8 @@
/* When creating a new Type 42 parser, we try to locate and load */
/* the base dictionary, loading the whole font into memory. */
/* */
- /* When `loading' the base dictionary, we only setup pointers in */
- /* the case of a memory-based stream. Otherwise, we allocate */
+ /* When `loading' the base dictionary, we only set up pointers */
+ /* in the case of a memory-based stream. Otherwise, we allocate */
/* and load the base dictionary in it. */
/* */
/* parser->in_memory is set if we have a memory stream. */
@@ -193,9 +189,9 @@
}
/* Now check font format; we must see `%!PS-TrueTypeFont' */
- if (size <= 17 ||
- ( ft_strncmp( (const char*)parser->base_dict,
- "%!PS-TrueTypeFont", 17) ) )
+ if ( size <= 17 ||
+ ( ft_strncmp( (const char*)parser->base_dict,
+ "%!PS-TrueTypeFont", 17 ) ) )
error = T42_Err_Unknown_File_Format;
else
{
@@ -227,80 +223,11 @@
static int
- t42_is_alpha( FT_Byte c )
- {
- /* Note: we must accept "+" as a valid character, as it is used in */
- /* embedded type1 fonts in PDF documents. */
- /* */
- return ( ft_isalnum( c ) ||
- c == '.' ||
- c == '_' ||
- c == '-' ||
- c == '+' );
- }
-
-
- static int
t42_is_space( FT_Byte c )
{
- return ( c == ' ' || c == '\t' || c == '\r' || c == '\n' );
- }
-
-
- static void
- t42_parse_font_name( T42_Face face,
- T42_Loader loader )
- {
- T42_Parser parser = &loader->parser;
- FT_Error error;
- FT_Memory memory = parser->root.memory;
- FT_Int len;
- FT_Byte* cur;
- FT_Byte* cur2;
- FT_Byte* limit;
-
-
- T1_Skip_Spaces( parser );
-
- cur = parser->root.cursor;
- limit = parser->root.limit;
-
- if ( cur >= limit - 1 ||
- ( *cur != '/' && *cur != '(') )
- return;
-
- cur++;
- cur2 = cur;
- while ( cur2 < limit && t42_is_alpha( *cur2 ) )
- cur2++;
-
- len = (FT_Int)( cur2 - cur );
- if ( len > 0 )
- {
- if ( FT_ALLOC( face->type1.font_name, len + 1 ) )
- {
- parser->root.error = error;
- return;
- }
-
- FT_MEM_COPY( face->type1.font_name, cur, len );
- face->type1.font_name[len] = '\0';
- }
- parser->root.cursor = cur2;
- }
-
-
- static void
- t42_parse_font_bbox( T42_Face face,
- T42_Loader loader )
- {
- T42_Parser parser = &loader->parser;
- FT_BBox* bbox = &face->type1.font_bbox;
-
- bbox->xMin = T1_ToInt( parser );
- bbox->yMin = T1_ToInt( parser );
- bbox->xMax = T1_ToInt( parser );
- bbox->yMax = T1_ToInt( parser );
+ return ( c == ' ' || c == '\t' ||
+ c == '\r' || c == '\n' || c == '\f' ||
+ c == '\0' );
}
@@ -318,7 +245,7 @@
(void)T1_ToFixedArray( parser, 6, temp, 3 );
- temp_scale = ABS( temp[3] );
+ temp_scale = FT_ABS( temp[3] );
/* Set Units per EM based on FontMatrix values. We set the value to */
/* 1000 / temp_scale, because temp_scale was already multiplied by */
@@ -343,8 +270,8 @@
matrix->yy = temp[3];
/* note that the offsets must be expressed in integer font units */
- offset->x = temp[4] >> 16;
- offset->y = temp[5] >> 16;
+ offset->x = temp[4] >> 16;
+ offset->y = temp[5] >> 16;
}
@@ -352,45 +279,52 @@
t42_parse_encoding( T42_Face face,
T42_Loader loader )
{
- T42_Parser parser = &loader->parser;
- FT_Byte* cur = parser->root.cursor;
- FT_Byte* limit = parser->root.limit;
+ T42_Parser parser = &loader->parser;
+ FT_Byte* cur;
+ FT_Byte* limit = parser->root.limit;
PSAux_Service psaux = (PSAux_Service)face->psaux;
- /* skip whitespace */
- while ( t42_is_space( *cur ) )
+ T1_Skip_Spaces( parser );
+ cur = parser->root.cursor;
+ if ( cur >= limit )
{
- cur++;
- if ( cur >= limit )
- {
- FT_ERROR(( "t42_parse_encoding: out of bounds!\n" ));
- parser->root.error = T42_Err_Invalid_File_Format;
- return;
- }
+ FT_ERROR(( "t42_parse_encoding: out of bounds!\n" ));
+ parser->root.error = T42_Err_Invalid_File_Format;
+ return;
}
- /* if we have a number, then the encoding is an array, */
- /* and we must load it now */
- if ( (FT_Byte)( *cur - '0' ) < 10 )
+ /* if we have a number or `[', the encoding is an array, */
+ /* and we must load it now */
+ if ( ft_isdigit( *cur ) || *cur == '[' )
{
- T1_Encoding encode = &face->type1.encoding;
- FT_Int count, n;
- PS_Table char_table = &loader->encoding_table;
- FT_Memory memory = parser->root.memory;
+ T1_Encoding encode = &face->type1.encoding;
+ FT_UInt count, n;
+ PS_Table char_table = &loader->encoding_table;
+ FT_Memory memory = parser->root.memory;
FT_Error error;
+ FT_Bool only_immediates = 0;
- /* read the number of entries in the encoding, should be 256 */
- count = T1_ToInt( parser );
- if ( parser->root.error )
+ /* read the number of entries in the encoding; should be 256 */
+ if ( *cur == '[' )
+ {
+ count = 256;
+ only_immediates = 1;
+ parser->root.cursor++;
+ }
+ else
+ count = (FT_UInt)T1_ToInt( parser );
+
+ T1_Skip_Spaces( parser );
+ if ( parser->root.cursor >= limit )
return;
/* we use a T1_Table to store our charnames */
loader->num_chars = encode->num_chars = count;
- if ( FT_NEW_ARRAY( encode->char_index, count ) ||
- FT_NEW_ARRAY( encode->char_name, count ) ||
+ if ( FT_NEW_ARRAY( encode->char_index, count ) ||
+ FT_NEW_ARRAY( encode->char_name, count ) ||
FT_SET_ERROR( psaux->ps_table_funcs->init(
char_table, count, memory ) ) )
{
@@ -407,86 +341,99 @@
T1_Add_Table( char_table, n, notdef, 8 );
}
- /* Now, we will need to read a record of the form */
- /* ... charcode /charname ... for each entry in our table */
+ /* Now we need to read records of the form */
+ /* */
+ /* ... charcode /charname ... */
+ /* */
+ /* for each entry in our table. */
/* */
/* We simply look for a number followed by an immediate */
/* name. Note that this ignores correctly the sequence */
- /* that is often seen in type1 fonts: */
+ /* that is often seen in type42 fonts: */
/* */
/* 0 1 255 { 1 index exch /.notdef put } for dup */
/* */
/* used to clean the encoding array before anything else. */
/* */
- /* We stop when we encounter a `def'. */
+ /* Alternatively, if the array is directly given as */
+ /* */
+ /* /Encoding [ ... ] */
+ /* */
+ /* we only read immediates. */
- cur = parser->root.cursor;
- limit = parser->root.limit;
- n = 0;
+ n = 0;
+ T1_Skip_Spaces( parser );
- for ( ; cur < limit; )
+ while ( parser->root.cursor < limit )
{
- FT_Byte c;
-
+ cur = parser->root.cursor;
- c = *cur;
-
- /* we stop when we encounter a `def' */
- if ( c == 'd' && cur + 3 < limit )
+ /* we stop when we encounter `def' or `]' */
+ if ( *cur == 'd' && cur + 3 < limit )
{
- if ( cur[1] == 'e' &&
- cur[2] == 'f' &&
- t42_is_space( cur[-1] ) &&
- t42_is_space( cur[3] ) )
+ if ( cur[1] == 'e' &&
+ cur[2] == 'f' &&
+ t42_is_space( cur[3] ) )
{
FT_TRACE6(( "encoding end\n" ));
+ cur += 3;
break;
}
}
+ if ( *cur == ']' )
+ {
+ FT_TRACE6(( "encoding end\n" ));
+ cur++;
+ break;
+ }
- /* otherwise, we must find a number before anything else */
- if ( (FT_Byte)( c - '0' ) < 10 )
+ /* check whether we've found an entry */
+ if ( ft_isdigit( *cur ) || only_immediates )
{
FT_Int charcode;
- parser->root.cursor = cur;
- charcode = T1_ToInt( parser );
- cur = parser->root.cursor;
+ if ( only_immediates )
+ charcode = n;
+ else
+ {
+ charcode = (FT_Int)T1_ToInt( parser );
+ T1_Skip_Spaces( parser );
+ }
- /* skip whitespace */
- while ( cur < limit && t42_is_space( *cur ) )
- cur++;
+ cur = parser->root.cursor;
- if ( cur < limit && *cur == '/' )
+ if ( *cur == '/' && cur + 2 < limit && n < count )
{
- /* bingo, we have an immediate name -- it must be a */
- /* character name */
- FT_Byte* cur2 = cur + 1;
- FT_Int len;
+ FT_PtrDist len;
- while ( cur2 < limit && t42_is_alpha( *cur2 ) )
- cur2++;
+ cur++;
+
+ parser->root.cursor = cur;
+ T1_Skip_PS_Token( parser );
- len = (FT_Int)( cur2 - cur - 1 );
+ len = parser->root.cursor - cur;
parser->root.error = T1_Add_Table( char_table, charcode,
- cur + 1, len + 1 );
+ cur, len + 1 );
char_table->elements[charcode][len] = '\0';
if ( parser->root.error )
return;
- cur = cur2;
+ n++;
}
}
else
- cur++;
+ T1_Skip_PS_Token( parser );
+
+ T1_Skip_Spaces( parser );
}
face->type1.encoding_type = T1_ENCODING_TYPE_ARRAY;
parser->root.cursor = cur;
}
+
/* Otherwise, we should have either `StandardEncoding', */
/* `ExpertEncoding', or `ISOLatin1Encoding' */
else
@@ -503,7 +450,8 @@
ft_strncmp( (const char*)cur, "ISOLatin1Encoding", 17 ) == 0 )
face->type1.encoding_type = T1_ENCODING_TYPE_ISOLATIN1;
- else {
+ else
+ {
FT_ERROR(( "t42_parse_encoding: invalid token!\n" ));
parser->root.error = T42_Err_Invalid_File_Format;
}
@@ -511,34 +459,13 @@
}
- static FT_UInt
- t42_hexval( FT_Byte v )
+ typedef enum
{
- FT_UInt d;
-
- d = (FT_UInt)( v - 'A' );
- if ( d < 6 )
- {
- d += 10;
- goto Exit;
- }
-
- d = (FT_UInt)( v - 'a' );
- if ( d < 6 )
- {
- d += 10;
- goto Exit;
- }
-
- d = (FT_UInt)( v - '0' );
- if ( d < 10 )
- goto Exit;
-
- d = 0;
-
- Exit:
- return d;
- }
+ BEFORE_START,
+ BEFORE_TABLE_DIR,
+ OTHER_TABLES
+
+ } T42_Load_Status;
static void
@@ -547,154 +474,177 @@
{
T42_Parser parser = &loader->parser;
FT_Memory memory = parser->root.memory;
- FT_Byte* cur = parser->root.cursor;
+ FT_Byte* cur;
FT_Byte* limit = parser->root.limit;
FT_Error error;
- FT_Int num_tables = 0, status;
- FT_ULong count, ttf_size = 0, string_size = 0;
- FT_Bool in_string = 0;
- FT_Byte v = 0;
-
-
- /* The format is `/sfnts [ <...> <...> ... ] def' */
+ FT_Int num_tables = 0;
+ FT_ULong count, ttf_size = 0;
+
+ FT_Long n, string_size, old_string_size, real_size;
+ FT_Byte* string_buf = NULL;
+ FT_Bool alloc = 0;
+
+ T42_Load_Status status;
+
+
+ /* The format is */
+ /* */
+ /* /sfnts [ <hexstring> <hexstring> ... ] def */
+ /* */
+ /* or */
+ /* */
+ /* /sfnts [ */
+ /* <num_bin_bytes> RD <binary data> */
+ /* <num_bin_bytes> RD <binary data> */
+ /* ... */
+ /* ] def */
+ /* */
+ /* with exactly one space after the `RD' token. */
- while ( t42_is_space( *cur ) )
- cur++;
+ T1_Skip_Spaces( parser );
- if (*cur++ == '[')
- {
- status = 0;
- count = 0;
- }
- else
+ if ( parser->root.cursor >= limit || *parser->root.cursor++ != '[' )
{
FT_ERROR(( "t42_parse_sfnts: can't find begin of sfnts vector!\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
- while ( cur < limit - 2 )
+ T1_Skip_Spaces( parser );
+ status = BEFORE_START;
+ string_size = 0;
+ old_string_size = 0;
+ count = 0;
+
+ while ( parser->root.cursor < limit )
{
- while ( t42_is_space( *cur ) )
- cur++;
+ cur = parser->root.cursor;
- switch ( *cur )
+ if ( *cur == ']' )
{
- case ']':
- parser->root.cursor = cur++;
- return;
+ parser->root.cursor++;
+ goto Exit;
+ }
- case '<':
- in_string = 1;
- string_size = 0;
- cur++;
- continue;
+ else if ( *cur == '<' )
+ {
+ T1_Skip_PS_Token( parser );
+ if ( parser->root.error )
+ goto Exit;
- case '>':
- if ( !in_string )
- {
- FT_ERROR(( "t42_parse_sfnts: found unpaired `>'!\n" ));
- error = T42_Err_Invalid_File_Format;
+ /* don't include delimiters */
+ string_size = (FT_Long)( ( parser->root.cursor - cur - 2 + 1 ) / 2 );
+ if ( FT_REALLOC( string_buf, old_string_size, string_size ) )
goto Fail;
- }
- /* A string can have, as a last byte, */
- /* a zero byte for padding. If so, ignore it */
- if ( ( v == 0 ) && ( string_size % 2 == 1 ) )
- count--;
- in_string = 0;
- cur++;
- continue;
+ alloc = 1;
- case '%':
- if ( !in_string )
- {
- /* Comment found; skip till end of line */
- while ( *cur != '\n' )
- cur++;
- continue;
- }
- else
- {
- FT_ERROR(( "t42_parse_sfnts: found `%' in string!\n" ));
- error = T42_Err_Invalid_File_Format;
- goto Fail;
- }
+ parser->root.cursor = cur;
+ (void)T1_ToBytes( parser, string_buf, string_size, &real_size, 1 );
+ old_string_size = string_size;
+ string_size = real_size;
+ }
+
+ else if ( ft_isdigit( *cur ) )
+ {
+ string_size = T1_ToInt( parser );
- default:
- if ( !ft_xdigit( *cur ) || !ft_xdigit( *(cur + 1) ) )
+ T1_Skip_PS_Token( parser ); /* `RD' */
+
+ string_buf = parser->root.cursor + 1; /* one space after `RD' */
+
+ parser->root.cursor += string_size + 1;
+ if ( parser->root.cursor >= limit )
{
- FT_ERROR(( "t42_parse_sfnts: found non-hex characters in string" ));
+ FT_ERROR(( "t42_parse_sfnts: too many binary data!\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
-
- v = (FT_Byte)( 16 * t42_hexval( cur[0] ) + t42_hexval( cur[1] ) );
- cur += 2;
- string_size++;
}
- switch ( status )
+ /* A string can have a trailing zero byte for padding. Ignore it. */
+ if ( string_buf[string_size - 1] == 0 && ( string_size % 2 == 1 ) )
+ string_size--;
+
+ for ( n = 0; n < string_size; n++ )
{
- case 0: /* The '[' was read, so load offset table, 12 bytes */
- if ( count < 12 )
+ switch ( status )
{
- face->ttf_data[count++] = v;
- continue;
- }
- else
- {
- num_tables = 16 * face->ttf_data[4] + face->ttf_data[5];
- status = 1;
- ttf_size = 12 + 16 * num_tables;
+ case BEFORE_START:
+ /* load offset table, 12 bytes */
+ if ( count < 12 )
+ {
+ face->ttf_data[count++] = string_buf[n];
+ continue;
+ }
+ else
+ {
+ num_tables = 16 * face->ttf_data[4] + face->ttf_data[5];
+ status = BEFORE_TABLE_DIR;
+ ttf_size = 12 + 16 * num_tables;
- if ( FT_REALLOC( face->ttf_data, 12, ttf_size ) )
- goto Fail;
- }
- /* No break, fall-through */
+ if ( FT_REALLOC( face->ttf_data, 12, ttf_size ) )
+ goto Fail;
+ }
+ /* fall through */
- case 1: /* The offset table is read; read now the table directory */
- if ( count < ttf_size )
- {
- face->ttf_data[count++] = v;
- continue;
- }
- else
- {
- int i;
- FT_ULong len;
+ case BEFORE_TABLE_DIR:
+ /* the offset table is read; read the table directory */
+ if ( count < ttf_size )
+ {
+ face->ttf_data[count++] = string_buf[n];
+ continue;
+ }
+ else
+ {
+ int i;
+ FT_ULong len;
- for ( i = 0; i < num_tables; i++ )
- {
- FT_Byte* p = face->ttf_data + 12 + 16*i + 12;
-
- len = FT_PEEK_ULONG( p );
+ for ( i = 0; i < num_tables; i++ )
+ {
+ FT_Byte* p = face->ttf_data + 12 + 16 * i + 12;
- /* Pad to a 4-byte boundary length */
- ttf_size += ( len + 3 ) & ~3;
- }
- status = 2;
- face->ttf_size = ttf_size;
+ len = FT_PEEK_ULONG( p );
- if ( FT_REALLOC( face->ttf_data, 12 + 16 * num_tables,
- ttf_size + 1 ) )
- goto Fail;
- }
- /* No break, fall-through */
+ /* Pad to a 4-byte boundary length */
+ ttf_size += ( len + 3 ) & ~3;
+ }
- case 2: /* We are reading normal tables; just swallow them */
- face->ttf_data[count++] = v;
+ status = OTHER_TABLES;
+ face->ttf_size = ttf_size;
+
+ if ( FT_REALLOC( face->ttf_data, 12 + 16 * num_tables,
+ ttf_size + 1 ) )
+ goto Fail;
+ }
+ /* fall through */
+ case OTHER_TABLES:
+ /* all other tables are just copied */
+ if ( count >= ttf_size )
+ {
+ FT_ERROR(( "t42_parse_sfnts: too many binary data!\n" ));
+ error = T42_Err_Invalid_File_Format;
+ goto Fail;
+ }
+ face->ttf_data[count++] = string_buf[n];
+ }
}
+
+ T1_Skip_Spaces( parser );
}
- /* If control reaches this point, the format was not valid */
+ /* if control reaches this point, the format was not valid */
error = T42_Err_Invalid_File_Format;
Fail:
parser->root.error = error;
+
+ Exit:
+ if ( alloc )
+ FT_FREE( string_buf );
}
@@ -702,22 +652,75 @@
t42_parse_charstrings( T42_Face face,
T42_Loader loader )
{
- T42_Parser parser = &loader->parser;
- PS_Table code_table = &loader->charstrings;
- PS_Table name_table = &loader->glyph_names;
- FT_Memory memory = parser->root.memory;
+ T42_Parser parser = &loader->parser;
+ PS_Table code_table = &loader->charstrings;
+ PS_Table name_table = &loader->glyph_names;
+ PS_Table swap_table = &loader->swap_table;
+ FT_Memory memory = parser->root.memory;
FT_Error error;
- PSAux_Service psaux = (PSAux_Service)face->psaux;
+ PSAux_Service psaux = (PSAux_Service)face->psaux;
FT_Byte* cur;
- FT_Byte* limit = parser->root.limit;
- FT_Int n;
+ FT_Byte* limit = parser->root.limit;
+ FT_UInt n;
+ FT_UInt notdef_index = 0;
+ FT_Byte notdef_found = 0;
- loader->num_glyphs = T1_ToInt( parser );
- if ( parser->root.error )
- return;
+ T1_Skip_Spaces( parser );
+
+ if ( parser->root.cursor >= limit )
+ {
+ FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" ));
+ error = T42_Err_Invalid_File_Format;
+ goto Fail;
+ }
+
+ if ( ft_isdigit( *parser->root.cursor ) )
+ {
+ loader->num_glyphs = (FT_UInt)T1_ToInt( parser );
+ if ( parser->root.error )
+ return;
+ }
+ else if ( *parser->root.cursor == '<' )
+ {
+ /* We have `<< ... >>'. Count the number of `/' in the dictionary */
+ /* to get its size. */
+ FT_UInt count = 0;
+
+
+ T1_Skip_PS_Token( parser );
+ T1_Skip_Spaces( parser );
+ cur = parser->root.cursor;
+
+ while ( parser->root.cursor < limit )
+ {
+ if ( *parser->root.cursor == '/' )
+ count++;
+ else if ( *parser->root.cursor == '>' )
+ {
+ loader->num_glyphs = count;
+ parser->root.cursor = cur; /* rewind */
+ break;
+ }
+ T1_Skip_PS_Token( parser );
+ T1_Skip_Spaces( parser );
+ }
+ }
+ else
+ {
+ FT_ERROR(( "t42_parse_charstrings: invalid token!\n" ));
+ error = T42_Err_Invalid_File_Format;
+ goto Fail;
+ }
+
+ if ( parser->root.cursor >= limit )
+ {
+ FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" ));
+ error = T42_Err_Invalid_File_Format;
+ goto Fail;
+ }
/* initialize tables */
@@ -733,57 +736,82 @@
if ( error )
goto Fail;
+ /* Initialize table for swapping index notdef_index and */
+ /* index 0 names and codes (if necessary). */
+
+ error = psaux->ps_table_funcs->init( swap_table, 4, memory );
+ if ( error )
+ goto Fail;
+
n = 0;
for (;;)
{
- /* the format is simple: */
- /* `/glyphname' + index + def */
- /* */
- /* note that we stop when we find an `end' */
- /* */
+ /* The format is simple: */
+ /* `/glyphname' + index [+ def] */
+
T1_Skip_Spaces( parser );
cur = parser->root.cursor;
if ( cur >= limit )
break;
- /* we stop when we find an `end' keyword */
- if ( *cur == 'e' &&
- cur + 3 < limit &&
- cur[1] == 'n' &&
- cur[2] == 'd' )
+ /* We stop when we find an `end' keyword or '>' */
+ if ( *cur == 'e' &&
+ cur + 3 < limit &&
+ cur[1] == 'n' &&
+ cur[2] == 'd' &&
+ t42_is_space( cur[3] ) )
+ break;
+ if ( *cur == '>' )
break;
- if ( *cur != '/' )
- T1_Skip_Alpha( parser );
- else
+ T1_Skip_PS_Token( parser );
+
+ if ( *cur == '/' )
{
- FT_Byte* cur2 = cur + 1;
- FT_Int len;
+ FT_PtrDist len;
+
+ if ( cur + 1 >= limit )
+ {
+ FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" ));
+ error = T42_Err_Invalid_File_Format;
+ goto Fail;
+ }
- while ( cur2 < limit && t42_is_alpha( *cur2 ) )
- cur2++;
- len = (FT_Int)( cur2 - cur - 1 );
+ cur++; /* skip `/' */
+ len = parser->root.cursor - cur;
- error = T1_Add_Table( name_table, n, cur + 1, len + 1 );
+ error = T1_Add_Table( name_table, n, cur, len + 1 );
if ( error )
goto Fail;
/* add a trailing zero to the name table */
name_table->elements[n][len] = '\0';
- parser->root.cursor = cur2;
+ /* record index of /.notdef */
+ if ( *cur == '.' &&
+ ft_strcmp( ".notdef",
+ (const char*)(name_table->elements[n]) ) == 0 )
+ {
+ notdef_index = n;
+ notdef_found = 1;
+ }
+
T1_Skip_Spaces( parser );
- cur2 = cur = parser->root.cursor;
- if ( cur >= limit )
- break;
+ cur = parser->root.cursor;
+
+ (void)T1_ToInt( parser );
+ if ( parser->root.cursor >= limit )
+ {
+ FT_ERROR(( "t42_parse_charstrings: out of bounds!\n" ));
+ error = T42_Err_Invalid_File_Format;
+ goto Fail;
+ }
- while ( cur2 < limit && t42_is_alpha( *cur2 ) )
- cur2++;
- len = (FT_Int)( cur2 - cur );
+ len = parser->root.cursor - cur;
error = T1_Add_Table( code_table, n, cur, len + 1 );
if ( error )
@@ -797,15 +825,79 @@
}
}
- /* Index 0 must be a .notdef element */
- if ( ft_strcmp( (char *)name_table->elements[0], ".notdef" ) )
+ loader->num_glyphs = n;
+
+ if ( !notdef_found )
{
- FT_ERROR(( "t42_parse_charstrings: Index 0 is not `.notdef'!\n" ));
+ FT_ERROR(( "t42_parse_charstrings: no /.notdef glyph!\n" ));
error = T42_Err_Invalid_File_Format;
goto Fail;
}
- loader->num_glyphs = n;
+ /* if /.notdef does not occupy index 0, do our magic. */
+ if ( ft_strcmp( (const char*)".notdef",
+ (const char*)name_table->elements[0] ) )
+ {
+ /* Swap glyph in index 0 with /.notdef glyph. First, add index 0 */
+ /* name and code entries to swap_table. Then place notdef_index */
+ /* name and code entries into swap_table. Then swap name and code */
+ /* entries at indices notdef_index and 0 using values stored in */
+ /* swap_table. */
+
+ /* Index 0 name */
+ error = T1_Add_Table( swap_table, 0,
+ name_table->elements[0],
+ name_table->lengths [0] );
+ if ( error )
+ goto Fail;
+
+ /* Index 0 code */
+ error = T1_Add_Table( swap_table, 1,
+ code_table->elements[0],
+ code_table->lengths [0] );
+ if ( error )
+ goto Fail;
+
+ /* Index notdef_index name */
+ error = T1_Add_Table( swap_table, 2,
+ name_table->elements[notdef_index],
+ name_table->lengths [notdef_index] );
+ if ( error )
+ goto Fail;
+
+ /* Index notdef_index code */
+ error = T1_Add_Table( swap_table, 3,
+ code_table->elements[notdef_index],
+ code_table->lengths [notdef_index] );
+ if ( error )
+ goto Fail;
+
+ error = T1_Add_Table( name_table, notdef_index,
+ swap_table->elements[0],
+ swap_table->lengths [0] );
+ if ( error )
+ goto Fail;
+
+ error = T1_Add_Table( code_table, notdef_index,
+ swap_table->elements[1],
+ swap_table->lengths [1] );
+ if ( error )
+ goto Fail;
+
+ error = T1_Add_Table( name_table, 0,
+ swap_table->elements[2],
+ swap_table->lengths [2] );
+ if ( error )
+ goto Fail;
+
+ error = T1_Add_Table( code_table, 0,
+ swap_table->elements[3],
+ swap_table->lengths [3] );
+ if ( error )
+ goto Fail;
+
+ }
+
return;
Fail:
@@ -825,26 +917,32 @@
/* if the keyword has a dedicated callback, call it */
- if ( field->type == T1_FIELD_TYPE_CALLBACK ) {
+ if ( field->type == T1_FIELD_TYPE_CALLBACK )
+ {
field->reader( (FT_Face)face, loader );
error = loader->parser.root.error;
goto Exit;
}
- /* now, the keyword is either a simple field, or a table of fields; */
- /* we are now going to take care of it */
+ /* now the keyword is either a simple field or a table of fields; */
+ /* we are now going to take care of it */
+
switch ( field->location )
{
case T1_FIELD_LOCATION_FONT_INFO:
dummy_object = &face->type1.font_info;
- objects = &dummy_object;
+ break;
+
+ case T1_FIELD_LOCATION_BBOX:
+ dummy_object = &face->type1.font_bbox;
break;
default:
dummy_object = &face->type1;
- objects = &dummy_object;
}
+ objects = &dummy_object;
+
if ( field->type == T1_FIELD_TYPE_INTEGER_ARRAY ||
field->type == T1_FIELD_TYPE_FIXED_ARRAY )
error = T1_Load_Field_Table( &loader->parser, field,
@@ -864,20 +962,28 @@
FT_Byte* base,
FT_Long size )
{
- T42_Parser parser = &loader->parser;
- FT_Byte* cur = base;
- FT_Byte* limit = cur + size;
- FT_UInt n_keywords = sizeof ( t42_keywords ) /
- sizeof ( t42_keywords[0] );
+ T42_Parser parser = &loader->parser;
+ FT_Byte* limit;
+ FT_Int n_keywords = (FT_Int)( sizeof ( t42_keywords ) /
+ sizeof ( t42_keywords[0] ) );
parser->root.cursor = base;
parser->root.limit = base + size;
- parser->root.error = 0;
+ parser->root.error = T42_Err_Ok;
- for ( ; cur < limit; cur++ )
+ limit = parser->root.limit;
+
+ T1_Skip_Spaces( parser );
+
+ while ( parser->root.cursor < limit )
{
- /* look for `FontDirectory', which causes problems on some fonts */
+ FT_Byte* cur;
+
+
+ cur = parser->root.cursor;
+
+ /* look for `FontDirectory' which causes problems for some fonts */
if ( *cur == 'F' && cur + 25 < limit &&
ft_strncmp( (char*)cur, "FontDirectory", 13 ) == 0 )
{
@@ -885,13 +991,21 @@
/* skip the `FontDirectory' keyword */
- cur += 13;
- cur2 = cur;
+ T1_Skip_PS_Token( parser );
+ T1_Skip_Spaces ( parser );
+ cur = cur2 = parser->root.cursor;
- /* lookup the `known' keyword */
- while ( cur < limit && *cur != 'k' &&
- ft_strncmp( (char*)cur, "known", 5 ) )
- cur++;
+ /* look up the `known' keyword */
+ while ( cur < limit )
+ {
+ if ( *cur == 'k' && cur + 5 < limit &&
+ ft_strncmp( (char*)cur, "known", 5 ) == 0 )
+ break;
+
+ T1_Skip_PS_Token( parser );
+ T1_Skip_Spaces ( parser );
+ cur = parser->root.cursor;
+ }
if ( cur < limit )
{
@@ -899,34 +1013,37 @@
/* skip the `known' keyword and the token following it */
- cur += 5;
- loader->parser.root.cursor = cur;
- T1_ToToken( &loader->parser, &token );
+ T1_Skip_PS_Token( parser );
+ T1_ToToken( parser, &token );
/* if the last token was an array, skip it! */
if ( token.type == T1_TOKEN_TYPE_ARRAY )
cur2 = parser->root.cursor;
}
- cur = cur2;
+ parser->root.cursor = cur2;
}
+
/* look for immediates */
else if ( *cur == '/' && cur + 2 < limit )
{
- FT_Byte* cur2;
- FT_UInt i, len;
+ FT_PtrDist len;
cur++;
- cur2 = cur;
- while ( cur2 < limit && t42_is_alpha( *cur2 ) )
- cur2++;
- len = (FT_UInt)( cur2 - cur );
- if ( len > 0 && len < 22 ) /* XXX What shall it this 22? */
+ parser->root.cursor = cur;
+ T1_Skip_PS_Token( parser );
+
+ len = parser->root.cursor - cur;
+
+ if ( len > 0 && len < 22 && parser->root.cursor < limit )
{
- /* now, compare the immediate name to the keyword table */
+ int i;
+
+
+ /* now compare the immediate name to the keyword table */
- /* Loop through all known keywords */
+ /* loop through all known keywords */
for ( i = 0; i < n_keywords; i++ )
{
T1_Field keyword = (T1_Field)&t42_keywords[i];
@@ -936,24 +1053,27 @@
if ( !name )
continue;
- if ( ( len == ft_strlen( (const char *)name ) ) &&
- ( ft_memcmp( cur, name, len ) == 0 ) )
+ if ( cur[0] == name[0] &&
+ len == ft_strlen( (const char *)name ) &&
+ ft_memcmp( cur, name, len ) == 0 )
{
/* we found it -- run the parsing callback! */
- parser->root.cursor = cur2;
- T1_Skip_Spaces( parser );
- parser->root.error = t42_load_keyword(face,
- loader,
- keyword );
+ parser->root.error = t42_load_keyword( face,
+ loader,
+ keyword );
if ( parser->root.error )
return parser->root.error;
- cur = parser->root.cursor;
break;
}
}
}
}
+ else
+ T1_Skip_PS_Token( parser );
+
+ T1_Skip_Spaces( parser );
}
+
return parser->root.error;
}
@@ -985,6 +1105,7 @@
T1_Release_Table( &loader->encoding_table );
T1_Release_Table( &loader->charstrings );
T1_Release_Table( &loader->glyph_names );
+ T1_Release_Table( &loader->swap_table );
/* finalize parser */
t42_parser_done( parser );
diff --git a/extras/freetype2/src/type42/t42parse.h b/extras/freetype2/src/type42/t42parse.h
index 9bcb65730..f77ec4af4 100644
--- a/extras/freetype2/src/type42/t42parse.h
+++ b/extras/freetype2/src/type42/t42parse.h
@@ -4,7 +4,7 @@
/* */
/* Type 42 font parser (specification). */
/* */
-/* Copyright 2002 by Roberto Alameda. */
+/* Copyright 2002, 2003 by Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@@ -31,9 +31,9 @@ FT_BEGIN_HEADER
FT_Stream stream;
FT_Byte* base_dict;
- FT_Int base_len;
+ FT_Long base_len;
- FT_Byte in_memory;
+ FT_Bool in_memory;
} T42_ParserRec, *T42_Parser;
@@ -42,13 +42,14 @@ FT_BEGIN_HEADER
{
T42_ParserRec parser; /* parser used to read the stream */
- FT_Int num_chars; /* number of characters in encoding */
+ FT_UInt num_chars; /* number of characters in encoding */
PS_TableRec encoding_table; /* PS_Table used to store the */
/* encoding character names */
- FT_Int num_glyphs;
+ FT_UInt num_glyphs;
PS_TableRec glyph_names;
PS_TableRec charstrings;
+ PS_TableRec swap_table; /* For moving .notdef glyph to index 0. */
} T42_LoaderRec, *T42_Loader;
diff --git a/extras/freetype2/src/type42/t42types.h b/extras/freetype2/src/type42/t42types.h
new file mode 100644
index 000000000..d44ac4e67
--- /dev/null
+++ b/extras/freetype2/src/type42/t42types.h
@@ -0,0 +1,54 @@
+/***************************************************************************/
+/* */
+/* t42types.h */
+/* */
+/* Type 42 font data types (specification only). */
+/* */
+/* Copyright 2002, 2003 by Roberto Alameda. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
+#ifndef __T42TYPES_H__
+#define __T42TYPES_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_TYPE1_TABLES_H
+#include FT_INTERNAL_TYPE1_TYPES_H
+#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+
+
+FT_BEGIN_HEADER
+
+
+ typedef struct T42_FaceRec_
+ {
+ FT_FaceRec root;
+ T1_FontRec type1;
+ const void* psnames;
+ const void* psaux;
+ const void* afm_data;
+ FT_Byte* ttf_data;
+ FT_ULong ttf_size;
+ FT_Face ttf_face;
+ FT_CharMapRec charmaprecs[2];
+ FT_CharMap charmaps[2];
+ PS_Unicodes unicode_map;
+
+ } T42_FaceRec, *T42_Face;
+
+
+FT_END_HEADER
+
+#endif /* __T1TYPES_H__ */
+
+
+/* END */
diff --git a/extras/freetype2/src/winfonts/rules.mk b/extras/freetype2/src/winfonts/rules.mk
index 994eef833..71a7df2d8 100644
--- a/extras/freetype2/src/winfonts/rules.mk
+++ b/extras/freetype2/src/winfonts/rules.mk
@@ -3,7 +3,7 @@
#
-# Copyright 1996-2000, 2001 by
+# Copyright 1996-2000, 2001, 2003 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@@ -15,21 +15,20 @@
# Windows driver directory
#
-FNT_DIR := $(SRC_)winfonts
-FNT_DIR_ := $(FNT_DIR)$(SEP)
+FNT_DIR := $(SRC_DIR)/winfonts
-FNT_COMPILE := $(FT_COMPILE) $I$(FNT_DIR)
+FNT_COMPILE := $(FT_COMPILE) $I$(subst /,$(COMPILER_SEP),$(FNT_DIR))
# Windows driver sources (i.e., C files)
#
-FNT_DRV_SRC := $(FNT_DIR_)winfnt.c
+FNT_DRV_SRC := $(FNT_DIR)/winfnt.c
# Windows driver headers
#
FNT_DRV_H := $(FNT_DRV_SRC:%.c=%.h) \
- $(FNT_DIR_)fnterrs.h
+ $(FNT_DIR)/fnterrs.h
# Windows driver object(s)
@@ -37,24 +36,24 @@ FNT_DRV_H := $(FNT_DRV_SRC:%.c=%.h) \
# FNT_DRV_OBJ_M is used during `multi' builds
# FNT_DRV_OBJ_S is used during `single' builds
#
-FNT_DRV_OBJ_M := $(FNT_DRV_SRC:$(FNT_DIR_)%.c=$(OBJ_)%.$O)
-FNT_DRV_OBJ_S := $(OBJ_)winfnt.$O
+FNT_DRV_OBJ_M := $(FNT_DRV_SRC:$(FNT_DIR)/%.c=$(OBJ_DIR)/%.$O)
+FNT_DRV_OBJ_S := $(OBJ_DIR)/winfnt.$O
# Windows driver source file for single build
#
-FNT_DRV_SRC_S := $(FNT_DIR_)winfnt.c
+FNT_DRV_SRC_S := $(FNT_DIR)/winfnt.c
# Windows driver - single object
#
$(FNT_DRV_OBJ_S): $(FNT_DRV_SRC_S) $(FNT_DRV_SRC) $(FREETYPE_H) $(FNT_DRV_H)
- $(FNT_COMPILE) $T$@ $(FNT_DRV_SRC_S)
+ $(FNT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $(FNT_DRV_SRC_S))
# Windows driver - multiple objects
#
-$(OBJ_)%.$O: $(FNT_DIR_)%.c $(FREETYPE_H) $(FNT_DRV_H)
- $(FNT_COMPILE) $T$@ $<
+$(OBJ_DIR)/%.$O: $(FNT_DIR)/%.c $(FREETYPE_H) $(FNT_DRV_H)
+ $(FNT_COMPILE) $T$(subst /,$(COMPILER_SEP),$@ $<)
# update main driver object lists
@@ -62,4 +61,5 @@ $(OBJ_)%.$O: $(FNT_DIR_)%.c $(FREETYPE_H) $(FNT_DRV_H)
DRV_OBJS_S += $(FNT_DRV_OBJ_S)
DRV_OBJS_M += $(FNT_DRV_OBJ_M)
+
# EOF
diff --git a/extras/freetype2/src/winfonts/winfnt.c b/extras/freetype2/src/winfonts/winfnt.c
index a82f5ebee..26e493065 100644
--- a/extras/freetype2/src/winfonts/winfnt.c
+++ b/extras/freetype2/src/winfonts/winfnt.c
@@ -4,7 +4,7 @@
/* */
/* FreeType font driver for Windows FNT/FON files */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,12 +21,11 @@
#include FT_INTERNAL_DEBUG_H
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_OBJECTS_H
-#include FT_INTERNAL_FNT_TYPES_H
#include "winfnt.h"
-
#include "fnterrs.h"
-
+#include FT_SERVICE_WINFNT_H
+#include FT_SERVICE_XFREE86_NAME_H
/*************************************************************************/
/* */
@@ -38,8 +37,7 @@
#define FT_COMPONENT trace_winfnt
- static
- const FT_Frame_Field winmz_header_fields[] =
+ static const FT_Frame_Field winmz_header_fields[] =
{
#undef FT_STRUCTURE
#define FT_STRUCTURE WinMZ_HeaderRec
@@ -51,8 +49,7 @@
FT_FRAME_END
};
- static
- const FT_Frame_Field winne_header_fields[] =
+ static const FT_Frame_Field winne_header_fields[] =
{
#undef FT_STRUCTURE
#define FT_STRUCTURE WinNE_HeaderRec
@@ -65,13 +62,12 @@
FT_FRAME_END
};
- static
- const FT_Frame_Field winfnt_header_fields[] =
+ static const FT_Frame_Field winfnt_header_fields[] =
{
#undef FT_STRUCTURE
#define FT_STRUCTURE FT_WinFNT_HeaderRec
- FT_FRAME_START( 146 ),
+ FT_FRAME_START( 148 ),
FT_FRAME_USHORT_LE( version ),
FT_FRAME_ULONG_LE ( file_size ),
FT_FRAME_BYTES ( copyright, 60 ),
@@ -106,21 +102,29 @@
FT_FRAME_USHORT_LE( A_space ),
FT_FRAME_USHORT_LE( B_space ),
FT_FRAME_USHORT_LE( C_space ),
- FT_FRAME_USHORT_LE( color_table_offset ),
+ FT_FRAME_ULONG_LE ( color_table_offset ),
FT_FRAME_BYTES ( reserved1, 16 ),
FT_FRAME_END
};
static void
- fnt_font_done( FNT_Font font,
- FT_Stream stream )
+ fnt_font_done( FNT_Face face )
{
+ FT_Memory memory = FT_FACE( face )->memory;
+ FT_Stream stream = FT_FACE( face )->stream;
+ FNT_Font font = face->font;
+
+
+ if ( !font )
+ return;
+
if ( font->fnt_frame )
FT_FRAME_RELEASE( font->fnt_frame );
+ FT_FREE( font->family_name );
- font->fnt_size = 0;
- font->fnt_frame = 0;
+ FT_FREE( font );
+ face->font = 0;
}
@@ -130,10 +134,12 @@
{
FT_Error error;
FT_WinFNT_Header header = &font->header;
+ FT_Bool new_format;
+ FT_UInt size;
/* first of all, read the FNT header */
- if ( FT_STREAM_SEEK( font->offset ) ||
+ if ( FT_STREAM_SEEK( font->offset ) ||
FT_STREAM_READ_FIELDS( winfnt_header_fields, header ) )
goto Exit;
@@ -146,6 +152,16 @@
goto Exit;
}
+ new_format = FT_BOOL( font->header.version == 0x300 );
+ size = new_format ? 148 : 118;
+
+ if ( header->file_size < size )
+ {
+ FT_TRACE2(( "[not a valid FNT file]\n" ));
+ error = FNT_Err_Unknown_File_Format;
+ goto Exit;
+ }
+
/* Version 2 doesn't have these fields */
if ( header->version == 0x200 )
{
@@ -164,11 +180,7 @@
goto Exit;
}
- /* small fixup -- some fonts have the `pixel_width' field set to 0 */
- if ( header->pixel_width == 0 )
- header->pixel_width = header->pixel_height;
-
- /* this is a FNT file/table, we now extract its frame */
+ /* this is a FNT file/table; extract its frame */
if ( FT_STREAM_SEEK( font->offset ) ||
FT_FRAME_EXTRACT( header->file_size, font->fnt_frame ) )
goto Exit;
@@ -178,25 +190,9 @@
}
- static void
- fnt_face_done_fonts( FNT_Face face )
- {
- FT_Memory memory = FT_FACE( face )->memory;
- FT_Stream stream = FT_FACE( face )->stream;
- FNT_Font cur = face->fonts;
- FNT_Font limit = cur + face->num_fonts;
-
-
- for ( ; cur < limit; cur++ )
- fnt_font_done( cur, stream );
-
- FT_FREE( face->fonts );
- face->num_fonts = 0;
- }
-
-
static FT_Error
- fnt_face_get_dll_fonts( FNT_Face face )
+ fnt_face_get_dll_font( FNT_Face face,
+ FT_Int face_index )
{
FT_Error error;
FT_Stream stream = FT_FACE( face )->stream;
@@ -204,38 +200,36 @@
WinMZ_HeaderRec mz_header;
- face->fonts = 0;
- face->num_fonts = 0;
+ face->font = 0;
- /* does it begin with a MZ header? */
- if ( FT_STREAM_SEEK( 0 ) ||
+ /* does it begin with an MZ header? */
+ if ( FT_STREAM_SEEK( 0 ) ||
FT_STREAM_READ_FIELDS( winmz_header_fields, &mz_header ) )
goto Exit;
error = FNT_Err_Unknown_File_Format;
if ( mz_header.magic == WINFNT_MZ_MAGIC )
{
- /* yes, now look for a NE header in the file */
+ /* yes, now look for an NE header in the file */
WinNE_HeaderRec ne_header;
- if ( FT_STREAM_SEEK( mz_header.lfanew ) ||
+ if ( FT_STREAM_SEEK( mz_header.lfanew ) ||
FT_STREAM_READ_FIELDS( winne_header_fields, &ne_header ) )
goto Exit;
error = FNT_Err_Unknown_File_Format;
if ( ne_header.magic == WINFNT_NE_MAGIC )
{
- /* good, now look in the resource table for each FNT resource */
- FT_ULong res_offset = mz_header.lfanew +
- ne_header.resource_tab_offset;
-
+ /* good, now look into the resource table for each FNT resource */
+ FT_ULong res_offset = mz_header.lfanew +
+ ne_header.resource_tab_offset;
FT_UShort size_shift;
FT_UShort font_count = 0;
FT_ULong font_offset = 0;
- if ( FT_STREAM_SEEK( res_offset ) ||
+ if ( FT_STREAM_SEEK( res_offset ) ||
FT_FRAME_ENTER( ne_header.rname_tab_offset -
ne_header.resource_tab_offset ) )
goto Exit;
@@ -253,7 +247,7 @@
count = FT_GET_USHORT_LE();
- if ( type_id == 0x8008 )
+ if ( type_id == 0x8008U )
{
font_count = count;
font_offset = (FT_ULong)( FT_STREAM_POS() + 4 +
@@ -263,6 +257,7 @@
stream->cursor += 4 + count * 12;
}
+
FT_FRAME_EXIT();
if ( !font_count || !font_offset )
@@ -272,57 +267,42 @@
goto Exit;
}
- if ( FT_STREAM_SEEK( font_offset ) ||
- FT_NEW_ARRAY( face->fonts, font_count ) )
- goto Exit;
-
- face->num_fonts = font_count;
+ face->root.num_faces = font_count;
- if ( FT_FRAME_ENTER( (FT_Long)font_count * 12 ) )
+ if ( face_index >= font_count )
+ {
+ error = FNT_Err_Bad_Argument;
goto Exit;
+ }
- /* now read the offset and position of each FNT font */
- {
- FNT_Font cur = face->fonts;
- FNT_Font limit = cur + font_count;
+ if ( FT_NEW( face->font ) )
+ goto Exit;
+ if ( FT_STREAM_SEEK( font_offset + face_index * 12 ) ||
+ FT_FRAME_ENTER( 12 ) )
+ goto Fail;
- for ( ; cur < limit; cur++ )
- {
- cur->offset = (FT_ULong)FT_GET_USHORT_LE() << size_shift;
- cur->fnt_size = (FT_ULong)FT_GET_USHORT_LE() << size_shift;
- cur->size_shift = size_shift;
- stream->cursor += 8;
- }
- }
- FT_FRAME_EXIT();
+ face->font->offset = (FT_ULong)FT_GET_USHORT_LE() << size_shift;
+ face->font->fnt_size = (FT_ULong)FT_GET_USHORT_LE() << size_shift;
+ face->font->size_shift = size_shift;
- /* finally, try to load each font there */
- {
- FNT_Font cur = face->fonts;
- FNT_Font limit = cur + font_count;
+ stream->cursor += 8;
+ FT_FRAME_EXIT();
- for ( ; cur < limit; cur++ )
- {
- error = fnt_font_load( cur, stream );
- if ( error )
- goto Fail;
- }
- }
+ error = fnt_font_load( face->font, stream );
}
}
Fail:
if ( error )
- fnt_face_done_fonts( face );
+ fnt_font_done( face );
Exit:
return error;
}
-
typedef struct FNT_CMapRec_
{
FT_CMapRec cmap;
@@ -336,7 +316,7 @@
fnt_cmap_init( FNT_CMap cmap )
{
FNT_Face face = (FNT_Face)FT_CMAP_FACE( cmap );
- FNT_Font font = face->fonts;
+ FNT_Font font = face->font;
cmap->first = (FT_UInt32) font->header.first_char;
@@ -355,8 +335,8 @@
char_code -= cmap->first;
if ( char_code < cmap->count )
- gindex = char_code + 1;
-
+ gindex = char_code + 1; /* we artificially increase the glyph index; */
+ /* FNT_Load_Glyph reverts to the right one */
return gindex;
}
@@ -390,7 +370,7 @@
}
- static FT_CMap_ClassRec fnt_cmap_class_rec =
+ static const FT_CMap_ClassRec fnt_cmap_class_rec =
{
sizeof ( FNT_CMapRec ),
@@ -400,8 +380,7 @@
(FT_CMap_CharNextFunc) fnt_cmap_char_next
};
- static FT_CMap_Class fnt_cmap_class = &fnt_cmap_class_rec;
-
+ static FT_CMap_Class const fnt_cmap_class = &fnt_cmap_class_rec;
static void
@@ -410,7 +389,7 @@
FT_Memory memory = FT_FACE_MEMORY( face );
- fnt_face_done_fonts( face );
+ fnt_font_done( face );
FT_FREE( face->root.available_sizes );
face->root.num_fixed_sizes = 0;
@@ -429,23 +408,22 @@
FT_UNUSED( num_params );
FT_UNUSED( params );
- FT_UNUSED( face_index );
- /* try to load several fonts from a DLL */
- error = fnt_face_get_dll_fonts( face );
+ /* try to load font from a DLL */
+ error = fnt_face_get_dll_font( face, face_index );
if ( error )
{
- /* this didn't work, now try to load a single FNT font */
+ /* this didn't work; try to load a single FNT font */
FNT_Font font;
- if ( FT_NEW( face->fonts ) )
+ if ( FT_NEW( face->font ) )
goto Exit;
- face->num_fonts = 1;
- font = face->fonts;
+ face->root.num_faces = 1;
+ font = face->font;
font->offset = 0;
font->fnt_size = stream->size;
@@ -454,53 +432,64 @@
goto Fail;
}
- /* all right, one or more fonts were loaded; we now need to */
- /* fill the root FT_Face fields with relevant information */
+ /* we now need to fill the root FT_Face fields */
+ /* with relevant information */
{
- FT_Face root = FT_FACE( face );
- FNT_Font fonts = face->fonts;
- FNT_Font limit = fonts + face->num_fonts;
- FNT_Font cur;
+ FT_Face root = FT_FACE( face );
+ FNT_Font font = face->font;
+ FT_PtrDist family_size;
- root->num_faces = 1;
root->face_flags = FT_FACE_FLAG_FIXED_SIZES |
FT_FACE_FLAG_HORIZONTAL;
- if ( fonts->header.avg_width == fonts->header.max_width )
+ if ( font->header.avg_width == font->header.max_width )
root->face_flags |= FT_FACE_FLAG_FIXED_WIDTH;
- if ( fonts->header.italic )
+ if ( font->header.italic )
root->style_flags |= FT_STYLE_FLAG_ITALIC;
- if ( fonts->header.weight >= 800 )
+ if ( font->header.weight >= 800 )
root->style_flags |= FT_STYLE_FLAG_BOLD;
- /* Setup the `fixed_sizes' array */
- if ( FT_NEW_ARRAY( root->available_sizes, face->num_fonts ) )
+ /* set up the `fixed_sizes' array */
+ if ( FT_NEW_ARRAY( root->available_sizes, 1 ) )
goto Fail;
- root->num_fixed_sizes = face->num_fonts;
+ root->num_fixed_sizes = 1;
{
- FT_Bitmap_Size* size = root->available_sizes;
-
-
- for ( cur = fonts; cur < limit; cur++, size++ )
- {
- size->width = cur->header.pixel_width;
- size->height = cur->header.pixel_height;
- }
+ FT_Bitmap_Size* bsize = root->available_sizes;
+
+
+ bsize->width = font->header.avg_width;
+ bsize->height = (FT_Short)(
+ font->header.pixel_height + font->header.external_leading );
+ bsize->size = font->header.nominal_point_size << 6;
+ bsize->x_ppem =
+ (FT_Pos)( ( font->header.horizontal_resolution * bsize->size + 36 )
+ / 72 );
+ bsize->y_ppem =
+ (FT_Pos)( ( font->header.vertical_resolution* bsize->size + 36 )
+ / 72 );
}
{
FT_CharMapRec charmap;
- charmap.encoding = FT_ENCODING_UNICODE;
- charmap.platform_id = 3;
- charmap.encoding_id = 1;
+
+ charmap.encoding = FT_ENCODING_NONE;
+ charmap.platform_id = 0;
+ charmap.encoding_id = 0;
charmap.face = root;
+ if ( font->header.charset == FT_WinFNT_ID_MAC )
+ {
+ charmap.encoding = FT_ENCODING_APPLE_ROMAN;
+ charmap.platform_id = 1;
+/* charmap.encoding_id = 0; */
+ }
+
error = FT_CMap_New( fnt_cmap_class,
NULL,
&charmap,
@@ -514,11 +503,27 @@
}
/* setup remaining flags */
- root->num_glyphs = fonts->header.last_char -
- fonts->header.first_char + 1;
- root->family_name = (FT_String*)fonts->fnt_frame +
- fonts->header.face_name_offset;
+ /* reserve one slot for the .notdef glyph at index 0 */
+ root->num_glyphs = font->header.last_char -
+ font->header.first_char + 1 + 1;
+
+ /* Some broken fonts don't delimit the face name with a final */
+ /* NULL byte -- the frame is erroneously one byte too small. */
+ /* We thus allocate one more byte, setting it explicitly to */
+ /* zero. */
+ family_size = font->header.file_size - font->header.face_name_offset;
+ if ( FT_ALLOC( font->family_name, family_size + 1 ) )
+ goto Fail;
+ FT_MEM_COPY( font->family_name,
+ font->fnt_frame + font->header.face_name_offset,
+ family_size );
+ font->family_name[family_size] = '\0';
+ if ( FT_REALLOC( font->family_name,
+ family_size,
+ ft_strlen( font->family_name ) + 1 ) )
+ goto Fail;
+ root->family_name = font->family_name;
root->style_name = (char *)"Regular";
if ( root->style_flags & FT_STYLE_FLAG_BOLD )
@@ -531,10 +536,10 @@
else if ( root->style_flags & FT_STYLE_FLAG_ITALIC )
root->style_name = (char *)"Italic";
}
+ goto Exit;
Fail:
- if ( error )
- FNT_Face_Done( face );
+ FNT_Face_Done( face );
Exit:
return error;
@@ -542,69 +547,64 @@
static FT_Error
- FNT_Size_Set_Pixels( FNT_Size size )
+ FNT_Size_Set_Pixels( FT_Size size )
{
- /* look up a font corresponding to the current pixel size */
- FNT_Face face = (FNT_Face)FT_SIZE_FACE( size );
- FNT_Font cur = face->fonts;
- FNT_Font limit = cur + face->num_fonts;
+ FNT_Face face = (FNT_Face)FT_SIZE_FACE( size );
+ FT_Face root = FT_FACE( face );
- size->font = 0;
- for ( ; cur < limit; cur++ )
+ if ( size->metrics.y_ppem == root->available_sizes->height )
{
- /* we only compare the character height, as fonts used some strange */
- /* values */
- if ( cur->header.pixel_height == size->root.metrics.y_ppem )
- {
- size->font = cur;
+ FNT_Font font = face->font;
- size->root.metrics.ascender = cur->header.ascent * 64;
- size->root.metrics.descender = ( cur->header.pixel_height -
- cur->header.ascent ) * 64;
- size->root.metrics.height = cur->header.pixel_height * 64;
- break;
- }
- }
- return ( size->font ? FNT_Err_Ok : FNT_Err_Invalid_Pixel_Size );
+ size->metrics.ascender = font->header.ascent * 64;
+ size->metrics.descender = -( font->header.pixel_height -
+ font->header.ascent ) * 64;
+ size->metrics.height = font->header.pixel_height * 64;
+ size->metrics.max_advance = font->header.max_width * 64;
+
+ return FNT_Err_Ok;
+ }
+ else
+ return FNT_Err_Invalid_Pixel_Size;
}
static FT_Error
FNT_Load_Glyph( FT_GlyphSlot slot,
- FNT_Size size,
+ FT_Size size,
FT_UInt glyph_index,
FT_Int32 load_flags )
{
- FNT_Font font = size->font;
- FT_Error error = 0;
+ FNT_Face face = (FNT_Face)FT_SIZE_FACE( size );
+ FNT_Font font = face->font;
+ FT_Error error = FNT_Err_Ok;
FT_Byte* p;
FT_Int len;
FT_Bitmap* bitmap = &slot->bitmap;
FT_ULong offset;
FT_Bool new_format;
- FT_UNUSED( slot );
FT_UNUSED( load_flags );
- if ( !font )
+ if ( !face || !font )
{
error = FNT_Err_Invalid_Argument;
goto Exit;
}
if ( glyph_index > 0 )
- glyph_index--;
+ glyph_index--; /* revert to real index */
else
- glyph_index = font->header.default_char - font->header.first_char;
+ glyph_index = font->header.default_char; /* the .notdef glyph */
new_format = FT_BOOL( font->header.version == 0x300 );
len = new_format ? 6 : 4;
/* jump to glyph entry */
- p = font->fnt_frame + ( new_format ? 146 : 118 ) + len * glyph_index;
+ p = font->fnt_frame + ( new_format ? 148 : 118 ) + len * glyph_index;
bitmap->width = FT_NEXT_SHORT_LE( p );
@@ -613,26 +613,49 @@
else
offset = FT_NEXT_USHORT_LE( p );
+ if ( offset >= font->header.file_size )
+ {
+ FT_TRACE2(( "invalid FNT offset!\n" ));
+ error = FNT_Err_Invalid_File_Format;
+ goto Exit;
+ }
+
/* jump to glyph data */
p = font->fnt_frame + /* font->header.bits_offset */ + offset;
/* allocate and build bitmap */
{
+ FT_Memory memory = FT_FACE_MEMORY( slot->face );
FT_Int pitch = ( bitmap->width + 7 ) >> 3;
+ FT_Byte* column;
+ FT_Byte* write;
bitmap->pitch = pitch;
bitmap->rows = font->header.pixel_height;
bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
- /* note: we don't allocate a new buffer for the bitmap since we */
- /* already store the images in the FT_Face */
- ft_glyphslot_set_bitmap( slot, p );
+ /* note: since glyphs are stored in columns and not in rows we */
+ /* can't use ft_glyphslot_set_bitmap */
+ if ( FT_ALLOC( bitmap->buffer, pitch * bitmap->rows ) )
+ goto Exit;
+
+ column = (FT_Byte*)bitmap->buffer;
+
+ for ( ; pitch > 0; pitch--, column++ )
+ {
+ FT_Byte* limit = p + bitmap->rows;
+
+
+ for ( write = column; p < limit; p++, write += bitmap->pitch )
+ *write = *p;
+ }
}
- slot->bitmap_left = 0;
- slot->bitmap_top = font->header.ascent;
- slot->format = FT_GLYPH_FORMAT_BITMAP;
+ slot->internal->flags = FT_GLYPH_OWN_BITMAP;
+ slot->bitmap_left = 0;
+ slot->bitmap_top = font->header.ascent;
+ slot->format = FT_GLYPH_FORMAT_BITMAP;
/* now set up metrics */
slot->metrics.horiAdvance = bitmap->width << 6;
@@ -647,11 +670,55 @@
}
+ static FT_Error
+ winfnt_get_header( FT_Face face,
+ FT_WinFNT_HeaderRec *aheader )
+ {
+ FNT_Font font = ((FNT_Face)face)->font;
+
+
+ *aheader = font->header;
+
+ return 0;
+ }
+
+
+ static const FT_Service_WinFntRec winfnt_service_rec =
+ {
+ winfnt_get_header
+ };
+
+ /*
+ * SERVICE LIST
+ *
+ */
+
+ static const FT_ServiceDescRec winfnt_services[] =
+ {
+ { FT_SERVICE_ID_XF86_NAME, FT_XF86_FORMAT_WINFNT },
+ { FT_SERVICE_ID_WINFNT, &winfnt_service_rec },
+ { NULL, NULL }
+ };
+
+
+ static FT_Module_Interface
+ winfnt_get_service( FT_Driver driver,
+ const FT_String* service_id )
+ {
+ FT_UNUSED( driver );
+
+ return ft_service_list_lookup( winfnt_services, service_id );
+ }
+
+
+
+
FT_CALLBACK_TABLE_DEF
const FT_Driver_ClassRec winfnt_driver_class =
{
{
- ft_module_font_driver,
+ FT_MODULE_FONT_DRIVER |
+ FT_MODULE_DRIVER_NO_OUTLINES,
sizeof ( FT_DriverRec ),
"winfonts",
@@ -662,11 +729,11 @@
(FT_Module_Constructor)0,
(FT_Module_Destructor) 0,
- (FT_Module_Requester) 0
+ (FT_Module_Requester) winfnt_get_service
},
sizeof( FNT_FaceRec ),
- sizeof( FNT_SizeRec ),
+ sizeof( FT_SizeRec ),
sizeof( FT_GlyphSlotRec ),
(FT_Face_InitFunc) FNT_Face_Init,
diff --git a/extras/freetype2/src/winfonts/winfnt.h b/extras/freetype2/src/winfonts/winfnt.h
index 4ba85e0b2..32ab6daf0 100644
--- a/extras/freetype2/src/winfonts/winfnt.h
+++ b/extras/freetype2/src/winfonts/winfnt.h
@@ -4,7 +4,7 @@
/* */
/* FreeType font driver for Windows FNT/FON files */
/* */
-/* Copyright 1996-2001, 2002 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -21,11 +21,79 @@
#include <ft2build.h>
+#include FT_WINFONTS_H
#include FT_INTERNAL_DRIVER_H
FT_BEGIN_HEADER
+ typedef struct WinMZ_HeaderRec_
+ {
+ FT_UShort magic;
+ /* skipped content */
+ FT_UShort lfanew;
+
+ } WinMZ_HeaderRec;
+
+
+ typedef struct WinNE_HeaderRec_
+ {
+ FT_UShort magic;
+ /* skipped content */
+ FT_UShort resource_tab_offset;
+ FT_UShort rname_tab_offset;
+
+ } WinNE_HeaderRec;
+
+
+ typedef struct WinNameInfoRec_
+ {
+ FT_UShort offset;
+ FT_UShort length;
+ FT_UShort flags;
+ FT_UShort id;
+ FT_UShort handle;
+ FT_UShort usage;
+
+ } WinNameInfoRec;
+
+
+ typedef struct WinResourceInfoRec_
+ {
+ FT_UShort type_id;
+ FT_UShort count;
+
+ } WinResourceInfoRec;
+
+
+#define WINFNT_MZ_MAGIC 0x5A4D
+#define WINFNT_NE_MAGIC 0x454E
+
+
+ typedef struct FNT_FontRec_
+ {
+ FT_ULong offset;
+ FT_Int size_shift;
+
+ FT_WinFNT_HeaderRec header;
+
+ FT_Byte* fnt_frame;
+ FT_ULong fnt_size;
+ FT_String* family_name;
+
+ } FNT_FontRec, *FNT_Font;
+
+
+ typedef struct FNT_FaceRec_
+ {
+ FT_FaceRec root;
+ FNT_Font font;
+
+ FT_CharMap charmap_handle;
+ FT_CharMapRec charmap; /* a single charmap per face */
+
+ } FNT_FaceRec, *FNT_Face;
+
FT_EXPORT_VAR( const FT_Driver_ClassRec ) winfnt_driver_class;
diff --git a/extras/freetype2/tests/gview.c b/extras/freetype2/tests/gview.c
index 0e76e19ef..f68598512 100644
--- a/extras/freetype2/tests/gview.c
+++ b/extras/freetype2/tests/gview.c
@@ -7,9 +7,7 @@
/* include FreeType internals to debug hints */
#include <../src/pshinter/pshrec.h>
-#include <../src/pshinter/pshalgo1.h>
-#include <../src/pshinter/pshalgo2.h>
-#include <../src/pshinter/pshalgo3.h>
+#include <../src/pshinter/pshalgo.h>
#include <../src/autohint/ahtypes.h>
@@ -24,9 +22,9 @@
#include <time.h> /* for clock() */
-/* SunOS 4.1.* does not define CLOCKS_PER_SEC, so include <sys/param.h> */
-/* to get the HZ macro which is the equivalent. */
-#if defined(__sun__) && !defined(SVR4) && !defined(__SVR4)
+ /* SunOS 4.1.* does not define CLOCKS_PER_SEC, so include <sys/param.h> */
+ /* to get the HZ macro which is the equivalent. */
+#if defined( __sun__ ) && !defined( SVR4 ) && !defined( __SVR4 )
#include <sys/param.h>
#define CLOCKS_PER_SEC HZ
#endif
@@ -56,6 +54,7 @@ static NV_Scale grid_scale = 1.0;
static int glyph_index;
static int pixel_size = 12;
+
/************************************************************************/
/************************************************************************/
/***** *****/
@@ -116,6 +115,7 @@ static NV_Path symbol_rect_v = NULL;
#define LINK_COLOR 0xF0FFFF00
#define SERIF_LINK_COLOR 0xF0FF808F
+
/* print message and abort program */
static void
Panic( const char* message )
@@ -144,6 +144,7 @@ init_symbols( void )
nv_path_new_circle( renderer, 0, 0, 2., &symbol_dot );
}
+
static void
done_symbols( void )
{
@@ -154,36 +155,39 @@ done_symbols( void )
nv_path_destroy( symbol_square );
}
- /************************************************************************/
- /************************************************************************/
- /***** *****/
- /***** COMMON GRID DRAWING ROUTINES *****/
- /***** *****/
- /************************************************************************/
- /************************************************************************/
+
+ /************************************************************************/
+ /************************************************************************/
+ /***** *****/
+ /***** COMMON GRID DRAWING ROUTINES *****/
+ /***** *****/
+ /************************************************************************/
+ /************************************************************************/
static void
reset_scale( NV_Scale scale )
{
- /* compute font units -> grid pixels scale factor */
+ /* compute font units -> grid pixels scale factor */
glyph_scale = target->width*0.75 / face->units_per_EM * scale;
- /* setup font units -> grid pixels transform */
+ /* setup font units -> grid pixels transform */
nv_transform_set_scale( &glyph_transform, glyph_scale, -glyph_scale );
glyph_org_x = glyph_transform.delta.x = target->width*0.125;
glyph_org_y = glyph_transform.delta.y = target->height*0.875;
- /* setup subpixels -> grid pixels transform */
- nv_transform_set_scale( &size_transform,
- glyph_scale/nv_fromfixed(face->size->metrics.x_scale),
- - glyph_scale/nv_fromfixed(face->size->metrics.y_scale) );
+ /* setup subpixels -> grid pixels transform */
+ nv_transform_set_scale(
+ &size_transform,
+ glyph_scale / nv_fromfixed( face->size->metrics.x_scale ),
+ -glyph_scale / nv_fromfixed( face->size->metrics.y_scale ) );
size_transform.delta = glyph_transform.delta;
}
static void
-reset_size( int pixel_size, NV_Scale scale )
+reset_size( int pixel_size,
+ NV_Scale scale )
{
FT_Set_Pixel_Sizes( face, pixel_size, pixel_size );
reset_scale( scale );
@@ -204,34 +208,36 @@ draw_grid( void )
int x = (int)glyph_org_x;
int y = (int)glyph_org_y;
+
/* draw grid */
if ( option_show_grid )
{
NV_Scale min, max, x, step;
+
/* draw vertical grid bars */
step = 64. * size_transform.matrix.xx;
- if (step > 1.)
+ if ( step > 1. )
{
- min = max = glyph_org_x;
+ min = max = glyph_org_x;
while ( min - step >= 0 ) min -= step;
while ( max + step < target->width ) max += step;
for ( x = min; x <= max; x += step )
- nv_pixmap_fill_rect( target, (NV_Int)(x+.5), 0,
+ nv_pixmap_fill_rect( target, (NV_Int)(x + .5), 0,
1, target->height, GRID_COLOR );
}
/* draw horizontal grid bars */
step = -64. * size_transform.matrix.yy;
- if (step > 1.)
+ if ( step > 1. )
{
- min = max = glyph_org_y;
+ min = max = glyph_org_y;
while ( min - step >= 0 ) min -= step;
while ( max + step < target->height ) max += step;
for ( x = min; x <= max; x += step )
- nv_pixmap_fill_rect( target, 0, (NV_Int)(x+.5),
+ nv_pixmap_fill_rect( target, 0, (NV_Int)(x + .5),
target->width, 1, GRID_COLOR );
}
}
@@ -249,6 +255,7 @@ draw_grid( void )
NV_Path stroke;
NV_UInt units = (NV_UInt)face->units_per_EM;
+
nv_path_new_rectangle( renderer, 0, 0, units, units, 0, 0, &path );
nv_path_transform( path, &glyph_transform );
@@ -265,13 +272,13 @@ draw_grid( void )
}
- /************************************************************************/
- /************************************************************************/
- /***** *****/
- /***** POSTSCRIPT GLOBALS ROUTINES *****/
- /***** *****/
- /************************************************************************/
- /************************************************************************/
+ /************************************************************************/
+ /************************************************************************/
+ /***** *****/
+ /***** POSTSCRIPT GLOBALS ROUTINES *****/
+ /***** *****/
+ /************************************************************************/
+ /************************************************************************/
#include <../src/pshinter/pshglob.h>
@@ -287,6 +294,7 @@ draw_ps_blue_zones( void )
FT_UInt count;
PSH_Blue_Zone zone;
+
/* draw top zones */
table = &blues->normal_top;
count = table->count;
@@ -348,7 +356,7 @@ draw_ps_blue_zones( void )
y2 = (int)(v.y + 0.5);
nv_pixmap_fill_rect( target, 0, y1,
- target->width, y2-y1+1,
+ target->width, y2 - y1 + 1,
BLUES_BOT_COLOR );
#if 0
@@ -358,278 +366,28 @@ draw_ps_blue_zones( void )
}
}
- /************************************************************************/
- /************************************************************************/
- /***** *****/
- /***** POSTSCRIPT HINTER ALGORITHM 1 ROUTINES *****/
- /***** *****/
- /************************************************************************/
- /************************************************************************/
-
-#include <../src/pshinter/pshalgo1.h>
-
-static int pshint_cpos = 0;
-static int pshint_vertical = -1;
-
-static void
-draw_ps1_hint( PSH1_Hint hint, FT_Bool vertical )
-{
- int x1, x2;
- NV_Vector v;
-
-
- if ( pshint_vertical != vertical )
- {
- if (vertical)
- pshint_cpos = 40;
- else
- pshint_cpos = 10;
-
- pshint_vertical = vertical;
- }
-
- if (vertical)
- {
- if ( !option_show_vert_hints )
- return;
-
- v.x = hint->cur_pos;
- v.y = 0;
- nv_vector_transform( &v, &size_transform );
- x1 = (int)(v.x + 0.5);
-
- v.x = hint->cur_pos + hint->cur_len;
- v.y = 0;
- nv_vector_transform( &v, &size_transform );
- x2 = (int)(v.x + 0.5);
-
- nv_pixmap_fill_rect( target, x1, 0, 1, target->height,
- psh1_hint_is_ghost(hint)
- ? GHOST_HINT_COLOR : STEM_HINT_COLOR );
-
- if ( psh1_hint_is_ghost(hint) )
- {
- x1 --;
- x2 = x1 + 2;
- }
- else
- nv_pixmap_fill_rect( target, x2, 0, 1, target->height,
- psh1_hint_is_ghost(hint)
- ? GHOST_HINT_COLOR : STEM_HINT_COLOR );
-
- nv_pixmap_fill_rect( target, x1, pshint_cpos, x2+1-x1, 1,
- STEM_JOIN_COLOR );
- }
- else
- {
- if (!option_show_horz_hints)
- return;
-
- v.y = hint->cur_pos;
- v.x = 0;
- nv_vector_transform( &v, &size_transform );
- x1 = (int)(v.y + 0.5);
-
- v.y = hint->cur_pos + hint->cur_len;
- v.x = 0;
- nv_vector_transform( &v, &size_transform );
- x2 = (int)(v.y + 0.5);
-
- nv_pixmap_fill_rect( target, 0, x1, target->width, 1,
- psh1_hint_is_ghost(hint)
- ? GHOST_HINT_COLOR : STEM_HINT_COLOR );
-
- if ( psh1_hint_is_ghost(hint) )
- {
- x1 --;
- x2 = x1 + 2;
- }
- else
- nv_pixmap_fill_rect( target, 0, x2, target->width, 1,
- psh1_hint_is_ghost(hint)
- ? GHOST_HINT_COLOR : STEM_HINT_COLOR );
-
- nv_pixmap_fill_rect( target, pshint_cpos, x2, 1, x1+1-x2,
- STEM_JOIN_COLOR );
- }
-
-#if 0
- printf( "[%7.3f %7.3f] %c\n", hint->cur_pos/64.0, (hint->cur_pos+hint->cur_len)/64.0, vertical ? 'v' : 'h' );
-#endif
-
- pshint_cpos += 10;
-}
-
-
/************************************************************************/
/************************************************************************/
/***** *****/
- /***** POSTSCRIPT HINTER ALGORITHM 2 ROUTINES *****/
+ /***** POSTSCRIPT HINTER ALGORITHM ROUTINES *****/
/***** *****/
/************************************************************************/
/************************************************************************/
-#include <../src/pshinter/pshalgo2.h>
+#include <../src/pshinter/pshalgo.h>
static void
-draw_ps2_hint( PSH2_Hint hint, FT_Bool vertical )
+draw_ps_hint( PSH_Hint hint,
+ FT_Bool vertical )
{
int x1, x2;
NV_Vector v;
- if ( pshint_vertical != vertical )
- {
- if (vertical)
- pshint_cpos = 40;
- else
- pshint_cpos = 10;
-
- pshint_vertical = vertical;
- }
-
- if (vertical)
- {
- if ( !option_show_vert_hints )
- return;
-
- v.x = hint->cur_pos;
- v.y = 0;
- nv_vector_transform( &v, &size_transform );
- x1 = (int)(v.x + 0.5);
-
- v.x = hint->cur_pos + hint->cur_len;
- v.y = 0;
- nv_vector_transform( &v, &size_transform );
- x2 = (int)(v.x + 0.5);
-
- nv_pixmap_fill_rect( target, x1, 0, 1, target->height,
- psh2_hint_is_ghost(hint)
- ? GHOST_HINT_COLOR : STEM_HINT_COLOR );
-
- if ( psh2_hint_is_ghost(hint) )
- {
- x1 --;
- x2 = x1 + 2;
- }
- else
- nv_pixmap_fill_rect( target, x2, 0, 1, target->height,
- psh2_hint_is_ghost(hint)
- ? GHOST_HINT_COLOR : STEM_HINT_COLOR );
-
- nv_pixmap_fill_rect( target, x1, pshint_cpos, x2+1-x1, 1,
- STEM_JOIN_COLOR );
- }
- else
- {
- if (!option_show_horz_hints)
- return;
-
- v.y = hint->cur_pos;
- v.x = 0;
- nv_vector_transform( &v, &size_transform );
- x1 = (int)(v.y + 0.5);
-
- v.y = hint->cur_pos + hint->cur_len;
- v.x = 0;
- nv_vector_transform( &v, &size_transform );
- x2 = (int)(v.y + 0.5);
-
- nv_pixmap_fill_rect( target, 0, x1, target->width, 1,
- psh2_hint_is_ghost(hint)
- ? GHOST_HINT_COLOR : STEM_HINT_COLOR );
-
- if ( psh2_hint_is_ghost(hint) )
- {
- x1 --;
- x2 = x1 + 2;
- }
- else
- nv_pixmap_fill_rect( target, 0, x2, target->width, 1,
- psh2_hint_is_ghost(hint)
- ? GHOST_HINT_COLOR : STEM_HINT_COLOR );
-
- nv_pixmap_fill_rect( target, pshint_cpos, x2, 1, x1+1-x2,
- STEM_JOIN_COLOR );
- }
-
-#if 0
- printf( "[%7.3f %7.3f] %c\n", hint->cur_pos/64.0, (hint->cur_pos+hint->cur_len)/64.0, vertical ? 'v' : 'h' );
-#endif
-
- pshint_cpos += 10;
-}
-
-
-static void
-ps2_draw_control_points( void )
-{
- if ( ps2_debug_glyph )
- {
- PSH2_Glyph glyph = ps2_debug_glyph;
- PSH2_Point point = glyph->points;
- FT_UInt count = glyph->num_points;
- NV_Transform transform, *trans = &transform;
- NV_Path vert_rect;
- NV_Path horz_rect;
- NV_Path dot, circle;
-
- for ( ; count > 0; count--, point++ )
- {
- NV_Vector vec;
-
- vec.x = point->cur_x;
- vec.y = point->cur_y;
- nv_vector_transform( &vec, &size_transform );
-
- nv_transform_set_translate( trans, vec.x, vec.y );
-
- if ( option_show_smooth && !psh2_point_is_smooth(point) )
- {
- nv_painter_set_color( painter, SMOOTH_COLOR, 256 );
- nv_painter_fill_path( painter, trans, 0, symbol_circle );
- }
-
- if (option_show_horz_hints)
- {
- if ( point->flags_y & PSH2_POINT_STRONG )
- {
- nv_painter_set_color( painter, STRONG_COLOR, 256 );
- nv_painter_fill_path( painter, trans, 0, symbol_rect_h );
- }
- }
-
- if (option_show_vert_hints)
- {
- if ( point->flags_x & PSH2_POINT_STRONG )
- {
- nv_painter_set_color( painter, STRONG_COLOR, 256 );
- nv_painter_fill_path( painter, trans, 0, symbol_rect_v );
- }
- }
- }
- }
-}
-
- /************************************************************************/
- /************************************************************************/
- /***** *****/
- /***** POSTSCRIPT HINTER ALGORITHM 3 ROUTINES *****/
- /***** *****/
- /************************************************************************/
- /************************************************************************/
-
-#include <../src/pshinter/pshalgo3.h>
-
-static void
-draw_ps3_hint( PSH3_Hint hint, FT_Bool vertical )
-{
- int x1, x2;
- NV_Vector v;
if ( pshint_vertical != vertical )
{
- if (vertical)
+ if ( vertical )
pshint_cpos = 40;
else
pshint_cpos = 10;
@@ -637,7 +395,7 @@ draw_ps3_hint( PSH3_Hint hint, FT_Bool vertical )
pshint_vertical = vertical;
}
- if (!vertical)
+ if ( !vertical )
{
if ( !option_show_vert_hints )
return;
@@ -653,25 +411,25 @@ draw_ps3_hint( PSH3_Hint hint, FT_Bool vertical )
x2 = (int)(v.x + 0.5);
nv_pixmap_fill_rect( target, x1, 0, 1, target->height,
- psh3_hint_is_ghost(hint)
+ psh_hint_is_ghost( hint )
? GHOST_HINT_COLOR : STEM_HINT_COLOR );
- if ( psh3_hint_is_ghost(hint) )
+ if ( psh_hint_is_ghost( hint ) )
{
x1 --;
x2 = x1 + 2;
}
else
nv_pixmap_fill_rect( target, x2, 0, 1, target->height,
- psh3_hint_is_ghost(hint)
+ psh_hint_is_ghost( hint )
? GHOST_HINT_COLOR : STEM_HINT_COLOR );
- nv_pixmap_fill_rect( target, x1, pshint_cpos, x2+1-x1, 1,
+ nv_pixmap_fill_rect( target, x1, pshint_cpos, x2 + 1 - x1, 1,
STEM_JOIN_COLOR );
}
else
{
- if (!option_show_horz_hints)
+ if ( !option_show_horz_hints )
return;
v.y = hint->cur_pos;
@@ -685,20 +443,20 @@ draw_ps3_hint( PSH3_Hint hint, FT_Bool vertical )
x2 = (int)(v.y + 0.5);
nv_pixmap_fill_rect( target, 0, x1, target->width, 1,
- psh3_hint_is_ghost(hint)
+ psh_hint_is_ghost( hint )
? GHOST_HINT_COLOR : STEM_HINT_COLOR );
- if ( psh3_hint_is_ghost(hint) )
+ if ( psh_hint_is_ghost( hint ) )
{
x1 --;
x2 = x1 + 2;
}
else
nv_pixmap_fill_rect( target, 0, x2, target->width, 1,
- psh3_hint_is_ghost(hint)
+ psh_hint_is_ghost(hint)
? GHOST_HINT_COLOR : STEM_HINT_COLOR );
- nv_pixmap_fill_rect( target, pshint_cpos, x2, 1, x1+1-x2,
+ nv_pixmap_fill_rect( target, pshint_cpos, x2, 1, x1 + 1 - x2,
STEM_JOIN_COLOR );
}
@@ -711,46 +469,48 @@ draw_ps3_hint( PSH3_Hint hint, FT_Bool vertical )
static void
-ps3_draw_control_points( void )
+ps_draw_control_points( void )
{
- if ( ps3_debug_glyph )
+ if ( ps_debug_glyph )
{
- PSH3_Glyph glyph = ps3_debug_glyph;
- PSH3_Point point = glyph->points;
+ PSH_Glyph glyph = ps_debug_glyph;
+ PSH_Point point = glyph->points;
FT_UInt count = glyph->num_points;
NV_Transform transform, *trans = &transform;
NV_Path vert_rect;
NV_Path horz_rect;
NV_Path dot, circle;
+
for ( ; count > 0; count--, point++ )
{
NV_Vector vec;
+
vec.x = point->cur_x;
vec.y = point->cur_y;
nv_vector_transform( &vec, &size_transform );
nv_transform_set_translate( trans, vec.x, vec.y );
- if ( option_show_smooth && !psh3_point_is_smooth(point) )
+ if ( option_show_smooth && !psh_point_is_smooth(point) )
{
nv_painter_set_color( painter, SMOOTH_COLOR, 256 );
nv_painter_fill_path( painter, trans, 0, symbol_circle );
}
- if (option_show_horz_hints)
+ if ( option_show_horz_hints )
{
- if ( point->flags_y & PSH3_POINT_STRONG )
+ if ( point->flags_y & PSH_POINT_STRONG )
{
nv_painter_set_color( painter, STRONG_COLOR, 256 );
nv_painter_fill_path( painter, trans, 0, symbol_rect_h );
}
}
- if (option_show_vert_hints)
+ if ( option_show_vert_hints )
{
- if ( point->flags_x & PSH3_POINT_STRONG )
+ if ( point->flags_x & PSH_POINT_STRONG )
{
nv_painter_set_color( painter, STRONG_COLOR, 256 );
nv_painter_fill_path( painter, trans, 0, symbol_rect_v );
@@ -767,7 +527,7 @@ ps_print_hints( void )
if ( ps_debug_hints )
{
FT_Int dimension;
- PSH_Dimension dim;
+
for ( dimension = 1; dimension >= 0; dimension-- )
{
@@ -775,6 +535,7 @@ ps_print_hints( void )
PS_Mask mask = dim->masks.masks;
FT_UInt count = dim->masks.num_masks;
+
printf( "%s hints -------------------------\n",
dimension ? "vertical" : "horizontal" );
@@ -782,6 +543,7 @@ ps_print_hints( void )
{
FT_UInt index;
+
printf( "mask -> %d\n", mask->end_point );
for ( index = 0; index < mask->num_bits; index++ )
{
@@ -789,6 +551,7 @@ ps_print_hints( void )
{
PS_Hint hint = dim->hints.hints + index;
+
printf( "%c [%3d %3d (%4d)]\n", dimension ? "v" : "h",
hint->pos, hint->pos + hint->len, hint->len );
}
@@ -798,23 +561,25 @@ ps_print_hints( void )
}
}
- /************************************************************************/
- /************************************************************************/
- /***** *****/
- /***** AUTOHINTER DRAWING ROUTINES *****/
- /***** *****/
- /************************************************************************/
- /************************************************************************/
+
+ /************************************************************************/
+ /************************************************************************/
+ /***** *****/
+ /***** AUTOHINTER DRAWING ROUTINES *****/
+ /***** *****/
+ /************************************************************************/
+ /************************************************************************/
static NV_Path
-ah_link_path( NV_Vector* p1,
- NV_Vector* p4,
- NV_Bool vertical )
+ah_link_path( NV_Vector* p1,
+ NV_Vector* p4,
+ NV_Bool vertical )
{
NV_PathWriter writer;
NV_Vector p2, p3;
NV_Path path, stroke;
+
if ( vertical )
{
p2.x = p4->x;
@@ -840,7 +605,9 @@ ah_link_path( NV_Vector* p1,
path = nv_path_writer_get_path( writer );
nv_path_writer_destroy( writer );
- nv_path_stroke( path, 1., nv_path_linecap_butt, nv_path_linejoin_round, 1., &stroke );
+ nv_path_stroke( path, 1.,
+ nv_path_linecap_butt, nv_path_linejoin_round,
+ 1., &stroke );
nv_path_destroy( path );
@@ -857,6 +624,7 @@ ah_draw_smooth_points( void )
FT_UInt count = glyph->num_points;
AH_Point point = glyph->points;
+
nv_painter_set_color( painter, SMOOTH_COLOR, 256 );
for ( ; count > 0; count--, point++ )
@@ -866,6 +634,7 @@ ah_draw_smooth_points( void )
NV_Transform transform, *trans = &transform;
NV_Vector vec;
+
vec.x = point->x - ah_debug_hinter->pp1.x;
vec.y = point->y;
nv_vector_transform( &vec, &size_transform );
@@ -883,10 +652,11 @@ ah_draw_edges( void )
{
if ( ah_debug_hinter )
{
- AH_Outline glyph = ah_debug_hinter->glyph;
- FT_UInt count;
- AH_Edge edge;
- FT_Pos pp1 = ah_debug_hinter->pp1.x;
+ AH_Outline glyph = ah_debug_hinter->glyph;
+ FT_UInt count;
+ AH_Edge edge;
+ FT_Pos pp1 = ah_debug_hinter->pp1.x;
+
nv_painter_set_color( painter, EDGE_COLOR, 256 );
@@ -899,8 +669,9 @@ ah_draw_edges( void )
edge = glyph->vert_edges;
for ( ; count > 0; count--, edge++ )
{
- NV_Vector vec;
- NV_Pos x;
+ NV_Vector vec;
+ NV_Pos x;
+
vec.x = edge->pos - pp1;
vec.y = 0;
@@ -919,8 +690,9 @@ ah_draw_edges( void )
edge = glyph->horz_edges;
for ( ; count > 0; count--, edge++ )
{
- NV_Vector vec;
- NV_Pos x;
+ NV_Vector vec;
+ NV_Pos x;
+
vec.x = 0;
vec.y = edge->pos;
@@ -938,8 +710,9 @@ ah_draw_edges( void )
/* draw vertical segments */
if ( option_show_vert_hints )
{
- AH_Segment seg = glyph->vert_segments;
- FT_UInt count = glyph->num_vsegments;
+ AH_Segment seg = glyph->vert_segments;
+ FT_UInt count = glyph->num_vsegments;
+
for ( ; count > 0; count--, seg++ )
{
@@ -947,6 +720,7 @@ ah_draw_edges( void )
NV_Vector v1, v2;
NV_Pos y1, y2, x;
+
first = seg->first;
last = seg->last;
@@ -970,21 +744,24 @@ ah_draw_edges( void )
y2 = (NV_Pos)( v2.y + 0.5 );
x = (NV_Pos)( v1.x + 0.5 );
- nv_pixmap_fill_rect( target, x-1, y2, 3, ABS(y1-y2)+1, SEGMENT_COLOR );
+ nv_pixmap_fill_rect( target, x - 1, y2, 3,
+ FT_ABS( y1 - y2 ) + 1, SEGMENT_COLOR );
}
}
/* draw horizontal segments */
if ( option_show_horz_hints )
{
- AH_Segment seg = glyph->horz_segments;
- FT_UInt count = glyph->num_hsegments;
+ AH_Segment seg = glyph->horz_segments;
+ FT_UInt count = glyph->num_hsegments;
+
for ( ; count > 0; count--, seg++ )
{
AH_PointRec *first, *last;
- NV_Vector v1, v2;
- NV_Pos y1, y2, x;
+ NV_Vector v1, v2;
+ NV_Pos y1, y2, x;
+
first = seg->first;
last = seg->last;
@@ -1009,21 +786,23 @@ ah_draw_edges( void )
y2 = (NV_Pos)( v2.x + 0.5 );
x = (NV_Pos)( v1.y + 0.5 );
- nv_pixmap_fill_rect( target, y1, x-1, ABS(y1-y2)+1, 3, SEGMENT_COLOR );
+ nv_pixmap_fill_rect( target, y1, x - 1,
+ FT_ABS( y1 - y2 ) + 1, 3, SEGMENT_COLOR );
}
}
-
if ( option_show_vert_hints && option_show_links )
{
- AH_Segment seg = glyph->vert_segments;
- FT_UInt count = glyph->num_vsegments;
+ AH_Segment seg = glyph->vert_segments;
+ FT_UInt count = glyph->num_vsegments;
+
for ( ; count > 0; count--, seg++ )
{
- AH_Segment seg2 = NULL;
- NV_Path link;
- NV_Vector v1, v2;
+ AH_Segment seg2 = NULL;
+ NV_Path link;
+ NV_Vector v1, v2;
+
if ( seg->link )
{
@@ -1037,12 +816,14 @@ ah_draw_edges( void )
{
v1.x = seg->first->x - pp1;
v2.x = seg2->first->x - pp1;
- v1.y = (seg->first->y + seg->last->y)/2;
- v2.y = (seg2->first->y + seg2->last->y)/2;
+ v1.y = ( seg->first->y + seg->last->y ) / 2;
+ v2.y = ( seg2->first->y + seg2->last->y ) / 2;
link = ah_link_path( &v1, &v2, 1 );
- nv_painter_set_color( painter, seg->serif ? SERIF_LINK_COLOR : LINK_COLOR, 256 );
+ nv_painter_set_color( painter,
+ seg->serif ? SERIF_LINK_COLOR : LINK_COLOR,
+ 256 );
nv_painter_fill_path( painter, &size_transform, 0, link );
nv_path_destroy( link );
@@ -1052,14 +833,16 @@ ah_draw_edges( void )
if ( option_show_horz_hints && option_show_links )
{
- AH_Segment seg = glyph->horz_segments;
- FT_UInt count = glyph->num_hsegments;
+ AH_Segment seg = glyph->horz_segments;
+ FT_UInt count = glyph->num_hsegments;
+
for ( ; count > 0; count--, seg++ )
{
- AH_Segment seg2 = NULL;
- NV_Path link;
- NV_Vector v1, v2;
+ AH_Segment seg2 = NULL;
+ NV_Path link;
+ NV_Vector v1, v2;
+
if ( seg->link )
{
@@ -1073,12 +856,14 @@ ah_draw_edges( void )
{
v1.y = seg->first->y;
v2.y = seg2->first->y;
- v1.x = (seg->first->x + seg->last->x)/2 - pp1;
- v2.x = (seg2->first->x + seg2->last->x)/2 - pp1;
+ v1.x = ( seg->first->x + seg->last->x ) / 2 - pp1;
+ v2.x = ( seg2->first->x + seg2->last->x ) / 2 - pp1;
link = ah_link_path( &v1, &v2, 0 );
- nv_painter_set_color( painter, seg->serif ? SERIF_LINK_COLOR : LINK_COLOR, 256 );
+ nv_painter_set_color( painter,
+ seg->serif ? SERIF_LINK_COLOR : LINK_COLOR,
+ 256 );
nv_painter_fill_path( painter, &size_transform, 0, link );
nv_path_destroy( link );
@@ -1089,29 +874,30 @@ ah_draw_edges( void )
}
}
- /************************************************************************/
- /************************************************************************/
- /***** *****/
- /***** MAIN LOOP(S) *****/
- /***** *****/
- /************************************************************************/
- /************************************************************************/
+
+ /************************************************************************/
+ /************************************************************************/
+ /***** *****/
+ /***** MAIN LOOP(S) *****/
+ /***** *****/
+ /************************************************************************/
+ /************************************************************************/
static void
draw_glyph( int glyph_index )
{
NV_Path path;
- pshint_vertical = -1;
- ps1_debug_hint_func = option_show_ps_hints ? draw_ps1_hint : 0;
- ps2_debug_hint_func = option_show_ps_hints ? draw_ps2_hint : 0;
- ps3_debug_hint_func = option_show_ps_hints ? draw_ps3_hint : 0;
+ pshint_vertical = -1;
+
+ ps_debug_hint_func = option_show_ps_hints ? draw_ps_hint : 0;
ah_debug_hinter = NULL;
error = FT_Load_Glyph( face, glyph_index, FT_LOAD_NO_BITMAP );
- if (error) Panic( "could not load glyph" );
+ if ( error )
+ Panic( "could not load glyph" );
if ( face->glyph->format != FT_GLYPH_FORMAT_OUTLINE )
Panic( "could not load glyph outline" );
@@ -1120,27 +906,30 @@ draw_glyph( int glyph_index )
(NV_Outline*)&face->glyph->outline,
&size_transform,
&path );
- if (error) Panic( "could not create glyph path" );
+ if ( error )
+ Panic( "could not create glyph path" );
/* trac du glyphe plein */
if ( option_show_glyph )
{
- nv_painter_set_color ( painter, 0xFF404080, 128 );
- nv_painter_fill_path ( painter, 0, 0, path );
+ nv_painter_set_color( painter, 0xFF404080, 128 );
+ nv_painter_fill_path( painter, 0, 0, path );
}
if ( option_show_stroke )
{
- NV_Path stroke;
+ NV_Path stroke;
+
error = nv_path_stroke( path, 0.6,
nv_path_linecap_butt,
nv_path_linejoin_miter,
1.0, &stroke );
- if (error) Panic( "could not stroke glyph path" );
+ if ( error )
+ Panic( "could not stroke glyph path" );
- nv_painter_set_color ( painter, 0xFF000040, 256 );
- nv_painter_fill_path ( painter, 0, 0, stroke );
+ nv_painter_set_color( painter, 0xFF000040, 256 );
+ nv_painter_fill_path( painter, 0, 0, stroke );
nv_path_destroy( stroke );
}
@@ -1153,6 +942,7 @@ draw_glyph( int glyph_index )
NV_Scale r = 2;
NV_Int n, first, last;
+
nv_path_get_outline( path, NULL, memory, &out );
first = 0;
@@ -1163,6 +953,7 @@ draw_glyph( int glyph_index )
NV_Color color;
NV_SubVector* vec;
+
last = out.contours[n];
for ( m = first; m <= last; m++ )
@@ -1173,7 +964,7 @@ draw_glyph( int glyph_index )
vec = out.points + m;
- nv_transform_set_translate( &trans, vec->x/64.0, vec->y/64.0 );
+ nv_transform_set_translate( &trans, vec->x / 64.0, vec->y / 64.0 );
nv_painter_set_color( painter, color, 256 );
nv_painter_fill_path( painter, &trans, 0, symbol_dot );
@@ -1182,8 +973,9 @@ draw_glyph( int glyph_index )
{
char temp[5];
+
sprintf( temp, "%d", m );
- nv_pixmap_cell_text( target, vec->x/64 + 4, vec->y/64 - 4,
+ nv_pixmap_cell_text( target, vec->x / 64 + 4, vec->y / 64 - 4,
temp, TEXT_COLOR );
}
}
@@ -1202,7 +994,9 @@ draw_glyph( int glyph_index )
char temp[1024];
char temp2[64];
- sprintf( temp, "font name : %s (%s)", face->family_name, face->style_name );
+
+ sprintf( temp, "font name : %s (%s)", face->family_name,
+ face->style_name );
nv_pixmap_cell_text( target, 0, 0, temp, TEXT_COLOR );
FT_Get_Glyph_Name( face, glyph_index, temp2, 63 );
@@ -1220,133 +1014,134 @@ draw_glyph( int glyph_index )
}
-
#define TOGGLE_OPTION(var,prefix) \
+ do \
{ \
var = !var; \
sprintf( temp_message, prefix " is now %s", \
var ? "on" : "off" ); \
- break; \
- }
+ } \
+ while()
#define TOGGLE_OPTION_NEG(var,prefix) \
+ do \
{ \
var = !var; \
sprintf( temp_message, prefix " is now %s", \
!var ? "on" : "off" ); \
- break; \
- }
+ } \
+ while
static void
-handle_event( NVV_EventRec* ev )
+handle_event( NVV_EventRec* ev )
{
- switch (ev->key)
+ switch ( ev->key )
{
- case NVV_Key_Left:
- {
- if ( glyph_index > 0 )
- glyph_index--;
- break;
- }
-
- case NVV_Key_Right:
- {
- if ( glyph_index+1 < face->num_glyphs )
- glyph_index++;
- break;
- }
-
- case NVV_KEY('x'):
- TOGGLE_OPTION( option_show_axis, "grid axis display" )
-
- case NVV_KEY('s'):
- TOGGLE_OPTION( option_show_stroke, "glyph stroke display" )
-
- case NVV_KEY('g'):
- TOGGLE_OPTION( option_show_glyph, "glyph fill display" )
-
- case NVV_KEY('d'):
- TOGGLE_OPTION( option_show_dots, "control points display" )
-
- case NVV_KEY('e'):
- TOGGLE_OPTION( option_show_em, "EM square display" )
-
- case NVV_KEY('+'):
- {
- grid_scale *= 1.2;
- reset_scale( grid_scale );
- break;
- }
-
- case NVV_KEY('-'):
- {
- if (grid_scale > 0.3)
- {
- grid_scale /= 1.2;
- reset_scale( grid_scale );
- }
- break;
- }
+ case NVV_Key_Left:
+ if ( glyph_index > 0 )
+ glyph_index--;
+ break;
+
+ case NVV_Key_Right:
+ if ( glyph_index + 1 < face->num_glyphs )
+ glyph_index++;
+ break;
+
+ case NVV_KEY( 'x' ):
+ TOGGLE_OPTION( option_show_axis, "grid axis display" );
+ break;
+
+ case NVV_KEY( 's' ):
+ TOGGLE_OPTION( option_show_stroke, "glyph stroke display" );
+ break;
+
+ case NVV_KEY( 'g' ):
+ TOGGLE_OPTION( option_show_glyph, "glyph fill display" );
+ break;
+
+ case NVV_KEY( 'd' ):
+ TOGGLE_OPTION( option_show_dots, "control points display" );
+ break
+
+ case NVV_KEY( 'e' ):
+ TOGGLE_OPTION( option_show_em, "EM square display" );
+ break;
+
+ case NVV_KEY( '+' ):
+ grid_scale *= 1.2;
+ reset_scale( grid_scale );
+ break;
+
+ case NVV_KEY( '-' ):
+ if ( grid_scale > 0.3 )
+ {
+ grid_scale /= 1.2;
+ reset_scale( grid_scale );
+ }
+ break;
- case NVV_Key_Up:
- {
- pixel_size++;
- reset_size( pixel_size, grid_scale );
- sprintf( temp_message, "pixel size = %d", pixel_size );
- break;
- }
+ case NVV_Key_Up:
+ pixel_size++;
+ reset_size( pixel_size, grid_scale );
+ sprintf( temp_message, "pixel size = %d", pixel_size );
+ break;
- case NVV_Key_Down:
- {
- if (pixel_size > 1)
- {
- pixel_size--;
- reset_size( pixel_size, grid_scale );
- sprintf( temp_message, "pixel size = %d", pixel_size );
- }
- break;
- }
+ case NVV_Key_Down:
+ if ( pixel_size > 1 )
+ {
+ pixel_size--;
+ reset_size( pixel_size, grid_scale );
+ sprintf( temp_message, "pixel size = %d", pixel_size );
+ }
+ break;
- case NVV_KEY('z'):
- TOGGLE_OPTION_NEG( ps_debug_no_vert_hints, "vertical hints processing" )
+ case NVV_KEY( 'z' ):
+ TOGGLE_OPTION_NEG( ps_debug_no_vert_hints, "vertical hints processing" );
+ break;
- case NVV_KEY('a'):
- TOGGLE_OPTION_NEG( ps_debug_no_horz_hints, "horizontal hints processing" )
+ case NVV_KEY( 'a' ):
+ TOGGLE_OPTION_NEG( ps_debug_no_horz_hints, "horizontal hints processing" );
+ break;
- case NVV_KEY('Z'):
- TOGGLE_OPTION( option_show_vert_hints, "vertical hints display" )
+ case NVV_KEY( 'Z' ):
+ TOGGLE_OPTION( option_show_vert_hints, "vertical hints display" );
+ break;
- case NVV_KEY('A'):
- TOGGLE_OPTION( option_show_horz_hints, "horizontal hints display" )
+ case NVV_KEY( 'A' ):
+ TOGGLE_OPTION( option_show_horz_hints, "horizontal hints display" );
+ break;
- case NVV_KEY('S'):
- TOGGLE_OPTION( option_show_smooth, "smooth points display" );
+ case NVV_KEY( 'S' ):
+ TOGGLE_OPTION( option_show_smooth, "smooth points display" );
+ break;
- case NVV_KEY('i'):
- TOGGLE_OPTION( option_show_indices, "point index display" );
+ case NVV_KEY( 'i' ):
+ TOGGLE_OPTION( option_show_indices, "point index display" );
+ break;
- case NVV_KEY('b'):
- TOGGLE_OPTION( option_show_blues, "blue zones display" );
+ case NVV_KEY( 'b' ):
+ TOGGLE_OPTION( option_show_blues, "blue zones display" );
+ break;
- case NVV_KEY('h'):
- ps_debug_no_horz_hints = option_hinting;
- ps_debug_no_vert_hints = option_hinting;
+ case NVV_KEY( 'h' ):
+ ps_debug_no_horz_hints = option_hinting;
+ ps_debug_no_vert_hints = option_hinting;
- TOGGLE_OPTION( option_hinting, "hinting" )
+ TOGGLE_OPTION( option_hinting, "hinting" );
+ break;
- case NVV_KEY('H'):
- ps_print_hints();
- break;
+ case NVV_KEY( 'H' ):
+ ps_print_hints();
+ break;
- default:
- ;
+ default:
+ ;
}
}
-
static void
usage()
{
@@ -1370,14 +1165,16 @@ usage()
static void
-parse_options( int* argc_p, char*** argv_p )
+parse_options( int* argc_p,
+ char*** argv_p )
{
- int argc = *argc_p;
- char** argv = *argv_p;
+ int argc = *argc_p;
+ char** argv = *argv_p;
- while (argc > 2 && argv[1][0] == '-')
+
+ while ( argc > 2 && argv[1][0] == '-' )
{
- switch (argv[1][1])
+ switch ( argv[1][1] )
{
OPTION2( 'f', first_glyph = atoi( argv[2] ); )
@@ -1393,11 +1190,13 @@ parse_options( int* argc_p, char*** argv_p )
}
-
-int main( int argc, char** argv )
+int
+main( int argc,
+ char** argv )
{
char* filename = "/winnt/fonts/arial.ttf";
+
parse_options( &argc, &argv );
if ( argc >= 2 )
@@ -1406,40 +1205,46 @@ int main( int argc, char** argv )
/* create library */
error = nv_renderer_new( 0, &renderer );
- if (error) Panic( "could not create Nirvana renderer" );
+ if ( error )
+ Panic( "could not create Nirvana renderer" );
memory = nv_renderer_get_memory( renderer );
init_symbols();
error = nvv_display_new( renderer, &display );
- if (error) Panic( "could not create display" );
+ if ( error )
+ Panic( "could not create display" );
error = nvv_surface_new( display, 460, 460, nv_pixmap_type_argb, &surface );
- if (error) Panic( "could not create surface" );
+ if ( error )
+ Panic( "could not create surface" );
target = nvv_surface_get_pixmap( surface );
error = nv_painter_new( renderer, &painter );
- if (error) Panic( "could not create painter" );
+ if ( error )
+ Panic( "could not create painter" );
nv_painter_set_target( painter, target );
clear_background();
error = FT_Init_FreeType( &freetype );
- if (error) Panic( "could not initialise FreeType" );
+ if ( error )
+ Panic( "could not initialize FreeType" );
error = FT_New_Face( freetype, filename, 0, &face );
- if (error) Panic( "could not open font face" );
+ if ( error )
+ Panic( "could not open font face" );
reset_size( pixel_size, grid_scale );
-
nvv_surface_set_title( surface, "FreeType Glyph Viewer" );
{
NVV_EventRec event;
+
glyph_index = first_glyph;
for ( ;; )
{
@@ -1454,7 +1259,7 @@ int main( int argc, char** argv )
draw_ps_blue_zones();
draw_glyph( glyph_index );
- ps3_draw_control_points();
+ ps_draw_control_points();
nvv_surface_refresh( surface, NULL );
@@ -1463,21 +1268,20 @@ int main( int argc, char** argv )
break;
handle_event( &event );
- switch (event.key)
+ switch ( event.key )
{
- case NVV_Key_Esc:
- goto Exit;
+ case NVV_Key_Esc:
+ goto Exit;
- default:
- ;
+ default:
+ ;
}
}
}
- Exit:
+Exit:
/* wait for escape */
-
/* destroy display (and surface) */
nvv_display_unref( display );
diff --git a/extras/freetype2/vms_make.com b/extras/freetype2/vms_make.com
new file mode 100644
index 000000000..12152ad04
--- /dev/null
+++ b/extras/freetype2/vms_make.com
@@ -0,0 +1,549 @@
+$!---------------vms_make.com for Freetype2------------------------------------
+$! make Freetype2 under OpenVMS
+$!
+$! In case of problems with the build you might want to contact me at
+$! zinser@decus.de (preferred) or zinser@sysdev.deutsche-boerse.com (Work)
+$!
+$! This procedure currently does support the following commandline options
+$! in arbitrary order
+$!
+$! * DEBUG - Compile modules with /noopt/debug and link shareable image
+$! with /debug
+$! * LOPTS - Options to be passed to the link command
+$! * CCOPT - Options to be passed to the C compiler
+$!------------------------------------------------------------------------------
+$!
+$! Just some general constants
+$!
+$ true = 1
+$ false = 0
+$ Make = ""
+$!
+$! Setup variables holding "config" information
+$!
+$ name = "Freetype2"
+$ mapfile = name + ".map"
+$ optfile = name + ".opt"
+$ s_case = false
+$ libdefs = ""
+$ libincs = ""
+$ liblist = ""
+$ ccopt = ""
+$ lopts = ""
+$!
+$! Check for MMK/MMS
+$!
+$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
+$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
+$!
+$! Which command parameters were given
+$!
+$ gosub check_opts
+$!
+$! Create option file
+$!
+$ open/write optf 'optfile'
+$!
+$! Pull in external libraries
+$!
+$ create libs.opt
+$ gosub check_create_vmslib
+$!
+$! Create objects
+$!
+$ if libdefs .nes. "" then ccopt = ccopt + "/define=(" + libdefs + ")"
+$!
+$ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) -
+ then s_case = true
+$ gosub crea_mms
+$!
+$ 'Make' /macro=(comp_flags="''ccopt'")
+$ purge/nolog [...]descrip.mms
+$!
+$! Add them to options
+$!
+$FLOOP:
+$ file = f$edit(f$search("[...]*.obj"),"UPCASE")
+$ if (file .nes. "")
+$ then
+$ if f$locate("DEMOS",file) .eqs. f$length(file) then write optf file
+$ goto floop
+$ endif
+$!
+$ close optf
+$!
+$!
+$! Alpha gets a shareable image
+$!
+$ If f$getsyi("HW_MODEL") .gt. 1024
+$ Then
+$ write sys$output "Creating freetype2shr.exe"
+$ call anal_obj_axp 'optfile' _link.opt
+$ open/append optf 'optfile'
+$ if s_case then WRITE optf "case_sensitive=YES"
+$ close optf
+$ LINK_/NODEB/SHARE=[.lib]freetype2shr.exe -
+ 'optfile'/opt,libs.opt/opt,_link.opt/opt
+$ endif
+$!
+$ exit
+$!
+$!------------------------------------------------------------------------------
+$!
+$! If MMS/MMK are available dump out the descrip.mms if required
+$!
+$CREA_MMS:
+$ write sys$output "Creating descrip.mms files ..."
+$ write sys$output "... Main directory"
+$ create descrip.mms
+$ open/append out descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 build system -- top-level Makefile for OpenVMS
+#
+
+
+# Copyright 2001 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+$ EOD
+$ write out "CFLAGS = ", ccopt
+$ copy sys$input: out
+$ deck
+
+
+all :
+ define freetype [--.include.freetype]
+ define psaux [-.psaux]
+ define autohint [-.autohint]
+ define base [-.base]
+ define cache [-.cache]
+ define cff [-.cff]
+ define cid [-.cid]
+ define pcf [-.pcf]
+ define psnames [-.psnames]
+ define raster [-.raster]
+ define sfnt [-.sfnt]
+ define smooth [-.smooth]
+ define truetype [-.truetype]
+ define type1 [-.type1]
+ define winfonts [-.winfonts]
+ if f$search("lib.dir") .eqs. "" then create/directory [.lib]
+ set default [.builds.vms]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [--.src.autohint]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.base]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.bdf]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.cache]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.cff]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.cid]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.gzip]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.lzw]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.pcf]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.pfr]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.psaux]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.pshinter]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.psnames]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.raster]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.sfnt]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.smooth]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.truetype]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.type1]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.type42]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [-.winfonts]
+ $(MMS)$(MMSQUALIFIERS)
+ set default [--]
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.builds.vms] directory"
+$ create [.builds.vms]descrip.mms
+$ open/append out [.builds.vms]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 system rules for VMS
+#
+
+
+# Copyright 2001 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([],[--.include],[--.src.base])
+
+OBJS=ftsystem.obj
+
+all : $(OBJS)
+ library/create [--.lib]freetype.olb $(OBJS)
+
+ftsystem.obj : ftsystem.c ftconfig.h
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.autohint] directory"
+$ create [.src.autohint]descrip.mms
+$ open/append out [.src.autohint]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 auto-hinter module compilation rules for VMS
+#
+
+
+# Copyright 2001, 2002 Catharon Productions Inc.
+#
+# This file is part of the Catharon Typography Project and shall only
+# be used, modified, and distributed under the terms of the Catharon
+# Open Source License that should come with this file under the name
+# `CatharonLicense.txt'. By continuing to use, modify, or distribute
+# this file you indicate that you have read the license and
+# understand and accept it fully.
+#
+# Note that this license is compatible with the FreeType license.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/incl=([--.include],[--.src.autohint])
+
+OBJS=autohint.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.gzip] directory"
+$ create [.src.gzip]descrip.mms
+$ open/append out [.src.gzip]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 GZip support compilation rules for VMS
+#
+
+
+# Copyright 2002 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+$EOD
+$ if libincs .nes. "" then write out "LIBINCS = ", libincs, ","
+$ copy sys$input: out
+$ deck
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=($(LIBINCS)[--.include],[--.src.gzip])
+
+OBJS=ftgzip.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.lzw] directory"
+$ create [.src.lzw]descrip.mms
+$ open/append out [.src.lzw]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 LZW support compilation rules for VMS
+#
+
+
+# Copyright 2004 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+$EOD
+$ if libincs .nes. "" then write out "LIBINCS = ", libincs, ","
+$ copy sys$input: out
+$ deck
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=($(LIBINCS)[--.include],[--.src.lzw])
+
+OBJS=ftlzw.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
+$ write sys$output "... [.src.type1] directory"
+$ create [.src.type1]descrip.mms
+$ open/append out [.src.type1]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 Type1 driver compilation rules for VMS
+#
+
+
+# Copyright 1996-2000, 2002 by
+# David Turner, Robert Wilhelm, and Werner Lemberg.
+#
+# This file is part of the FreeType project, and may only be used, modified,
+# and distributed under the terms of the FreeType project license,
+# LICENSE.TXT. By continuing to use, modify, or distribute this file you
+# indicate that you have read the license and understand and accept it
+# fully.
+
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=([--.include],[--.src.type1])
+
+OBJS=type1.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+type1.obj : type1.c t1parse.c t1load.c t1objs.c t1driver.c t1gload.c t1afm.c
+
+# EOF
+$ eod
+$ close out
+$ return
+$!------------------------------------------------------------------------------
+$!
+$! Check command line options and set symbols accordingly
+$!
+$ CHECK_OPTS:
+$ i = 1
+$ OPT_LOOP:
+$ if i .lt. 9
+$ then
+$ cparm = f$edit(p'i',"upcase")
+$ if cparm .eqs. "DEBUG"
+$ then
+$ ccopt = ccopt + "/noopt/deb"
+$ lopts = lopts + "/deb"
+$ endif
+$! if cparm .eqs. "LINK" then linkonly = true
+$ if f$locate("LOPTS",cparm) .lt. f$length(cparm)
+$ then
+$ start = f$locate("=",cparm) + 1
+$ len = f$length(cparm) - start
+$ lopts = lopts + f$extract(start,len,cparm)
+$ endif
+$ if f$locate("CCOPT",cparm) .lt. f$length(cparm)
+$ then
+$ start = f$locate("=",cparm) + 1
+$ len = f$length(cparm) - start
+$ ccopt = ccopt + f$extract(start,len,cparm)
+$ endif
+$ i = i + 1
+$ goto opt_loop
+$ endif
+$ return
+$!------------------------------------------------------------------------------
+$!
+$! Take care of driver file with information about external libraries
+$!
+$CHECK_CREATE_VMSLIB:
+$!
+$ if f$search("VMSLIB.DAT") .eqs. ""
+$ then
+$ type/out=vmslib.dat sys$input
+!
+! This is a simple driver file with information used by make.com to
+! check if external libraries (like t1lib and freetype) are available on
+! the system.
+!
+! Layout of the file:
+!
+! - Lines starting with ! are treated as comments
+! - Elements in a data line are separated by # signs
+! - The elements need to be listed in the following order
+! 1.) Name of the Library
+! 2.) Location where the object library can be found
+! 3.) Location where the include files for the library can be found
+! 4.) Include file used to verify library location
+! 5.) CPP define to pass to the build to indicate availability of
+! the library
+!
+! Example: The following lines show how definitions
+! might look like. They are site specific and the locations of the
+! library and include files need almost certainly to be changed.
+!
+! Location: All of the libaries can be found at the following addresses
+!
+! ZLIB: http://www.decus.de:8080/www/vms/sw/zlib.htmlx
+!
+!ZLIB # pubbin:libz.olb # public$Root:[util.libs.zlib] # zlib.h # FT_CONFIG_OPTION_SYSTEM_ZLIB
+$ write sys$output "New driver file vmslib.dat created."
+$ write sys$output "Please customize libary locations for your site"
+$ write sys$output "and afterwards re-execute vms_make.com"
+$ write sys$output "Exiting..."
+$ close/nolog optf
+$ exit
+$ endif
+$!
+$! Open data file with location of libraries
+$!
+$ open/read/end=end_lib/err=lib_err libdata VMSLIB.DAT
+$ open/append loptf libs.opt
+$LIB_LOOP:
+$ read/end=end_lib libdata libline
+$ libline = f$edit(libline, "UNCOMMENT,COLLAPSE")
+$ if libline .eqs. "" then goto LIB_LOOP ! Comment line
+$ libname = f$edit(f$element(0,"#",libline),"UPCASE")
+$ liblist = liblist + "#" + libname
+$ write sys$output "Processing ''libname' setup ..."
+$ libloc = f$element(1,"#",libline)
+$ libsrc = f$element(2,"#",libline)
+$ testinc = f$element(3,"#",libline)
+$ cppdef = f$element(4,"#",libline)
+$ old_cpp = f$locate("=1",cppdef)
+$ if old_cpp.lt.f$length(cppdef) then cppdef = f$extract(0,old_cpp,cppdef)
+$ if f$search("''libloc'").eqs. ""
+$ then
+$ write sys$output "Can not find library ''libloc' - Skipping ''libname'"
+$ goto LIB_LOOP
+$ endif
+$ libsrc_elem = 0
+$ libsrc_found = false
+$LIBSRC_LOOP:
+$ libsrcdir = f$element(libsrc_elem,",",libsrc)
+$ if (libsrcdir .eqs. ",") then goto END_LIBSRC
+$ if f$search("''libsrcdir'''testinc'") .nes. "" then libsrc_found = true
+$ libsrc_elem = libsrc_elem + 1
+$ goto LIBSRC_LOOP
+$END_LIBSRC:
+$ if .not. libsrc_found
+$ then
+$ write sys$output "Can not find includes at ''libsrc' - Skipping ''libname'"
+$ goto LIB_LOOP
+$ endif
+$ if cppdef .nes. "" then libdefs = libdefs + "," + cppdef
+$ libincs = libincs + "," + libsrc
+$ lqual = "/lib"
+$ libtype = f$parse(libloc,,,"TYPE")
+$ if f$locate("EXE",libtype) .lt. f$length(libtype) then lqual = "/share"
+$ write loptf libloc , lqual
+$ goto LIB_LOOP
+$END_LIB:
+$ close libdata
+$ close loptf
+$ libincs = libincs - ","
+$ libdefs = libdefs - ","
+$ return
+$!------------------------------------------------------------------------------
+$!
+$! Analyze Object files for OpenVMS AXP to extract Procedure and Data
+$! information to build a symbol vector for a shareable image
+$! All the "brains" of this logic was suggested by Hartmut Becker
+$! (Hartmut.Becker@compaq.com). All the bugs were introduced by me
+$! (zinser@decus.de), so if you do have problem reports please do not
+$! bother Hartmut/HP, but get in touch with me
+$!
+$ ANAL_OBJ_AXP: Subroutine
+$ V = 'F$Verify(0)
+$ SAY := "WRITE_ SYS$OUTPUT"
+$
+$ IF F$SEARCH("''P1'") .EQS. ""
+$ THEN
+$ SAY "ANAL_OBJ_AXP-E-NOSUCHFILE: Error, inputfile ''p1' not available"
+$ goto exit_aa
+$ ENDIF
+$ IF "''P2'" .EQS. ""
+$ THEN
+$ SAY "ANAL_OBJ_AXP: Error, no output file provided"
+$ goto exit_aa
+$ ENDIF
+$
+$ open/read in 'p1
+$ create a.tmp
+$ open/append atmp a.tmp
+$ loop:
+$ read/end=end_loop in line
+$ f= f$search(line)
+$ if f .eqs. ""
+$ then
+$ write sys$output "ANAL_OBJ_AXP-w-nosuchfile, ''line'"
+$ goto loop
+$ endif
+$ def/user sys$output nl:
+$ def/user sys$error nl:
+$ anal/obj/gsd 'f /out=x.tmp
+$ open/read xtmp x.tmp
+$ XLOOP:
+$ read/end=end_xloop xtmp xline
+$ xline = f$edit(xline,"compress")
+$ write atmp xline
+$ goto xloop
+$ END_XLOOP:
+$ close xtmp
+$ goto loop
+$ end_loop:
+$ close in
+$ close atmp
+$ if f$search("a.tmp") .eqs. "" -
+ then $ exit
+$ ! all global definitions
+$ search a.tmp "symbol:","EGSY$V_DEF 1","EGSY$V_NORM 1"/out=b.tmp
+$ ! all procedures
+$ search b.tmp "EGSY$V_NORM 1"/wind=(0,1) /out=c.tmp
+$ search c.tmp "symbol:"/out=d.tmp
+$ def/user sys$output nl:
+$ edito/edt/command=sys$input d.tmp
+sub/symbol: "/symbol_vector=(/whole
+sub/"/=procedure)/whole
+exit
+$ ! all data
+$ search b.tmp "EGSY$V_DEF 1"/wind=(0,1) /out=e.tmp
+$ search e.tmp "symbol:"/out=f.tmp
+$ def/user sys$output nl:
+$ edito/edt/command=sys$input f.tmp
+sub/symbol: "/symbol_vector=(/whole
+sub/"/=data)/whole
+exit
+$ sort/nodupl d.tmp,f.tmp 'p2'
+$ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;*
+$ if f$search("x.tmp") .nes. "" -
+ then $ delete x.tmp;*
+$!
+$ EXIT_AA:
+$ if V then set verify
+$ endsubroutine