Building gumd and libgum

gumd and libgum uses the standard GNU build system, using autoconf for package configuration and resolving portability issues, automake for building makefiles that comply with the GNU Coding Standards, and libtool for building shared libraries on multiple platforms. The normal sequence for compiling and installing gumd and libgum from distribution tarballs is thus:


        ./configure
        make
        make install
      

If you have obtained the source code directly from git repository, execute the ./autogen.sh script before the steps above.

The standard options provided by GNU autoconf may be passed to the configure script. Please see the autoconf documentation or run ./configure --help for information about the standard options.

Dependencies

Before you can compile gumd and libgum, you need to have various other tools and libraries installed on your system. The two tools needed during the build process are pkg-config and GNU make.

  • pkg-config is a tool for tracking the compilation flags needed for libraries that are used by the gumd and libgum. (For each library, a small .pc text file is installed in a standard location that contains the compilation flags needed for that library along with version number information.)

gumd depends on a number of other libraries.

  • The GLib library is the development framework that gumd and libgum is built on.

  • The check library provides a unit testing framework. It is needed only if you would like to run unit tests with make check.

  • The Systemd provides dbus login apis that gumd is using for querying/terminating users sessions e.g. when a user is deleted.

  • The optional libtlm-nfc library provides support for writing usernames and passwords to NFC tags in gum-utils utility. Such tags can be used for logging in with TLM login manager.

Extra Configuration Options

In addition to the normal options, the configure script supports these additional arguments:

--enable-debug Turns on debugging support. This allows setting environment variables to influence the runtime behaviour of gumd and libgum (see GumConfig).

--enable-tests This enables unit tests and implicitly enables debugging support as well.

--enable-dbus-type=dbus-type Sets the way in which libgum is using DBus to communicate with gumd. dbus-type can be one of

  • 'p2p' which is the default value. Gumd will use direct connection over a UNIX domain socket with the client library without involving the DBus daemon.

  • 'session' which will use the session bus. This is not recommended to use because session bus isn't secure against eavesdropping, but it can be used for debugging purposes, as it allows the use of standard tools such as dbus-monitor, d-feet and so on.

  • 'system' which will use the system bus.

This setting can be overridden at runtime by setting GUM_BUS_TYPE environment variable to "p2p" or "system". Note that the environment needs to be set for both daemon and client side.

Building distribution packages

Instead of running make install to install gumd and libgum into a system location it is possible to build distribution-specific packages. dists/ directory in the source tree contains a number of package confuguration files, and to use them also a distribution tarball is needed. If you are building from a git tree, use make dist to create such a tarball.