Closed
Bug 116148
Opened 24 years ago
Closed 24 years ago
review config changes for FreeType checking
Categories
(Core :: Internationalization, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bstell, Assigned: bstell)
References
Details
Attachments
(1 file, 3 obsolete files)
|
7.18 KB,
patch
|
netscape
:
review+
|
Details | Diff | Splinter Review |
this is to help manage the checking of the config changes for the FreeType2
code
| Assignee | ||
Comment 1•24 years ago
|
||
Updated•24 years ago
|
Attachment #62302 -
Flags: review+
Comment 2•24 years ago
|
||
Comment on attachment 62302 [details] [diff] [review]
patch to configure.in and config/autoconf.mk.in
bstell: thanks for explaining the patch for me.
/r=yokoyama
Comment 4•24 years ago
|
||
See http://www.mozilla.org/hacking/reviewers.html#exceptions where cls is
listed. You need only his r= to check in autoconf changes.
/be
Comment 5•24 years ago
|
||
Comment on attachment 62302 [details] [diff] [review]
patch to configure.in and config/autoconf.mk.in
Why is FREETYPE2_INCLUDES being hardcoded to /usr/local/include/freetype2 ?
Arguably, that's
not going to be the standard location on any system. I'd rather we go the
JPEG_CFLAGS/PNG_CFLAGS route and add a flag or --with-freetype2-dir or just
skip checking that optional directory all together and let people set CPPFLAGS
appropriately.
And this patch only covers the headers. You'll need to explicitly check for
the freetype2 libraries as well.
I don't think this should be on by default as it will add an additional library
dependency to the build if the builder has the library installed. What's the
gain of having this on by default?
Attachment #62302 -
Flags: needs-work+
| Assignee | ||
Comment 6•24 years ago
|
||
> this patch only covers the headers. You'll need to explicitly
> check for the freetype2 libraries as well.
Because I expect that many systems will not have libfreetype this
code does not use ld link it in. Directly linking it in as a
shared library would cause moz to fail to start on those systems.
Instead, at run time the code uses PR_LoadLibrary to check for
the library and if found the code uses PR_FindFunctionSymbol to
resolve the needed functions.
Thus only the header files are needed at build time. Since the
existance of the library is not required on the build system do we
still want to test for it?
> I don't think this should be on by default as it will add an
> additional library dependency to the build if the builder has
> the library installed.
I believe the use of PR_LoadLibrary/PR_FindFunctionSymbol
addresses this. If I am missing something would you kindly let
me know?
In the long term FreeType we want TrueType to be a standard
feature on Linux/Unix moz. Hence the FreeType2 dev env should be
a requirement for all development systems. However, I did not want to
force those developer's builds to immediately upgrade their
systems. So I added these changes to configure.in so the build
would continue to work in the absence of a FreeType dev env.
> Why is FREETYPE2_INCLUDES being hardcoded to
> /usr/local/include/freetype2 ? Arguably, that's not going to be
> the standard location on any system. I'd rather we go the
> JPEG_CFLAGS/PNG_CFLAGS route and add a flag or --with-freetype2-dir
> or just skip checking that optional directory all together and
> let people set CPPFLAGS appropriately.
Let me take a look at this.
| Assignee | ||
Comment 7•24 years ago
|
||
I revised it to use `freetype-config --cflags`
Comment 8•24 years ago
|
||
> Instead, at run time the code uses PR_LoadLibrary to check for
> the library and if found the code uses PR_FindFunctionSymbol to
> resolve the needed functions.
However, there is a huge effort by our performance team to switch us to
distributing "static" builds by default. In that case, every dependent library
will be linked directly against the application.
> Thus only the header files are needed at build time. Since the
> existance of the library is not required on the build system do we
> still want to test for it?
You still need to check for the libraries at configure time if you intend to use
them in the build at all.
> In the long term FreeType we want TrueType to be a standard
> feature on Linux/Unix moz. Hence the FreeType2 dev env should be
> a requirement for all development systems.
The build pages should be updated and the newsgroups should be informed when it
becomes a hard standard. What's the timeframe for requiring the upgrade? Is
there any effect on servers w/o TTF support?
> However, I did not want to
> force those developer's builds to immediately upgrade their
> systems. So I added these changes to configure.in so the build
> would continue to work in the absence of a FreeType dev env.
Unless someone has a better argument, I'll leave it up to the distributors to
disable the feature if they feel their target audience won't have required
dependencies.
Comment 9•24 years ago
|
||
Comment on attachment 63631 [details] [diff] [review]
patch; revised configure.in, config/autoconf.mk.in
I'm suprised that freetype doesn't come with a .m4 file since it has a -config
script. You should follow the basic example of build/autoconf/nspr.m4 and add
at least a AC_PATH_PROG check for freetype-config . It's probably in another
bug but I don't see where the freetype libs are set or would be used.
Attachment #63631 -
Flags: needs-work+
| Assignee | ||
Comment 10•24 years ago
|
||
I'm certianly not an expert on autoconf so please bear with me as I stumble
through this.
I found a aclocal.m4
http://www.freetype.org/cgi-bin/viewcvs.cgi/freetype2/builds/unix/
Comment 11•24 years ago
|
||
aclocal.m4 is used when building freetype itself. The freetype2.m4 file on that
same page is what we want. (I wonder why it's not part of the RH7.2 rpm)
Copy freetype2.m4 into mozilla/build/autoconf
Add the include for freetype2.m4 into mozilla/aclocal.m4
Then follow the AM_PATH_NSPR example in configure.in to add the AC_CHECK_FT2()
check to set the HAVE_FREETYPE2 default.
| Assignee | ||
Comment 12•24 years ago
|
||
thanks
| Assignee | ||
Comment 13•24 years ago
|
||
> However, there is a huge effort by our performance team to switch
> us to distributing "static" builds by default. In that case, every
> dependent library will be linked directly against the application.
Okay, then I will need to support both static linking and run time
linking. Is there a single flag that indicates a static build or
should I add a configure option such as "--static-freetype2" ?
Once I add this to configure I will add macros that allow the
compiler to directly call the functions (static link) or
indirectly call the functions (run time link).
> The build pages should be updated and the newsgroups should be
> informed when it becomes a hard standard. What's the timeframe for
> requiring the upgrade?
My main goal is to get this feature in for Moz 1.0. Requiring
all developers to upgrade could occur at any convenient time.
> Is there any effect on servers w/o TTF support?
This is scrictly client side and designed to work with older
X servers. If I have missed your question please restate it.
> > However, I did not want to
> > force those developer's builds to immediately upgrade their
> > systems. So I added these changes to configure.in so the build
> > would continue to work in the absence of a FreeType dev env.
>
> Unless someone has a better argument, I'll leave it up to the
> distributors to disable the feature if they feel their target
> audience won't have required dependencies.
I'm confused. I was talking about not breaking the build for
developers without FreeType2 installed; eg: immediately forcing
them to upgrade. Is your statement about developers or end users?
Comment 14•24 years ago
|
||
I'm not sure if you need to worry about the "static" linking condition other
than acknowledging that it exists. I put static in quotes because it's not a
completely static binary. Only internal libraries are linked statically and
even nspr & xpcom are exceptions to that rule. The option to link statically
against freetype would be nice but not required .
My previous statement was about users getting hit with the additional dependency
because a developer/distributor wasn't aware of the additional conditional
dependency since it would be auto-detected. That's probably not sure a big deal
for us since our distribution builds are made on stock RH6.2 boxes which don't
have the library.
Comment 15•24 years ago
|
||
Cc'ing blizzard, who may be able to answer cls's parenthetical question in the
first paragraph in comment #11.
/be
| Assignee | ||
Comment 16•24 years ago
|
||
re: static linking. An advantage of static linked is that way we do not
have to work out how to support users with older OSes (eg: Redhat 6.2).
A disadvantage of static linking is that due to patent issues we might
have to supply 2 versions:
with TrueType hinting:
for those people who have the right to use this patented technology
without TrueType hinting:
for those people who do not have the right to use this patented technology
| Assignee | ||
Comment 17•24 years ago
|
||
how does this look?
Attachment #62302 -
Attachment is obsolete: true
Attachment #63631 -
Attachment is obsolete: true
| Assignee | ||
Updated•24 years ago
|
Attachment #63900 -
Flags: needs-work+
| Assignee | ||
Comment 18•24 years ago
|
||
this patch is working
Attachment #63900 -
Attachment is obsolete: true
Comment 19•24 years ago
|
||
Comment on attachment 63928 [details] [diff] [review]
patch including fixed freetype2.m4
Bash 1.x used = instead of == to test for equivalence. Fix that and r=cls.
Nice work.
Attachment #63928 -
Flags: review+
| Assignee | ||
Comment 20•24 years ago
|
||
checked in
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
URL: http://http://
You need to log in
before you can comment on or make changes to this bug.
Description
•