Build a MathML-enabled Mozilla
Roger B. Sidje <rbs@maths.uq.edu.au>
Starting with milestone m0.9.9, MathML became a default part of official mozilla.org builds on Windows and Linux. It was subsequently enabled by default on the Mac with milestone m1.1. Official mozilla.org releases now have MathML support by default.
OUTDATED: old notes when MathML wasn't enabled by default
This is a summary of the build rules to get a MathML-enabled
Mozilla binary on
Win32 and
Linux.
If you already have a build environment for Mozilla, it is
straightforward to enable MathML in your build and to try out the
examples in the mozilla/layout/mathml/tests
directory.
If you want to try your own examples,
see this simple cross-browser example.
Remember this is work in progress (WIP), not everything works flawlessly.
If you do not yet have a build environment for Mozilla, you must
first download the source
and make sure that it compiles and runs normally
(MathML is not part of the build by default). Proceed as indicated
below to enable MathML in your build.
For Mac users
Follow bug 74821 and bug 70161For Windows users
- Activate MathML
> set MOZ_MATHML=1
- Rebuild only the necessary part
> cd %MOZ_SRC%\mozilla\intl\uconv\ucvmath
> nmake makefile.win
> cd %MOZ_SRC%\mozilla\gfx
> nmake -f makefile.win clean
> nmake makefile.win
> cd %MOZ_SRC%\mozilla\layout
> nmake -f makefile.win clean
> nmake makefile.win
For Linux users
- Activate MathML
% cd $MOZ_SRC/mozilla
% ./configure --enable-mathml
- Rebuild only the necessary part
% cd $MOZ_SRC/mozilla/intl/uconv/ucvmath; gmake
% cd $MOZ_SRC/mozilla/gfx; gmake clean; gmake
% cd $MOZ_SRC/mozilla/layout; gmake clean; gmake
IMPORTANT NOTES
- Keeping MathML automatically enabled
To keep MathML enabled on Linux, a simple approach is to add
ac_add_options --enable-mathml
in$MOZ_HOME/.mozconfig
.
(see the Unix Build Configurator and the Detailed Unix Build Instructions for extra hacks).
- Building an official MathML-enabled Milestone
There are additional options if you wish to build an official MathML-enabled Milestone that can be redistributed via ftp.mozilla.org.