[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (ft-dev) Re: [Devel] use of zlib
From: |
Jacob (=Jouk) Jansen |
Subject: |
Re: (ft-dev) Re: [Devel] use of zlib |
Date: |
Tue, 5 Nov 2002 15:27:51 +0100 (MET) |
David Turner wrote on 5-NOV-2002 10:51:39.19
>Jacob (=Jouk) Jansen wrote:
>> Hi All,
>>
>> in src/gzip/ftgzip.c it is stated :
>> # if 1 /* we choose to include directly the zlib sources in this component
>> */
>> /* this is done to avoid ugly library dependencies
>> */
>>
>>
>> This statement is rather taste/system dependend. The solution chosen here
>> is quite ugly for OpenVMS: when you try to use the freetype2 library in one
>> program together with code where the original zlib is required one get a lot
>> of warnings about externals which are multiple defined in the libraries.
>> Ofcourse one can solve it by "prefix" all the zlib routines in ft's zlib.
>> However : -the list in zconf.h is not complete and has to maintained every
>> time zlib is upgraded.
>> -the executables become larger since much code is included twice,
>> without any gain in performance.
>>
>
>I know it's not optimal, but external library dependencies are a nightmare to
>support on multiple platforms; I also really despise Autoconf and don't want
>to touch a single line of this atrocity. That's why I did ask in this list
>for a volunteer to deal with this issue before committing the changes :o)
>
>Let me propose you a sort of "deal":
>
> A - I modify FreeType in order to:
>
> * move the zlib sources from "src/gzip" to another
> place, like "extras/zlib" for example.
OK
> * provide a new configuration macro, like
> FT_CONFIG_OPTION_SYSTEM_ZLIB (defined in "ftoption.h")
>
> * modify "src/gzip/ftgzip.c" and/or the build system
> to include the files in "extras/zlib" *OR* to use
> the system zlib when the configuration macro is
> defined.
I think the "include-option" (i.e. -I for Unix) in the make file should point
to the correct directory. So the sources do not have to know which version
it is. So splitting the sources should be sufficient.
> B - someone (that means you, or someone else), provides patches
> to perform the latter:
>
> - modify builds/unix/configure.in to allow it to accept a
> new option, like "--with-system-zlib", with relevant
> actions on the build system.
> - provide a similar option for VMS builds (that use
> the "descrip.mms" files).
That is easy for me to do.
> - modify "freetype-config" so that it returns the correct
> library dependencies on Unix
>
> I will make the changes to the Jamfiles myself.
>
>I propose to define a build variable named "FT2_SYSTEM_ZLIB"
(in Makefile/Jamfile/descrip.mms). When defined, it should contain
the include path to the zlib header files. When not defined, the
"extras/zlib" sources should be used instead.
I do not think this is needed. see above.
>If you do part B, I'll do part A. What do you think about that ?
The OpenVMS part is easy for me. I could give the unix part a try, but I cannot
test it.
Jouk
Bush : All votes are equal but some votes are more equal than others.
>------------------------------------------------------------------------------<
Jouk Jansen
address@hidden
Technische Universiteit Delft tttttttttt uu uu ddddddd
Nationaal centrum voor HREM tttttttttt uu uu dd dd
Rotterdamseweg 137 tt uu uu dd dd
2628 AL Delft tt uu uu dd dd
Nederland tt uu uu dd dd
tel. 31-15-2782272 tt uuuuuuu ddddddd
>------------------------------------------------------------------------------<
- Re: (ft-dev) Re: [Devel] use of zlib,
Jacob (=Jouk) Jansen <=
- Re: (ft-dev) Re: [Devel] use of zlib, Jacob (=Jouk) Jansen, 2002/11/11
- Re: (ft-dev) Re: [Devel] use of zlib, Sven Neumann, 2002/11/11
- Re: (ft-dev) Re: [Devel] use of zlib, Vincent Caron, 2002/11/13
- Re: (ft-dev) Re: [Devel] use of zlib, Vincent Caron, 2002/11/13
- Re: (ft-dev) Re: [Devel] use of zlib, David Turner, 2002/11/23
- Re: (ft-dev) Re: [Devel] use of zlib, Vincent Caron, 2002/11/23
- Re: (ft-dev) Re: [Devel] use of zlib, David Turner, 2002/11/27
- Re: (ft-dev) Re: [Devel] use of zlib (patch pb), Vincent Caron, 2002/11/27