summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor V. Kovalenko <igor.v.kovalenko@gmail.com>2021-04-18 13:13:52 +0300
committerPulseAudio Marge Bot <pulseaudio-maintainers@lists.freedesktop.org>2021-04-19 18:48:59 +0000
commit424580a9016419be64837747c0ab2061e5252a18 (patch)
treeb35046108112b0ddee82680ddf6020c8c7bc297d
parent1a73fb9eb9851d00e2907a3dbd50d8dfb5e173b2 (diff)
build-sys: meson: allow building client libraries only
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/540>
-rw-r--r--man/meson.build23
-rw-r--r--meson.build2
-rw-r--r--meson_options.txt3
-rw-r--r--shell-completion/bash/meson.build13
-rw-r--r--src/meson.build8
-rw-r--r--src/tests/meson.build285
-rw-r--r--src/tests/proplist-modargs-test.c73
-rw-r--r--src/tests/proplist-test.c18
-rw-r--r--src/utils/meson.build58
9 files changed, 293 insertions, 190 deletions
diff --git a/man/meson.build b/man/meson.build
index 104384459..3f79890f9 100644
--- a/man/meson.build
+++ b/man/meson.build
@@ -1,18 +1,25 @@
# man page name, section, [aliases]
-manpages = [
- ['default.pa', '5'],
+manpages = []
+
+if get_option('daemon')
+ manpages += [
+ ['default.pa', '5'],
+ ['pacmd', '1'],
+ ['pasuspender', '1'],
+ ['pulse-cli-syntax', '5'],
+ ['pulse-daemon.conf', '5'],
+ ['pulseaudio', '1'],
+ ['start-pulseaudio-x11', '1'],
+ ]
+endif
+
+manpages += [
['pacat', '1', ['paplay', 'parec', 'parecord', 'pamon']],
- ['pacmd', '1'],
['pactl', '1'],
['padsp', '1'],
- ['pasuspender', '1'],
['pax11publish', '1'],
- ['pulse-cli-syntax', '5'],
['pulse-client.conf', '5'],
- ['pulse-daemon.conf', '5'],
- ['pulseaudio', '1'],
- ['start-pulseaudio-x11', '1'],
]
# FIXME: Add esdcompat if HAVE_ESOUND
diff --git a/meson.build b/meson.build
index fd146a7e7..9fbdda1ee 100644
--- a/meson.build
+++ b/meson.build
@@ -882,6 +882,8 @@ summary = [
# 'CPPFLAGS: @0@'.format(${CPPFLAGS}),
# 'LIBS: @0@'.format(${LIBS}),
'',
+ 'Enable pulseaudio daemon: @0@'.format(get_option('daemon')),
+ '',
'Enable memfd shared memory: @0@'.format(cdata.has('HAVE_MEMFD')),
'Enable X11: @0@'.format(x11_dep.found()),
' Safe X11 I/O errors: @0@'.format(cdata.has('HAVE_XSETIOERROREXITHANDLER')),
diff --git a/meson_options.txt b/meson_options.txt
index e2d08becd..6be586452 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,6 @@
+option('daemon',
+ type : 'boolean', value : true,
+ description : 'Enable building and installation of pulseaudio daemon and supporting configuration files')
option('gcov',
type : 'boolean', value : false,
description : 'Enable optional gcov coverage analysis')
diff --git a/shell-completion/bash/meson.build b/shell-completion/bash/meson.build
index db4b00bcb..3ba5cb16f 100644
--- a/shell-completion/bash/meson.build
+++ b/shell-completion/bash/meson.build
@@ -1,13 +1,20 @@
if bashcompletiondir != 'no'
- aliases = [
+ aliases = []
+
+ if get_option('daemon')
+ aliases += [
+ 'pacmd',
+ 'pasuspender',
+ ]
+ endif
+
+ aliases += [
'pacat',
- 'pacmd',
'pactl',
'padsp',
'paplay',
'parec',
'parecord',
- 'pasuspender',
]
install_data('pulseaudio', install_dir : bashcompletiondir)
diff --git a/src/meson.build b/src/meson.build
index af29db453..d8ecd8678 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -206,9 +206,11 @@ libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
libpulsecommon_dep = declare_dependency(link_with: libpulsecommon)
subdir('pulse')
-subdir('pulsecore')
-subdir('daemon')
-subdir('modules')
+if get_option('daemon')
+ subdir('pulsecore')
+ subdir('daemon')
+ subdir('modules')
+endif
if get_option('tests')
subdir('tests')
endif
diff --git a/src/tests/meson.build b/src/tests/meson.build
index 1e550d5c7..acd301037 100644
--- a/src/tests/meson.build
+++ b/src/tests/meson.build
@@ -7,85 +7,95 @@
# Default tests
-default_tests = [
- [ 'asyncmsgq-test', 'asyncmsgq-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'asyncq-test', 'asyncq-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+default_tests = []
+
+default_tests += [
[ 'channelmap-test', 'channelmap-test.c',
[ check_dep, libpulse_dep ] ],
- [ 'close-test', 'close-test.c',
- [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
[ 'core-util-test', 'core-util-test.c',
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
- [ 'cpu-mix-test', [ 'cpu-mix-test.c', 'runtime-test-util.h' ],
- [ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'cpu-remap-test', [ 'cpu-remap-test.c', 'runtime-test-util.h' ],
- [ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'cpu-sconv-test', [ 'cpu-sconv-test.c', 'runtime-test-util.h' ],
- [ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'cpu-volume-test', [ 'cpu-volume-test.c', 'runtime-test-util.h' ],
- [ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'format-test', 'format-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
[ 'get-binary-name-test', 'get-binary-name-test.c',
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
[ 'hashmap-test', 'hashmap-test.c',
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
- [ 'hook-list-test', 'hook-list-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
[ 'json-test', 'json-test.c',
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
- [ 'lfe-filter-test', 'lfe-filter-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'lock-autospawn-test', 'lock-autospawn-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
[ 'mainloop-test', 'mainloop-test.c',
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
- [ 'memblock-test', 'memblock-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'memblockq-test', 'memblockq-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'mix-test', 'mix-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'mult-s16-test', [ 'mult-s16-test.c', 'runtime-test-util.h' ],
- [ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
[ 'proplist-test', 'proplist-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'queue-test', 'queue-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'resampler-test', 'resampler-test.c',
- [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libintl_dep ] ],
- [ 'rtpoll-test', 'rtpoll-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'smoother-test', 'smoother-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'strlist-test', 'strlist-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ check_dep, libpulse_dep, libpulsecommon_dep ] ],
[ 'thread-mainloop-test', 'thread-mainloop-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'thread-test', 'thread-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ check_dep, libpulse_dep, libpulsecommon_dep ] ],
[ 'utf8-test', 'utf8-test.c',
[ check_dep, libpulse_dep, libpulsecommon_dep ] ],
[ 'volume-test', 'volume-test.c',
[ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep ] ],
]
-if host_machine.system() != 'windows'
+if get_option('daemon')
default_tests += [
- [ 'sigbus-test', 'sigbus-test.c',
+ [ 'asyncmsgq-test', 'asyncmsgq-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'asyncq-test', 'asyncq-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'close-test', 'close-test.c',
+ [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'cpu-mix-test', [ 'cpu-mix-test.c', 'runtime-test-util.h' ],
+ [ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'cpu-remap-test', [ 'cpu-remap-test.c', 'runtime-test-util.h' ],
+ [ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'cpu-sconv-test', [ 'cpu-sconv-test.c', 'runtime-test-util.h' ],
+ [ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'cpu-volume-test', [ 'cpu-volume-test.c', 'runtime-test-util.h' ],
+ [ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'format-test', 'format-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'hook-list-test', 'hook-list-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'lfe-filter-test', 'lfe-filter-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'lock-autospawn-test', 'lock-autospawn-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'memblock-test', 'memblock-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'memblockq-test', 'memblockq-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'mix-test', 'mix-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'mult-s16-test', [ 'mult-s16-test.c', 'runtime-test-util.h' ],
+ [ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'proplist-modargs-test', 'proplist-modargs-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'queue-test', 'queue-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'resampler-test', 'resampler-test.c',
+ [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libintl_dep ] ],
+ [ 'rtpoll-test', 'rtpoll-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'smoother-test', 'smoother-test.c',
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'usergroup-test', 'usergroup-test.c',
+ [ 'strlist-test', 'strlist-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'thread-test', 'thread-test.c',
[ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
]
-endif
-if host_machine.system() != 'darwin'
- default_tests += [
- [ 'once-test', 'once-test.c',
- [ check_dep, thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libatomic_ops_dep ] ],
- ]
+ if host_machine.system() != 'windows'
+ default_tests += [
+ [ 'sigbus-test', 'sigbus-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'usergroup-test', 'usergroup-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ ]
+ endif
+
+ if host_machine.system() != 'darwin'
+ default_tests += [
+ [ 'once-test', 'once-test.c',
+ [ check_dep, thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libatomic_ops_dep ] ],
+ ]
+ endif
+
endif
if cc.has_header('sys/eventfd.h')
@@ -95,12 +105,14 @@ if cc.has_header('sys/eventfd.h')
]
endif
-if alsa_dep.found()
- default_tests += [
- [ 'alsa-mixer-path-test', 'alsa-mixer-path-test.c',
- [ alsa_dep, check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ],
- libalsa_util ]
- ]
+if get_option('daemon')
+ if alsa_dep.found()
+ default_tests += [
+ [ 'alsa-mixer-path-test', 'alsa-mixer-path-test.c',
+ [ alsa_dep, check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ],
+ libalsa_util ]
+ ]
+ endif
endif
if glib_dep.found()
@@ -112,52 +124,59 @@ if glib_dep.found()
endif
# No-run tests
+norun_tests = []
-norun_tests = [
- [ 'flist-test', 'flist-test.c',
- [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'ipacl-test', 'ipacl-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'lo-latency-test', [ 'lo-latency-test.c', 'lo-test-util.c', 'lo-test-util.h' ],
- [ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'mcalign-test', 'mcalign-test.c',
- [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+norun_tests += [
[ 'pacat-simple', 'pacat-simple.c',
[ libpulse_dep, libpulse_simple_dep ] ],
[ 'parec-simple', 'parec-simple.c',
[ libpulse_dep, libpulse_simple_dep ] ],
- [ 'remix-test', 'remix-test.c',
- [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'rtstutter', 'rtstutter.c',
- [ thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'sig2str-test', 'sig2str-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'stripnul', 'stripnul.c',
- [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
]
-# echo-cancel test is a bit tedious to handle
-echo_cancel_test_sources = []
-foreach s : module_echo_cancel_sources
- echo_cancel_test_sources += '../modules/' + s
-endforeach
-echo_cancel_test_sources += module_echo_cancel_orc_sources
+if get_option('daemon')
+ norun_tests += [
+ [ 'flist-test', 'flist-test.c',
+ [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'ipacl-test', 'ipacl-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'lo-latency-test', [ 'lo-latency-test.c', 'lo-test-util.c', 'lo-test-util.h' ],
+ [ check_dep, libm_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'mcalign-test', 'mcalign-test.c',
+ [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'remix-test', 'remix-test.c',
+ [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'rtstutter', 'rtstutter.c',
+ [ thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'sig2str-test', 'sig2str-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'stripnul', 'stripnul.c',
+ [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ ]
-norun_tests += [
- [ 'echo-cancel-test', echo_cancel_test_sources,
- module_echo_cancel_deps + [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libintl_dep ],
- module_echo_cancel_libs,
- module_echo_cancel_flags + server_c_args + [ '-DPA_MODULE_NAME=module_echo_cancel', '-DECHO_CANCEL_TEST=1' ] ]
-]
+ # echo-cancel test is a bit tedious to handle
+ echo_cancel_test_sources = []
+ foreach s : module_echo_cancel_sources
+ echo_cancel_test_sources += '../modules/' + s
+ endforeach
+ echo_cancel_test_sources += module_echo_cancel_orc_sources
-if cc.has_header_symbol('signal.h', 'SIGXCPU')
norun_tests += [
- [ 'cpulimit-test', [ 'cpulimit-test.c', '../daemon/cpulimit.c', '../daemon/cpulimit.h' ],
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
- [ 'cpulimit-test2', [ 'cpulimit-test.c', '../daemon/cpulimit.c', '../daemon/cpulimit.h' ],
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ],
- [], ['-DTEST2'] ],
+ [ 'echo-cancel-test', echo_cancel_test_sources,
+ module_echo_cancel_deps + [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libintl_dep ],
+ module_echo_cancel_libs,
+ module_echo_cancel_flags + server_c_args + [ '-DPA_MODULE_NAME=module_echo_cancel', '-DECHO_CANCEL_TEST=1' ] ]
]
+
+ if cc.has_header_symbol('signal.h', 'SIGXCPU')
+ norun_tests += [
+ [ 'cpulimit-test', [ 'cpulimit-test.c', '../daemon/cpulimit.c', '../daemon/cpulimit.h' ],
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ [ 'cpulimit-test2', [ 'cpulimit-test.c', '../daemon/cpulimit.c', '../daemon/cpulimit.h' ],
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ],
+ [], ['-DTEST2'] ],
+ ]
+ endif
+
endif
if cc.has_function('pthread_setaffinity_np', dependencies : thread_dep)
@@ -207,47 +226,51 @@ foreach t : default_tests + norun_tests
endif
endforeach
-# These tests need a running pulseaudio daemon
+if get_option('daemon')
-daemon_tests = [
- [ 'extended-test', 'extended-test.c',
- [ check_dep, libm_dep, libpulse_dep ] ],
- [ 'sync-playback', 'sync-playback.c',
- [ check_dep, libm_dep, libpulse_dep ] ],
-]
+ # These tests need a running pulseaudio daemon
-daemon_tests_long = [
- [ 'connect-stress', 'connect-stress.c',
- [ check_dep, libpulse_dep ] ],
- [ 'interpol-test', 'interpol-test.c',
- [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
-]
+ daemon_tests = [
+ [ 'extended-test', 'extended-test.c',
+ [ check_dep, libm_dep, libpulse_dep ] ],
+ [ 'sync-playback', 'sync-playback.c',
+ [ check_dep, libm_dep, libpulse_dep ] ],
+ ]
-daemon_test_names = []
-daemon_test_long_names = []
+ daemon_tests_long = [
+ [ 'connect-stress', 'connect-stress.c',
+ [ check_dep, libpulse_dep ] ],
+ [ 'interpol-test', 'interpol-test.c',
+ [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ],
+ ]
-foreach t : daemon_tests + daemon_tests_long
- name = t[0]
- sources = t[1]
- deps = t[2]
+ daemon_test_names = []
+ daemon_test_long_names = []
- if daemon_tests.contains(t)
- daemon_test_names += name
- else
- daemon_test_long_names += name
- endif
+ foreach t : daemon_tests + daemon_tests_long
+ name = t[0]
+ sources = t[1]
+ deps = t[2]
- executable(name, sources,
- c_args : pa_c_args,
- include_directories : [ configinc, topinc ],
- dependencies : deps,
+ if daemon_tests.contains(t)
+ daemon_test_names += name
+ else
+ daemon_test_long_names += name
+ endif
+
+ executable(name, sources,
+ c_args : pa_c_args,
+ include_directories : [ configinc, topinc ],
+ dependencies : deps,
+ )
+ endforeach
+
+ test_daemon_meson_sh = find_program('test-daemon.meson.sh')
+ run_target('test-daemon',
+ command : [ test_daemon_meson_sh ] + daemon_test_names
+ )
+ run_target('test-daemon-long',
+ command : [ test_daemon_meson_sh ] + daemon_test_long_names
)
-endforeach
-test_daemon_meson_sh = find_program('test-daemon.meson.sh')
-run_target('test-daemon',
- command : [ test_daemon_meson_sh ] + daemon_test_names
-)
-run_target('test-daemon-long',
- command : [ test_daemon_meson_sh ] + daemon_test_long_names
-)
+endif
diff --git a/src/tests/proplist-modargs-test.c b/src/tests/proplist-modargs-test.c
new file mode 100644
index 000000000..963b2cbcc
--- /dev/null
+++ b/src/tests/proplist-modargs-test.c
@@ -0,0 +1,73 @@
+/***
+ This file is part of PulseAudio.
+
+ PulseAudio is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2.1 of the License,
+ or (at your option) any later version.
+
+ PulseAudio is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
+***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include <check.h>
+
+#include <pulse/proplist.h>
+#include <pulse/xmalloc.h>
+#include <pulsecore/macro.h>
+#include <pulsecore/core-util.h>
+#include <pulsecore/modargs.h>
+
+START_TEST (proplist_modargs_test) {
+ pa_modargs *ma;
+ pa_proplist *a;
+ char *v;
+ const char *x[] = { "foo", NULL };
+
+ ma = pa_modargs_new("foo='foobar=waldo foo2=\"lj\\\"dhflh\" foo3=\"kjlskj\\'\"'", x);
+ fail_unless(ma != NULL);
+ a = pa_proplist_new();
+ fail_unless(a != NULL);
+
+ fail_unless(pa_modargs_get_proplist(ma, "foo", a, PA_UPDATE_REPLACE) >= 0);
+
+ pa_log_debug("%s", v = pa_proplist_to_string(a));
+ pa_xfree(v);
+
+ pa_proplist_free(a);
+ pa_modargs_free(ma);
+}
+END_TEST
+
+int main(int argc, char *argv[]) {
+ int failed = 0;
+ Suite *s;
+ TCase *tc;
+ SRunner *sr;
+
+ if (!getenv("MAKE_CHECK"))
+ pa_log_set_level(PA_LOG_DEBUG);
+
+ s = suite_create("Property List");
+ tc = tcase_create("propertylist");
+ tcase_add_test(tc, proplist_modargs_test);
+ suite_add_tcase(s, tc);
+
+ sr = srunner_create(s);
+ srunner_run_all(sr, CK_NORMAL);
+ failed = srunner_ntests_failed(sr);
+ srunner_free(sr);
+
+ return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
+}
diff --git a/src/tests/proplist-test.c b/src/tests/proplist-test.c
index a0074f8e4..94752bb55 100644
--- a/src/tests/proplist-test.c
+++ b/src/tests/proplist-test.c
@@ -25,16 +25,13 @@
#include <pulse/proplist.h>
#include <pulse/xmalloc.h>
-#include <pulsecore/macro.h>
+#include <pulsecore/log.h>
#include <pulsecore/core-util.h>
-#include <pulsecore/modargs.h>
START_TEST (proplist_test) {
- pa_modargs *ma;
pa_proplist *a, *b, *c, *d;
char *s, *t, *u, *v;
const char *text;
- const char *x[] = { "foo", NULL };
a = pa_proplist_new();
fail_unless(pa_proplist_sets(a, PA_PROP_MEDIA_TITLE, "Brandenburgische Konzerte") == 0);
@@ -80,19 +77,6 @@ START_TEST (proplist_test) {
pa_proplist_free(d);
pa_log_debug("%s", v);
pa_xfree(v);
-
- ma = pa_modargs_new("foo='foobar=waldo foo2=\"lj\\\"dhflh\" foo3=\"kjlskj\\'\"'", x);
- fail_unless(ma != NULL);
- a = pa_proplist_new();
- fail_unless(a != NULL);
-
- fail_unless(pa_modargs_get_proplist(ma, "foo", a, PA_UPDATE_REPLACE) >= 0);
-
- pa_log_debug("%s", v = pa_proplist_to_string(a));
- pa_xfree(v);
-
- pa_proplist_free(a);
- pa_modargs_free(ma);
}
END_TEST
diff --git a/src/utils/meson.build b/src/utils/meson.build
index f40eaff95..c9635fdb6 100644
--- a/src/utils/meson.build
+++ b/src/utils/meson.build
@@ -42,34 +42,36 @@ executable('pactl',
c_args : pa_c_args,
)
-if host_machine.system() != 'windows'
- pasuspender_sources = [
- 'pasuspender.c',
- ]
-
- executable('pasuspender',
- pasuspender_sources,
- install: true,
- install_rpath : privlibdir,
- include_directories : [configinc, topinc],
- link_with : [libpulsecommon, libpulse],
- dependencies: [libintl_dep],
- c_args : pa_c_args,
- )
-
- pacmd_sources = [
- 'pacmd.c',
- ]
-
- executable('pacmd',
- pacmd_sources,
- install: true,
- install_rpath : privlibdir,
- include_directories : [configinc, topinc],
- link_with : [libpulsecommon, libpulse],
- dependencies: [libintl_dep],
- c_args : pa_c_args,
- )
+if get_option('daemon')
+ if host_machine.system() != 'windows'
+ pasuspender_sources = [
+ 'pasuspender.c',
+ ]
+
+ executable('pasuspender',
+ pasuspender_sources,
+ install: true,
+ install_rpath : privlibdir,
+ include_directories : [configinc, topinc],
+ link_with : [libpulsecommon, libpulse],
+ dependencies: [libintl_dep],
+ c_args : pa_c_args,
+ )
+
+ pacmd_sources = [
+ 'pacmd.c',
+ ]
+
+ executable('pacmd',
+ pacmd_sources,
+ install: true,
+ install_rpath : privlibdir,
+ include_directories : [configinc, topinc],
+ link_with : [libpulsecommon, libpulse],
+ dependencies: [libintl_dep],
+ c_args : pa_c_args,
+ )
+ endif
endif
if x11_dep.found()