summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Rebillout <arnaud.rebillout@collabora.com>2018-11-26 13:33:44 +0700
committerArun Raghavan <arun@arunraghavan.net>2019-06-08 11:57:00 +0200
commitfdf3384f24f150f35ecb7f0a7f7270b4f58a53a4 (patch)
tree3d8bc709edeb298328de1e05f61f977da4b8c21d
parenta7b24ed03dd6a648e2fd26a6d998783a3fb6289a (diff)
meson: Add systemduserunitdir option
Signed-off-by: Arnaud Rebillout <arnaud.rebillout@collabora.com>
-rw-r--r--meson.build13
-rw-r--r--meson_options.txt3
-rw-r--r--src/daemon/meson.build2
-rw-r--r--src/meson.build2
-rw-r--r--src/modules/meson.build4
5 files changed, 17 insertions, 7 deletions
diff --git a/meson.build b/meson.build
index b7ef83cfd..966dc3e89 100644
--- a/meson.build
+++ b/meson.build
@@ -66,6 +66,9 @@ if pulsedspdir == ''
pulsedspdir = join_paths(libdir, 'pulseaudio')
endif
+systemduserunitdir = get_option('systemduserunitdir')
+# the default value is set below
+
vapidir = join_paths(datadir, 'vala', 'vapi')
bashcompletiondir = get_option('bashcompletiondir')
@@ -345,11 +348,15 @@ if soxr_dep.found()
cdata.set('HAVE_SOXR', 1)
endif
-systemd_dep = dependency('libsystemd', required : get_option('systemd'))
-if systemd_dep.found()
+libsystemd_dep = dependency('libsystemd', required : get_option('systemd'))
+if libsystemd_dep.found()
cdata.set('HAVE_SYSTEMD_DAEMON', 1)
cdata.set('HAVE_SYSTEMD_LOGIN', 1)
cdata.set('HAVE_SYSTEMD_JOURNAL', 1)
+ systemd_dep = dependency('systemd', required : get_option('systemd'))
+ if systemd_dep.found() and systemduserunitdir == ''
+ systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir')
+ endif
endif
x11_dep = dependency('x11-xcb', required : get_option('x11'))
@@ -533,7 +540,7 @@ summary = [
' Enable ofono headsets: @0@'.format(get_option('bluez5-ofono-headset')),
'Enable udev: @0@'.format(udev_dep.found()),
' Enable HAL->udev compat: @0@'.format(get_option('hal-compat')),
- 'Enable systemd: @0@'.format(systemd_dep.found()),
+ 'Enable systemd: @0@'.format(libsystemd_dep.found()),
# 'Enable TCP Wrappers: @0@'.format(${ENABLE_TCPWRAP}),
'Enable libsamplerate: @0@'.format(samplerate_dep.found()),
'Enable IPv6: @0@'.format(get_option('ipv6')),
diff --git a/meson_options.txt b/meson_options.txt
index a550df2c4..7e5b4d073 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -30,6 +30,9 @@ option('pulsedspdir',
option('modlibexecdir',
type : 'string',
description : 'Specify location where modules will be installed')
+option('systemduserunitdir',
+ type : 'string',
+ description : 'Directory for systemd user service files')
option('bashcompletiondir',
type : 'string',
description : 'Directory for bash completion files')
diff --git a/src/daemon/meson.build b/src/daemon/meson.build
index 5f263fb38..9d54bc95c 100644
--- a/src/daemon/meson.build
+++ b/src/daemon/meson.build
@@ -29,7 +29,7 @@ executable('pulseaudio',
install: true,
include_directories : [configinc, topinc],
link_with : [libpulsecore, libpulsecommon, libpulse],
- dependencies : [ltdl_dep, cap_dep, dbus_dep, systemd_dep],
+ dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep],
c_args : pa_c_args,
)
diff --git a/src/meson.build b/src/meson.build
index a299a9a78..8063355e2 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -183,7 +183,7 @@ libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
c_args : [pa_c_args],
install : true,
install_dir : privlibdir,
- dependencies : [libm_dep, thread_dep, shm_dep, sndfile_dep, dbus_dep, x11_dep, systemd_dep, glib_dep, gtk_dep, asyncns_dep],
+ dependencies : [libm_dep, thread_dep, shm_dep, sndfile_dep, dbus_dep, x11_dep, libsystemd_dep, glib_dep, gtk_dep, asyncns_dep],
implicit_include_directories : false)
libpulsecommon_dep = declare_dependency(link_with: libpulsecommon)
diff --git a/src/modules/meson.build b/src/modules/meson.build
index 90904cc80..774f8904d 100644
--- a/src/modules/meson.build
+++ b/src/modules/meson.build
@@ -176,9 +176,9 @@ if openssl_dep.found()
endif
endif
-if systemd_dep.found()
+if libsystemd_dep.found()
all_modules += [
- [ 'module-systemd-login', 'module-systemd-login.c', [], [], [systemd_dep] ],
+ [ 'module-systemd-login', 'module-systemd-login.c', [], [], [libsystemd_dep] ],
]
endif