Compilation of TeXmacs
Download the latest version of the source code.
cd into the directory where you wish to compile TeXmacs and type
tar -zxvf TeXmacs-[source version].tar.gzAll files will be unpacked into the directory TeXmacs-[version], which is the 'installation directory'; its subdirectory TeXmacs-[version] is the main 'TeXmacs directory'.
cd into the installation directory and set the environment variables by
source SETUPActually, it is a good idea to include these definitions in your .bash_profile or another personal boot script.
Build 'TeXmacs' using
makeFirst, this will build the generic preprocessors 'gencc' and 'gendep'. Next the main source will be built.
By default, we build TeXmacs using dynamically linked libraries. If you rather want to build the static version, use
make STATIC_TEXMACSIf you have already built a dynamic version of TeXmacs and if you want to replace it by a static version, you should first clean up some makefiles, libraries and binaries, and type
make OTHER make STATIC_TEXMACS
Using recent versions of the egcs compiler, it is possible to considerably speed up TeXmacs by optimizing the compilation. I personally use the following options:
export CXXFLAGS="-O3 -fexpensive-optimizations -malign-loops=2 -malign-jumps=2 -malign-functions=2"In order to build TeXmacs using these optimization flags, just type
make -eNotice that you might want to separate the compilation of the gencc preprocessor and the actual editor. In order to build the preprocessor only, type
make GENCCIn a similar fashion, you may compile the editor with debugging information. In this case, you have to use the following flags:
export CXXFLAGS=-gOther environment variables recognized during the compilation of TeXmacs are
Unfortunately, several bugs seem to persist in the egcs compiler. In order to compile TeXmacs using egcs 2.95.2, optimization and redhat linux, I had to change correct source at three places in order to avoid segmentation faults. On a SuSE linux system, I even had to change one line in order to get the non optimized program working, and I still don't manage to correctly compile the program using optimization.
A typical example of the kind of changes needed to get things working is avoiding nested expressions :
SI TER::get_length (string name) { string s= get (name)->label; return decode_length (s); }instead of
SI TER::get_length (string name) { return decode_length (get (name)->label); }