Index: xc/ChangeLog =================================================================== RCS file: /cvs/xorg/xc/ChangeLog,v retrieving revision 1.10 diff -u -r1.10 ChangeLog --- a/xc/ChangeLog 26 Apr 2004 13:38:05 -0000 1.10 +++ b/xc/ChangeLog 28 Apr 2004 10:23:47 -0000 @@ -1,3 +1,233 @@ +2004-04-28 Roland Mainz + * xc/extras/freetype2/ChangeLog + * xc/extras/freetype2/Jamfile + * xc/extras/freetype2/Jamfile.in + * xc/extras/freetype2/README + * xc/extras/freetype2/builds/atari/ATARI.H + * xc/extras/freetype2/builds/atari/FNames.SIC + * xc/extras/freetype2/builds/atari/FREETYPE.PRJ + * xc/extras/freetype2/builds/atari/README.TXT + * xc/extras/freetype2/builds/freetype.mk + * xc/extras/freetype2/builds/unix/aclocal.m4 + * xc/extras/freetype2/builds/unix/config.guess + * xc/extras/freetype2/builds/unix/config.sub + * xc/extras/freetype2/builds/unix/configure + * xc/extras/freetype2/builds/unix/configure.ac + * xc/extras/freetype2/builds/unix/detect.mk + * xc/extras/freetype2/builds/unix/freetype-config.in + * xc/extras/freetype2/builds/unix/ft-munmap.m4 + * xc/extras/freetype2/builds/unix/ftconfig.in + * xc/extras/freetype2/builds/unix/ftsystem.c + * xc/extras/freetype2/builds/unix/install-sh + * xc/extras/freetype2/builds/unix/ltmain.sh + * xc/extras/freetype2/builds/unix/mkinstalldirs + * xc/extras/freetype2/builds/unix/unix-def.in + * xc/extras/freetype2/builds/unix/unix.mk + * xc/extras/freetype2/builds/vms/ftconfig.h + * xc/extras/freetype2/builds/win32/visualc/freetype.dsp + * xc/extras/freetype2/builds/win32/visualc/freetype.sln + * xc/extras/freetype2/builds/win32/visualc/freetype.vcproj + * xc/extras/freetype2/builds/win32/visualc/index.html + * xc/extras/freetype2/configure + * xc/extras/freetype2/devel/ftoption.h + * xc/extras/freetype2/docs/CHANGES + * xc/extras/freetype2/docs/INSTALL + * xc/extras/freetype2/docs/INSTALL.GNU + * xc/extras/freetype2/docs/INSTALL.UNX + * xc/extras/freetype2/docs/VERSION.DLL + * xc/extras/freetype2/docs/raster.txt + * xc/extras/freetype2/docs/release + * xc/extras/freetype2/include/freetype/cache/ftccache.h + * xc/extras/freetype2/include/freetype/cache/ftcglyph.h + * xc/extras/freetype2/include/freetype/cache/ftcimage.h + * xc/extras/freetype2/include/freetype/cache/ftcmanag.h + * xc/extras/freetype2/include/freetype/cache/ftcmru.h + * xc/extras/freetype2/include/freetype/cache/ftcsbits.h + * xc/extras/freetype2/include/freetype/cache/ftlru.h + * xc/extras/freetype2/include/freetype/config/ftconfig.h + * xc/extras/freetype2/include/freetype/config/ftheader.h + * xc/extras/freetype2/include/freetype/config/ftoption.h + * xc/extras/freetype2/include/freetype/config/ftstdlib.h + * xc/extras/freetype2/include/freetype/freetype.h + * xc/extras/freetype2/include/freetype/ftcache.h + * xc/extras/freetype2/include/freetype/fterrdef.h + * xc/extras/freetype2/include/freetype/ftglyph.h + * xc/extras/freetype2/include/freetype/ftimage.h + * xc/extras/freetype2/include/freetype/ftlzw.h + * xc/extras/freetype2/include/freetype/ftmac.h + * xc/extras/freetype2/include/freetype/ftmoderr.h + * xc/extras/freetype2/include/freetype/ftstroke.h + * xc/extras/freetype2/include/freetype/ftwinfnt.h + * xc/extras/freetype2/include/freetype/ftxf86.h + * xc/extras/freetype2/include/freetype/internal/ftcalc.h + * xc/extras/freetype2/include/freetype/internal/ftdebug.h + * xc/extras/freetype2/include/freetype/internal/ftdriver.h + * xc/extras/freetype2/include/freetype/internal/ftgloadr.h + * xc/extras/freetype2/include/freetype/internal/ftmemory.h + * xc/extras/freetype2/include/freetype/internal/ftobjs.h + * xc/extras/freetype2/include/freetype/internal/ftrfork.h + * xc/extras/freetype2/include/freetype/internal/ftserv.h + * xc/extras/freetype2/include/freetype/internal/ftstream.h + * xc/extras/freetype2/include/freetype/internal/fttrace.h + * xc/extras/freetype2/include/freetype/internal/internal.h + * xc/extras/freetype2/include/freetype/internal/psaux.h + * xc/extras/freetype2/include/freetype/internal/services/svttcmap.h + * xc/extras/freetype2/include/freetype/internal/sfnt.h + * xc/extras/freetype2/include/freetype/internal/t1types.h + * xc/extras/freetype2/include/freetype/internal/tttypes.h + * xc/extras/freetype2/include/freetype/t1tables.h + * xc/extras/freetype2/include/freetype/ttnameid.h + * xc/extras/freetype2/include/freetype/tttables.h + * xc/extras/freetype2/src/autofit/Jamfile + * xc/extras/freetype2/src/autofit/afangles.c + * xc/extras/freetype2/src/autofit/afdummy.c + * xc/extras/freetype2/src/autofit/afdummy.h + * xc/extras/freetype2/src/autofit/afglobal.c + * xc/extras/freetype2/src/autofit/afglobal.h + * xc/extras/freetype2/src/autofit/afhints.c + * xc/extras/freetype2/src/autofit/afhints.h + * xc/extras/freetype2/src/autofit/aflatin.c + * xc/extras/freetype2/src/autofit/aflatin.h + * xc/extras/freetype2/src/autofit/afloader.c + * xc/extras/freetype2/src/autofit/afloader.h + * xc/extras/freetype2/src/autofit/afmodule.c + * xc/extras/freetype2/src/autofit/afmodule.h + * xc/extras/freetype2/src/autofit/aftypes.h + * xc/extras/freetype2/src/autofit/autofit.c + * xc/extras/freetype2/src/autohint/ahglobal.c + * xc/extras/freetype2/src/autohint/ahglyph.c + * xc/extras/freetype2/src/autohint/ahhint.c + * xc/extras/freetype2/src/autohint/ahtypes.h + * xc/extras/freetype2/src/base/Jamfile + * xc/extras/freetype2/src/base/descrip.mms + * xc/extras/freetype2/src/base/ftbase.c + * xc/extras/freetype2/src/base/ftcalc.c + * xc/extras/freetype2/src/base/ftdbgmem.c + * xc/extras/freetype2/src/base/ftdebug.c + * xc/extras/freetype2/src/base/ftgloadr.c + * xc/extras/freetype2/src/base/ftglyph.c + * xc/extras/freetype2/src/base/ftmac.c + * xc/extras/freetype2/src/base/ftobjs.c + * xc/extras/freetype2/src/base/ftoutln.c + * xc/extras/freetype2/src/base/ftrfork.c + * xc/extras/freetype2/src/base/ftstream.c + * xc/extras/freetype2/src/base/ftstroke.c + * xc/extras/freetype2/src/base/ftsynth.c + * xc/extras/freetype2/src/base/fttrigon.c + * xc/extras/freetype2/src/base/rules.mk + * xc/extras/freetype2/src/bdf/bdfdrivr.c + * xc/extras/freetype2/src/bdf/bdfdrivr.h + * xc/extras/freetype2/src/bdf/bdflib.c + * xc/extras/freetype2/src/cache/Jamfile + * xc/extras/freetype2/src/cache/descrip.mms + * xc/extras/freetype2/src/cache/ftcache.c + * xc/extras/freetype2/src/cache/ftcbasic.c + * xc/extras/freetype2/src/cache/ftccache.c + * xc/extras/freetype2/src/cache/ftccache.i + * xc/extras/freetype2/src/cache/ftccback.h + * xc/extras/freetype2/src/cache/ftccmap.c + * xc/extras/freetype2/src/cache/ftcglyph.c + * xc/extras/freetype2/src/cache/ftcimage.c + * xc/extras/freetype2/src/cache/ftcmanag.c + * xc/extras/freetype2/src/cache/ftcmru.c + * xc/extras/freetype2/src/cache/ftcsbits.c + * xc/extras/freetype2/src/cache/ftlru.c + * xc/extras/freetype2/src/cache/rules.mk + * xc/extras/freetype2/src/cff/Jamfile + * xc/extras/freetype2/src/cff/cff.c + * xc/extras/freetype2/src/cff/cffcmap.c + * xc/extras/freetype2/src/cff/cffdrivr.c + * xc/extras/freetype2/src/cff/cffgload.c + * xc/extras/freetype2/src/cff/cffload.c + * xc/extras/freetype2/src/cff/cffload.h + * xc/extras/freetype2/src/cff/cffobjs.c + * xc/extras/freetype2/src/cff/cffobjs.h + * xc/extras/freetype2/src/cff/cffparse.c + * xc/extras/freetype2/src/cff/cffparse.h + * xc/extras/freetype2/src/cff/cfftoken.h + * xc/extras/freetype2/src/cff/cfftypes.h + * xc/extras/freetype2/src/cff/rules.mk + * xc/extras/freetype2/src/cid/cidgload.c + * xc/extras/freetype2/src/cid/cidload.c + * xc/extras/freetype2/src/cid/cidload.h + * xc/extras/freetype2/src/cid/cidobjs.c + * xc/extras/freetype2/src/cid/cidparse.c + * xc/extras/freetype2/src/cid/cidparse.h + * xc/extras/freetype2/src/gzip/ftgzip.c + * xc/extras/freetype2/src/gzip/zutil.h + * xc/extras/freetype2/src/lzw/Jamfile + * xc/extras/freetype2/src/lzw/ftlzw.c + * xc/extras/freetype2/src/lzw/rules.mk + * xc/extras/freetype2/src/lzw/zopen.c + * xc/extras/freetype2/src/lzw/zopen.h + * xc/extras/freetype2/src/pcf/pcfdrivr.c + * xc/extras/freetype2/src/pcf/pcfread.c + * xc/extras/freetype2/src/pcf/pcfutil.c + * xc/extras/freetype2/src/pcf/pcfutil.h + * xc/extras/freetype2/src/pfr/pfrdrivr.c + * xc/extras/freetype2/src/pfr/pfrgload.c + * xc/extras/freetype2/src/pfr/pfrload.c + * xc/extras/freetype2/src/pfr/pfrobjs.c + * xc/extras/freetype2/src/pfr/pfrsbit.c + * xc/extras/freetype2/src/psaux/psobjs.c + * xc/extras/freetype2/src/psaux/t1decode.c + * xc/extras/freetype2/src/pshinter/Jamfile + * xc/extras/freetype2/src/pshinter/pshalgo.c + * xc/extras/freetype2/src/pshinter/pshglob.c + * xc/extras/freetype2/src/pshinter/pshrec.c + * xc/extras/freetype2/src/pshinter/pshrec.h + * xc/extras/freetype2/src/raster/ftrend1.c + * xc/extras/freetype2/src/sfnt/Jamfile + * xc/extras/freetype2/src/sfnt/rules.mk + * xc/extras/freetype2/src/sfnt/sfdriver.c + * xc/extras/freetype2/src/sfnt/sfnt.c + * xc/extras/freetype2/src/sfnt/sfobjs.c + * xc/extras/freetype2/src/sfnt/ttcmap.c + * xc/extras/freetype2/src/sfnt/ttcmap.h + * xc/extras/freetype2/src/sfnt/ttcmap0.c + * xc/extras/freetype2/src/sfnt/ttcmap0.h + * xc/extras/freetype2/src/sfnt/ttload.c + * xc/extras/freetype2/src/sfnt/ttsbit.c + * xc/extras/freetype2/src/sfnt/ttsbit.h + * xc/extras/freetype2/src/smooth/ftsmooth.c + * xc/extras/freetype2/src/tools/docmaker/content.py + * xc/extras/freetype2/src/tools/docmaker/docbeauty.py + * xc/extras/freetype2/src/tools/docmaker/docmaker.py + * xc/extras/freetype2/src/tools/docmaker/formatter.py + * xc/extras/freetype2/src/tools/docmaker/sources.py + * xc/extras/freetype2/src/tools/docmaker/utils.py + * xc/extras/freetype2/src/truetype/ttdriver.c + * xc/extras/freetype2/src/truetype/ttgload.c + * xc/extras/freetype2/src/truetype/ttgload.h + * xc/extras/freetype2/src/truetype/ttinterp.c + * xc/extras/freetype2/src/truetype/ttinterp.h + * xc/extras/freetype2/src/truetype/ttobjs.c + * xc/extras/freetype2/src/truetype/ttobjs.h + * xc/extras/freetype2/src/type1/t1driver.c + * xc/extras/freetype2/src/type1/t1gload.c + * xc/extras/freetype2/src/type1/t1load.c + * xc/extras/freetype2/src/type1/t1objs.c + * xc/extras/freetype2/src/type1/t1parse.c + * xc/extras/freetype2/src/type1/t1tokens.h + * xc/extras/freetype2/src/type42/t42drivr.c + * xc/extras/freetype2/src/type42/t42objs.c + * xc/extras/freetype2/src/type42/t42parse.c + * xc/extras/freetype2/src/type42/t42types.h + * xc/extras/freetype2/src/winfonts/winfnt.c + * xc/extras/freetype2/src/winfonts/winfnt.h + * xc/extras/freetype2/tests/gview.c + * xc/extras/freetype2/vms_make.com + * xc/lib/font/FreeType/ftconfig.h + * xc/lib/font/FreeType/module/ftheader.h + * xc/lib/font/FreeType/module/ftoption.h + * xc/lib/freetype2/Imakefile + * xc/lib/freetype2/freetype/Imakefile + * xc/lib/freetype2/freetype/cache/Imakefile + * xc/lib/freetype2/freetype/internal/Imakefile + * xc/lib/freetype2/freetype/internal/services/Imakefile + Bugzilla #556: Update FreeType2 version in xc/extras/Freetype2 + to V2.1.8 (previous version in tree was V2.1.7) + 2004-04-26 Alan Hourihane * xc/extras/Mesa/src/X/xm_dd.c Backport a fix from Mesa 6.0 to 5.0.2 that creates the xmesa Index: xc/extras/freetype2/ChangeLog =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/ChangeLog,v retrieving revision 1.2 diff -u -r1.2 ChangeLog --- a/xc/extras/freetype2/ChangeLog 23 Apr 2004 18:42:40 -0000 1.2 +++ b/xc/extras/freetype2/ChangeLog 28 Apr 2004 10:24:02 -0000 @@ -1,3 +1,1275 @@ +2004-04-21 David Turner + + * 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 + + * src/psaux/psobjs.c (T1Radix): Renamed to... + (ps_radix): This. + Update current cursor position. + + * docs/CHANGES: Updated. + +2004-04-18 Werner Lemberg + + * 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 + + * 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 + + * builds/unix/freetype-config.in (usage): Fix and improve usage + information. + +2004-04-15 Werner Lemberg + + * 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 + + * include/freetype/config/ftconfig.h, src/base/ftstream.c + (FT_Stream_ReadFields): More fixes using FT_CHAR_BIT. + +2004-04-14 Werner Lemberg + + * include/freetype/config/ftconfig.h (FT_CHAR_BIT): New macro. + +2004-04-14 Alex Strelnikov + + * src/cache/ftcsbits.c (ftc_snode_load): Initialize `*asize' in case + of error. + +2004-04-14 Werner Lemberg + + * 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 + + * include/freetype/config/ftconfig.h: Use CHAR_BIT to define + size of FT_SIZEOF_xxx. + +2004-04-12 Chisato Yamauchi + + * 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 + + * 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 + + * src/lzw/zopen.c: Don't include sys/param.h and sys/stat.h. + +2004-04-10 Werner Lemberg + + * 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 + + * 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 + + * 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 + + 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 + + * src/sfnt/ttload.c (tt_face_load_sfnt_header): Fix change from + 2004-03-19. + +2004-03-27 Werner Lemberg + + * src/base/descrip.mms (OBJS): Add ftbbox.obj. + +2004-03-26 George Williams + + 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 + + * src/bdf/bdfdrivr.c (BDF_Glyph_Load): Fix left side bearing. + +2004-03-20 Steve Hartwell + + * src/cache/ftcmru.c (FTC_MruList_RemoveSelection): Handle a NULL + value for `selection' as `select all'. + +2004-03-19 Steve Hartwell + + * 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 + + * 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 + + 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 + + * src/pshinter/pshalgo.c (psh_hint_table_init): Simplify code. + +2004-03-02 Werner Lemberg + + 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 + + * 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 + + * 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 + + * 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 + + * docs/CHANGES: Updated. + +2004-02-25 Garrick Meeker + Steve Hartwell + + 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 + + * src/autohint/ahhint.c (ah_hinter_load) : + Handle case where outline->num_vedges is zero while computing hinted + metrics. + +2004-02-24 Gordon Childs + + * src/cff/cffcmap.c (cff_cmap_unicode_init): Provide correct value + for `count'. + +2004-02-24 Werner Lemberg + + * 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 + + 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 + + * docs/CHANGES: Updated. + + * include/freetype/internal/ftdebug.h: Include FT_FREETYPE_H. + +2004-02-23 Masatake YAMATO + + 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + 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 + + * 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 + + * src/base/ftobjs.c (FT_Set_Char_Size): Fix typo. + +2004-02-14 Masatake YAMATO + + * 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 + + * src/type1/t1load.c (parse_dict): Initialize `start_binary'. + +2004-02-13 Robert Etheridge + + * 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 + + * 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 + + * src/cid/cidload.c (cid_face_open): Always allocate + face->cid_stream so that we can deallocate it safely. + +2004-02-10 Werner Lemberg + + 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 + + * src/cff/cffgload.c (cff_decoder_parse_charstrings) + : Preserve glyph width before calling + cff_operator_seac. + +2004-02-09 Martin Muskens + + * src/cff/cffgload.c (cff_decoder_parse_charstrings): Handle special + first argument for `hintmask' and `cntrmask' operators also. + +2004-02-08 Werner Lemberg + + * 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 + + * 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 + + * builds/win32/visualc/index.html, + builds/win32/visualc/freetype.dsp, + builds/win32/visualc/freetype.dsw, docs/CHANGES: Updated. + +2004-02-07 Vitaliy Pasternak + + * builds/win32/visualc/freetype.sln, + builds/win32/visualc/freetype.vcproj: New files for VS.NET 2003. + +2004-02-03 Werner Lemberg + + * 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 + + * 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 + + * 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 + + * src/sfnt/Jamfile: Removing `ttcmap' from the list of sources. + + * include/freetype/cache/ftccache.h (FTC_CACHE_LOOKUP_CMP) + : Provide macro version which doesn't use inline code. + * include/freetype/cache/ftcglyph.h (FTC_GCACHE_LOOKUP_CMP) + : 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) : 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 + + * 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) : Fix magnitude + of accent offset. + Don't hint glyphs twice if seac is emulated. + : Assign correct point tags. + * docs/CHANGES: Updated. + +2004-01-30 Werner Lemberg + + * 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 + + * 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 + + * src/cff/cffload.c (cff_subfont_load): Initialize `dict'. + +2004-01-22 Werner Lemberg + + 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 + + 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 + + * 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 + + * src/cache/ftcmanag.c (ftc_size_node_compare): Call + FT_Activate_Size. + +2004-01-20 Werner Lemberg + + * src/type1/t1parse.c (T1_Get_Private_Dict): Skip exactly one + CR, LF, or CR/LF after `eexec'. + +2004-01-18 David Turner + + * src/sfnt/ttsbit.c (tt_face_set_sbit_strike): Remove compiler + warning. + + * src/tools/docmaker/*: Updating beautifier tool. + +2004-01-15 David Turner + + * 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 + + * 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 + + * 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 + + * 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 + + Make `FT_Get_CMap_Language_ID' work with CFF. Bug reported by + Steve Hartwell . + + * 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 . + +2004-01-03 Masatake YAMATO + + * src/base/ftobjs.c (destroy_charmaps): New function. + (destroy_face, open_face): Use `destroy_charmaps'. + +2004-01-01 Werner Lemberg + + * docs/CHANGES: Updated. + +2004-01-01 Michael Jansson + + * src/winfonts/winfnt.c (FNT_Size_Set_Pixels): Fix sign of + size->metrics.descender. + +2003-12-31 Wolfgang Domröse + + * src/cff/cffgload.c (cff_decoder_parse_charstrings) + [FT_DEBUG_LEVEL_TRACE]: Use `%ld' in FT_TRACE4. + : Change type of dx and dy to FT_Pos and remove + cast for accessing arguments. + +2003-12-31 Werner Lemberg + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Revert previous + change. It's not necessary. + +2003-12-29 Smith Charles + + * src/truetype/ttgload.c (TT_Load_Simple_Glyph): Handle `repeated + flags set' correctly. + +2003-12-29 Werner Lemberg + + * src/cff/cffobjs.c (cff_face_init): Fix memory leak by deallocating + `full' and `weight' properly. + * src/cff/cffgload.c (cff_decoder_parse_charstrings) + [FT_DEBUG_LEVEL_TRACE]: Use `0x' as prefix for + tracing output. + +2003-12-26 Werner Lemberg + + * 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 + + * 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 + + * src/cache/ftcsbits.c (FTC_SNode_Weight): + s/FTC_SBIT_ITEM_PER_NODE/FTC_SBIT_ITEMS_PER_NODE/. + +2003-12-24 David Turner + + * Fixed compilation problems in the cache sub-system. + + * Partial updates to src/autofit. + + * Jamfile (FT2_COMPONENTS): Add autofit module. + +2003-12-23 Werner Lemberg + + * src/cff/cffgload.c (cff_lookup_glyph_by_stdcharcode): Handle + CID-keyed fonts. + +2003-12-23 David Turner + + * 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 + + * 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 Würkner . + + * docs/CHANGES: Updated. + +2003-12-22 David Turner + + * 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 + + * src/type1/t1load.c (parse_dict): Stop parsing if `eexec' keyword + is encountered. + +2003-12-19 Werner Lemberg + + * 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 + + * 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 + + * 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 + + * 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 + + 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 + + * 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 + + * docs/CHANGES: Updated. + +2003-12-15 Wolfgang Domröse + + * builds/atari/*: New directory for building FreeType 2 on Atari + with the PureC compiler. + +2003-12-12 Wolfgang Domröse + + * 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 + + * 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 + + * 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 + + 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 Würkner + + * 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 + + * 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 + + * 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 + + * 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 Domröse + + * 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 + + * docs/raster.txt: New file, taken from FreeType 1 and completely + revised. + +2003-12-04 Masatake YAMATO + + * src/type1/t1driver.c (Get_Interface): Remove FT_UNUSED for + t1_interface. t1_interface is used. + +2003-11-27 David Turner + + * 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 + + * 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 + + * 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 + + * 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 + + * 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 + + * 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. + + * 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 + + * docs/CHANGES: Updated. + +2003-11-11 John A. Boyd Jr. + + 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 @@ -1910,8 +3182,8 @@ (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". + [TT_CONFIG_OPTION_COMPILE_UNPATENTED_HINTING]: New element `FT_Bool + unpatented_hinting'. * src/truetype/ttinterp.c (NO_APPLE_PATENT, APPLE_THRESHOLD): Removed. @@ -1977,8 +3249,8 @@ * 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". + convention that glyph index 0 always corresponds to the `missing + glyph'. 2003-04-24 Werner Lemberg @@ -2074,7 +3346,7 @@ 2003-04-09 Torrey Lyons * src/base/ftmac.c (open_face_from_buffer): Removed a double-free - bug that had nasty consequences when trying to open an "invalid" + bug that had nasty consequences when trying to open an `invalid' font on a Mac. 2003-04-09 Mike Fabian @@ -2093,7 +3365,7 @@ 2003-04-03 Martin Muskens * src/type1/t1load.c (T1_Open_Face): Fixed the code to make it - handle special cases where a font only contains a ".notdef" glyph + 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 @@ -2202,8 +3474,8 @@ 2003-03-13 David Turner 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. + FreeType. See the description of `FT2_DEBUG_MEMORY', + `FT2_ALLOC_TOTAL_MAX' and `FT2_ALLOC_COUNT_MAX' in DEBUG.TXT. * src/base/ftdbgmem.c (FT_MemTableRec): Add `alloc_count', `bound_total', `alloc_total_max', `bound_count', `alloc_count_max'. @@ -2248,7 +3520,7 @@ (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" + * src/sfnt/ttload.c, src/base/ftobjs.c: Changed `asian' to `Asian' in comments. 2003-02-25 David Turner @@ -2269,7 +3541,7 @@ - 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. + retrieve the `real' family and style names. NOTE THAT THESE CHANGES THE FAMILY NAME OF MANY PFR FONTS! @@ -2315,7 +3587,7 @@ `exec->metrics'. * src/autohint/ahhint.c (ah_hinter_load): Disabled the advance width - "correction" which seemed to provide more trouble than benefits. + `correction' which seemed to provide more trouble than benefits. 2003-02-13 Graham Asher @@ -2356,7 +3628,7 @@ * 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 + 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). @@ -2420,9 +3692,9 @@ (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 + * 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 + incorrectly (the table should be padded, but its `size' field shouldn't according to the specification). 2003-01-18 Werner Lemberg @@ -2488,9 +3760,9 @@ 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 + FT_CONFIG_OPTION_CHESTER_HINTS defined in `ftoption.h'. There are also individual FT_CONFIG_CHESTER_XXX macros to control individual - "features". + `features'. Note that all improvements are enabled by default, but can be tweaked for optimization and testing purposes. The configuration @@ -2532,11 +3804,11 @@ 2003-01-08 Huw Dawies * src/winfonts/winfnt.c (winfnt_header_fields): Read 16 bytes into - "reserved2", not "reserved". + `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. @@ -2589,7 +3861,7 @@ assertion, and changing code to avoid hash table size contraction. * src/base/Jamfile, src/base/rules.mk, src/base/descrip.mms: Adding - "ftstroker" to default build, as optional component. + `ftstroker' to default build, as optional component. 2002-12-26 David Turner @@ -2720,7 +3992,7 @@ 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 as a volatile pointer to a variable :-) @@ -2852,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. @@ -3117,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. @@ -3125,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 @@ -3429,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. @@ -3443,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. @@ -3613,7 +4885,7 @@ 2002-07-30 David Turner * 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. @@ -3649,10 +4921,10 @@ 2002-07-24 Graham Asher * 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 @@ -3755,8 +5027,8 @@ 2002-07-11 David Turner 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. @@ -4058,7 +5330,7 @@ (FT_Get_PS_Font_Info): Make it work with CID and Type 42 drivers also. -2002-06-19 Sebastien BARRE +2002-06-19 Sebastien BARRE * src/type42/t42parse.c (t42_parse_sfnts): Fix compiler warning. @@ -4273,7 +5545,7 @@ 2002-06-07 David Turner 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, @@ -4379,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. @@ -4402,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 @@ -4456,7 +5728,7 @@ 2002-05-21 David Turner * 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. @@ -4467,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 @@ -4621,11 +5893,11 @@ 2002-05-01 David Turner * 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 @@ -4792,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, @@ -4880,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.). @@ -5121,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, @@ -5331,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 @@ -5395,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 @@ -5442,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 @@ -5464,8 +6736,8 @@ 2002-02-21 David Turner 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. @@ -5490,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 ... @@ -5503,7 +6775,7 @@ 2002-02-20 David Turner - * README: Adding "devel@freetype.org" address for bug reports. + * README: Adding `devel@freetype.org' address for bug reports. 2002-02-20 Werner Lemberg @@ -5631,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. @@ -5697,7 +6969,7 @@ 2002-01-30 David Turner * 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 @@ -5707,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 @@ -5754,7 +7026,7 @@ 2002-01-21 Antoine Leca - * docs/PATENTS: Typo fixed (thanks to Detlef "Hawkeye" Würkner) in + * docs/PATENTS: Typo fixed (thanks to Detlef `Hawkeye' Würkner) in the URL for the online resource. 2002-01-18 Ian Brown @@ -5814,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 @@ -5829,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): @@ -5856,22 +7128,22 @@ 2002-01-03 Keith Packard * 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 * 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. @@ -5922,8 +7194,8 @@ 2001-12-21 David Turner * 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. @@ -6019,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. @@ -6038,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. @@ -6132,9 +7404,9 @@ 2001-12-11 David Turner * 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 @@ -6155,7 +7427,7 @@ 2001-12-10 Francesco Zappa Nardelli * 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 @@ -6254,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 Würkner + (TT_UCR_SURROGATES) which (with OpenType v.1.3) now means `there is + a character beyond 0xFFFF in this font'. Thanks to Detlef Würkner for noticing this. 2001-11-20 David Turner @@ -6302,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 @@ -6313,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 @@ -6381,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. @@ -6435,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 @@ -6445,7 +7717,7 @@ 2001-10-18 David Turner * 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. @@ -6487,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 @@ -6609,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 @@ -6691,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. @@ -6708,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 @@ -6857,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. @@ -6931,9 +8203,9 @@ 2001-06-14 David Turner 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. @@ -7055,7 +8327,7 @@ 2001-05-25 David Turner - 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. @@ -7109,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. @@ -7163,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 @@ -7190,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 @@ -7208,7 +8480,7 @@ 2001-04-20 David Turner - * 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. @@ -7325,7 +8597,7 @@ 2001-03-20 David Turner * 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 @@ -7335,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 @@ -7345,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 @@ -7371,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 . * include/config/ftheader.h: Added new section describing the #include @@ -7393,7 +8665,7 @@ 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 . @@ -7404,7 +8676,7 @@ Submitted by Sander van der Wal . * src/cff/cffgload.c (CFF_Parse_CharStrings): Added support for - deprecated operator "dotsection". + deprecated operator `dotsection'. Submitted by Sander van der Wal . 2001-03-12 Werner Lemberg @@ -7590,7 +8862,7 @@ 2001-02-01 David Turner * docs/docmaker.py: Improved the index sorting routine to place - capital letters before small ones. Added the "" marker to + capital letters before small ones. Added the `' marker to section blocks in order to give the order of blocks. 2001-01-30 Antoine Leca @@ -7797,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 @@ -7815,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 @@ -7916,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 - * 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 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 as the default build and setup configuration file in all public headers. Internal source files @@ -7937,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 @@ -7949,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. @@ -7976,13 +9248,13 @@ 2000-11-30 David Turner * 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. @@ -7990,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, Index: xc/extras/freetype2/Jamfile =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/Jamfile,v retrieving revision 1.2 diff -u -r1.2 Jamfile --- a/xc/extras/freetype2/Jamfile 23 Apr 2004 18:42:40 -0000 1.2 +++ b/xc/extras/freetype2/Jamfile 28 Apr 2004 10:24:02 -0000 @@ -1,4 +1,4 @@ -# FreeType 2 top Jamfile (c) 2001, 2002, 2003 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 @@ -61,13 +61,15 @@ # 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 + 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 @@ -146,7 +148,7 @@ actions RefDoc { - python $(FT2_SRC)/tools/docmaker/docmaker.py --prefix=ft2 --title=FreeType-2.1.5 --output=$(DOC_DIR) $(FT2_INCLUDE)/freetype/*.h $(FT2_INCLUDE)/freetype/config/*.h $(FT2_INCLUDE)/freetype/cache/*.h + 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 ; Index: xc/extras/freetype2/Jamfile.in =================================================================== RCS file: xc/extras/freetype2/Jamfile.in diff -N xc/extras/freetype2/Jamfile.in --- a/xc/extras/freetype2/Jamfile.in 23 Apr 2004 18:42:40 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,135 +0,0 @@ -# FreeType 2 top Jamfile (c) 2001, 2002, 2003 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 -# the following code -# -if ! $(JAM_TOOLSET) -{ - rule HDRMACRO - { - # 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. -# -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 -# replaced by other definitions when the library is compiled as part of -# a larger project. -# - -# Name of FreeType include directory during compilation. -# This is relative to FT2_TOP. -# -FT2_INCLUDE_DIR ?= include ; - -# Name of FreeType source directory during compilation. -# This is relative to FT2_TOP. -# -FT2_SRC_DIR ?= src ; - -# 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. It can be used to specify -# the location of a custom which will point to custom -# 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. -# -# 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 - 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 - 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 - sfnt # SFNT-based format support routines - truetype # TrueType font driver - type1 # PostScript Type 1 font driver - type42 # PostScript Type 42 (embedded TrueType) driver - winfonts # Windows FON/FNT font driver - ; - - -# 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. -# -if $(DEBUG_HINTER) -{ - CCFLAGS += -DDEBUG_HINTER ; -} - - -# We need "freetype2/include" in the current include path in order to -# compile any part of FreeType 2. -# -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! -# -# FT2_MULTI = true ; - - -# The file is used to define macros that are -# later used in #include statements. It needs to be parsed in order to -# record these definitions. -# -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) ; - - -# Test files (hinter debugging). Only used by FreeType developers. -# -if $(DEBUG_HINTER) -{ - SubInclude FT2_TOP tests ; -} - -# end of top Jamfile Index: xc/extras/freetype2/README =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/README,v retrieving revision 1.2 diff -u -r1.2 README --- a/xc/extras/freetype2/README 23 Apr 2004 18:42:40 -0000 1.2 +++ b/xc/extras/freetype2/README 28 Apr 2004 10:24:02 -0000 @@ -9,7 +9,7 @@ is called `libttf'. They are *not* compatible! - FreeType 2.1.7 + FreeType 2.1.8 ============== Please read the docs/CHANGES file, it contains IMPORTANT INFORMATION. @@ -19,9 +19,9 @@ 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.7.tar.bz2 - ftp://ftp.freetype.org/pub/freetype2/ftdocs-2.1.7.tar.gz - ftp://ftp.freetype.org/pub/freetype2/ftdoc216.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 Bugs Index: xc/extras/freetype2/configure =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/configure,v retrieving revision 1.2 diff -u -r1.2 configure --- a/xc/extras/freetype2/configure 23 Apr 2004 18:42:40 -0000 1.2 +++ b/xc/extras/freetype2/configure 28 Apr 2004 10:24:02 -0000 @@ -5,7 +5,6 @@ # This should re-generate the following files: # # config.mk -# Jamfile # install # @@ -14,9 +13,14 @@ 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= $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= $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... Index: xc/extras/freetype2/vms_make.com =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/vms_make.com,v retrieving revision 1.2 diff -u -r1.2 vms_make.com --- a/xc/extras/freetype2/vms_make.com 23 Apr 2004 18:42:41 -0000 1.2 +++ b/xc/extras/freetype2/vms_make.com 28 Apr 2004 10:24:03 -0000 @@ -151,6 +151,8 @@ $(MMS)$(MMSQUALIFIERS) set default [-.gzip] $(MMS)$(MMSQUALIFIERS) + set default [-.lzw] + $(MMS)$(MMSQUALIFIERS) set default [-.pcf] $(MMS)$(MMSQUALIFIERS) set default [-.pfr] @@ -277,6 +279,39 @@ # 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 Index: xc/extras/freetype2/builds/freetype.mk =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/freetype.mk,v retrieving revision 1.2 diff -u -r1.2 freetype.mk --- a/xc/extras/freetype2/builds/freetype.mk 23 Apr 2004 18:42:41 -0000 1.2 +++ b/xc/extras/freetype2/builds/freetype.mk 28 Apr 2004 10:24:03 -0000 @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2001, 2002, 2003 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, @@ -254,7 +254,7 @@ refdoc: python $(SRC_DIR)/tools/docmaker/docmaker.py \ --prefix=ft2 \ - --title=FreeType-2.1.7 \ + --title=FreeType-2.1.8 \ --output=$(DOC_DIR) \ $(PUBLIC_DIR)/*.h \ $(PUBLIC_DIR)/config/*.h \ Index: xc/extras/freetype2/builds/atari/ATARI.H =================================================================== RCS file: xc/extras/freetype2/builds/atari/ATARI.H diff -N xc/extras/freetype2/builds/atari/ATARI.H --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/builds/atari/ATARI.H 28 Apr 2004 10:24:04 -0000 @@ -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 */ Index: xc/extras/freetype2/builds/atari/FNames.SIC =================================================================== RCS file: xc/extras/freetype2/builds/atari/FNames.SIC diff -N xc/extras/freetype2/builds/atari/FNames.SIC --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/builds/atari/FNames.SIC 28 Apr 2004 10:24:04 -0000 @@ -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); +} Index: xc/extras/freetype2/builds/atari/FREETYPE.PRJ =================================================================== RCS file: xc/extras/freetype2/builds/atari/FREETYPE.PRJ diff -N xc/extras/freetype2/builds/atari/FREETYPE.PRJ --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/builds/atari/FREETYPE.PRJ 28 Apr 2004 10:24:05 -0000 @@ -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 + Index: xc/extras/freetype2/builds/atari/README.TXT =================================================================== RCS file: xc/extras/freetype2/builds/atari/README.TXT diff -N xc/extras/freetype2/builds/atari/README.TXT --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/builds/atari/README.TXT 28 Apr 2004 10:24:05 -0000 @@ -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 +ge„ndert 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 --- Index: xc/extras/freetype2/builds/unix/aclocal.m4 =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/unix/aclocal.m4,v retrieving revision 1.2 diff -u -r1.2 aclocal.m4 --- a/xc/extras/freetype2/builds/unix/aclocal.m4 23 Apr 2004 18:42:42 -0000 1.2 +++ b/xc/extras/freetype2/builds/unix/aclocal.m4 28 Apr 2004 10:24:11 -0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.7.8 -*- 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,30 +11,6 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. - -# serial 2 - -AC_DEFUN([FT_MUNMAP_PARAM], - [AC_MSG_CHECKING([for munmap's first parameter type]) - AC_COMPILE_IFELSE([ - AC_LANG_SOURCE([[ - -#include -#include -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 - # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 47 AC_PROG_LIBTOOL @@ -515,7 +491,7 @@ x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*) + ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -579,7 +555,8 @@ # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], -[AC_CACHE_CHECK([$1], [$2], +[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 @@ -655,7 +632,7 @@ AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 - testring="ABCD" + teststring="ABCD" case $build_os in msdosdjgpp*) @@ -684,20 +661,26 @@ 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$testring" 2>/dev/null` \ - = "XX$testring") >/dev/null 2>&1 && - new_result=`expr "X$testring" : ".*" 2>&1` && + 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` - testring=$testring$testring + teststring=$teststring$teststring done - testring= + 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. @@ -847,7 +830,7 @@ lt_cv_dlopen_self=yes ]) ;; - + *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], @@ -936,13 +919,6 @@ mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext - # 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 . - 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. @@ -966,8 +942,11 @@ fi fi chmod u+w . - $rm conftest* out/* - rmdir out + $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* @@ -1084,7 +1063,7 @@ *) AC_MSG_RESULT([no]) ;; - esac + esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP @@ -1097,7 +1076,7 @@ library_names_spec= libname_spec='lib$name' soname_spec= -shrext=".so" +shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -1185,7 +1164,7 @@ 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*) @@ -1210,7 +1189,7 @@ cygwin* | mingw* | pw32*) version_type=windows - shrext=".dll" + shrext_cmds=".dll" need_version=no need_lib_prefix=no @@ -1232,7 +1211,7 @@ 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="/lib /lib/w32api /usr/lib /usr/local/lib" + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix @@ -1271,17 +1250,16 @@ 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}$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='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; 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"` + 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' ;; @@ -1299,6 +1277,18 @@ 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 @@ -1347,7 +1337,7 @@ need_version=no case "$host_cpu" in ia64*) - shrext='.so' + shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH @@ -1362,7 +1352,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) - shrext='.sl' + shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH @@ -1373,7 +1363,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) - shrext='.sl' + shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH @@ -1442,6 +1432,12 @@ # 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, @@ -1451,6 +1447,18 @@ 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 @@ -1460,7 +1468,7 @@ 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}${release}${shared_ext} ${libname}${shared_ext}' + 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 @@ -1476,7 +1484,7 @@ shlibpath_overrides_runpath=yes ;; -nto-qnx) +nto-qnx*) version_type=linux need_lib_prefix=no need_version=no @@ -1489,7 +1497,7 @@ 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 @@ -1509,7 +1517,7 @@ os2*) libname_spec='$name' - shrext=".dll" + shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' @@ -1945,7 +1953,7 @@ # AC_PROG_LD # ---------- -# find the path to the GNU or non-GNU linker +# 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], @@ -1971,7 +1979,7 @@ # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the path of ld + # 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%/%"` @@ -2034,7 +2042,7 @@ [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 &1 /dev/null; then case $host_cpu in i*86 ) @@ -2159,36 +2163,27 @@ ;; 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 $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" - ;; + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; esac - lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) case $host_cpu in - alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*) + 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*) @@ -2205,7 +2200,7 @@ lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; -nto-qnx) +nto-qnx*) lt_cv_deplibs_check_method=unknown ;; @@ -2220,9 +2215,6 @@ ;; 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 ;; @@ -2232,7 +2224,6 @@ solaris*) lt_cv_deplibs_check_method=pass_all - lt_cv_file_magic_test_file=/lib/libc.so ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) @@ -2272,7 +2263,7 @@ # AC_PROG_NM # ---------- -# find the path to a BSD-compatible name lister +# 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 @@ -2410,7 +2401,7 @@ AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX @@ -2426,7 +2417,7 @@ # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) -_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 @@ -2447,7 +2438,7 @@ [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=`echo "$tagnames,GCJ" | sed 's/^,//'`]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ @@ -2456,7 +2447,7 @@ # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) -_LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC @@ -2498,7 +2489,7 @@ 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 : + 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 @@ -2521,9 +2512,9 @@ 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_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_DLOPEN_SELF($1) # Report which librarie types wil actually be built @@ -2544,39 +2535,48 @@ 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 $CC -v 2>&1 | grep 'Apple' >/dev/null ; then + 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 - test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + 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 - # 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! - output_verbose_link_cmd='echo' + 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 -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' + _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 -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _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 - fi - ;; + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; esac AC_MSG_RESULT([$enable_shared]) @@ -2711,7 +2711,7 @@ # 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 $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + _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 @@ -2878,41 +2878,54 @@ ;; darwin* | rhapsody*) - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then + 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 - test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + 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 -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' + 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 -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + 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 - fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi ;; dgux*) @@ -2939,7 +2952,7 @@ freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; - freebsd*) + freebsd* | kfreebsd*-gnu) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes @@ -2970,7 +2983,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + 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 @@ -3449,9 +3462,9 @@ 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_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) @@ -3673,7 +3686,7 @@ postinstall_cmds='$RANLIB $lib' fi ;; -aix4*) +aix4* | aix5*) test "$enable_shared" = yes && enable_static=no ;; esac @@ -3693,9 +3706,10 @@ 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_SYS_DYNAMIC_LINKER($1) + AC_LIBTOOL_CONFIG($1) @@ -3743,9 +3757,9 @@ 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_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) @@ -3810,11 +3824,12 @@ # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST - fi + 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 \ + 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 \ @@ -3864,7 +3879,7 @@ _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(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 | \ @@ -3995,7 +4010,7 @@ 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 @@ -4026,7 +4041,7 @@ libext="$libext" # Shared library suffix (normally ".so"). -shrext='$shrext' +shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" @@ -4270,7 +4285,10 @@ # 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 ])# AC_LIBTOOL_CONFIG @@ -4343,7 +4361,7 @@ symcode='[[BCDEGQRST]]' ;; solaris* | sysv5*) - symcode='[[BDT]]' + symcode='[[BDRT]]' ;; sysv4) symcode='[[DFNSTU]]' @@ -4361,7 +4379,7 @@ # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) - symcode='[[ABCDGISTW]]' ;; + symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. @@ -4576,7 +4594,7 @@ ;; esac ;; - freebsd*) + freebsd* | kfreebsd*-gnu) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -4627,7 +4645,7 @@ _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 @@ -4852,12 +4870,12 @@ linux*) case $CC in - icc|ecc) + 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) + 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' @@ -4987,7 +5005,7 @@ _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(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* @@ -5130,6 +5148,31 @@ _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 + ;; + *) 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' @@ -5306,7 +5349,7 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext=".dll" + 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. @@ -5318,20 +5361,27 @@ ;; darwin* | rhapsody*) - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then + 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 - test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + 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 - # 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! lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then @@ -5342,20 +5392,22 @@ 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 -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' + _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 -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~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 - fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi ;; dgux*) @@ -5388,7 +5440,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd*) + 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 @@ -5705,7 +5757,7 @@ 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 @@ -5867,3 +5919,4 @@ AC_MSG_RESULT([$SED]) ]) +m4_include([./ft-munmap.m4]) Index: xc/extras/freetype2/builds/unix/config.guess =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/unix/config.guess,v retrieving revision 1.2 diff -u -r1.2 config.guess --- a/xc/extras/freetype2/builds/unix/config.guess 23 Apr 2004 18:42:42 -0000 1.2 +++ b/xc/extras/freetype2/builds/unix/config.guess 28 Apr 2004 10:24:16 -0000 @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2003-10-16' +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 @@ -197,12 +197,18 @@ # 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 ;; @@ -239,10 +245,24 @@ *:OpenBSD:*:*) echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} exit 0 ;; + *: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 @@ -280,11 +300,12 @@ "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. - 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 @@ -405,6 +426,9 @@ *:*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 ;; @@ -829,6 +853,9 @@ 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 ;; @@ -997,6 +1024,9 @@ 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 ;; @@ -1183,7 +1213,7 @@ *:QNX:*:4*) echo i386-pc-qnx exit 0 ;; - NSR-[DGKLNPTVWY]:NONSTOP_KERNEL:*:*) + NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit 0 ;; *:NonStop-UX:*:*) @@ -1227,6 +1257,9 @@ 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 Index: xc/extras/freetype2/builds/unix/config.sub =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/unix/config.sub,v retrieving revision 1.2 diff -u -r1.2 config.sub --- a/xc/extras/freetype2/builds/unix/config.sub 23 Apr 2004 18:42:42 -0000 1.2 +++ b/xc/extras/freetype2/builds/unix/config.sub 28 Apr 2004 10:24:16 -0000 @@ -3,7 +3,7 @@ # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003 Free Software Foundation, Inc. -timestamp='2003-11-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 @@ -237,7 +237,7 @@ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | m32r | m68000 | m68k | m88k | mcore \ + | m32r | m32rle | m68000 | m68k | m88k | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -262,7 +262,7 @@ | pyramid \ | 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 | tic4x | tic80 | tron \ | v850 | v850e \ @@ -308,7 +308,7 @@ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | m32r-* \ + | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ @@ -336,7 +336,7 @@ | 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?-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ @@ -363,6 +363,9 @@ basic_machine=a29k-amd os=-udi ;; + abacus) + basic_machine=abacus-unknown + ;; adobe68k) basic_machine=m68010-adobe os=-scout @@ -380,6 +383,9 @@ amd64) basic_machine=x86_64-pc ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; amdahl) basic_machine=580-amdahl os=-sysv @@ -439,12 +445,20 @@ 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 ;; @@ -1067,7 +1081,7 @@ sh64) basic_machine=sh64-unknown ;; - sparc | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) @@ -1140,8 +1154,9 @@ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -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* \ @@ -1152,7 +1167,7 @@ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1215,6 +1230,9 @@ -atheos*) os=-atheos ;; + -syllable*) + os=-syllable + ;; -386bsd) os=-bsd ;; Index: xc/extras/freetype2/builds/unix/configure =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/unix/configure,v retrieving revision 1.2 diff -u -r1.2 configure --- a/xc/extras/freetype2/builds/unix/configure 23 Apr 2004 18:42:42 -0000 1.2 +++ b/xc/extras/freetype2/builds/unix/configure 28 Apr 2004 10:24:32 -0000 @@ -1,8 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. +# Generated by GNU Autoconf 2.59a. # -# Copyright (C) 2003 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. ## --------------------- ## @@ -21,6 +22,28 @@ 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 ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset @@ -29,6 +52,30 @@ 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='$ ' @@ -75,101 +122,277 @@ 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" >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 +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 @@ -391,9 +614,9 @@ -tagnames=`echo "$tagnames,CXX" | sed 's/^,//'` +tagnames=${tagnames+${tagnames},}CXX -tagnames=`echo "$tagnames,F77" | sed 's/^,//'` +tagnames=${tagnames+${tagnames},}F77 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, @@ -454,16 +677,15 @@ #endif #if HAVE_INTTYPES_H # include -#else -# if HAVE_STDINT_H -# include -# endif +#endif +#if HAVE_STDINT_H +# include #endif #if HAVE_UNISTD_H # include #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 AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 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. @@ -1151,7 +1373,8 @@ if $ac_init_version; then cat <<\_ACEOF -Copyright (C) 2003 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 @@ -1163,7 +1386,7 @@ running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.59a. Invocation command line was $ $0 $@ @@ -1340,7 +1563,7 @@ echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do @@ -1349,9 +1572,11 @@ 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. @@ -1495,7 +1720,7 @@ # Don't forget to update docs/VERSION.DLL! -version_info='9:5:3' +version_info='9:6:3' ft_version=`echo $version_info | tr : .` @@ -1693,7 +1918,19 @@ 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 @@ -1773,7 +2010,19 @@ 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 @@ -1917,7 +2166,19 @@ 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 @@ -2319,10 +2580,10 @@ /* 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 -std1 is added to get + 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 -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); @@ -2342,11 +2603,11 @@ # 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 @@ -2971,19 +3232,202 @@ +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 @@ -3549,7 +3993,7 @@ 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. @@ -3565,7 +4009,7 @@ 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 ; @@ -3606,7 +4050,7 @@ 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 ; @@ -3641,11 +4085,11 @@ 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.err conftest.$ac_objext conftest.$ac_ext done @@ -3663,7 +4107,7 @@ 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 ; @@ -3704,7 +4148,7 @@ 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 ; @@ -3739,11 +4183,11 @@ 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.err conftest.$ac_objext conftest.$ac_ext done @@ -3769,7 +4213,7 @@ 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 ; @@ -3816,13 +4260,6 @@ { (exit 1); exit 1; }; } ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3830,8 +4267,8 @@ 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 #include int @@ -3841,17 +4278,17 @@ 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); } @@ -3887,7 +4324,6 @@ fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi rm -f conftest.val else ac_cv_sizeof_int=0 @@ -3963,7 +4399,7 @@ 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. @@ -3979,7 +4415,7 @@ 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 ; @@ -4020,7 +4456,7 @@ 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 ; @@ -4055,11 +4491,11 @@ 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.err conftest.$ac_objext conftest.$ac_ext done @@ -4077,7 +4513,7 @@ 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 ; @@ -4118,7 +4554,7 @@ 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 ; @@ -4153,11 +4589,11 @@ 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.err conftest.$ac_objext conftest.$ac_ext done @@ -4183,7 +4619,7 @@ 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 ; @@ -4230,13 +4666,6 @@ { (exit 1); exit 1; }; } ;; esac else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run test program while cross compiling -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4244,8 +4673,8 @@ 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 #include int @@ -4255,17 +4684,17 @@ 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); } @@ -4301,7 +4730,6 @@ fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi -fi rm -f conftest.val else ac_cv_sizeof_long=0 @@ -4874,18 +5302,19 @@ 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 - -echo "$as_me:$LINENO: result: void *" >&5 + echo "$as_me:$LINENO: result: void *" >&5 echo "${ECHO_T}void *" >&6 cat >>confdefs.h <<\_ACEOF #define MUNMAP_USES_VOIDP _ACEOF +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: char *" >&5 +echo "${ECHO_T}char *" >&6 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext @@ -5232,7 +5661,6 @@ fi; if test x$with_old_mac_fonts = xyes; then - CFLAGS="$CFLAGS -DTARGET_API_MAC_CARBON" LDFLAGS="$LDFLAGS -Xlinker -framework -Xlinker CoreServices \ -Xlinker -framework -Xlinker ApplicationServices" else @@ -5399,7 +5827,7 @@ # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld + # 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%/%"` @@ -5468,7 +5896,7 @@ 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 &1 /dev/null; then case $host_cpu in i*86 ) @@ -5649,36 +6073,27 @@ ;; 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 $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" - ;; + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; esac - lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) case $host_cpu in - alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*) + 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*) @@ -5695,7 +6110,7 @@ lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; -nto-qnx) +nto-qnx*) lt_cv_deplibs_check_method=unknown ;; @@ -5710,9 +6125,6 @@ ;; 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 ;; @@ -5722,7 +6134,6 @@ solaris*) lt_cv_deplibs_check_method=pass_all - lt_cv_file_magic_test_file=/lib/libc.so ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) @@ -5801,7 +6212,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 5804 "configure"' > conftest.$ac_ext + echo '#line 6215 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5850,7 +6261,7 @@ x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*) + ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -6200,9 +6611,20 @@ test -n "$ac_ct_CXX" && break done -test -n "$ac_ct_CXX" || ac_ct_CXX="g++" - CXX=$ac_ct_CXX + 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 @@ -6786,12 +7208,24 @@ test -n "$ac_ct_F77" && break done - F77=$ac_ct_F77 + 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:6794:" \ +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 &5\"") >&5 @@ -6946,7 +7380,7 @@ echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 - testring="ABCD" + teststring="ABCD" case $build_os in msdosdjgpp*) @@ -6975,20 +7409,26 @@ 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$testring" 2>/dev/null` \ - = "XX$testring") >/dev/null 2>&1 && - new_result=`expr "X$testring" : ".*" 2>&1` && + 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` - testring=$testring$testring + teststring=$teststring$teststring done - testring= + 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. @@ -7056,7 +7496,7 @@ symcode='[BCDEGQRST]' ;; solaris* | sysv5*) - symcode='[BDT]' + symcode='[BDRT]' ;; sysv4) symcode='[DFNSTU]' @@ -7074,7 +7514,7 @@ # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) - symcode='[ABCDGISTW]' ;; + symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. @@ -7333,7 +7773,6 @@ done done - test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR @@ -7345,7 +7784,19 @@ echo "${ECHO_T}no" >&6 fi - AR=$ac_ct_AR + if test "x$ac_ct_AR" = x; then + AR="false" + 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 + AR=$ac_ct_AR + fi else AR="$ac_cv_prog_AR" fi @@ -7413,7 +7864,6 @@ 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 @@ -7425,7 +7875,19 @@ 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 @@ -7493,7 +7955,6 @@ 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 @@ -7505,7 +7966,19 @@ echo "${ECHO_T}no" >&6 fi - STRIP=$ac_ct_STRIP + 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 else STRIP="$ac_cv_prog_STRIP" fi @@ -7800,7 +8273,8 @@ 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 "$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 @@ -7818,11 +8292,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7821: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8295: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7825: \$? = $ac_status" >&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 @@ -7965,12 +8439,12 @@ linux*) case $CC in - icc|ecc) + icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; - ccc) + ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' @@ -8032,7 +8506,8 @@ # 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 "$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 @@ -8050,11 +8525,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8053: $lt_compile\"" >&5) + (eval echo "\"\$as_me:8528: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:8057: \$? = $ac_status" >&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 @@ -8101,13 +8576,6 @@ mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext - # 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 . - 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. @@ -8117,11 +8585,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8120: $lt_compile\"" >&5) + (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:8124: \$? = $ac_status" >&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 @@ -8131,8 +8599,11 @@ fi fi chmod u+w . - $rm conftest* out/* - rmdir out + $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* @@ -8329,6 +8800,31 @@ 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' @@ -8607,7 +9103,7 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext=".dll" + 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. @@ -8619,20 +9115,27 @@ ;; darwin* | rhapsody*) - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then + if test "$GXX" = yes ; then archive_cmds_need_lc=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag='-undefined suppress' ;; *) # Darwin 1.3 on - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag='-flat_namespace -undefined suppress' + 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 - # 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! lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then @@ -8643,19 +9146,21 @@ 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 -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' + 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 -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~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 ;; @@ -8689,7 +9194,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd*) + freebsd* | kfreebsd*-gnu) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes @@ -9011,116 +9516,50 @@ 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 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 + 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=".so" +shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -9208,7 +9647,7 @@ 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*) @@ -9233,7 +9672,7 @@ cygwin* | mingw* | pw32*) version_type=windows - shrext=".dll" + shrext_cmds=".dll" need_version=no need_lib_prefix=no @@ -9255,7 +9694,7 @@ 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="/lib /lib/w32api /usr/lib /usr/local/lib" + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix @@ -9294,17 +9733,16 @@ 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}$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='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; 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"` + 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' ;; @@ -9322,6 +9760,18 @@ 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 @@ -9370,7 +9820,7 @@ need_version=no case "$host_cpu" in ia64*) - shrext='.so' + shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH @@ -9385,7 +9835,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) - shrext='.sl' + shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH @@ -9396,7 +9846,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) - shrext='.sl' + shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH @@ -9465,6 +9915,12 @@ # 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, @@ -9474,6 +9930,18 @@ 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 @@ -9483,7 +9951,7 @@ 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}${release}${shared_ext} ${libname}${shared_ext}' + 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 @@ -9499,7 +9967,7 @@ shlibpath_overrides_runpath=yes ;; -nto-qnx) +nto-qnx*) version_type=linux need_lib_prefix=no need_version=no @@ -9512,7 +9980,7 @@ 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 @@ -9532,7 +10000,7 @@ os2*) libname_spec='$name' - shrext=".dll" + shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' @@ -9630,6 +10098,72 @@ 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 + if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown @@ -10235,7 +10769,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&1 | grep 'Apple' >/dev/null ; then + 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 - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag='-flat_namespace -undefined suppress' + 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 - # 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! - output_verbose_link_cmd='echo' + 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 -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' + 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 -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + 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 - fi + else + ld_shlibs=no + fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 @@ -10515,7 +11058,8 @@ # 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 \ + 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 \ @@ -10693,7 +11237,7 @@ 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 @@ -10724,7 +11268,7 @@ libext="$libext" # Shared library suffix (normally ".so"). -shrext='$shrext' +shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" @@ -10966,7 +11510,10 @@ # 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 @@ -11147,7 +11694,7 @@ # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld + # 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%/%"` @@ -11216,7 +11763,7 @@ 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 &1 &1 | grep 'Apple' >/dev/null ; then + if test "$GXX" = yes; then archive_cmds_need_lc_CXX=no case "$host_os" in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='-undefined suppress' ;; *) # Darwin 1.3 on - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag_CXX='-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 - 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 -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' + 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 -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + 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 - fi + else + ld_shlibs_CXX=no + fi ;; dgux*) @@ -11592,7 +12152,7 @@ freebsd-elf*) archive_cmds_need_lc_CXX=no ;; - freebsd*) + freebsd* | kfreebsd*-gnu) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes @@ -11623,7 +12183,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + 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 @@ -12299,7 +12859,7 @@ ;; esac ;; - freebsd*) + freebsd* | kfreebsd*-gnu) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) @@ -12467,7 +13027,8 @@ # 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 "$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 @@ -12485,11 +13046,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12488: $lt_compile\"" >&5) + (eval echo "\"\$as_me:13049: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12492: \$? = $ac_status" >&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 @@ -12536,13 +13097,6 @@ mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext - # 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 . - 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. @@ -12552,11 +13106,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12555: $lt_compile\"" >&5) + (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:12559: \$? = $ac_status" >&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 @@ -12566,8 +13120,11 @@ fi fi chmod u+w . - $rm conftest* out/* - rmdir out + $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* @@ -12695,78 +13252,12 @@ ;; esac -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 - 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=".so" +shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -12854,7 +13345,7 @@ 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*) @@ -12879,7 +13370,7 @@ cygwin* | mingw* | pw32*) version_type=windows - shrext=".dll" + shrext_cmds=".dll" need_version=no need_lib_prefix=no @@ -12901,7 +13392,7 @@ 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="/lib /lib/w32api /usr/lib /usr/local/lib" + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix @@ -12940,17 +13431,16 @@ 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}$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='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; 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"` + 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' ;; @@ -12968,6 +13458,18 @@ 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 @@ -13016,7 +13518,7 @@ need_version=no case "$host_cpu" in ia64*) - shrext='.so' + shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH @@ -13031,7 +13533,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) - shrext='.sl' + shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH @@ -13042,7 +13544,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) - shrext='.sl' + shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH @@ -13110,14 +13612,32 @@ # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes - - # 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' + + # 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*) @@ -13129,7 +13649,7 @@ 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}${release}${shared_ext} ${libname}${shared_ext}' + 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 @@ -13145,7 +13665,7 @@ shlibpath_overrides_runpath=yes ;; -nto-qnx) +nto-qnx*) version_type=linux need_lib_prefix=no need_version=no @@ -13158,7 +13678,7 @@ 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 @@ -13178,7 +13698,7 @@ os2*) libname_spec='$name' - shrext=".dll" + shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' @@ -13276,6 +13796,72 @@ 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 @@ -13881,7 +14467,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5 + +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 @@ -14801,11 +15392,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14804: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15395: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14808: \$? = $ac_status" >&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 @@ -14852,13 +15443,6 @@ mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext - # 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 . - 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. @@ -14868,11 +15452,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14871: $lt_compile\"" >&5) + (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:14875: \$? = $ac_status" >&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 @@ -14882,8 +15466,11 @@ fi fi chmod u+w . - $rm conftest* out/* - rmdir out + $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* @@ -15080,6 +15667,31 @@ 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 + ;; + *) 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' @@ -15338,7 +15950,7 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext=".dll" + 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. @@ -15350,20 +15962,27 @@ ;; darwin* | rhapsody*) - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then + 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 - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag_F77='-flat_namespace -undefined suppress' + 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 - # 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! lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then @@ -15374,19 +15993,21 @@ 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 -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' + 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 -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + 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 ;; @@ -15420,7 +16041,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd*) + 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 @@ -15780,78 +16401,12 @@ ;; esac -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_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_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 "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && - test "$hardcode_minus_L_F77" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action_F77=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action_F77=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - 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 - -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 dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= -shrext=".so" +shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -15939,7 +16494,7 @@ 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*) @@ -15964,7 +16519,7 @@ cygwin* | mingw* | pw32*) version_type=windows - shrext=".dll" + shrext_cmds=".dll" need_version=no need_lib_prefix=no @@ -15986,7 +16541,7 @@ 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="/lib /lib/w32api /usr/lib /usr/local/lib" + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix @@ -16025,17 +16580,16 @@ 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}$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='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; 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"` + 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' ;; @@ -16053,6 +16607,18 @@ 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 @@ -16101,7 +16667,7 @@ need_version=no case "$host_cpu" in ia64*) - shrext='.so' + shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH @@ -16116,7 +16682,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) - shrext='.sl' + shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH @@ -16127,7 +16693,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) - shrext='.sl' + shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH @@ -16196,6 +16762,12 @@ # 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, @@ -16205,6 +16777,18 @@ 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 @@ -16214,7 +16798,7 @@ 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}${release}${shared_ext} ${libname}${shared_ext}' + 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 @@ -16230,7 +16814,7 @@ shlibpath_overrides_runpath=yes ;; -nto-qnx) +nto-qnx*) version_type=linux need_lib_prefix=no need_version=no @@ -16243,7 +16827,7 @@ 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 @@ -16263,7 +16847,7 @@ os2*) libname_spec='$name' - shrext=".dll" + shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' @@ -16361,6 +16945,73 @@ 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_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_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 "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + 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 + +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 + + # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh @@ -16375,7 +17026,8 @@ # 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 \ + 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 \ @@ -16505,7 +17157,7 @@ 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 @@ -16536,7 +17188,7 @@ libext="$libext" # Shared library suffix (normally ".so"). -shrext='$shrext' +shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" @@ -16753,7 +17405,10 @@ # 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 @@ -16774,7 +17429,6 @@ if test -n "$GCJ" && test "X$GCJ" != "Xno"; then - # Source file extension for Java test sources. ac_ext=java @@ -16812,7 +17466,8 @@ 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 "$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 @@ -16830,11 +17485,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16833: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17488: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16837: \$? = $ac_status" >&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 @@ -16977,12 +17632,12 @@ linux*) case $CC in - icc|ecc) + icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; - ccc) + ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' @@ -17044,7 +17699,8 @@ # 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 "$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 @@ -17062,11 +17718,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17065: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17721: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17069: \$? = $ac_status" >&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 @@ -17113,13 +17769,6 @@ mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext - # 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 . - 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. @@ -17129,11 +17778,11 @@ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17132: $lt_compile\"" >&5) + (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:17136: \$? = $ac_status" >&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 @@ -17143,8 +17792,11 @@ fi fi chmod u+w . - $rm conftest* out/* - rmdir out + $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* @@ -17341,6 +17993,31 @@ 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' @@ -17619,7 +18296,7 @@ # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. - shrext=".dll" + 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. @@ -17631,20 +18308,27 @@ ;; darwin* | rhapsody*) - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then + 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 - test -z ${LD_TWOLEVEL_NAMESPACE} && allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' + 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 - # 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! lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then @@ -17655,19 +18339,21 @@ 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 -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' + 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 -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + 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 ;; @@ -17701,7 +18387,7 @@ ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd*) + 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 @@ -18061,78 +18747,12 @@ ;; esac -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 - - # 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 -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_GCJ" = 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 dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= -shrext=".so" +shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= @@ -18220,7 +18840,7 @@ 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*) @@ -18245,7 +18865,7 @@ cygwin* | mingw* | pw32*) version_type=windows - shrext=".dll" + shrext_cmds=".dll" need_version=no need_lib_prefix=no @@ -18267,7 +18887,7 @@ 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="/lib /lib/w32api /usr/lib /usr/local/lib" + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix @@ -18306,17 +18926,16 @@ 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}$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='$(test .$module = .yes && echo .so || echo .dylib)' + shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. - if $CC -v 2>&1 | grep 'Apple' >/dev/null ; 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"` + 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' ;; @@ -18334,6 +18953,18 @@ 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 @@ -18382,7 +19013,7 @@ need_version=no case "$host_cpu" in ia64*) - shrext='.so' + shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH @@ -18397,7 +19028,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) - shrext='.sl' + shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH @@ -18408,7 +19039,7 @@ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) - shrext='.sl' + shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH @@ -18477,6 +19108,12 @@ # 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, @@ -18486,6 +19123,18 @@ 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 @@ -18495,7 +19144,7 @@ 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}${release}${shared_ext} ${libname}${shared_ext}' + 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 @@ -18511,7 +19160,7 @@ shlibpath_overrides_runpath=yes ;; -nto-qnx) +nto-qnx*) version_type=linux need_lib_prefix=no need_version=no @@ -18524,7 +19173,7 @@ 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 @@ -18544,7 +19193,7 @@ os2*) libname_spec='$name' - shrext=".dll" + shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' @@ -18642,6 +19291,72 @@ 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_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var GCJ" || \ + test "X$hardcode_automatic_GCJ"="Xyes" ; then + + # 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 +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_GCJ" = 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 @@ -19247,7 +19962,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <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 ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset @@ -20506,6 +21254,31 @@ 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='$ ' @@ -20552,102 +21325,38 @@ 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" >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 - - 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 @@ -20734,7 +21443,7 @@ cat >&5 <<_CSEOF This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was +generated by GNU Autoconf 2.59a. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -20794,10 +21503,10 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status -configured by $0, generated by GNU Autoconf 2.59, +configured by $0, generated by GNU Autoconf 2.59a, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 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 @@ -20922,7 +21631,7 @@ # 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 } @@ -21014,6 +21723,7 @@ 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 @@ -21034,6 +21744,9 @@ 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 @@ -21107,7 +21820,7 @@ /^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= @@ -21464,7 +22177,7 @@ /^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= Index: xc/extras/freetype2/builds/unix/configure.ac =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/unix/configure.ac,v retrieving revision 1.2 diff -u -r1.2 configure.ac --- a/xc/extras/freetype2/builds/unix/configure.ac 23 Apr 2004 18:42:42 -0000 1.2 +++ b/xc/extras/freetype2/builds/unix/configure.ac 28 Apr 2004 10:24:32 -0000 @@ -8,7 +8,7 @@ # Don't forget to update docs/VERSION.DLL! -version_info='9:5:3' +version_info='9:6:3' AC_SUBST([version_info]) ft_version=`echo $version_info | tr : .` AC_SUBST([ft_version]) @@ -131,7 +131,6 @@ AS_HELP_STRING([--with-old-mac-fonts], [allow Mac resource-based fonts to be used])) if test x$with_old_mac_fonts = xyes; then - CFLAGS="$CFLAGS -DTARGET_API_MAC_CARBON" LDFLAGS="$LDFLAGS -Xlinker -framework -Xlinker CoreServices \ -Xlinker -framework -Xlinker ApplicationServices" else @@ -146,6 +145,10 @@ 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 Index: xc/extras/freetype2/builds/unix/detect.mk =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/unix/detect.mk,v retrieving revision 1.2 diff -u -r1.2 detect.mk --- a/xc/extras/freetype2/builds/unix/detect.mk 23 Apr 2004 18:42:42 -0000 1.2 +++ b/xc/extras/freetype2/builds/unix/detect.mk 28 Apr 2004 10:24:32 -0000 @@ -3,7 +3,7 @@ # -# Copyright 1996-2000, 2002, 2003 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, @@ -66,7 +66,7 @@ # platform). # CONFIG_FILE := unix.mk - setup: unix-def.mk + setup: $(BUILD_DIR)/unix-def.mk unix: setup .PHONY: unix endif @@ -77,10 +77,10 @@ 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 Index: xc/extras/freetype2/builds/unix/freetype-config.in =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/unix/freetype-config.in,v retrieving revision 1.2 diff -u -r1.2 freetype-config.in --- a/xc/extras/freetype2/builds/unix/freetype-config.in 23 Apr 2004 18:42:42 -0000 1.2 +++ b/xc/extras/freetype2/builds/unix/freetype-config.in 28 Apr 2004 10:24:32 -0000 @@ -1,20 +1,32 @@ #! /bin/sh - 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 < #include #include +#include /*************************************************************************/ @@ -182,16 +183,16 @@ /*************************************************************************/ /* */ /* */ - /* ft_close_stream */ + /* ft_close_stream_by_munmap */ /* */ /* */ - /* The function to close a stream. */ + /* The function to close a stream which is opened by mmap. */ /* */ /* */ /* 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 @@ } + /*************************************************************************/ + /* */ + /* */ + /* ft_close_stream_by_free */ + /* */ + /* */ + /* The function to close a stream which is created by ft_alloc. */ + /* */ + /* */ + /* 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 ); Index: xc/extras/freetype2/builds/unix/install-sh =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/unix/install-sh,v retrieving revision 1.2 diff -u -r1.2 install-sh --- a/xc/extras/freetype2/builds/unix/install-sh 23 Apr 2004 18:42:42 -0000 1.2 +++ b/xc/extras/freetype2/builds/unix/install-sh 28 Apr 2004 10:24:33 -0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2003-09-24.23 +scriptversion=2004-02-15.20 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -72,7 +72,8 @@ 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. @@ -134,153 +135,173 @@ --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 - -# Protect names starting with `-'. -case $src in - -*) src=./$src ;; -esac - -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 - exit 1 - fi - - if test -z "$dst"; then - echo "$0: no destination specified." >&2 +if test -z "$1"; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 exit 1 fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi +for src +do # Protect names starting with `-'. - case $dst in - -*) dst=./$dst ;; + case $src in + -*) src=./$src ;; esac - # 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 + 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 + exit 1 + fi -# This sed command emulates the dirname command. -dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + if test -z "$dstarg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi -# Make sure that the destination directory exists. + dst=$dstarg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst ;; + esac + + # 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 -# 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 - test -d "$pathcomp" || $mkdirprog "$pathcomp" - pathcomp=$pathcomp/ - done -fi + # This sed command emulates the dirname command. + dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` -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 + # 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"` + 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"; } - # 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 + # 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. { Index: xc/extras/freetype2/builds/unix/ltmain.sh =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/unix/ltmain.sh,v retrieving revision 1.2 diff -u -r1.2 ltmain.sh --- a/xc/extras/freetype2/builds/unix/ltmain.sh 23 Apr 2004 18:42:42 -0000 1.2 +++ b/xc/extras/freetype2/builds/unix/ltmain.sh 28 Apr 2004 10:24:38 -0000 @@ -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, 2003 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 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 @@ : 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 @@ cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit 1 + exit $EXIT_FAILURE fi # Global variables. @@ -118,10 +132,13 @@ # 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. -win32_libid () { +func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in @@ -130,7 +147,7 @@ ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - grep -E 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then + $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 @@ -140,7 +157,7 @@ fi fi ;; - *DLL*) + *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... @@ -154,9 +171,76 @@ $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 do @@ -176,12 +260,13 @@ ;; 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 1 + exit $EXIT_FAILURE ;; esac @@ -191,10 +276,10 @@ # not specially marked. ;; *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then + 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' < $0`" + 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 @@ -223,21 +308,22 @@ $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 0 + exit $EXIT_SUCCESS ;; --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $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" < "$0" + ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done - exit 0 + exit $EXIT_SUCCESS ;; --debug) $echo "$progname: enabling shell trace mode" set -x + preserve_args="$preserve_args $arg" ;; --dry-run | -n) @@ -256,7 +342,7 @@ else $echo "disable static libraries" fi - exit 0 + exit $EXIT_SUCCESS ;; --finish) mode="finish" ;; @@ -268,6 +354,7 @@ --quiet | --silent) show=: + preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag ;; @@ -275,6 +362,7 @@ set tag "$optarg" ${1+"$@"} shift prev=tag + preserve_args="$preserve_args --tag" ;; -dlopen) @@ -285,7 +373,7 @@ -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; *) @@ -298,7 +386,7 @@ 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 @@ -354,7 +442,7 @@ 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. @@ -369,9 +457,11 @@ # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" + suppress_opt=yes suppress_output= arg_mode=normal libobj= + later= for arg do @@ -394,24 +484,19 @@ -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit 1 + exit $EXIT_FAILURE fi arg_mode=target continue ;; - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes + -static | -prefer-pic | -prefer-non-pic) + later="$later $arg" continue ;; - -prefer-non-pic) - pic_mode=no + -no-suppress) + suppress_opt=no continue ;; @@ -424,7 +509,7 @@ args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' - for arg in $args; do + for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. @@ -474,11 +559,11 @@ case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" - exit 1 + exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; *) # Get the name of the library object. @@ -511,50 +596,30 @@ *.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 - # 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. - if test -n "$available_tags" && test -z "$tagname"; then - case $base_compile 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` "*) ;; - # 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$" < "$0" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" - case "$base_compile " in - "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) - # 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 1 -# else -# $echo "$modename: using $tagname tagged configuration" - fi + 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 - fi + done objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` @@ -568,7 +633,7 @@ 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. @@ -579,7 +644,7 @@ 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 @@ -598,7 +663,7 @@ 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 @@ -608,7 +673,7 @@ # 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 @@ -626,7 +691,7 @@ compiler." $run $rm $removelist - exit 1 + exit $EXIT_FAILURE fi $echo $srcfile > "$lockfile" fi @@ -681,7 +746,7 @@ if $run eval "$command"; then : else test -n "$output_obj" && $run $rm $removelist - exit 1 + exit $EXIT_FAILURE fi if test "$need_locks" = warn && @@ -701,7 +766,7 @@ compiler." $run $rm $removelist - exit 1 + exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one @@ -722,7 +787,9 @@ EOF # Allow error messages only from the first compilation. - suppress_output=' >/dev/null 2>&1' + 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. @@ -751,7 +818,7 @@ if $run eval "$command"; then : else $run $rm $removelist - exit 1 + exit $EXIT_FAILURE fi if test "$need_locks" = warn && @@ -771,7 +838,7 @@ compiler." $run $rm $removelist - exit 1 + exit $EXIT_FAILURE fi # Just move the object if needed @@ -809,7 +876,7 @@ $run $rm "$lockfile" fi - exit 0 + exit $EXIT_SUCCESS ;; # libtool link mode @@ -835,7 +902,7 @@ ;; esac libtool_args="$nonopt" - base_compile="$nonopt" + base_compile="$nonopt $@" compile_command="$nonopt" finalize_command="$nonopt" @@ -867,6 +934,7 @@ no_install=no objs= non_pic_objects= + precious_files_regex= prefer_static_libs=no preload=no prev= @@ -880,6 +948,8 @@ vinfo= vinfo_number=no + func_infer_tag $base_compile + # We need to know -static, to get the right output filenames. for arg do @@ -911,7 +981,6 @@ # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" - base_compile="$base_compile $arg" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") @@ -975,7 +1044,7 @@ export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" - exit 1 + exit $EXIT_FAILURE fi prev= continue @@ -990,6 +1059,11 @@ prev= continue ;; + precious_regex) + precious_files_regex="$arg" + prev= + continue + ;; release) release="-$arg" prev= @@ -1022,7 +1096,7 @@ test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit 1 + exit $EXIT_FAILURE fi # Extract subdirectory from the argument. @@ -1075,7 +1149,7 @@ # 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 1 + exit $EXIT_FAILURE else # Dry-run case. @@ -1096,7 +1170,7 @@ done else $echo "$modename: link input file \`$save_arg' does not exist" - exit 1 + exit $EXIT_FAILURE fi arg=$save_arg prev= @@ -1108,7 +1182,7 @@ [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then @@ -1148,6 +1222,11 @@ finalize_command="$finalize_command $qarg" continue ;; + shrext) + shrext_cmds="$arg" + prev= + continue + ;; *) eval "$prev=\"\$arg\"" prev= @@ -1196,7 +1275,7 @@ -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 @@ -1232,7 +1311,7 @@ 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" ;; @@ -1287,6 +1366,11 @@ continue ;; + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) + deplibs="$deplibs $arg" + continue + ;; + -module) module=yes continue @@ -1351,6 +1435,11 @@ -o) prev=output ;; + -precious-files-regex) + prev=precious_regex + continue + ;; + -release) prev=release continue @@ -1373,7 +1462,7 @@ [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; esac case "$xrpath " in @@ -1496,7 +1585,7 @@ test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit 1 + exit $EXIT_FAILURE fi # Extract subdirectory from the argument. @@ -1549,7 +1638,7 @@ # 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 1 + exit $EXIT_FAILURE else # Dry-run case. @@ -1616,48 +1705,7 @@ if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 - exit 1 - fi - - # 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 link - # command doesn't match the default compiler. - if test -n "$available_tags" && test -z "$tagname"; then - case $base_compile 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` "*) ;; - # 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$" < "$0" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $0`" - case $base_compile in - "$CC "* | " $CC "* | "`$echo $CC` "* | " `$echo $CC` "*) - # The compiler in $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 1 -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac + exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then @@ -1701,7 +1749,7 @@ "") $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 ;; @@ -1711,7 +1759,7 @@ case $host in *cygwin* | *mingw* | *pw32*) - # don't eliminate duplcations in $postdeps and $predeps + # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) @@ -1764,7 +1812,7 @@ *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; esac done @@ -1802,6 +1850,15 @@ 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" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 @@ -1813,12 +1870,18 @@ 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 @@ -1883,11 +1946,11 @@ fi 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" 1>&2 @@ -1966,14 +2029,14 @@ 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 | 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%/[^/]*$%%'` @@ -2009,7 +2072,7 @@ 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" @@ -2026,12 +2089,12 @@ done 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 @@ -2039,16 +2102,18 @@ 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 -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. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't @@ -2097,7 +2162,7 @@ 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). @@ -2124,7 +2189,7 @@ continue fi - + if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" @@ -2211,17 +2276,18 @@ 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 + + # 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 + $echo "*** $linklib is not portable!" + fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. @@ -2279,9 +2345,10 @@ 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 @@ -2292,9 +2359,10 @@ 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 @@ -2317,9 +2385,9 @@ 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 | grep "bundle" >/dev/null ; then + # 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 @@ -2327,7 +2395,7 @@ $echo "** The link will probably fail, sorry" else add="$dir/$old_library" - fi + fi fi esac elif test "$hardcode_minus_L" = no; then @@ -2352,7 +2420,7 @@ if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) - add_dir="-L$inst_prefix_dir$libdir $add_dir" + add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi @@ -2369,7 +2437,7 @@ 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 @@ -2412,7 +2480,8 @@ esac add="-l$name" elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; 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" @@ -2424,7 +2493,7 @@ if test -n "$inst_prefix_dir"; then case "$libdir" in [\\/]*) - add_dir="-L$inst_prefix_dir$libdir $add_dir" + add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi @@ -2492,7 +2561,8 @@ if test "$linkmode" = lib; then if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || + { test "$hardcode_into_libs" != yes || + test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= @@ -2549,7 +2619,7 @@ 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 @@ -2559,7 +2629,8 @@ depdepl= case $host in *-*-darwin*) - # we do not want to link against static libs, but need to link against shared + # 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 @@ -2567,39 +2638,42 @@ done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" - fi - newlib_search_path="$newlib_search_path $path" - path="" + 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 - + path="-L$path" + ;; + esac ;; - -l*) + -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="" + # 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 + esac ;; *) continue ;; esac case " $deplibs " in *" $depdepl "*) ;; - *) deplibs="$deplibs $depdepl" ;; - esac + *) deplibs="$depdepl $deplibs" ;; + esac case " $deplibs " in *" $path "*) ;; *) deplibs="$deplibs $path" ;; @@ -2689,7 +2763,8 @@ eval $var=\"$tmp_libs\" done # for var fi - # Last step: remove runtime libs from dependency_libs (they stay in deplibs) + # 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 @@ -2749,19 +2824,19 @@ case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval shared_ext=\"$shrext\" + 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\" + eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` @@ -2772,7 +2847,7 @@ 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" @@ -2820,13 +2895,13 @@ 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 # 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" @@ -2870,7 +2945,7 @@ *) $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 @@ -2879,7 +2954,7 @@ *) $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 @@ -2888,14 +2963,14 @@ *) $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 $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. @@ -2984,7 +3059,7 @@ *) $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 + exit $EXIT_FAILURE ;; esac @@ -3038,6 +3113,12 @@ *.$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" ;; *) ;; @@ -3517,7 +3598,7 @@ fi # Get the real and link names of the library. - eval shared_ext=\"$shrext\" + eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" @@ -3547,10 +3628,11 @@ $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" + eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" @@ -3580,12 +3662,12 @@ for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; - *) + *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done - deplibs="$tmp_deplibs" + deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then @@ -3667,19 +3749,23 @@ # 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 cmds=\"$module_expsym_cmds\" + eval test_cmds=\"$module_expsym_cmds\" + cmds=$module_expsym_cmds else - eval cmds=\"$module_cmds\" + 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 cmds=\"$archive_cmds\" + eval test_cmds=\"$archive_cmds\" + cmds=$archive_cmds fi fi - if test "X$skipped_export" != "X:" && len=`expr "X$cmds" : ".*"` && + 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 @@ -3780,19 +3866,28 @@ # 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 - eval cmds=\"$archive_expsym_cmds\" + cmds=$archive_expsym_cmds else - eval cmds=\"$archive_cmds\" + cmds=$archive_cmds + fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. - eval cmds=\"\$cmds~$rm $delfiles\" + 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 @@ -3801,7 +3896,7 @@ # 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. @@ -3849,7 +3944,7 @@ *.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"` @@ -3943,10 +4038,11 @@ 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 @@ -3959,7 +4055,7 @@ $run ${rm}r $gentop fi - exit 0 + exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then @@ -3972,17 +4068,18 @@ # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? - exit 0 + 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 @@ -3994,7 +4091,7 @@ $run ${rm}r $gentop fi - exit 0 + exit $EXIT_SUCCESS ;; prog) @@ -4312,7 +4409,7 @@ ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; esac else @@ -4400,7 +4497,7 @@ # 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 @@ -4455,10 +4552,10 @@ 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 @@ -4484,7 +4581,7 @@ cwrappersource=`$echo ${objdir}/lt-${output}.c` cwrapper=`$echo ${output}.exe` $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit 1" 1 2 15 + trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource < $output "\ #! $SHELL @@ -4793,7 +4890,7 @@ else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" - exit 1 + exit $EXIT_FAILURE fi fi @@ -4855,20 +4952,20 @@ 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 + exit $EXIT_FAILURE fi fi\ " chmod +x $output fi - exit 0 + exit $EXIT_SUCCESS ;; esac @@ -4954,13 +5051,13 @@ # 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 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..." @@ -4987,7 +5084,7 @@ for obj in $save_oldobjs do last_oldobj=$obj - done + done for obj in $save_oldobjs do oldobjs="$objlist $obj" @@ -5001,7 +5098,7 @@ oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB - fi + fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= @@ -5012,12 +5109,13 @@ if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else - eval cmds=\"\$concat_cmds~$old_archive_cmds\" + eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do + eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? @@ -5049,8 +5147,12 @@ fi done # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $0 --mode=relink $libtool_args @inst_prefix_dir@)" + 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 @@ -5069,7 +5171,7 @@ 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" ;; @@ -5083,7 +5185,7 @@ 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 @@ -5094,11 +5196,30 @@ 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 @@ -5155,7 +5276,7 @@ $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac - exit 0 + exit $EXIT_SUCCESS ;; # libtool install mode @@ -5244,13 +5365,13 @@ 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 @@ -5260,7 +5381,7 @@ $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. @@ -5281,7 +5402,7 @@ 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 @@ -5293,7 +5414,7 @@ *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; esac done @@ -5322,7 +5443,7 @@ else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 - exit 1 + exit $EXIT_FAILURE fi library_names= @@ -5364,7 +5485,7 @@ # 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 1 + exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then @@ -5379,7 +5500,7 @@ if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit 1 + exit $EXIT_FAILURE fi fi @@ -5414,10 +5535,11 @@ # 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 @@ -5457,7 +5579,7 @@ *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; esac @@ -5475,7 +5597,7 @@ $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi - exit 0 + exit $EXIT_SUCCESS ;; *) @@ -5529,7 +5651,7 @@ # 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 @@ -5570,8 +5692,12 @@ 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 @@ -5630,16 +5756,17 @@ $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 @@ -5653,9 +5780,9 @@ 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 ;; @@ -5674,10 +5801,11 @@ 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" @@ -5694,7 +5822,7 @@ fi # Exit here if they wanted silent mode. - test "$show" = : && exit 0 + test "$show" = : && exit $EXIT_SUCCESS $echo "----------------------------------------------------------------------" $echo "Libraries have been installed in:" @@ -5730,7 +5858,7 @@ $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 + exit $EXIT_SUCCESS ;; # libtool execute mode @@ -5742,7 +5870,7 @@ 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. @@ -5750,7 +5878,7 @@ 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= @@ -5761,7 +5889,7 @@ 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. @@ -5788,7 +5916,7 @@ dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit 1 + exit $EXIT_FAILURE fi ;; @@ -5868,7 +5996,7 @@ $echo "export $shlibpath_var" fi $echo "$cmd$args" - exit 0 + exit $EXIT_SUCCESS fi ;; @@ -5896,7 +6024,7 @@ 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= @@ -5951,10 +6079,11 @@ 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 "$?" -ne 0 && test "$rmforce" != yes; then @@ -5966,10 +6095,11 @@ 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 "$?" -ne 0 && test "$rmforce" != yes; then @@ -6008,7 +6138,7 @@ if test "$mode" = clean ; then noexename=$name case $file in - *.exe) + *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, @@ -6053,20 +6183,20 @@ "") $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. @@ -6102,7 +6232,7 @@ a more detailed description of MODE. Report bugs to ." - exit 0 + exit $EXIT_SUCCESS ;; clean) @@ -6214,6 +6344,8 @@ -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 @@ -6255,14 +6387,14 @@ *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 - exit 1 + exit $EXIT_FAILURE ;; esac $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 Index: xc/extras/freetype2/builds/unix/mkinstalldirs =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/unix/mkinstalldirs,v retrieving revision 1.2 diff -u -r1.2 mkinstalldirs --- a/xc/extras/freetype2/builds/unix/mkinstalldirs 23 Apr 2004 18:42:42 -0000 1.2 +++ b/xc/extras/freetype2/builds/unix/mkinstalldirs 28 Apr 2004 10:24:39 -0000 @@ -1,10 +1,15 @@ #! /bin/sh # mkinstalldirs --- make directory hierarchy + +scriptversion=2004-02-15.20 + # Original author: Noah Friedman # Created: 1993-05-16 # Public domain. - -scriptversion=2003-09-26.19 +# +# This file is maintained in Automake, please report +# bugs to or send patches to +# . errstatus=0 dirmode="" @@ -14,7 +19,8 @@ Create each directory DIR (with mode MODE, if specified), including all leading file name components. -" + +Report bugs to ." # process command line arguments while test $# -gt 0 ; do @@ -60,9 +66,15 @@ 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 @@ -71,16 +83,17 @@ # directories to create, and then abort because `.' already # exists. test -d ./-p && rmdir ./-p - test -d ./-- && rmdir ./-- + 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 ./-- "./$dirmode"; + for d in ./-m ./-p ./--version "./$dirmode"; do test -d $d && rmdir $d done Index: xc/extras/freetype2/builds/unix/unix-def.in =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/unix/unix-def.in,v retrieving revision 1.2 diff -u -r1.2 unix-def.in --- a/xc/extras/freetype2/builds/unix/unix-def.in 23 Apr 2004 18:42:42 -0000 1.2 +++ b/xc/extras/freetype2/builds/unix/unix-def.in 28 Apr 2004 10:24:39 -0000 @@ -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, @@ -21,8 +21,6 @@ DELETE := @RMF@ DELDIR := @RMDIR@ SEP := / -BUILD_DIR := $(TOP_DIR)/builds/unix -PLATFORM := unix # this is used for `make distclean' and `make install' ifndef OBJ_BUILD Index: xc/extras/freetype2/builds/unix/unix.mk =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/unix/unix.mk,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 unix.mk --- a/xc/extras/freetype2/builds/unix/unix.mk 25 Nov 2003 19:27:18 -0000 1.1.1.2 +++ b/xc/extras/freetype2/builds/unix/unix.mk 28 Apr 2004 10:24:39 -0000 @@ -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 Index: xc/extras/freetype2/builds/vms/ftconfig.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/vms/ftconfig.h,v retrieving revision 1.2 diff -u -r1.2 ftconfig.h --- a/xc/extras/freetype2/builds/vms/ftconfig.h 23 Apr 2004 18:42:44 -0000 1.2 +++ b/xc/extras/freetype2/builds/vms/ftconfig.h 28 Apr 2004 10:24:40 -0000 @@ -4,7 +4,7 @@ /* */ /* VMS-specific configuration file (specification only). */ /* */ -/* Copyright 1996-2001, 2002, 2003 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, */ @@ -67,6 +67,8 @@ #define FT_SIZEOF_INT 4 #define FT_SIZEOF_LONG 4 +#define FT_CHAR_BIT 8 + /* Preferred alignment of data */ #define FT_ALIGNMENT 8 Index: xc/extras/freetype2/builds/win32/visualc/freetype.dsp =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/win32/visualc/freetype.dsp,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 freetype.dsp --- a/xc/extras/freetype2/builds/win32/visualc/freetype.dsp 25 Nov 2003 19:27:18 -0000 1.1.1.2 +++ b/xc/extras/freetype2/builds/win32/visualc/freetype.dsp 28 Apr 2004 10:24:40 -0000 @@ -54,7 +54,7 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 @@ # 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 Index: xc/extras/freetype2/builds/win32/visualc/freetype.sln =================================================================== RCS file: xc/extras/freetype2/builds/win32/visualc/freetype.sln diff -N xc/extras/freetype2/builds/win32/visualc/freetype.sln --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/builds/win32/visualc/freetype.sln 28 Apr 2004 10:24:40 -0000 @@ -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 Index: xc/extras/freetype2/builds/win32/visualc/freetype.vcproj =================================================================== RCS file: xc/extras/freetype2/builds/win32/visualc/freetype.vcproj diff -N xc/extras/freetype2/builds/win32/visualc/freetype.vcproj --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/builds/win32/visualc/freetype.vcproj 28 Apr 2004 10:24:40 -0000 @@ -0,0 +1,1717 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: xc/extras/freetype2/builds/win32/visualc/index.html =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/builds/win32/visualc/index.html,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 index.html --- a/xc/extras/freetype2/builds/win32/visualc/index.html 25 Nov 2003 19:27:18 -0000 1.1.1.2 +++ b/xc/extras/freetype2/builds/win32/visualc/index.html 28 Apr 2004 10:24:40 -0000 @@ -1,27 +1,38 @@
-FreeType 2 Project Files for Visual C++ + + FreeType 2 Project Files for Visual C++ and VS.NET 2003 +
-

