freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] FreeType 2.3.5, minor issues


From: mpsuzuki
Subject: Re: [ft-devel] FreeType 2.3.5, minor issues
Date: Fri, 4 Jan 2008 14:41:58 +0900

Hi,

Sorry for long long long lated issue.

Now, src/base/ftbase.c includes ftmac.c by

        #include <ftmac.c>

syntax. The inclusion by <> does not search the current
directory implicitly, so it requires appropriate CFLAGS
pointing the directory that has ftmac.c. I designed
builds/unix/configure.raw to set appropriate CFLAGS with
consideration of configure options (e.g. force to use
legacy QuickDraw API). In fact, before I inserted such
hook, builds/unix/configure.raw included the current
directory (e.g. freetype-x.y.z/src/base) explicitly.

There are some softwares that merges freetype2 source
codes into their own souce code tree, and sets CFLAGS by
their own mechanism, without configure.raw in freetype.

For such softwares, the simple inclusion by "" is easier
because it searches the current directory implicitly.
It is why Sean McBride asked to replace

        #include <ftmac.c>

by
        #include "ftmac.c"

The most generic advice for such softwares is "please
add -I${freetype_top_dir}/src/base to CFLAGS". In my
personal opinion, if a software designer does not use
genuine freetype configure/Jamfile/project file, he is
responsible to the setting of appropriate CFLAGS.

But I'm afraid there are too many unactively-maintained
softwares including freetype to tell that. So rewriting
ftbase.c for easy dropin-update is not meaningless, I
think. Following patch is too ugly for ftbase.c?

Other idea may be: use a macro FT_MAC_C to include non-
default (legacy) ftmac.c and expects builds/unix/configure.raw
to define it. If it's not defined, include default
(Mac OS X-only) src/base/ftmac.c.

Index: src/base/ftbase.c
===================================================================
RCS file: /sources/freetype/freetype2/src/base/ftbase.c,v
retrieving revision 1.25
diff -u -r1.25 ftbase.c
--- src/base/ftbase.c   8 Feb 2007 08:54:09 -0000       1.25
+++ src/base/ftbase.c   4 Jan 2008 05:00:53 -0000
@@ -32,7 +32,12 @@
 #include "ftutil.c"
 
 #if defined( __APPLE__ ) && !defined ( DARWIN_NO_CARBON )
-#include <ftmac.c>
+#if defined( HAVE_FSSPEC ) || defined( HAVE_FSREF ) || defined( HAVE_ATS ) \
+ || defined( HAVE_QUICKDRAW_TOOLBOX ) || defined( HAVE_QUICKDRAW_CARBON )
+#include <ftmac.c> /* legacy ftmac.c in builds/mac/ */
+#else
+#include "ftmac.c" /* Mac OS X only */
+#endif
 #endif
 
 /* END */








On Fri, 06 Jul 2007 10:38:57 +0900
suzuki toshiya <address@hidden> wrote:

>Hi,
>
>Sean McBride wrote:
>> 2) ftbase.c #includes a bunch of source files.  It uses "" for all of
>> them except ftmac.c where it uses <> instead... why?  In VTK I need to
>> change this to "" for it to build.
>>   
>
>The inclusion of ftmac.c was changed when I divided ftmac.c into
>OSX-only ftmac.c and legacy-unified ftmac.c.
>
>http://cvs.savannah.gnu.org/viewvc/freetype/freetype2/src/base/ftbase.c?r1=1.23&r2=1.24
>
>By changing from "ftmac.c" to <ftmac.c>, adding compiler flag
>-Ibuilds/mac/ in configure script can switch the used ftmac.c
>from src/base/ftmac.c to builds/mac/ftmac.c.
>
>However, your trouble in building VTK is not what I wanted to
>do, so I will fix it soon. As other source files are included
>by "", ftmac.c should be included by #include "ftmac.c".
>Thank you for pointing out.
>
>Regards,
>mpsuzuki
>
>
>_______________________________________________
>Freetype-devel mailing list
>address@hidden
>http://lists.nongnu.org/mailman/listinfo/freetype-devel


-- 
鈴木




reply via email to

[Prev in Thread] Current Thread [Next in Thread]