Ok, first, I had to edit gdttf.c and change:
#if HAVE_LIBTTF && !defined(USE_GD_IMGSTRTTF)
to:
#if (HAVE_LIBTTF|HAVE_FREETYPE) && !defined(USE_GD_IMGSTRTTF)
Next I was getting complaints about not finding freetype.h. I edited the
configure script and fixed what I guess was a typo:
FREETYPE2_INC_DIR="$i/include/freetype/freetype2"
to
FREETYPE2_INC_DIR="$i/include/freetype2/freetype"
Then I started getting errors about freetype/config/ftheader.h not existing.
So, I hand edited config_vars.mk and added -I/usr/local/include/freetype2.
It found the file fine then.
Now I get massive parse errors.
gdttf.c:74: parse error before `TT_Engine'
gdttf.c:74: warning: no semicolon at end of struct or union
gdttf.c:75: warning: type defaults to `int' in declaration of `face'
gdttf.c:75: warning: data definition has no type or storage class
gdttf.c:76: parse error before `properties'
gdttf.c:76: warning: type defaults to `int' in declaration of `properties'
gdttf.c:76: warning: data definition has no type or storage class
gdttf.c:77: parse error before `instance'
gdttf.c:77: warning: type defaults to `int' in declaration of `instance'
gdttf.c:77: warning: data definition has no type or storage class
gdttf.c:78: parse error before `char_map_Unicode'
gdttf.c:78: warning: type defaults to `int' in declaration of
`char_map_Unicode'
gdttf.c:78: warning: data definition has no type or storage class
gdttf.c:79: parse error before `char_map_Big5'
gdttf.c:79: warning: type defaults to `int' in declaration of
`char_map_Big5'
gdttf.c:79: warning: data definition has no type or storage class
gdttf.c:80: parse error before `char_map_Roman'
gdttf.c:80: warning: type defaults to `int' in declaration of
`char_map_Roman'
gdttf.c:80: warning: data definition has no type or storage class
gdttf.c:84: parse error before `matrix'
gdttf.c:84: warning: type defaults to `int' in declaration of `matrix'
gdttf.c:84: warning: data definition has no type or storage class
gdttf.c:85: parse error before `imetrics'
gdttf.c:85: warning: type defaults to `int' in declaration of `imetrics'
gdttf.c:85: warning: data definition has no type or storage class
gdttf.c:87: parse error before `}'
gdttf.c:87: warning: type defaults to `int' in declaration of `font_t'
gdttf.c:87: warning: data definition has no type or storage class
gdttf.c:93: parse error before `TT_Engine'
gdttf.c:93: warning: no semicolon at end of struct or union
gdttf.c:94: warning: type defaults to `int' in declaration of `fontkey_t'
gdttf.c:94: warning: data definition has no type or storage class
gdttf.c:99: parse error before `TT_Glyph'
gdttf.c:99: warning: no semicolon at end of struct or union
gdttf.c:100: warning: type defaults to `int' in declaration of `metrics'
gdttf.c:100: warning: data definition has no type or storage class
gdttf.c:101: parse error before `outline'
gdttf.c:101: warning: type defaults to `int' in declaration of `outline'
gdttf.c:101: warning: data definition has no type or storage class
gdttf.c:102: parse error before `oldx'
gdttf.c:102: warning: type defaults to `int' in declaration of `oldx'
gdttf.c:102: warning: type defaults to `int' in declaration of `oldy'
gdttf.c:102: warning: data definition has no type or storage class
gdttf.c:103: parse error before `Bit'
gdttf.c:103: warning: type defaults to `int' in declaration of `Bit'
gdttf.c:103: warning: data definition has no type or storage class
gdttf.c:107: parse error before `}'
gdttf.c:107: warning: type defaults to `int' in declaration of `glyph_t'
gdttf.c:107: warning: data definition has no type or storage class
gdttf.c:113: parse error before `font_t'
gdttf.c:113: warning: no semicolon at end of struct or union
gdttf.c:114: warning: type defaults to `int' in declaration of `glyphkey_t'
gdttf.c:114: warning: data definition has no type or storage class
gdttf.c:125: parse error before `glyph_t'
gdttf.c:125: warning: no semicolon at end of struct or union
gdttf.c:126: warning: type defaults to `int' in declaration of `bitmapkey_t'
gdttf.c:126: warning: data definition has no type or storage class
gdttf.c:154: parse error before `font_t'
gdttf.c: In function `fontTest':
gdttf.c:319: `a' undeclared (first use in this function)
gdttf.c:319: (Each undeclared identifier is reported only once
gdttf.c:319: for each function it appears in.)
gdttf.c:319: parse error before `)'
gdttf.c:320: `b' undeclared (first use in this function)
gdttf.c:320: parse error before `)'
gdttf.c:325: warning: control reaches end of non-void function
gdttf.c: In function `fontFetch':
gdttf.c:330: `TT_Error' undeclared (first use in this function)
gdttf.c:330: parse error before `err'
gdttf.c:331: `a' undeclared (first use in this function)
gdttf.c:331: warning: statement with no effect
gdttf.c:332: `b' undeclared (first use in this function)
gdttf.c:332: parse error before `)'
gdttf.c:336: parse error before `)'
gdttf.c:352: `err' undeclared (first use in this function)
gdttf.c:352: warning: implicit declaration of function `TT_Open_Face'
gdttf.c:353: `TT_Err_Could_Not_Open_File' undeclared (first use in this
function)
gdttf.c:362: warning: implicit declaration of function
`TT_Get_Face_Properties'
gdttf.c:365: warning: implicit declaration of function `TT_New_Instance'
gdttf.c:370: warning: implicit declaration of function
`TT_Set_Instance_Resolutions'
gdttf.c:373: `map_found' undeclared (first use in this function)
gdttf.c:379: warning: implicit declaration of function
`TT_Set_Instance_CharSize'
gdttf.c:379: `TT_F26Dot6' undeclared (first use in this function)
gdttf.c:384: warning: implicit declaration of function
`TT_Get_Instance_Metrics'
gdttf.c:387: `n' undeclared (first use in this function)
gdttf.c:387: warning: implicit declaration of function
`TT_Get_CharMap_Count'
gdttf.c:389: `i' undeclared (first use in this function)
gdttf.c:390: warning: implicit declaration of function `TT_Get_CharMap_ID'
gdttf.c:390: `platform' undeclared (first use in this function)
gdttf.c:390: `encoding' undeclared (first use in this function)
gdttf.c:394: warning: implicit declaration of function `TT_Get_CharMap'
gdttf.c:413: `TT_Fixed' undeclared (first use in this function)
gdttf.c: In function `fontRelease':
gdttf.c:427: `a' undeclared (first use in this function)
gdttf.c:427: parse error before `)'
gdttf.c:430: warning: implicit declaration of function `TT_Done_Instance'
gdttf.c:431: warning: implicit declaration of function `TT_Close_Face'
gdttf.c: In function `glyphTest':
gdttf.c:442: `a' undeclared (first use in this function)
gdttf.c:442: parse error before `)'
gdttf.c:443: `b' undeclared (first use in this function)
gdttf.c:443: parse error before `)'
gdttf.c:448: warning: control reaches end of non-void function
gdttf.c: In function `glyphFetch':
gdttf.c:453: `a' undeclared (first use in this function)
gdttf.c:453: warning: statement with no effect
gdttf.c:454: `b' undeclared (first use in this function)
gdttf.c:454: parse error before `)'
gdttf.c:460: parse error before `)'
gdttf.c:467: warning: implicit declaration of function `TT_New_Glyph'
gdttf.c:472: `flags' undeclared (first use in this function)
gdttf.c:472: `TTLOAD_SCALE_GLYPH' undeclared (first use in this function)
gdttf.c:474: `TTLOAD_HINT_GLYPH' undeclared (first use in this function)
gdttf.c:477: `glyph_code' undeclared (first use in this function)
gdttf.c:477: warning: implicit declaration of function `TT_Char_Index'
gdttf.c:483: `err' undeclared (first use in this function)
gdttf.c:483: warning: implicit declaration of function `TT_Load_Glyph'
gdttf.c:488: warning: implicit declaration of function
`TT_Get_Glyph_Metrics'
gdttf.c:490: warning: implicit declaration of function
`TT_Get_Glyph_Outline'
gdttf.c:491: warning: implicit declaration of function
`TT_Transform_Outline'
gdttf.c:500: `cos_a' undeclared (first use in this function)
gdttf.c:501: `sin_a' undeclared (first use in this function)
gdttf.c:502: `crect' undeclared (first use in this function)
gdttf.c:518: `TT_Flow_Up' undeclared (first use in this function)
gdttf.c: In function `glyphRelease':
gdttf.c:538: `a' undeclared (first use in this function)
gdttf.c:538: parse error before `)'
gdttf.c:541: warning: implicit declaration of function `TT_Done_Glyph'
gdttf.c: In function `bitmapTest':
gdttf.c:552: `b' undeclared (first use in this function)
gdttf.c:552: parse error before `)'
gdttf.c: In function `bitmapFetch':
gdttf.c:565: `b' undeclared (first use in this function)
gdttf.c:565: parse error before `)'
gdttf.c:575: warning: implicit declaration of function `TT_Get_Glyph_Pixmap'
gdttf.c:579: warning: implicit declaration of function `TT_Get_Glyph_Bitmap'
gdttf.c: At top level:
gdttf.c:650: parse error before `font_t'
gdttf.c: In function `gdttfchar':
gdttf.c:663: `glyph' undeclared (first use in this function)
gdttf.c:663: warning: statement with no effect
gdttf.c:664: `glyphkey_t' undeclared (first use in this function)
gdttf.c:664: parse error before `glyphkey'
gdttf.c:665: `bitmapkey_t' undeclared (first use in this function)
gdttf.c:677: `font' undeclared (first use in this function)
gdttf.c:678: `next' undeclared (first use in this function)
gdttf.c:695: `glyphkey' undeclared (first use in this function)
gdttf.c:698: `fg' undeclared (first use in this function)
gdttf.c:700: parse error before `)'
gdttf.c:704: `bbox' undeclared (first use in this function)
gdttf.c:705: `advance' undeclared (first use in this function)
gdttf.c:708: `im' undeclared (first use in this function)
gdttf.c:712: `bitmapkey' undeclared (first use in this function)
gdttf.c:712: `x1' undeclared (first use in this function)
gdttf.c:713: invalid operands to binary &
gdttf.c:718: `x' undeclared (first use in this function)
gdttf.c:719: `y' undeclared (first use in this function)
gdttf.c:719: invalid operands to binary &
gdttf.c:720: `tweencolorkey' undeclared (first use in this function)
gdttf.c:748: `tweencolor' undeclared (first use in this function)
gdttf.c: In function `gdttf':
gdttf.c:764: `TT_F26Dot6' undeclared (first use in this function)
gdttf.c:764: parse error before `ur_x'
gdttf.c:766: `TT_BBox' undeclared (first use in this function)
gdttf.c:766: `bbox' undeclared (first use in this function)
gdttf.c:766: warning: statement with no effect
gdttf.c:767: parse error before `double'
gdttf.c:769: `font' undeclared (first use in this function)
gdttf.c:769: warning: statement with no effect
gdttf.c:770: `fontkey_t' undeclared (first use in this function)
gdttf.c:770: parse error before `fontkey'
gdttf.c:777: `fontCache' undeclared (first use in this function)
gdttf.c:778: warning: implicit declaration of function `TT_Init_FreeType'
gdttf.c:778: `engine' undeclared (first use in this function)
gdttf.c:787: `fontkey' undeclared (first use in this function)
gdttf.c:791: parse error before `)'
gdttf.c:795: `sin_a' undeclared (first use in this function)
gdttf.c:796: `cos_a' undeclared (first use in this function)
gdttf.c:797: `advance_x' undeclared (first use in this function)
gdttf.c:797: `advance_y' undeclared (first use in this function)
gdttf.c:799: `next' undeclared (first use in this function)
gdttf.c:801: `ch' undeclared (first use in this function)
gdttf.c:817: `x1' undeclared (first use in this function)
gdttf.c:820: `error' undeclared (first use in this function)
gdttf.c:820: `advance' undeclared (first use in this function)
gdttf.c:823: `i' undeclared (first use in this function)
gdttf.c:824: `ll_x' undeclared (first use in this function)
gdttf.c:825: `ll_y' undeclared (first use in this function)
gdttf.c:826: `ur_x' undeclared (first use in this function)
gdttf.c:827: `ur_y' undeclared (first use in this function)
make[3]: *** [gdttf.lo] Error 1
make[3]: Leaving directory `/usr/src/apache/php4-200104131045/ext/gd'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/apache/php4-200104131045/ext/gd'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/apache/php4-200104131045/ext'
make: *** [all-recursive] Error 1
Brian Moon
Phorum Dev Team - Making better forums with PHP
http://phorum.org/
-------------------------------------------------------------------------
----- Original Message -----
From: "Wez Furlong" <[EMAIL PROTECTED]>
To: "Brian Moon" <[EMAIL PROTECTED]>
Sent: Friday, April 13, 2001 5:42 AM
Subject: Re: [PHP-DEV] GD 2.0.1 and FreeType 2
> Hi Brian,
>
> > A) has anyone tried PHP and gd 2.0.1?
> Yes - me.
>
> > B) If I compile gd with FreeType 2 support, do I have to compile
FreeType
> > into PHP?
> PHP needs to be linked to any and all libraries that are used by those
libraries that you use, if you get my meaning!
> If gd has a dependency on freetype, then anything that uses that gd
library will need to be linked to freetype as well.
>
> I've attached a patch that takes care of this and enables the true color
and alpha channel code, plus a handful of line style and image brush/tile
options that have so far been missing from PHP.
>
>
./configure --with-ttf=no --with-freetype-dir --with-png-dir --with-jpeg-dir
--with-gd
>
> The --with-ttf=no is there to prevent linking against the libttf if it is
installed.
>
> Please let me know how you get on with this!
>
> --Wez.
>
>
--
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]