FreeType 2 Project Files for Visual C++

- -

This directory contains a project file for Visual C++, named - freetype.dsp. It will compile the following libraries - from the FreeType 2.1.4 sources:

+

+ FreeType 2 Project Files for Visual C++ and VS.NET 2003 +

+ +

This directory contains a project files for Visual C++, named +freetype.dsp, and Visual Studio, called freetype.sln. It +will compile the following libraries from the FreeType 2.1.8 sources:

    -    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
    -  
    + 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
-

Build directories are placed in the top-level "objs" directory

+

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 .tar.*z archives, be sure to configure your extracting +tool to convert the line endings. For example, with WinZip, you should activate the TAR +file smart CR/LF Conversion option. Alternatively, you may consider +using the unix2dos or u2d utilities that are floating +around, which specifically deal with this particular problem. -

Enjoy :-)

+

Build directories are placed in the top-level objs +directory.

- \ No newline at end of file + Index: xc/extras/freetype2/devel/ftoption.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/devel/ftoption.h,v retrieving revision 1.2 diff -u -r1.2 ftoption.h --- a/xc/extras/freetype2/devel/ftoption.h 23 Apr 2004 18:42:44 -0000 1.2 +++ b/xc/extras/freetype2/devel/ftoption.h 28 Apr 2004 10:24:41 -0000 @@ -4,7 +4,7 @@ /* */ /* User-selectable configuration macros (specification only). */ /* */ -/* Copyright 1996-2001, 2002, 2003 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, */ @@ -97,16 +97,30 @@ /*************************************************************************/ /* */ + /* 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). */ + /* 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,7 +130,7 @@ /* 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 */ + /* 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. */ /* */ @@ -232,6 +246,29 @@ /*************************************************************************/ /* */ + /* 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 */ @@ -296,7 +333,7 @@ /* Do not #undef this macro here since the build system might define */ /* it for certain configurations only. */ /* */ -/* #define FT_DEBUG_MEMORY */ +#define FT_DEBUG_MEMORY /*************************************************************************/ Index: xc/extras/freetype2/docs/CHANGES =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/docs/CHANGES,v retrieving revision 1.2 diff -u -r1.2 CHANGES --- a/xc/extras/freetype2/docs/CHANGES 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/docs/CHANGES 28 Apr 2004 10:24:45 -0000 @@ -1,4 +1,166 @@ +LATEST CHANGES BETWEEN 2.1.8 and 2.1.7 + + I. IMPORTANT BUG FIXES + + - 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 Domröse 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 @@ -132,7 +294,7 @@ - The algorithm for guessing the font style has been improved. - - For fonts in sfnt format, root->height is no longer increased if + - 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. Index: xc/extras/freetype2/docs/INSTALL =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/docs/INSTALL,v retrieving revision 1.2 diff -u -r1.2 INSTALL --- a/xc/extras/freetype2/docs/INSTALL 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/docs/INSTALL 28 Apr 2004 10:24:46 -0000 @@ -61,6 +61,7 @@ [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. + http://makepp.sourceforge.net for more information; you need version + 1.19 or newer, and you must pass option `--norc-substitution'. --- end of INSTALL --- Index: xc/extras/freetype2/docs/INSTALL.GNU =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/docs/INSTALL.GNU,v retrieving revision 1.2 diff -u -r1.2 INSTALL.GNU --- a/xc/extras/freetype2/docs/INSTALL.GNU 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/docs/INSTALL.GNU 28 Apr 2004 10:24:47 -0000 @@ -23,7 +23,8 @@ 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. + 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: Index: xc/extras/freetype2/docs/INSTALL.UNX =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/docs/INSTALL.UNX,v retrieving revision 1.2 diff -u -r1.2 INSTALL.UNX --- a/xc/extras/freetype2/docs/INSTALL.UNX 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/docs/INSTALL.UNX 28 Apr 2004 10:24:47 -0000 @@ -13,7 +13,8 @@ [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.] + for more details; you need version 1.19 or newer, and you must pass + option `--norc-substitution'.] Trying to compile the library with a different Make tool will print a message like: Index: xc/extras/freetype2/docs/VERSION.DLL =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/docs/VERSION.DLL,v retrieving revision 1.2 diff -u -r1.2 VERSION.DLL --- a/xc/extras/freetype2/docs/VERSION.DLL 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/docs/VERSION.DLL 28 Apr 2004 10:24:47 -0000 @@ -52,6 +52,7 @@ 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 @@ -90,20 +91,19 @@ old_CPPFLAGS="$CPPFLAGS" CPPFLAGS=`freetype-config --cflags` AC_TRY_CPP([ + #include #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_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])]) --- end of VERSION.DLL --- Index: xc/extras/freetype2/docs/raster.txt =================================================================== RCS file: xc/extras/freetype2/docs/raster.txt diff -N xc/extras/freetype2/docs/raster.txt --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/docs/raster.txt 28 Apr 2004 10:24:48 -0000 @@ -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 Béziers. + Meanwhile it has been extended to render third-order Bézier 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) Bézier 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) Bézier + 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 Bézier arcs. + + The parametric form of a second-order Bézier 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 Bézier 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 Bézier 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 Bézier 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 Bézier 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 Bézier 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. + + Bézier arcs have the special property of being very easily + decomposed into two sub-arcs, which are themselves Bézier arcs. + Moreover, it is easy to prove that there is at most one vertical + extremum on each Bézier 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 Bézier 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 Bézier 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 Bézier arcs, the job is a little more complicated. + + We assume that all Béziers 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: Index: xc/extras/freetype2/docs/release =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/docs/release,v retrieving revision 1.2 diff -u -r1.2 release --- a/xc/extras/freetype2/docs/release 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/docs/release 28 Apr 2004 10:24:48 -0000 @@ -17,14 +17,16 @@ . ChangeLog: Announce new release. -. Tag the CVS. - -. Update `make-release' and `make-current' in ~/cvs/scripts/ on - www.freetype.org, then call them. - . 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. Index: xc/extras/freetype2/include/freetype/freetype.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/freetype.h,v retrieving revision 1.2 diff -u -r1.2 freetype.h --- a/xc/extras/freetype2/include/freetype/freetype.h 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/freetype.h 28 Apr 2004 10:24:53 -0000 @@ -4,7 +4,7 @@ /* */ /* FreeType high-level API and common types (specification only). */ /* */ -/* Copyright 1996-2001, 2002, 2003 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, */ @@ -44,7 +44,7 @@ /* */ #define FREETYPE_MAJOR 2 #define FREETYPE_MINOR 1 -#define FREETYPE_PATCH 7 +#define FREETYPE_PATCH 8 #include @@ -469,7 +469,7 @@ /* 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. */ /* */ @@ -590,6 +590,37 @@ /* 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 ), @@ -737,10 +768,12 @@ /* 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). */ /* */ @@ -941,7 +974,7 @@ /* FT_FACE_FLAG_XXX */ /* */ /* */ - /* 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. */ /* */ @@ -1718,6 +1751,7 @@ /* */ /* face_index :: The index of the face within the resource. The */ /* first face has index 0. */ + /* */ /* */ /* aface :: A handle to a new face object. */ /* */ @@ -1731,9 +1765,9 @@ /* */ /* @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'. */ @@ -1764,6 +1798,7 @@ /* */ /* face_index :: The index of the face within the resource. The */ /* first face has index 0. */ + /* */ /* */ /* aface :: A handle to a new face object. */ /* */ @@ -1783,8 +1818,8 @@ /* @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, @@ -1813,6 +1848,7 @@ /* */ /* face_index :: The index of the face within the resource. The */ /* first face has index 0. */ + /* */ /* */ /* aface :: A handle to a new face object. */ /* */ @@ -1824,11 +1860,11 @@ /* 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, @@ -2030,7 +2066,9 @@ /* will be loaded. */ /* */ /* */ - /* 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 */ @@ -2221,6 +2259,21 @@ * 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 @@ -2243,36 +2296,9 @@ /* */ - #define FT_LOAD_TARGET_( x ) ( (FT_Int32)( (x) & 15 ) << 16 ) #define FT_LOAD_TARGET_MODE( x ) ( (FT_Render_Mode)( ( (x) >> 16 ) & 15 ) ) - - /*************************************************************************** - * - * @enum: - * FT_LOAD_TARGET_XXX - * - * @description: - * A list of load targets. XXX - * - * @values: - * FT_LOAD_TARGET_NORMAL :: - * XXX - * - * FT_LOAD_TARGET_LIGHT :: - * XXX - * - * FT_LOAD_TARGET_MONO :: - * XXX - * - * FT_LOAD_TARGET_LCD :: - * XXX - * - * FT_LOAD_TARGET_LCD_V :: - * XXX - */ - #define FT_LOAD_TARGET_NORMAL FT_LOAD_TARGET_( FT_RENDER_MODE_NORMAL ) #define FT_LOAD_TARGET_LIGHT FT_LOAD_TARGET_( FT_RENDER_MODE_LIGHT ) #define FT_LOAD_TARGET_MONO FT_LOAD_TARGET_( FT_RENDER_MODE_MONO ) @@ -2334,11 +2360,14 @@ /* 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 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. */ Index: xc/extras/freetype2/include/freetype/ftcache.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/ftcache.h,v retrieving revision 1.2 diff -u -r1.2 ftcache.h --- a/xc/extras/freetype2/include/freetype/ftcache.h 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/ftcache.h 28 Apr 2004 10:24:53 -0000 @@ -4,7 +4,7 @@ /* */ /* FreeType Cache subsystem (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003 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,8 +63,8 @@ /* 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 */ @@ -108,10 +108,10 @@ /* FTC_FaceID */ /* */ /* */ - /* 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; /*************************************************************************/ @@ -257,22 +257,16 @@ /* Creates a new cache manager. */ /* */ /* */ - /* 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). */ /* */ /* */ /* amanager :: A handle to a new manager object. 0 in case of */ @@ -325,7 +319,7 @@ /*************************************************************************/ /* */ /* */ - /* FTC_Manager_Lookup_Face */ + /* FTC_Manager_LookupFace */ /* */ /* */ /* Retrieves the @FT_Face object that corresponds to a given face ID */ @@ -348,63 +342,479 @@ /* */ /* 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 ); + + + /*************************************************************************/ + /* */ + /* */ + /* FTC_ScalerRec */ + /* */ + /* */ + /* A structure used to describe a given character size in either */ + /* pixels or points to the cache manager. See */ + /* @FTC_Manager_LookupSize. */ + /* */ + /* */ + /* 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. */ + /* */ + /* */ + /* 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; /*************************************************************************/ /* */ /* */ - /* FTC_Manager_Lookup_Size */ + /* FTC_Manager_LookupSize */ /* */ /* */ - /* Retrieves the @FT_Face and @FT_Size objects that correspond to a */ - /* given font. */ + /* Retrieve the @FT_Size object that corresponds to a given */ + /* @FTC_Scaler through a cache manager. */ /* */ /* */ /* manager :: A handle to the cache manager. */ /* */ - /* font :: The font to use. */ + /* scaler :: A scaler handle. */ + /* */ + /* */ + /* asize :: A handle to the size object. */ + /* */ + /* */ + /* FreeType error code. 0 means success. */ + /* */ + /* */ + /* 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 ); + + + /*************************************************************************/ + /* */ + /* */ + /* FTC_Node_Unref */ + /* */ + /* */ + /* Decrement a cache node's internal reference count. When the count */ + /* reaches 0, it is not destroyed but becomes eligible for subsequent */ + /* cache flushes. */ + /* */ + /* */ + /* 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 ); + + + /*************************************************************************/ + /* */ + /*
*/ + /* 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 ); + + + /*************************************************************************/ + /* */ + /*
*/ + /* 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 ) ) + + + /*************************************************************************/ + /* */ + /* */ + /* FTC_ImageCache */ + /* */ + /* */ + /* 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; + + + /*************************************************************************/ + /* */ + /* */ + /* FTC_ImageCache_New */ + /* */ + /* */ + /* Creates a new glyph image cache. */ + /* */ + /* */ + /* manager :: The parent manager for the image cache. */ /* */ /* */ - /* aface :: A pointer to the handle of the face object. Set it to */ - /* zero if you don't need it. */ + /* acache :: A handle to the new glyph image cache object. */ + /* */ + /* */ + /* FreeType error code. 0 means success. */ + /* */ + FT_EXPORT( FT_Error ) + FTC_ImageCache_New( FTC_Manager manager, + FTC_ImageCache *acache ); + + + /*************************************************************************/ + /* */ + /* */ + /* FTC_ImageCache_Lookup */ + /* */ + /* */ + /* Retrieves a given glyph image from a glyph image cache. */ + /* */ + /* */ + /* cache :: A handle to the source glyph image cache. */ /* */ - /* asize :: A pointer to the handle of the size object. Set it to */ - /* zero if you don't need it. */ + /* type :: A pointer to a glyph image type descriptor. */ + /* */ + /* gindex :: The glyph index to retrieve. */ + /* */ + /* */ + /* 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). */ /* */ /* */ /* FreeType error code. 0 means success. */ /* */ /* */ - /* 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. */ + /* */ + /* 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! */ /* */ - /* 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_ImageCache_Lookup( FTC_ImageCache cache, + FTC_ImageType type, + FT_UInt gindex, + FT_Glyph *aglyph, + FTC_Node *anode ); + + + /*************************************************************************/ + /* */ + /* */ + /* FTC_SBit */ + /* */ + /* */ + /* A handle to a small bitmap descriptor. See the @FTC_SBitRec */ + /* structure for details. */ + /* */ + typedef struct FTC_SBitRec_* FTC_SBit; + + + /*************************************************************************/ + /* */ + /* */ + /* FTC_SBitRec */ + /* */ + /* */ + /* A very compact structure used to describe a small glyph bitmap. */ + /* */ + /* */ + /* width :: The bitmap width in pixels. */ /* */ - /* 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! */ + /* height :: The bitmap height in pixels. */ /* */ - /* 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. */ + /* 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; + + FT_Byte format; + FT_Byte max_grays; + FT_Short pitch; + FT_Char xadvance; + FT_Char yadvance; + + FT_Byte* buffer; + + } FTC_SBitRec; + + + /*************************************************************************/ + /* */ + /* */ + /* FTC_SBitCache */ + /* */ + /* */ + /* 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; + + + /*************************************************************************/ + /* */ + /* */ + /* FTC_SBitCache_New */ + /* */ + /* */ + /* Creates a new cache to store small glyph bitmaps. */ + /* */ + /* */ + /* manager :: A handle to the source cache manager. */ + /* */ + /* */ + /* acache :: A handle to the new sbit cache. NULL in case of error. */ + /* */ + /* */ + /* FreeType error code. 0 means success. */ /* */ FT_EXPORT( FT_Error ) - FTC_Manager_Lookup_Size( FTC_Manager manager, - FTC_Font font, - FT_Face *aface, - FT_Size *asize ); + FTC_SBitCache_New( FTC_Manager manager, + FTC_SBitCache *acache ); + + + /*************************************************************************/ + /* */ + /* */ + /* FTC_SBitCache_Lookup */ + /* */ + /* */ + /* Looks up a given small glyph bitmap in a given sbit cache and */ + /* `lock' it to prevent its flushing from the cache until needed. */ + /* */ + /* */ + /* cache :: A handle to the source sbit cache. */ + /* */ + /* type :: A pointer to the glyph image type descriptor. */ + /* */ + /* gindex :: The glyph index. */ + /* */ + /* */ + /* 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). */ + /* */ + /* */ + /* FreeType error code. 0 means success. */ + /* */ + /* */ + /* 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_END_HEADER Index: xc/extras/freetype2/include/freetype/fterrdef.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/fterrdef.h,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 fterrdef.h --- a/xc/extras/freetype2/include/freetype/fterrdef.h 14 Nov 2003 16:48:24 -0000 1.1.1.1 +++ b/xc/extras/freetype2/include/freetype/fterrdef.h 28 Apr 2004 10:24:53 -0000 @@ -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 */ Index: xc/extras/freetype2/include/freetype/ftglyph.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/ftglyph.h,v retrieving revision 1.2 diff -u -r1.2 ftglyph.h --- a/xc/extras/freetype2/include/freetype/ftglyph.h 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/ftglyph.h 28 Apr 2004 10:24:53 -0000 @@ -479,8 +479,7 @@ /* } */ /* */ /* */ - /* 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, Index: xc/extras/freetype2/include/freetype/ftimage.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/ftimage.h,v retrieving revision 1.2 diff -u -r1.2 ftimage.h --- a/xc/extras/freetype2/include/freetype/ftimage.h 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/ftimage.h 28 Apr 2004 10:24:56 -0000 @@ -5,7 +5,7 @@ /* FreeType glyph image formats and default raster interface */ /* (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003 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, */ @@ -657,7 +657,7 @@ /* 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. */ /* */ Index: xc/extras/freetype2/include/freetype/ftlzw.h =================================================================== RCS file: xc/extras/freetype2/include/freetype/ftlzw.h diff -N xc/extras/freetype2/include/freetype/ftlzw.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/include/freetype/ftlzw.h 28 Apr 2004 10:24:57 -0000 @@ -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 +#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 + + /*************************************************************************/ + /* */ + /*
*/ + /* lzw */ + /* */ + /* */ + /* 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 */ Index: xc/extras/freetype2/include/freetype/ftmac.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/ftmac.h,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 ftmac.h --- a/xc/extras/freetype2/include/freetype/ftmac.h 14 Nov 2003 16:48:24 -0000 1.1.1.1 +++ b/xc/extras/freetype2/include/freetype/ftmac.h 28 Apr 2004 10:24:57 -0000 @@ -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 @@ /* <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 ); /* */ Index: xc/extras/freetype2/include/freetype/ftmoderr.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/ftmoderr.h,v retrieving revision 1.2 diff -u -r1.2 ftmoderr.h --- a/xc/extras/freetype2/include/freetype/ftmoderr.h 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/ftmoderr.h 28 Apr 2004 10:24:57 -0000 @@ -4,7 +4,7 @@ /* */ /* FreeType module error offsets (specification). */ /* */ -/* Copyright 2001, 2002, 2003 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 0xF03, the error */ - /* `T1_Err_Invalid_File_Format' has value 0x1003, 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 */ @@ -109,18 +109,19 @@ FT_MODERRDEF( CFF, 0x400, "CFF module" ) FT_MODERRDEF( CID, 0x500, "CID module" ) FT_MODERRDEF( Gzip, 0x600, "Gzip module" ) - FT_MODERRDEF( PCF, 0x700, "PCF module" ) - FT_MODERRDEF( PFR, 0x800, "PFR module" ) - FT_MODERRDEF( PSaux, 0x900, "PS auxiliary module" ) - FT_MODERRDEF( PShinter, 0xA00, "PS hinter module" ) - FT_MODERRDEF( PSnames, 0xB00, "PS names module" ) - FT_MODERRDEF( Raster, 0xC00, "raster module" ) - FT_MODERRDEF( SFNT, 0xD00, "SFNT module" ) - FT_MODERRDEF( Smooth, 0xE00, "smooth raster module" ) - FT_MODERRDEF( TrueType, 0xF00, "TrueType module" ) - FT_MODERRDEF( Type1, 0x1000, "Type 1 module" ) - FT_MODERRDEF( Type42, 0x1100, "Type 42 module" ) - FT_MODERRDEF( Winfonts, 0x1200, "Windows FON/FNT 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 Index: xc/extras/freetype2/include/freetype/ftstroke.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/ftstroke.h,v retrieving revision 1.2 diff -u -r1.2 ftstroke.h --- a/xc/extras/freetype2/include/freetype/ftstroke.h 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/ftstroke.h 28 Apr 2004 10:25:00 -0000 @@ -4,7 +4,7 @@ /* */ /* FreeType path stroker (specification). */ /* */ -/* Copyright 2002, 2003 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, */ @@ -21,42 +21,45 @@ #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). - */ + /*@************************************************************* + * + * @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, @@ -66,27 +69,28 @@ } 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 - */ + /*@************************************************************* + * + * @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, @@ -95,12 +99,134 @@ } 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, @@ -109,29 +235,208 @@ 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 Bézier 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 Bézier in the stroker's current sub-path, + * from the last position. + * + * @input: + * stroker :: + * The target stroker handle. + * + * control1 :: + * A pointer to the first Bézier control point. + * + * control2 :: + * A pointer to second Bézier 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, @@ -139,19 +444,240 @@ 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__ */ Index: xc/extras/freetype2/include/freetype/ftwinfnt.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/ftwinfnt.h,v retrieving revision 1.2 diff -u -r1.2 ftwinfnt.h --- a/xc/extras/freetype2/include/freetype/ftwinfnt.h 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/ftwinfnt.h 28 Apr 2004 10:25:02 -0000 @@ -49,10 +49,132 @@ /* */ /*************************************************************************/ + + /************************************************************************* + * + * @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 Pöttgen <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. */ Index: xc/extras/freetype2/include/freetype/ftxf86.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/ftxf86.h,v retrieving revision 1.2 diff -u -r1.2 ftxf86.h --- a/xc/extras/freetype2/include/freetype/ftxf86.h 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/ftxf86.h 28 Apr 2004 10:25:02 -0000 @@ -4,7 +4,7 @@ /* */ /* Support functions for X11. */ /* */ -/* Copyright 2002, 2003 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, */ @@ -50,7 +50,7 @@ /* <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 ); /* */ Index: xc/extras/freetype2/include/freetype/t1tables.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/t1tables.h,v retrieving revision 1.2 diff -u -r1.2 t1tables.h --- a/xc/extras/freetype2/include/freetype/t1tables.h 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/t1tables.h 28 Apr 2004 10:25:02 -0000 @@ -5,7 +5,7 @@ /* Basic Type 1/Type 2 tables definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2001, 2002, 2003 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, */ @@ -135,6 +135,8 @@ 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; @@ -163,7 +165,7 @@ /* */ /* <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 Index: xc/extras/freetype2/include/freetype/ttnameid.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/ttnameid.h,v retrieving revision 1.2 diff -u -r1.2 ttnameid.h --- a/xc/extras/freetype2/include/freetype/ttnameid.h 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/ttnameid.h 28 Apr 2004 10:25:04 -0000 @@ -291,6 +291,7 @@ #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 /*************************************************************************/ Index: xc/extras/freetype2/include/freetype/tttables.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/tttables.h,v retrieving revision 1.2 diff -u -r1.2 tttables.h --- a/xc/extras/freetype2/include/freetype/tttables.h 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/tttables.h 28 Apr 2004 10:25:07 -0000 @@ -663,6 +663,27 @@ 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 ); + /* */ Index: xc/extras/freetype2/include/freetype/cache/ftccache.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/cache/ftccache.h,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 ftccache.h --- a/xc/extras/freetype2/include/freetype/cache/ftccache.h 25 Nov 2003 19:27:18 -0000 1.1.1.2 +++ b/xc/extras/freetype2/include/freetype/cache/ftccache.h 28 Apr 2004 10:25:07 -0000 @@ -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 @@ 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 @@ /* 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 @@ #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 @@ /* 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 @@ /*************************************************************************/ /*************************************************************************/ /***** *****/ - /***** 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_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 void + (*FTC_Cache_DoneFunc)( FTC_Cache cache ); - typedef struct FTC_Cache_ClassRec_ + + typedef struct FTC_CacheClassRec_ { - FT_UInt cache_size; - FTC_Cache_InitFunc cache_init; - FTC_Cache_ClearFunc cache_clear; - FTC_Cache_DoneFunc cache_done; - - FT_UInt family_size; - FTC_Family_InitFunc family_init; - FTC_Family_CompareFunc family_compare; - FTC_Family_DoneFunc family_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_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 cache_size; + FTC_Cache_InitFunc cache_init; + FTC_Cache_DoneFunc cache_done; - } FTC_Cache_ClassRec; + } FTC_CacheClassRec; - /* */ + /* 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 */ + FTC_CacheClass org_class; /* original class pointer */ - /*************************************************************************/ - /* */ - /* 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_CacheRec; - /* 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 */ +#define FTC_CACHE( x ) ( (FTC_Cache)(x) ) +#define FTC_CACHE_P( x ) ( (FTC_Cache*)(x) ) + + + /* 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 */ /* */ Index: xc/extras/freetype2/include/freetype/cache/ftcglyph.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/cache/ftcglyph.h,v retrieving revision 1.2 diff -u -r1.2 ftcglyph.h --- a/xc/extras/freetype2/include/freetype/cache/ftcglyph.h 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/cache/ftcglyph.h 28 Apr 2004 10:25:08 -0000 @@ -4,7 +4,7 @@ /* */ /* FreeType abstract glyph cache (specification). */ /* */ -/* Copyright 2000-2001, 2003 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,97 +118,53 @@ #include <ft2build.h> -#include FT_CACHE_H -#include FT_CACHE_MANAGER_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_GlyphNodeRec; + FTC_MruNodeRec mrunode; + FT_UInt num_nodes; /* current number of nodes in this family */ + FTC_Cache cache; + FTC_MruListClass clazz; + } FTC_FamilyRec, *FTC_Family; -#define FTC_GLYPH_NODE( x ) ( (FTC_GlyphNode)(x) ) -#define FTC_GLYPH_NODE_P( x ) ( (FTC_GlyphNode*)(x) ) +#define FTC_FAMILY(x) ( (FTC_Family)(x) ) +#define FTC_FAMILY_P(x) ( (FTC_Family*)(x) ) - typedef struct FTC_GlyphQueryRec_ + typedef struct FTC_GNodeRec_ { - FTC_QueryRec query; - FT_UInt gindex; + FTC_NodeRec node; + FTC_Family family; + FT_UInt gindex; - } FTC_GlyphQueryRec, *FTC_GlyphQuery; + } FTC_GNodeRec, *FTC_GNode; +#define FTC_GNODE( x ) ( (FTC_GNode)(x) ) +#define FTC_GNODE_P( x ) ( (FTC_GNode*)(x) ) -#define FTC_GLYPH_QUERY( x ) ( (FTC_GlyphQuery)(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) ) - -#define FTC_GLYPH_FAMILY_MEMORY( x ) FTC_FAMILY(x)->cache->memory - - - /* 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 ) & 0xFFFFU ) ) ) - - /* 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 & 0xFFFFU ) ) + FT_UInt gindex; + FTC_Family family; + + } FTC_GQueryRec, *FTC_GQuery; + +#define FTC_GQUERY( x ) ( (FTC_GQuery)(x) ) /*************************************************************************/ @@ -149,39 +176,116 @@ /* 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 Index: xc/extras/freetype2/include/freetype/cache/ftcimage.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/cache/ftcimage.h,v retrieving revision 1.2 diff -u -r1.2 ftcimage.h --- a/xc/extras/freetype2/include/freetype/cache/ftcimage.h 23 Apr 2004 18:42:45 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/cache/ftcimage.h 28 Apr 2004 10:25:08 -0000 @@ -2,7 +2,7 @@ /* */ /* ftcimage.h */ /* */ -/* FreeType Image cache (specification). */ +/* FreeType Generic Image cache (specification) */ /* */ /* Copyright 2000-2001, 2002, 2003 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ @@ -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,284 +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; -#define ftc_image_format_bitmap 0x0000 -#define ftc_image_format_outline 0x0001 + } FTC_INodeRec, *FTC_INode; -#define ftc_image_format_mask 0x000F +#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 + + 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_ImageTypeRec instead. */ - /* */ - /* A simple structure used to describe a given glyph image category. */ - /* */ - /* <Fields> */ - /* font :: An @FTC_FontRec 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__ */ Index: xc/extras/freetype2/include/freetype/cache/ftcmanag.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/cache/ftcmanag.h,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 ftcmanag.h --- a/xc/extras/freetype2/include/freetype/cache/ftcmanag.h 14 Nov 2003 16:48:24 -0000 1.1.1.1 +++ b/xc/extras/freetype2/include/freetype/cache/ftcmanag.h 28 Apr 2004 10:25:08 -0000 @@ -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 @@ #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 @@ FTC_Manager_Compress( FTC_Manager manager ); - /* 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 ); + /* 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 ); - /* can be called to increment a node's reference count */ - FT_EXPORT( void ) - FTC_Node_Ref( FTC_Node node, - FTC_Manager manager ); + /* this must be used internally for the moment */ + FT_EXPORT( FT_Error ) + FTC_Manager_RegisterCache( FTC_Manager manager, + FTC_CacheClass clazz, + FTC_Cache *acache ); + /* */ - /*************************************************************************/ - /* */ - /* <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_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 ) ) ) + +#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__ */ Index: xc/extras/freetype2/include/freetype/cache/ftcmru.h =================================================================== RCS file: xc/extras/freetype2/include/freetype/cache/ftcmru.h diff -N xc/extras/freetype2/include/freetype/cache/ftcmru.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/include/freetype/cache/ftcmru.h 28 Apr 2004 10:25:08 -0000 @@ -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 */ Index: xc/extras/freetype2/include/freetype/cache/ftcsbits.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/cache/ftcsbits.h,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 ftcsbits.h --- a/xc/extras/freetype2/include/freetype/cache/ftcsbits.h 25 Nov 2003 19:27:18 -0000 1.1.1.2 +++ b/xc/extras/freetype2/include/freetype/cache/ftcsbits.h 28 Apr 2004 10:25:08 -0000 @@ -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 */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* <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. */ - /* */ - /* 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_ + typedef struct FTC_SNodeRec_ { - 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; - - - /*************************************************************************/ - /* */ - /* <Type> */ - /* FTC_SBit_Cache */ - /* */ - /* <Description> */ - /* DEPRECATED. Use @FTC_SBitCache instead. */ - /* */ - typedef FTC_SBitCache FTC_SBit_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_GNodeRec gnode; + FT_UInt count; + FTC_SBitRec sbits[FTC_SBIT_ITEMS_PER_NODE]; + } FTC_SNodeRec, *FTC_SNode; - /*************************************************************************/ - /* */ - /* <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 ); +#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 - /* */ + typedef FT_UInt + (*FTC_SFamily_GetCountFunc)( FTC_Family family, + FTC_Manager manager ); + typedef FT_Error + (*FTC_SFamily_LoadGlyphFunc)( FTC_Family family, + FT_UInt gindex, + FTC_Manager manager, + FT_Face *aface ); - /*************************************************************************/ - /* */ - /* <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 ); + typedef struct FTC_SFamilyClassRec_ + { + FTC_MruListClassRec clazz; + FTC_SFamily_GetCountFunc family_get_count; + FTC_SFamily_LoadGlyphFunc family_load_glyph; + + } FTC_SFamilyClassRec; + + typedef const FTC_SFamilyClassRec* FTC_SFamilyClass; +#define FTC_SFAMILY_CLASS( x ) ((FTC_SFamilyClass)(x)) + +#define FTC_CACHE__SFAMILY_CLASS( x ) \ + FTC_SFAMILY_CLASS( FTC_CACHE__GCACHE_CLASS( x )->family_class ) + + + FT_EXPORT( void ) + FTC_SNode_Free( FTC_SNode snode, + FTC_Cache cache ); - /*************************************************************************/ - /* */ - /* <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 ); + FTC_SNode_New( FTC_SNode *psnode, + FTC_GQuery gquery, + FTC_Cache cache ); + + FT_EXPORT( FT_ULong ) + FTC_SNode_Weight( FTC_SNode inode ); + FT_EXPORT( FT_Bool ) + FTC_SNode_Compare( FTC_SNode snode, + FTC_GQuery gquery, + FTC_Cache cache ); + + /* */ + FT_END_HEADER #endif /* __FTCSBITS_H__ */ Index: xc/extras/freetype2/include/freetype/cache/ftlru.h =================================================================== RCS file: xc/extras/freetype2/include/freetype/cache/ftlru.h diff -N xc/extras/freetype2/include/freetype/cache/ftlru.h --- a/xc/extras/freetype2/include/freetype/cache/ftlru.h 23 Apr 2004 18:42:45 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,208 +0,0 @@ -/***************************************************************************/ -/* */ -/* ftlru.h */ -/* */ -/* Simple LRU list-cache (specification). */ -/* */ -/* 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, */ -/* 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 LRU 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. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /********* *********/ - /********* WARNING, THIS IS BETA CODE. *********/ - /********* *********/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - /*************************************************************************/ - - -#ifndef __FTLRU_H__ -#define __FTLRU_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 - - - /* generic list key type */ - typedef FT_Pointer FT_LruKey; - - /* a list list handle */ - typedef struct FT_LruListRec_* FT_LruList; - - /* a list class handle */ - typedef const struct FT_LruList_ClassRec_* FT_LruList_Class; - - /* a list node handle */ - typedef struct FT_LruNodeRec_* FT_LruNode; - - /* the list node structure */ - typedef struct FT_LruNodeRec_ - { - FT_LruNode next; - FT_LruKey key; - - } FT_LruNodeRec; - - - /* the list structure */ - typedef struct FT_LruListRec_ - { - FT_Memory memory; - FT_LruList_Class clazz; - FT_LruNode nodes; - FT_UInt max_nodes; - FT_UInt num_nodes; - FT_Pointer data; - - } FT_LruListRec; - - - /* initialize a list list */ - typedef FT_Error - (*FT_LruList_InitFunc)( FT_LruList list ); - - /* finalize a list list */ - typedef void - (*FT_LruList_DoneFunc)( FT_LruList list ); - - /* this method is used to initialize a new list element node */ - typedef FT_Error - (*FT_LruNode_InitFunc)( FT_LruNode node, - FT_LruKey key, - FT_Pointer data ); - - /* this method is used to finalize a given list element node */ - typedef void - (*FT_LruNode_DoneFunc)( FT_LruNode node, - FT_Pointer data ); - - /* If defined, this method is called when the list if full */ - /* during the lookup process -- it is used to change the contents */ - /* of a list element node instead of calling `done_element()', */ - /* then `init_element()'. Set it to 0 for default behaviour. */ - typedef FT_Error - (*FT_LruNode_FlushFunc)( FT_LruNode node, - FT_LruKey new_key, - FT_Pointer data ); - - /* If defined, this method is used to compare a list element node */ - /* with a given key during a lookup. If set to 0, the `key' */ - /* fields will be directly compared instead. */ - typedef FT_Bool - (*FT_LruNode_CompareFunc)( FT_LruNode node, - FT_LruKey key, - FT_Pointer data ); - - /* A selector is used to indicate whether a given list element node */ - /* is part of a selection for FT_LruList_Remove_Selection(). The */ - /* functrion must return true (i.e., non-null) to indicate that the */ - /* node is part of it. */ - typedef FT_Bool - (*FT_LruNode_SelectFunc)( FT_LruNode node, - FT_Pointer data, - FT_Pointer list_data ); - - /* LRU class */ - typedef struct FT_LruList_ClassRec_ - { - FT_UInt list_size; - FT_LruList_InitFunc list_init; /* optional */ - FT_LruList_DoneFunc list_done; /* optional */ - - FT_UInt node_size; - FT_LruNode_InitFunc node_init; /* MANDATORY */ - FT_LruNode_DoneFunc node_done; /* optional */ - FT_LruNode_FlushFunc node_flush; /* optional */ - FT_LruNode_CompareFunc node_compare; /* optional */ - - } FT_LruList_ClassRec; - - - /* The following functions must be exported in the case where */ - /* applications would want to write their own cache classes. */ - - FT_EXPORT( FT_Error ) - FT_LruList_New( FT_LruList_Class clazz, - FT_UInt max_elements, - FT_Pointer user_data, - FT_Memory memory, - FT_LruList *alist ); - - FT_EXPORT( void ) - FT_LruList_Reset( FT_LruList list ); - - FT_EXPORT( void ) - FT_LruList_Destroy ( FT_LruList list ); - - FT_EXPORT( FT_Error ) - FT_LruList_Lookup( FT_LruList list, - FT_LruKey key, - FT_LruNode *anode ); - - FT_EXPORT( void ) - FT_LruList_Remove( FT_LruList list, - FT_LruNode node ); - - FT_EXPORT( void ) - FT_LruList_Remove_Selection( FT_LruList list, - FT_LruNode_SelectFunc select_func, - FT_Pointer select_data ); - - /* */ - -FT_END_HEADER - - -#endif /* __FTLRU_H__ */ - - -/* END */ Index: xc/extras/freetype2/include/freetype/config/ftconfig.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/config/ftconfig.h,v retrieving revision 1.2 diff -u -r1.2 ftconfig.h --- a/xc/extras/freetype2/include/freetype/config/ftconfig.h 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/config/ftconfig.h 28 Apr 2004 10:25:08 -0000 @@ -4,7 +4,7 @@ /* */ /* ANSI-specific configuration file (specification only). */ /* */ -/* Copyright 1996-2001, 2002, 2003 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, */ @@ -15,6 +15,7 @@ /* */ /***************************************************************************/ + /*************************************************************************/ /* */ /* This header file contains a number of macro definitions that are used */ @@ -57,24 +58,41 @@ /*************************************************************************/ - /* 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 +# ifdef CHAR_BIT +# define FT_CHAR_BIT 8 +# else +# define FT_CHAR_BIT 8 +# endif +#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 @@ -122,12 +140,12 @@ 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; @@ -137,12 +155,12 @@ #endif /* look up an integer type that is at least 32 bits */ -#if FT_SIZEOF_INT >= 4 +#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 +170,7 @@ /* 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 @@ -188,7 +206,7 @@ #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 { Index: xc/extras/freetype2/include/freetype/config/ftheader.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/config/ftheader.h,v retrieving revision 1.2 diff -u -r1.2 ftheader.h --- a/xc/extras/freetype2/include/freetype/config/ftheader.h 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/config/ftheader.h 28 Apr 2004 10:25:08 -0000 @@ -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 */ /*************************************************************************/ @@ -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,26 +531,30 @@ /* */ -#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_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_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_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> +#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 Index: xc/extras/freetype2/include/freetype/config/ftoption.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/config/ftoption.h,v retrieving revision 1.2 diff -u -r1.2 ftoption.h --- a/xc/extras/freetype2/include/freetype/config/ftoption.h 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/config/ftoption.h 28 Apr 2004 10:25:09 -0000 @@ -4,7 +4,7 @@ /* */ /* User-selectable configuration macros (specification only). */ /* */ -/* Copyright 1996-2001, 2002, 2003 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, */ @@ -25,501 +25,538 @@ FT_BEGIN_HEADER - /*************************************************************************/ - /* */ - /* USER-SELECTABLE CONFIGURATION MACROS */ - /* */ - /* This file contains the default configuration macro definitions for */ - /* a standard build of the FreeType library. There are three ways to */ - /* use this file to build project-specific versions of the library: */ - /* */ - /* - You can modify this file by hand, but this is not recommended in */ - /* cases where you would like to build several versions of the */ - /* library from a single source directory. */ - /* */ - /* - You can put a copy of this file in your build directory, more */ - /* precisely in "$BUILD/freetype/config/ftoption.h", where "$BUILD" */ - /* is the name of a directory that is included _before_ the FreeType */ - /* include path during compilation. */ - /* */ - /* The default FreeType Makefiles and Jamfiles use the build */ - /* directory "builds/<system>" by default, but you can easily change */ - /* that for your own projects. */ - /* */ - /* - Copy the file <ft2build.h> to "$BUILD/ft2build.h" and modify it */ - /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ - /* locate this file during the build. For example, */ - /* */ - /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */ - /* #include <freetype/config/ftheader.h> */ - /* */ - /* will use "$BUILD/myftoptions.h" instead of this file for macro */ - /* definitions. */ - /* */ - /* Note also that you can similarly pre-define the macro */ - /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ - /* that are statically linked to the library at compile time. By */ - /* default, this file is <freetype/config/ftmodule.h>. */ - /* */ - /* We highly recommend using the third method whenever possible. */ - /* */ - /*************************************************************************/ - - - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* Many compilers provide a non-ANSI 64-bit data type that can be used */ - /* 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 integers is normally disabled when */ - /* the __STDC__ macro is defined. You can however disable this by */ - /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */ - /* */ - /* 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 the */ - /* `configure' script on supported platforms. */ - /* */ - #undef FT_CONFIG_OPTION_FORCE_INT64 - - - /*************************************************************************/ - /* */ - /* 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). */ - /* */ - /* 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 FT_CONFIG_OPTION_USE_ZLIB - - - /*************************************************************************/ - /* */ - /* 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 */ - /* 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 */ - /* included directly within the component and *not* export external */ - /* 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 */ - /* it for certain configurations only. */ - /* */ - /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ - - - /*************************************************************************/ - /* */ - /* DLL export compilation */ - /* */ - /* When compiling FreeType as a DLL, some systems/compilers need a */ - /* special keyword in front OR after the return type of function */ - /* declarations. */ - /* */ - /* Two macros are used within the FreeType source code to define */ - /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ - /* */ - /* FT_EXPORT( return_type ) */ - /* */ - /* is used in a function declaration, as in */ - /* */ - /* FT_EXPORT( FT_Error ) */ - /* FT_Init_FreeType( FT_Library* alibrary ); */ - /* */ - /* */ - /* FT_EXPORT_DEF( return_type ) */ - /* */ - /* is used in a function definition, as in */ - /* */ - /* FT_EXPORT_DEF( FT_Error ) */ - /* FT_Init_FreeType( FT_Library* alibrary ) */ - /* { */ - /* ... some code ... */ - /* return FT_Err_Ok; */ - /* } */ - /* */ - /* You can provide your own implementation of FT_EXPORT and */ - /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */ - /* 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 */ - - - /*************************************************************************/ - /* */ - /* Glyph Postscript Names handling */ - /* */ - /* By default, FreeType 2 is compiled with the `PSNames' module. This */ - /* module is in charge of converting a glyph name string into a */ - /* Unicode value, or return a Macintosh standard glyph name for the */ - /* use with the TrueType `post' table. */ - /* */ - /* Undefine this macro if you do not want `PSNames' compiled in your */ - /* build of FreeType. This has the following effects: */ - /* */ - /* - The TrueType driver will provide its own set of glyph names, */ - /* if you build it to support postscript names in the TrueType */ - /* `post' table. */ - /* */ - /* - The Type 1 driver will not be able to synthetize a Unicode */ - /* charmap out of the glyphs found in the fonts. */ - /* */ - /* You would normally undefine this configuration macro when building */ - /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */ - /* */ - #define FT_CONFIG_OPTION_POSTSCRIPT_NAMES - - - /*************************************************************************/ - /* */ - /* Postscript Names to Unicode Values support */ - /* */ - /* By default, FreeType 2 is built with the `PSNames' module compiled */ - /* in. Among other things, the module is used to convert a glyph name */ - /* into a Unicode value. This is especially useful in order to */ - /* synthetize on the fly a Unicode charmap from the CFF/Type 1 driver */ - /* through a big table named the `Adobe Glyph List' (AGL). */ - /* */ - /* Undefine this macro if you do not want the Adobe Glyph List */ - /* compiled in your `PSNames' module. The Type 1 driver will not be */ - /* able to synthetize a Unicode charmap out of the glyphs found in the */ - /* fonts. */ - /* */ - #define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST - - - /*************************************************************************/ - /* */ - /* 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 - - - /*************************************************************************/ - /* */ - /* 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 */ - - - /*************************************************************************/ - /* */ - /* 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. */ - /* */ - #define FT_RENDER_POOL_SIZE 16384L - - - /*************************************************************************/ - /* */ - /* FT_MAX_MODULES */ - /* */ - /* The maximum number of modules that can be registered in a single */ - /* FreeType library object. 32 is the default. */ - /* */ - #define FT_MAX_MODULES 32 - - - /*************************************************************************/ - /* */ - /* Debug level */ - /* */ - /* FreeType can be compiled in debug or trace mode. In debug mode, */ - /* errors are reported through the `ftdebug' component. In trace */ - /* mode, additional messages are sent to the standard output during */ - /* execution. */ - /* */ - /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */ - /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */ - /* */ - /* Don't define any of these macros to compile in `release' mode! */ - /* */ - /* 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 */ - - - /*************************************************************************/ - /* */ - /* Memory Debugging */ - /* */ - /* FreeType now comes with an integrated memory debugger that is */ - /* capable of detecting simple errors like memory leaks or double */ - /* deletes. To compile it within your build of the library, you */ - /* should define FT_DEBUG_MEMORY here. */ - /* */ - /* Note that the memory debugger is only activated at runtime when */ - /* when the _environment_ variable "FT2_DEBUG_MEMORY" is defined also! */ - /* */ - /* Do not #undef this macro here since the build system might define */ - /* it for certain configurations only. */ - /* */ - /* #define FT_DEBUG_MEMORY */ - - - /*************************************************************************/ - /* */ - /* Module errors */ - /* */ - /* If this macro is set (which is _not_ the default), the higher byte */ - /* of an error code gives the module in which the error has occurred, */ - /* while the lower byte is the real error code. */ - /* */ - /* Setting this macro makes sense for debugging purposes only, since */ - /* it would break source compatibility of certain programs that use */ - /* FreeType 2. */ - /* */ - /* More details can be found in the files ftmoderr.h and fterrors.h. */ - /* */ - #undef FT_CONFIG_OPTION_USE_MODULE_ERRORS - - - - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */ - /* embedded bitmaps in all formats using the SFNT module (namely */ - /* TrueType & OpenType). */ - /* */ - #define TT_CONFIG_OPTION_EMBEDDED_BITMAPS - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */ - /* load and enumerate the glyph Postscript names in a TrueType or */ - /* OpenType file. */ - /* */ - /* Note that when you do not compile the `PSNames' module by undefining */ - /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */ - /* contain additional code used to read the PS Names table from a font. */ - /* */ - /* (By default, the module uses `PSNames' to extract glyph names.) */ - /* */ - #define TT_CONFIG_OPTION_POSTSCRIPT_NAMES - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */ - /* access the internal name table in a SFNT-based format like TrueType */ - /* or OpenType. The name table contains various strings used to */ - /* describe the font, like family name, copyright, version, etc. It */ - /* does not contain any glyph name though. */ - /* */ - /* Accessing SFNT names is done through the functions declared in */ - /* `freetype/ftnames.h'. */ - /* */ - #define TT_CONFIG_OPTION_SFNT_NAMES - - - /*************************************************************************/ - /* */ - /* TrueType CMap support */ - /* */ - /* Here you can fine-tune which TrueType CMap table format shall be */ - /* supported. */ - #define TT_CONFIG_CMAP_FORMAT_0 - #define TT_CONFIG_CMAP_FORMAT_2 - #define TT_CONFIG_CMAP_FORMAT_4 - #define TT_CONFIG_CMAP_FORMAT_6 - #define TT_CONFIG_CMAP_FORMAT_8 - #define TT_CONFIG_CMAP_FORMAT_10 - #define TT_CONFIG_CMAP_FORMAT_12 - - - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ - /* a bytecode interpreter in the TrueType driver. Note that there are */ - /* important patent issues related to the use of the interpreter. */ - /* */ - /* 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 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 */ - /* architectures. */ - /* */ - /* Note however that on some compiler/processor combinations, undefining */ - /* this macro will generate faster, though larger, code. */ - /* */ - #define TT_CONFIG_OPTION_INTERPRETER_SWITCH - - - /*************************************************************************/ - /* */ - /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ - /* TrueType glyph loader to use Apple's definition of how to handle */ - /* component offsets in composite glyphs. */ - /* */ - /* Apple and MS disagree on the default behavior of component offsets */ - /* in composites. Apple says that they should be scaled by the scale */ - /* factors in the transformation matrix (roughly, it's more complex) */ - /* while MS says they should not. OpenType defines two bits in the */ - /* composite flags array which can be used to disambiguate, but old */ - /* fonts will not have them. */ - /* */ - /* http://partners.adobe.com/asn/developer/opentype/glyf.html */ - /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */ - /* */ - #undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED - - - /*************************************************************************/ - /*************************************************************************/ - /**** ****/ - /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ - /**** ****/ - /*************************************************************************/ - /*************************************************************************/ - - - /*************************************************************************/ - /* */ - /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */ - /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ - /* required. */ - /* */ - #define T1_MAX_DICT_DEPTH 5 - - - /*************************************************************************/ - /* */ - /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ - /* calls during glyph loading. */ - /* */ - #define T1_MAX_SUBRS_CALLS 16 - - - /*************************************************************************/ - /* */ - /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ - /* minimum of 16 is required. */ - /* */ - /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */ - /* */ - #define T1_MAX_CHARSTRINGS_OPERANDS 256 - - - /*************************************************************************/ - /* */ - /* Define this configuration macro if you want to prevent the */ - /* compilation of `t1afm', which is in charge of reading Type 1 AFM */ - /* files into an existing face. Note that if set, the T1 driver will be */ - /* unable to produce kerning distances. */ - /* */ - #undef T1_CONFIG_OPTION_NO_AFM - - - /*************************************************************************/ - /* */ - /* Define this configuration macro if you want to prevent the */ - /* compilation of the Multiple Masters font support in the Type 1 */ - /* driver. */ - /* */ - #undef T1_CONFIG_OPTION_NO_MM_SUPPORT - - /* */ - - /* - * 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 + /*************************************************************************/ + /* */ + /* USER-SELECTABLE CONFIGURATION MACROS */ + /* */ + /* This file contains the default configuration macro definitions for */ + /* a standard build of the FreeType library. There are three ways to */ + /* use this file to build project-specific versions of the library: */ + /* */ + /* - You can modify this file by hand, but this is not recommended in */ + /* cases where you would like to build several versions of the */ + /* library from a single source directory. */ + /* */ + /* - You can put a copy of this file in your build directory, more */ + /* precisely in "$BUILD/freetype/config/ftoption.h", where "$BUILD" */ + /* is the name of a directory that is included _before_ the FreeType */ + /* include path during compilation. */ + /* */ + /* The default FreeType Makefiles and Jamfiles use the build */ + /* directory "builds/<system>" by default, but you can easily change */ + /* that for your own projects. */ + /* */ + /* - Copy the file <ft2build.h> to "$BUILD/ft2build.h" and modify it */ + /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ + /* locate this file during the build. For example, */ + /* */ + /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */ + /* #include <freetype/config/ftheader.h> */ + /* */ + /* will use "$BUILD/myftoptions.h" instead of this file for macro */ + /* definitions. */ + /* */ + /* Note also that you can similarly pre-define the macro */ + /* FT_CONFIG_MODULES_H used to locate the file listing of the modules */ + /* that are statically linked to the library at compile time. By */ + /* default, this file is <freetype/config/ftmodule.h>. */ + /* */ + /* We highly recommend using the third method whenever possible. */ + /* */ + /*************************************************************************/ + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** G E N E R A L F R E E T Y P E 2 C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Many compilers provide a non-ANSI 64-bit data type that can be used */ + /* 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 integers is normally disabled when */ + /* the __STDC__ macro is defined. You can however disable this by */ + /* defining the macro FT_CONFIG_OPTION_FORCE_INT64 here. */ + /* */ + /* 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 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/gzip/ftgzip.c). */ + /* */ + /* 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 + + + /*************************************************************************/ + /* */ + /* 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 */ + /* 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 */ + /* included directly within the component and *not* export external */ + /* 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 */ + /* it for certain configurations only. */ + /* */ +/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ + + + /*************************************************************************/ + /* */ + /* DLL export compilation */ + /* */ + /* When compiling FreeType as a DLL, some systems/compilers need a */ + /* special keyword in front OR after the return type of function */ + /* declarations. */ + /* */ + /* Two macros are used within the FreeType source code to define */ + /* exported library functions: FT_EXPORT and FT_EXPORT_DEF. */ + /* */ + /* FT_EXPORT( return_type ) */ + /* */ + /* is used in a function declaration, as in */ + /* */ + /* FT_EXPORT( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ); */ + /* */ + /* */ + /* FT_EXPORT_DEF( return_type ) */ + /* */ + /* is used in a function definition, as in */ + /* */ + /* FT_EXPORT_DEF( FT_Error ) */ + /* FT_Init_FreeType( FT_Library* alibrary ) */ + /* { */ + /* ... some code ... */ + /* return FT_Err_Ok; */ + /* } */ + /* */ + /* You can provide your own implementation of FT_EXPORT and */ + /* FT_EXPORT_DEF here if you want. If you leave them undefined, they */ + /* 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 */ + + + /*************************************************************************/ + /* */ + /* Glyph Postscript Names handling */ + /* */ + /* By default, FreeType 2 is compiled with the `PSNames' module. This */ + /* module is in charge of converting a glyph name string into a */ + /* Unicode value, or return a Macintosh standard glyph name for the */ + /* use with the TrueType `post' table. */ + /* */ + /* Undefine this macro if you do not want `PSNames' compiled in your */ + /* build of FreeType. This has the following effects: */ + /* */ + /* - The TrueType driver will provide its own set of glyph names, */ + /* if you build it to support postscript names in the TrueType */ + /* `post' table. */ + /* */ + /* - The Type 1 driver will not be able to synthetize a Unicode */ + /* charmap out of the glyphs found in the fonts. */ + /* */ + /* You would normally undefine this configuration macro when building */ + /* a version of FreeType that doesn't contain a Type 1 or CFF driver. */ + /* */ +#define FT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Postscript Names to Unicode Values support */ + /* */ + /* By default, FreeType 2 is built with the `PSNames' module compiled */ + /* in. Among other things, the module is used to convert a glyph name */ + /* into a Unicode value. This is especially useful in order to */ + /* synthetize on the fly a Unicode charmap from the CFF/Type 1 driver */ + /* through a big table named the `Adobe Glyph List' (AGL). */ + /* */ + /* Undefine this macro if you do not want the Adobe Glyph List */ + /* compiled in your `PSNames' module. The Type 1 driver will not be */ + /* able to synthetize a Unicode charmap out of the glyphs found in the */ + /* fonts. */ + /* */ +#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST + + + /*************************************************************************/ + /* */ + /* 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 */ + + + /*************************************************************************/ + /* */ + /* 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. */ + /* */ +#define FT_RENDER_POOL_SIZE 16384L + + + /*************************************************************************/ + /* */ + /* FT_MAX_MODULES */ + /* */ + /* The maximum number of modules that can be registered in a single */ + /* FreeType library object. 32 is the default. */ + /* */ +#define FT_MAX_MODULES 32 + + + /*************************************************************************/ + /* */ + /* Debug level */ + /* */ + /* FreeType can be compiled in debug or trace mode. In debug mode, */ + /* errors are reported through the `ftdebug' component. In trace */ + /* mode, additional messages are sent to the standard output during */ + /* execution. */ + /* */ + /* Define FT_DEBUG_LEVEL_ERROR to build the library in debug mode. */ + /* Define FT_DEBUG_LEVEL_TRACE to build it in trace mode. */ + /* */ + /* Don't define any of these macros to compile in `release' mode! */ + /* */ + /* 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 */ + + + /*************************************************************************/ + /* */ + /* Memory Debugging */ + /* */ + /* FreeType now comes with an integrated memory debugger that is */ + /* capable of detecting simple errors like memory leaks or double */ + /* deletes. To compile it within your build of the library, you */ + /* should define FT_DEBUG_MEMORY here. */ + /* */ + /* Note that the memory debugger is only activated at runtime when */ + /* when the _environment_ variable "FT2_DEBUG_MEMORY" is defined also! */ + /* */ + /* Do not #undef this macro here since the build system might define */ + /* it for certain configurations only. */ + /* */ +/* #define FT_DEBUG_MEMORY */ + + + /*************************************************************************/ + /* */ + /* Module errors */ + /* */ + /* If this macro is set (which is _not_ the default), the higher byte */ + /* of an error code gives the module in which the error has occurred, */ + /* while the lower byte is the real error code. */ + /* */ + /* Setting this macro makes sense for debugging purposes only, since */ + /* it would break source compatibility of certain programs that use */ + /* FreeType 2. */ + /* */ + /* More details can be found in the files ftmoderr.h and fterrors.h. */ + /* */ +#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS + + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** S F N T D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_EMBEDDED_BITMAPS if you want to support */ + /* embedded bitmaps in all formats using the SFNT module (namely */ + /* TrueType & OpenType). */ + /* */ +#define TT_CONFIG_OPTION_EMBEDDED_BITMAPS + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_POSTSCRIPT_NAMES if you want to be able to */ + /* load and enumerate the glyph Postscript names in a TrueType or */ + /* OpenType file. */ + /* */ + /* Note that when you do not compile the `PSNames' module by undefining */ + /* the above FT_CONFIG_OPTION_POSTSCRIPT_NAMES, the `sfnt' module will */ + /* contain additional code used to read the PS Names table from a font. */ + /* */ + /* (By default, the module uses `PSNames' to extract glyph names.) */ + /* */ +#define TT_CONFIG_OPTION_POSTSCRIPT_NAMES + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_SFNT_NAMES if your applications need to */ + /* access the internal name table in a SFNT-based format like TrueType */ + /* or OpenType. The name table contains various strings used to */ + /* describe the font, like family name, copyright, version, etc. It */ + /* does not contain any glyph name though. */ + /* */ + /* Accessing SFNT names is done through the functions declared in */ + /* `freetype/ftnames.h'. */ + /* */ +#define TT_CONFIG_OPTION_SFNT_NAMES + + + /*************************************************************************/ + /* */ + /* TrueType CMap support */ + /* */ + /* Here you can fine-tune which TrueType CMap table format shall be */ + /* supported. */ +#define TT_CONFIG_CMAP_FORMAT_0 +#define TT_CONFIG_CMAP_FORMAT_2 +#define TT_CONFIG_CMAP_FORMAT_4 +#define TT_CONFIG_CMAP_FORMAT_6 +#define TT_CONFIG_CMAP_FORMAT_8 +#define TT_CONFIG_CMAP_FORMAT_10 +#define TT_CONFIG_CMAP_FORMAT_12 + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T R U E T Y P E D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ + /* a bytecode interpreter in the TrueType driver. Note that there are */ + /* important patent issues related to the use of the interpreter. */ + /* */ + /* 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 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 */ + /* architectures. */ + /* */ + /* Note however that on some compiler/processor combinations, undefining */ + /* this macro will generate faster, though larger, code. */ + /* */ +#define TT_CONFIG_OPTION_INTERPRETER_SWITCH + + + /*************************************************************************/ + /* */ + /* Define TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED to compile the */ + /* TrueType glyph loader to use Apple's definition of how to handle */ + /* component offsets in composite glyphs. */ + /* */ + /* Apple and MS disagree on the default behavior of component offsets */ + /* in composites. Apple says that they should be scaled by the scale */ + /* factors in the transformation matrix (roughly, it's more complex) */ + /* while MS says they should not. OpenType defines two bits in the */ + /* composite flags array which can be used to disambiguate, but old */ + /* fonts will not have them. */ + /* */ + /* http://partners.adobe.com/asn/developer/opentype/glyf.html */ + /* http://fonts.apple.com/TTRefMan/RM06/Chap6glyf.html */ + /* */ +#undef TT_CONFIG_OPTION_COMPONENT_OFFSET_SCALED + + + /*************************************************************************/ + /*************************************************************************/ + /**** ****/ + /**** T Y P E 1 D R I V E R C O N F I G U R A T I O N ****/ + /**** ****/ + /*************************************************************************/ + /*************************************************************************/ + + + /*************************************************************************/ + /* */ + /* T1_MAX_DICT_DEPTH is the maximal depth of nest dictionaries and */ + /* arrays in the Type 1 stream (see t1load.c). A minimum of 4 is */ + /* required. */ + /* */ +#define T1_MAX_DICT_DEPTH 5 + + + /*************************************************************************/ + /* */ + /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine */ + /* calls during glyph loading. */ + /* */ +#define T1_MAX_SUBRS_CALLS 16 + + + /*************************************************************************/ + /* */ + /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity. A */ + /* minimum of 16 is required. */ + /* */ + /* The Chinese font MingTiEG-Medium (CNS 11643 character set) needs 256. */ + /* */ +#define T1_MAX_CHARSTRINGS_OPERANDS 256 + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of `t1afm', which is in charge of reading Type 1 AFM */ + /* files into an existing face. Note that if set, the T1 driver will be */ + /* unable to produce kerning distances. */ + /* */ +#undef T1_CONFIG_OPTION_NO_AFM + + + /*************************************************************************/ + /* */ + /* Define this configuration macro if you want to prevent the */ + /* compilation of the Multiple Masters font support in the Type 1 */ + /* driver. */ + /* */ +#undef T1_CONFIG_OPTION_NO_MM_SUPPORT + + /* */ + +/* + * 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 - #endif /* FT_CONFIG_OPTION_CHESTER_HINTS */ +#endif /* FT_CONFIG_OPTION_CHESTER_HINTS */ FT_END_HEADER Index: xc/extras/freetype2/include/freetype/config/ftstdlib.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/config/ftstdlib.h,v retrieving revision 1.2 diff -u -r1.2 ftstdlib.h --- a/xc/extras/freetype2/include/freetype/config/ftstdlib.h 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/config/ftstdlib.h 28 Apr 2004 10:25:09 -0000 @@ -5,7 +5,7 @@ /* ANSI-specific library and header configuration file (specification */ /* only). */ /* */ -/* Copyright 2002, 2003 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, */ @@ -82,16 +82,18 @@ #include <string.h> -#define ft_strlen strlen +#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_strncmp strncmp -#define ft_memcpy memcpy #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> @@ -110,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 /**********************************************************************/ Index: xc/extras/freetype2/include/freetype/internal/ftcalc.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/ftcalc.h,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 ftcalc.h --- a/xc/extras/freetype2/include/freetype/internal/ftcalc.h 14 Nov 2003 16:48:24 -0000 1.1.1.1 +++ b/xc/extras/freetype2/include/freetype/internal/ftcalc.h 28 Apr 2004 10:25:09 -0000 @@ -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 @@ /*************************************************************************/ +#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 ) Index: xc/extras/freetype2/include/freetype/internal/ftdebug.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/ftdebug.h,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 ftdebug.h --- a/xc/extras/freetype2/include/freetype/internal/ftdebug.h 25 Nov 2003 19:27:18 -0000 1.1.1.2 +++ b/xc/extras/freetype2/include/freetype/internal/ftdebug.h 28 Apr 2004 10:25:10 -0000 @@ -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 @@ /*************************************************************************/ /* */ + /* <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 )) */ Index: xc/extras/freetype2/include/freetype/internal/ftdriver.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/ftdriver.h,v retrieving revision 1.2 diff -u -r1.2 ftdriver.h --- a/xc/extras/freetype2/include/freetype/internal/ftdriver.h 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/internal/ftdriver.h 28 Apr 2004 10:25:10 -0000 @@ -155,11 +155,15 @@ /* 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 */ Index: xc/extras/freetype2/include/freetype/internal/ftgloadr.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/ftgloadr.h,v retrieving revision 1.2 diff -u -r1.2 ftgloadr.h --- a/xc/extras/freetype2/include/freetype/internal/ftgloadr.h 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/internal/ftgloadr.h 28 Apr 2004 10:25:10 -0000 @@ -110,15 +110,15 @@ 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 ); Index: xc/extras/freetype2/include/freetype/internal/ftmemory.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/ftmemory.h,v retrieving revision 1.2 diff -u -r1.2 ftmemory.h --- a/xc/extras/freetype2/include/freetype/internal/ftmemory.h 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/internal/ftmemory.h 28 Apr 2004 10:25:10 -0000 @@ -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, */ @@ -180,6 +180,12 @@ #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) ) ) + /*************************************************************************/ /* */ Index: xc/extras/freetype2/include/freetype/internal/ftobjs.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/ftobjs.h,v retrieving revision 1.2 diff -u -r1.2 ftobjs.h --- a/xc/extras/freetype2/include/freetype/internal/ftobjs.h 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/internal/ftobjs.h 28 Apr 2004 10:25:11 -0000 @@ -4,7 +4,7 @@ /* */ /* The FreeType private base classes (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003 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, */ @@ -64,19 +64,21 @@ /*************************************************************************/ /* */ /* 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 ) /*************************************************************************/ Index: xc/extras/freetype2/include/freetype/internal/ftrfork.h =================================================================== RCS file: xc/extras/freetype2/include/freetype/internal/ftrfork.h diff -N xc/extras/freetype2/include/freetype/internal/ftrfork.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/include/freetype/internal/ftrfork.h 28 Apr 2004 10:25:11 -0000 @@ -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 */ Index: xc/extras/freetype2/include/freetype/internal/ftserv.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/ftserv.h,v retrieving revision 1.2 diff -u -r1.2 ftserv.h --- a/xc/extras/freetype2/include/freetype/internal/ftserv.h 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/internal/ftserv.h 28 Apr 2004 10:25:11 -0000 @@ -248,6 +248,7 @@ #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> /* */ Index: xc/extras/freetype2/include/freetype/internal/ftstream.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/ftstream.h,v retrieving revision 1.1.1.2 diff -u -r1.1.1.2 ftstream.h --- a/xc/extras/freetype2/include/freetype/internal/ftstream.h 25 Nov 2003 19:27:18 -0000 1.1.1.2 +++ b/xc/extras/freetype2/include/freetype/internal/ftstream.h 28 Apr 2004 10:25:12 -0000 @@ -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 @@ #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, Index: xc/extras/freetype2/include/freetype/internal/fttrace.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/fttrace.h,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 fttrace.h --- a/xc/extras/freetype2/include/freetype/internal/fttrace.h 14 Nov 2003 16:48:24 -0000 1.1.1.1 +++ b/xc/extras/freetype2/include/freetype/internal/fttrace.h 28 Apr 2004 10:25:12 -0000 @@ -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( 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) */ Index: xc/extras/freetype2/include/freetype/internal/internal.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/internal.h,v retrieving revision 1.2 diff -u -r1.2 internal.h --- a/xc/extras/freetype2/include/freetype/internal/internal.h 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/internal/internal.h 28 Apr 2004 10:25:12 -0000 @@ -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, */ @@ -15,6 +15,7 @@ /* */ /***************************************************************************/ + /*************************************************************************/ /* */ /* This file is automatically included by `ft2build.h'. */ @@ -33,6 +34,7 @@ #define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h> #define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.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> Index: xc/extras/freetype2/include/freetype/internal/psaux.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/psaux.h,v retrieving revision 1.2 diff -u -r1.2 psaux.h --- a/xc/extras/freetype2/include/freetype/internal/psaux.h 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/internal/psaux.h 28 Apr 2004 10:25:13 -0000 @@ -124,7 +124,7 @@ 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; @@ -658,7 +658,7 @@ 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; Index: xc/extras/freetype2/include/freetype/internal/sfnt.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/sfnt.h,v retrieving revision 1.2 diff -u -r1.2 sfnt.h --- a/xc/extras/freetype2/include/freetype/internal/sfnt.h 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/internal/sfnt.h 28 Apr 2004 10:25:14 -0000 @@ -4,7 +4,7 @@ /* */ /* High-level `sfnt' driver interface (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003 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, */ @@ -243,6 +243,76 @@ /*************************************************************************/ /* */ /* <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> */ @@ -250,20 +320,27 @@ /* 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 */ @@ -307,8 +384,8 @@ /* */ 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 ); @@ -364,57 +441,6 @@ /*************************************************************************/ /* */ /* <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> */ @@ -503,6 +529,8 @@ /* 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; @@ -510,10 +538,6 @@ 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; Index: xc/extras/freetype2/include/freetype/internal/t1types.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/t1types.h,v retrieving revision 1.2 diff -u -r1.2 t1types.h --- a/xc/extras/freetype2/include/freetype/internal/t1types.h 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/internal/t1types.h 28 Apr 2004 10:25:14 -0000 @@ -5,7 +5,7 @@ /* Basic Type1/Type2 type definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2001, 2002, 2003 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, */ @@ -102,12 +102,12 @@ 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; @@ -142,17 +142,6 @@ /*************************************************************************/ - /*************************************************************************/ - /* */ - /* 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; @@ -184,6 +173,8 @@ 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 */ Index: xc/extras/freetype2/include/freetype/internal/tttypes.h =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/tttypes.h,v retrieving revision 1.2 diff -u -r1.2 tttypes.h --- a/xc/extras/freetype2/include/freetype/internal/tttypes.h 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/include/freetype/internal/tttypes.h 28 Apr 2004 10:25:16 -0000 @@ -108,41 +108,6 @@ /*************************************************************************/ /* */ /* <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 @@ /*************************************************************************/ /* */ /* <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 @@ /*************************************************************************/ /*** ***/ /*** ***/ - /*** 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 @@ /* 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 @@ 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 @@ /* 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 */ @@ -1648,11 +1342,15 @@ 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; Index: xc/extras/freetype2/include/freetype/internal/services/svttcmap.h =================================================================== RCS file: xc/extras/freetype2/include/freetype/internal/services/svttcmap.h diff -N xc/extras/freetype2/include/freetype/internal/services/svttcmap.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/include/freetype/internal/services/svttcmap.h 28 Apr 2004 10:25:16 -0000 @@ -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 */ Index: xc/extras/freetype2/src/autofit/Jamfile =================================================================== RCS file: xc/extras/freetype2/src/autofit/Jamfile diff -N xc/extras/freetype2/src/autofit/Jamfile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/src/autofit/Jamfile 28 Apr 2004 10:25:16 -0000 @@ -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 Index: xc/extras/freetype2/src/autofit/afangles.c =================================================================== RCS file: /cvs/xorg/xc/extras/freetype2/src/autofit/afangles.c,v retrieving revision 1.2 diff -u -r1.2 afangles.c --- a/xc/extras/freetype2/src/autofit/afangles.c 23 Apr 2004 18:42:46 -0000 1.2 +++ b/xc/extras/freetype2/src/autofit/afangles.c 28 Apr 2004 10:25:17 -0000 @@ -2,13 +2,15 @@ /* 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 + 90, 64, 38, 20, 10, 5, 3, 1, 1 }; + static FT_Int af_angle_prenorm( FT_Vector* vec ) { @@ -115,9 +117,9 @@ /* round theta */ if ( theta >= 0 ) - theta = ( theta + 2 ) & -4; + theta = FT_PAD_ROUND( theta, 4 ); else - theta = - (( -theta + 2 ) & -4); + theta = - FT_PAD_ROUND( theta, 4 ); vec->x = x; vec->y = theta; @@ -151,14 +153,62 @@ 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; + } + } + } Index: xc/extras/freetype2/src/autofit/afdummy.c =================================================================== RCS file: xc/extras/freetype2/src/autofit/afdummy.c diff -N xc/extras/freetype2/src/autofit/afdummy.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/src/autofit/afdummy.c 28 Apr 2004 10:25:17 -0000 @@ -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 + }; Index: xc/extras/freetype2/src/autofit/afdummy.h =================================================================== RCS file: xc/extras/freetype2/src/autofit/afdummy.h diff -N xc/extras/freetype2/src/autofit/afdummy.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/src/autofit/afdummy.h 28 Apr 2004 10:25:17 -0000 @@ -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__ */ Index: xc/extras/freetype2/src/autofit/afglobal.c =================================================================== RCS file: xc/extras/freetype2/src/autofit/afglobal.c diff -N xc/extras/freetype2/src/autofit/afglobal.c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/src/autofit/afglobal.c 28 Apr 2004 10:25:17 -0000 @@ -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; + } Index: xc/extras/freetype2/src/autofit/afglobal.h =================================================================== RCS file: xc/extras/freetype2/src/autofit/afglobal.h diff -N xc/extras/freetype2/src/autofit/afglobal.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ b/xc/extras/freetype2/src/autofit/afglobal.h 28 Apr 2004 10:25:17 -0000 @@ -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__ */