1 diff --git a/data/meson.build b/data/meson.build
2 index a1fc61f..7c03882 100644
5 @@ -7,7 +7,7 @@ if get_option('enable-backend')
6 conf.set('demo_agent', '')
9 - conf_dir = join_paths(sysconfdir, 'geoclue')
10 + conf_dir = join_paths(sysconfdir_install, 'geoclue')
11 configure_file(output: 'geoclue.conf',
12 input: 'geoclue.conf.in',
14 @@ -16,7 +16,7 @@ if get_option('enable-backend')
15 conf = configuration_data()
16 conf.set('libexecdir', libexecdir)
17 conf.set('dbus_srv_user', get_option('dbus-srv-user'))
18 - conf.set('sysconfdir', sysconfdir)
19 + conf.set('sysconfdir', sysconfdir_install)
21 service_dir = join_paths(datadir, 'dbus-1', 'system-services')
22 configure_file(output: 'org.freedesktop.GeoClue2.service',
23 @@ -33,7 +33,7 @@ if get_option('enable-backend')
24 # DBus Service policy file
25 dbus_service_dir = get_option('dbus-sys-dir')
26 if dbus_service_dir == ''
27 - dbus_service_dir = join_paths(sysconfdir, 'dbus-1', 'system.d')
28 + dbus_service_dir = join_paths(sysconfdir_install, 'dbus-1', 'system.d')
30 configure_file(output: 'org.freedesktop.GeoClue2.conf',
31 input: 'org.freedesktop.GeoClue2.conf.in',
32 diff --git a/demo/meson.build b/demo/meson.build
33 index 1427fbe..2623f16 100644
34 --- a/demo/meson.build
35 +++ b/demo/meson.build
36 @@ -54,7 +54,7 @@ if get_option('demo-agent')
37 install_dir: desktop_dir)
39 # Also install in the autostart directory.
40 - autostart_dir = join_paths(sysconfdir, 'xdg', 'autostart')
41 + autostart_dir = join_paths(sysconfdir_install, 'xdg', 'autostart')
42 meson.add_install_script('install-file.py',
43 desktop_file.full_path(),
45 diff --git a/meson.build b/meson.build
46 index 8aa5c31..b011879 100644
49 @@ -12,7 +12,11 @@ gclue_api_version='2.0'
50 datadir = join_paths(get_option('prefix'), get_option('datadir'))
51 includedir = join_paths(get_option('prefix'), get_option('includedir'))
52 libexecdir = join_paths(get_option('prefix'), get_option('libexecdir'))
53 -sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir'))
54 +if get_option('sysconfdir_install') != ''
55 + sysconfdir_install = join_paths(get_option('prefix'), get_option('sysconfdir_install'))
57 + sysconfdir_install = get_option('sysconfdir')
59 localedir = join_paths(datadir, 'locale')
61 header_dir = 'libgeoclue-' + gclue_api_version
62 @@ -29,7 +33,7 @@ conf.set_quoted('PACKAGE_URL', 'https://gitlab.freedesktop.org/geoclue/geoclue/w
63 conf.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/geoclue/geoclue/issues/new')
64 conf.set_quoted('TEST_SRCDIR', meson.source_root() + '/data/')
65 conf.set_quoted('LOCALEDIR', localedir)
66 -conf.set_quoted('SYSCONFDIR', sysconfdir)
67 +conf.set_quoted('SYSCONFDIR', get_option('sysconfdir'))
68 conf.set_quoted('MOZILLA_API_KEY', get_option('mozilla-api-key'))
69 conf.set10('GCLUE_USE_3G_SOURCE', get_option('3g-source'))
70 conf.set10('GCLUE_USE_CDMA_SOURCE', get_option('cdma-source'))
71 diff --git a/meson_options.txt b/meson_options.txt
72 index 5b8c42d..945dfd5 100644
73 --- a/meson_options.txt
74 +++ b/meson_options.txt
75 @@ -40,6 +40,9 @@ option('systemd-system-unit-dir',
76 option('dbus-srv-user',
77 type: 'string', value: 'root',
78 description: 'The user (existing) as which the service will run')
79 +option('sysconfdir_install',
80 + type: 'string', value: '',
81 + description: 'sysconfdir to use during installation')
82 option('mozilla-api-key',
83 type: 'string', value: 'geoclue',
84 description: 'Your API key for Mozilla Location Service')