utmp: rewrite utmp logging

This patch generalizes the utmp support, to not only support
libutempter, but also ulog (and in the future, even more interfaces).

* Rename config option main.utempter to main.utmp-helper
* Add meson option -Dutmp-backend=none|libutempter|ulog|auto
* Rename meson option -Ddefault-utempter-path to -Dutmp-default-helper-path
* utmp is no longer detected at compile time, but at runtime instead.

Meson will configure the following pre-processor macros, based on the
selected utmp backend:

* UTMP_ADD - argument to pass to utmp helper when adding a record (starting foot)
* UTMP_DEL - argument to pass to utmp helper when removing a record (exiting foot)
* UTMP_DEL_HAVE_ARGUMENT - if defined, UTMP_DEL expects an extra argument ($WAYLAND_DISPLAY)
* UTMP_DEFAULT_HELPER_PATH - path to the default utmp helper binary

The documentation has been updated to mention which arguments are
passed to the helper binary.

Closes #1314
This commit is contained in:
Daniel Eklöf 2023-05-17 20:51:40 +02:00
parent a2f765b72a
commit e78319fccd
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
11 changed files with 159 additions and 58 deletions

View file

@ -320,7 +320,7 @@ struct config {
env_var_list_t env_vars;
char *utempter_path;
char *utmp_helper_path;
struct {
enum fcft_scaling_filter fcft_filter;