Skip to content

Building with Autotools

Gerald Nunn edited this page Oct 1, 2018 · 10 revisions

Note that Autotools is deprecated in favor of Meson and will be replaced in the future, however Tilix will support both for the next release (1.8.7) to give people time to transition but removed in the 1.8.9 timeframe.

Building with Autotools

Requirements

  • autoconf >= 2.69, automake >= 1.15, gettext >= 0.19.7 and po4a >= 0.48 (may work with older versions, but not tested)
  • D compiler executable is in the $PATH (currently, only DMD and LDC >= 1.1.0 are supported out of the box. There is a workaround to build with previous stable LDC 1.0.0. See #387 for more information)
  • pkg-config
  • gtkd-3 and vted-3 (both shared libraries and "headers") built with the same compiler that will be used to build Tilix (instructions to build these below)

Building Tilix

In order to build Tilix with autotools, issue the following commands:

$ ./autogen.sh
$ ./configure
$ make
$ sudo make install

Some parameters may be added to these commands:

  • ./configure accepts a --prefix=/path/to/prefix parameter (defaults to /usr/local)
  • the compiler detection may be overridden by passing DC=compiler to the make command (The DMD-compatible wrapper must be used, i.e. DC=ldmd to use LDC).
  • compiler flags may be passed in variable DCFLAGS. Default value is -O. A release version of Tilix can be built with DCFLAGS='-O -inline -release -version=StdLoggerDisableTrace'
  • it is possible to specify the installation root to make install in variable DESTDIR (defaults to /).

Building GtkD Shared libraries

GtkD tarball comes with a handmade Makefile, so building and installing it can be done with the following commands:

$ make DCFLAGS='-O -release -inline' shared-libs shared-gstreamer shared-vte shared-peas
$ make prefix=/path/to/prefix DESTDIR=/path/to/install \
                      install-shared install-shared-gstreamer install-shared-vte install-shared-peas \
                      install-headers install-headers-gstreamer install-headers-vte install-headers-peas

These commands install all the shared libraries, although Tilix only requires the gtkd (*-libs) and vted (*-vte) ones (headers for these are also required). Please, refer to the GtkD README for dependencies and further details.

The command above builds GtkD with LDC, but it also can be built with DC='dmd'.

If the system already contains GtkD libraries compiled with another D compiler, it is necessary to add a suffix to the installed files to avoid conflicts. It may be done by changing the Makefile with the following command run from GtkD top directory, e.g.:

$ sed -i 's#-$(MAJOR)#-$(MAJOR)-dmd#g' GNUmakefile

This way, libraries gtkd-3-dmd and vted-3-dmd will be generated (Tilix also checks for suffixed libs).

Generating Source Tarball

It is possible to create a source distribution tarball by calling make dist after the ./configure step. This will create a tilix-<version>.tar.gz archive that can be used to build Tilix without autotools. Just extract the contents and run the well known ./configure; make; make install commands from the extracted directory.

Maintenance of Autotools Support

As changes in the Tilix tree occur, it may be necessary to adjust the autotools support accordingly. If no new files are added to the tree, maintaining autotools files means simply bumping versions in file configure.ac. Also, the following file additions do not require any additional maintenance:

  • .d files under source/
  • .json color schemes under data/schemes/
  • .css stylesheets under data/resources/css/
  • .ui GtkBuilder files under data/resources/ui/
  • icons under data/resources/icons/
  • icons under data/icons
  • translation files under po/
  • man-page translation files under data/man/po

Other files must be analyzed on a case-by-case basis.