Linux-sxs.org features an informative article on how to compile Mozilla from source. Especially if you have switched to GCC 3.1, you can build some really optimized binaries for your Mozilla, as GCC 3.1 does better optimization in general, plus it supports special optimizations for Pentium4 or AthlonXP. A very simple example of how you could do that (you could add more parameters or modify to your liking or needs), is following. By exporting these variables to a terminal, you are making sure that all subsequent compilations in that session will use these optimizations. The following will work for all 686 (pentium-pro/PII/PIII etc architecture that is) CPUs and up.
export CXXFLAGS=”-O3 -march=i686 -mcpu=i686″
export CPPFLAGS=”-O3 -march=i686 -mcpu=i686″
export CFLAGS=”-O3 -march=i686 -mcpu=i686″
This will work for AthlonXPs:
export CXXFLAGS=”-O3 -march=athlon-xp -mcpu=athlon-xp”
export CPPFLAGS=”-O3 -march=athlon-xp -mcpu=athlon-xp”
export CFLAGS=”-O3 -march=athlon-xp -mcpu=athlon-xp”
And this one, for Pentium 4s:
export CXXFLAGS=”-O3 -march=pentium4 -mcpu=pentium4″
export CPPFLAGS=”-O3 -march=pentium4 -mcpu=pentium4″
export CFLAGS=”-O3 -march=pentium4 -mcpu=pentium4″
You get the idea. Other options for GCC 3.1 include i386, i486, i586, i686, pentium, pentium-mmx, pentiumpro, pentium2, pentium3, pentium4, k6, k6-2, k6-3, athlon, athlon-tbird, athlon-4, athlon-xp and athlon-mp. Get the list and additional optimization flags here.
If you got GCC 2.95.x or 2.96 (open a terminal and type: gcc -v, to check out what version you are running), I believe you are limited to these CPU types.
The Mozilla configure script as described in the Linux-sxs.org article, already contains this line:
–enable-optimize=’-O3 -march=i686 -mcpu=i686′
so, you will want to change it according to your CPU type as described above.
XFree 4.3 will have native support in its XFT library for Mozilla true type font anti-alias, but if you can’t wait till then, recompile the latest FreeType2 library by changing the #undef to #define in front of the “TT_CONFIG_OPTION_BYTECODE_INTERPRETER” line, in its [freetype2-src-dir]/include/freetype/config/ftoption.h file and then configure and compile.
Make sure you have read its unix Readme file, in order to make sure FreeType2’s ‘make install’ script will put the compiled libraries to the correct places for your distribution.
After you do all that, open up the /usr/lib/… or ~/mozilla/defaults/pref/unix.js file with a text editor and leave uncommented only this line: pref(“font.FreeType2.unhinted”, true); and hide its previous line: pref(“font.FreeType2.autohinted”, false); Then, remove the double slashes (comments) from: pref(“font.directory.truetype.2”, “/usr/X11R6/lib/X11/fonts/ttf”); and replace that last directory with the directory you have all your TTF web fonts installed on your X11 system. If you do not have the special Web Fonts installed yet, you can find them either at your C:\windows\fonts\ directory or on Microsoft’s web site as linked above.