From 11edbc3a818e15ea2b622b31e6f87159ee68ae4a Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sat, 28 Jun 2008 15:34:50 -0400 Subject: Do not call FT_Get_BDF_Charset_ID() if configured with --disable-bdfformat MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When I configure libXfont-1.3.2 with --disable-bdfformat and link it against FreeType that is built without BDF support, I get the following link error: libXfont.so: undefined reference to ‘FT_Get_BDF_Charset_ID’ I fixed it by checking XFONT_BDFFORMAT and if BDF support is disabled, the call to FT_Get_BDF_Charset_ID() is omitted and the result code is set as if the call had failed. Signed-off-by: James Cloos --- src/FreeType/ftenc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/FreeType/ftenc.c b/src/FreeType/ftenc.c index a9d6494..f6436fc 100644 --- a/src/FreeType/ftenc.c +++ b/src/FreeType/ftenc.c @@ -86,7 +86,11 @@ FTPickMapping(char *xlfd, int length, char *filename, FT_Face face, symbol = FTEncFontSpecific(encoding_name); +#if XFONT_BDFFORMAT ftrc = FT_Get_BDF_Charset_ID(face, &enc, ®); +#else + ftrc = -1; +#endif if(ftrc == 0) { /* Disable reencoding for non-Unicode fonts. This will currently only work for BDFs. */ -- cgit v1.2.3