GNU TeXmacsUser manualReferenceAboutEnglish
Building with the autotools

1.Quick start

The traditional build, described for users in the file COMPILE, is

./configure
make
make install

run from

src/

. When

configure.in

or one of the macros in

misc/m4/

has changed, configure must be regenerated first with autoreconf -fi (as in the Dockerfile). The build is done in the source tree: objects go to src/Objects/, dependency files to src/Deps/, and the binary to TeXmacs/bin/texmacs.bin.

2.Configuration

configure.in

checks the compilers (preferring clang and clang++, with Objective-C for macOS), the sizes of the basic types and a few headers, and then calls one macro per subject. The options which matter most are:

Guile

(

guile.m4

) --with-guile=path gives the guile-config program to use; --with-guile=embedded18 uses the embedded Guile 1.8 in tm-guile188/, which is also chosen automatically when that directory exists. Without either, configure looks for guile18-config, guile1.8-config, guile16-config, …, guile-config and then guile20-config and similar names. Guile 2 and later are refused unless --enable-guile2 is given. The version determines the dialect macro GUILE_A to GUILE_D; when cross compiling, it must be given in the variable GUILE_VERSION.

Graphical port

(

tm_gui.m4

,

qt.m4

) --with-gui=port chooses the port, which defines one macro:

qt

(the default) native Qt 5 or 6 widgets, QTTEXMACS. --enable-qt-new (the default on Android) compiles

Plugins/Qt6

instead of

Plugins/Qt

, and requires Qt 6.10 or later.

qtwk

Qt as a platform layer with the Widkit widgets, QTWKTEXMACS together with QTTEXMACS.

x11

The historical X11 port with Widkit, X11TEXMACS.

sdl

Widkit on SDL 3 (--with-sdl3), drawn with MuPDF, SDLTEXMACS.

vue

SDL 3 windows and widgets drawn by Clay, VUETEXMACS; with --with-thorvg=dir the GPU renderer (OpenGL and ThorVG).

cocoa, aqua

The native macOS port of

Plugins/NS

, AQUATEXMACS; it needs the macOS extensions.

SDL and Vue require MuPDF (--with-mupdf=dir,

mupdf.m4

); Qt uses it when it is found, X11 and Cocoa refuse it. --enable-qtpipes (on by default with Qt and Qtwk, refused with the other ports) replaces Unix pipes by Qt pipes. The Qt installation is found through qmake (variables QMAKE, QT_PATH, MOC, …). On macOS, the Objective-C code of

src/Plugins/MacOS

is added unless --disable-macosx-extensions is given.

Libraries

--with-freetype, --with-iconv, --with-gnutls, --with-aspell, --with-cairo, --with-imlib2, --with-resvg, --with-sparkle (automatic updates on macOS and Windows, with --with-appcast), --with-axel, --disable-gs, --disable-pdf-renderer, and the SQLite check of

sql.m4

.

Debugging and optimization

(

tm_debug.m4

,

tm_optimize.m4

) --enable-debug, --enable-assert, --enable-warnings, --enable-checks, --enable-profile, --enable-sanitizers, --enable-optimize, --disable-fastalloc (use the system allocator instead of the fast allocator for small objects, useful with memory checkers) and --enable-experimental (the style rewriting code in

src/Style/

).

Developer kit

--with-tmrepo=dir (

tm_repo.m4

) uses a TeXmacs SDK directory: its bin, include, lib and pkgconfig directories are put first in the search paths. It is also required for some packaging targets (see packages).

The platform macro (

tm_platform.m4

) chooses the operating system layer, the static or dynamic link mode (

tm_static.m4

) and the default packaging targets.

3.Generated files

configure writes src/System/config.h (from

src/System/config.in

, as declared by AC_CONFIG_HEADERS) and the files listed in AC_CONFIG_FILES, among which:

None of these generated files is under version control; only their templates (*.in) are.

4.Makefile targets

The top level Makefile (from

Makefile.in

) has the following main targets:

TEXMACS

(the default) Builds the embedded Guile if needed and then the binary through src/makefile.

STATIC_TEXMACS

A statically linked binary.

deps

Regenerates the dependency files.

GLUE

Regenerates the Scheme glue (src/Scheme/Glue/glue_*.cpp), see the Scheme glue. In src/makefile, a glue file also depends on its build-glue-*.scm declaration file, so the glue is regenerated automatically when the dependency files are up to date.

PLUGINS, EX_PLUGINS

The binaries of the plug-ins in

plugins/

and of the example plug-ins.

install, uninstall

Installation into the prefix: executables, data, plug-ins, icons, desktop files, include files and manual pages.

PACKAGE, BUNDLE

The default package and application bundle of the platform; see packages for the various platforms.

clean, distclean

Remove the objects; distclean also removes the embedded Guile build, the makefiles, the configuration headers, the scripts and the manual page (but not the generated package descriptions in

packages/

).

5.Pitfalls

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with no Invariant Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License".