Skip to content

Building with Autotools

dsboger edited this page Jul 12, 2016 · 10 revisions

Building with Autotools

Requirements

  • autoconf >= 2.69, automake >= 1.15 and gettext >= 0.19.7 (may work with older versions, but not tested)
  • dmd compiler executable is in the $PATH
  • pkg-config
  • gtkd-3 and vted-3 or gtkd-3-dmd and vted-3-dmd (both shared libraries and "headers") compiled with dmd (instructions to build these below)

Building Terminix

In order to build terminix 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)
  • compiler flags may be passed to dmd in variable DCFLAGS. Default value is -O. A release version of Terminix can be built with command make 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 DC='dmd' DCFLAGS='-O -release -inline' shared-libs shared-gstreamer shared-vte
$ make prefix=/path/to/prefix DESTDIR=/path/to/install \
                      install-shared install-shared-gstreamer install-shared-vte \
                      install-headers install-headers-gstreamer install-headers-vte

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

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:

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

This way, libraries gtkd-3-dmd and vted-3-dmd will be generated.

Generating Source Tarball

It is possible to create a source distribution tarball by calling make dist after the ./configure step. This will create a terminix-<version>.tar.gz archive that can be used to build Terminix 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 Terminix 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

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

Clone this wiki locally