[pulseaudio-commits] [Git][pulseaudio/pulseaudio][master] 8 commits: build-sys: meson: Relax sanity checks for daemonless builds

PulseAudio Marge Bot (@pulseaudio-merge-bot) gitlab at gitlab.freedesktop.org
Wed Nov 17 16:09:24 UTC 2021



PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio


Commits:
a67f8947 by Mart Raudsepp at 2021-11-17T16:06:23+00:00
build-sys: meson: Relax sanity checks for daemonless builds

Echo canceller, udev and speex resampling is only used by the daemon, so
don't error or warn about those in -Ddaemon=false builds.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>

- - - - -
4cf4a1fd by Mart Raudsepp at 2021-11-17T16:06:23+00:00
build-sys: meson: Allow building the daemon only

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>

- - - - -
6928714b by Igor V. Kovalenko at 2021-11-17T16:06:23+00:00
build-sys: meson: change daemon-only to client

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>

- - - - -
6dd14ad9 by Igor V. Kovalenko at 2021-11-17T16:06:23+00:00
build-sys: meson: Move remaining tests under daemon and client builds

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>

- - - - -
80c0a497 by Igor V. Kovalenko at 2021-11-17T16:06:23+00:00
build-sys: meson: Rearrange dependencies under client and daemon options

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>

- - - - -
5f431732 by Igor V. Kovalenko at 2021-11-17T16:06:23+00:00
build-sys: meson: Rearrange shell completion between daemon and client

Rename bash completion file to pactl and install it with client build.
Completions specific to daemon are now just symlinks, create target directory
first to install them.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>

- - - - -
5fcc70e2 by Igor V. Kovalenko at 2021-11-17T16:06:23+00:00
build-sys: meson: Fix indentation in daemon/client blocks

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>

- - - - -
56a9743f by Igor V. Kovalenko at 2021-11-17T16:06:23+00:00
build-sys: meson: Make glib and fftw common dependencies

GSettings module (daemon) requires both gio and glib, move glib to common block.
qpaeq requires fftw, move fftw to common block.

Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/659>

- - - - -


13 changed files:

- man/meson.build
- meson.build
- meson_options.txt
- po/meson.build
- shell-completion/bash/meson.build
- shell-completion/bash/pulseaudio → shell-completion/bash/pactl
- shell-completion/zsh/meson.build
- src/daemon/meson.build
- src/meson.build
- src/modules/gsettings/meson.build
- src/modules/meson.build
- src/tests/meson.build
- src/utils/meson.build


Changes:

=====================================
man/meson.build
=====================================
@@ -14,22 +14,24 @@ if get_option('daemon')
   ]
 endif
 
-manpages += [
-  ['pacat', '1', ['paplay', 'parec', 'parecord', 'pamon']],
-  ['pactl', '1'],
-  ['pulse-client.conf', '5'],
-]
-
-if cdata.has('HAVE_OSS_WRAPPER')
+if get_option('client')
   manpages += [
-    ['padsp', '1'],
+    ['pacat', '1', ['paplay', 'parec', 'parecord', 'pamon']],
+    ['pactl', '1'],
+    ['pulse-client.conf', '5'],
   ]
-endif
 
-if x11_dep.found()
-  manpages += [
-    ['pax11publish', '1'],
-  ]
+  if cdata.has('HAVE_OSS_WRAPPER')
+    manpages += [
+      ['padsp', '1'],
+    ]
+  endif
+
+  if x11_dep.found()
+    manpages += [
+      ['pax11publish', '1'],
+    ]
+  endif
 endif
 
 # FIXME: Add esdcompat if HAVE_ESOUND


=====================================
meson.build
=====================================
@@ -53,6 +53,8 @@ libpulse_mainloop_glib_version = '@0 at .@1 at .@2@'.format(
   libpulse_mainloop_glib_version_info[1],
 )
 
+i18n = import('i18n')
+
 # Paths
 
 prefix = get_option('prefix')
@@ -68,6 +70,7 @@ localedir = join_paths(prefix, get_option('localedir'))
 localstatedir = join_paths(prefix, get_option('localstatedir'))
 sysconfdir = join_paths(prefix, get_option('sysconfdir'))
 privlibdir = join_paths(libdir, 'pulseaudio')
+po_dir = join_paths(meson.current_source_dir(), 'po')
 
 if host_machine.system() == 'windows'
   # Windows only supports loading libraries from the same dir as the executable
@@ -582,231 +585,241 @@ if host_machine.cpu_family() == 'arm'
 endif
 # NEON checks are automatically done by the unstable-simd module
 
-if get_option('daemon')
-  # FIXME: make sure it's >= 2.2
-  ltdl_dep = cc.find_library('ltdl', required : true)
-endif
-
-# FIXME: can meson support libtool -dlopen/-dlpreopen things?
-#        and do we still want to support this at all?
-cdata.set('DISABLE_LIBTOOL_PRELOAD', 1)
-
-if get_option('database') == 'tdb'
-  database_dep = dependency('tdb')
-elif get_option('database') == 'gdbm'
-  database_dep = cc.find_library('gdbm', required : true)
-else
-  database_dep = dependency('', required: false)
-endif
+# Dependencies common to client, daemon and modules
 
 if get_option('ipv6')
   cdata.set('HAVE_IPV6', 1)
 endif
 
-if get_option('legacy-database-entry-format')
-  cdata.set('ENABLE_LEGACY_DATABASE_ENTRY_FORMAT', 1)
-endif
-
-if get_option('stream-restore-clear-old-devices')
-  cdata.set('STREAM_RESTORE_CLEAR_OLD_DEVICES', 1)
-endif
-
-if get_option('running-from-build-tree')
-  cdata.set('HAVE_RUNNING_FROM_BUILD_TREE', 1)
-endif
-
-if get_option('enable-smoother-2')
-  cdata.set('USE_SMOOTHER_2', 1)
-endif
-
-alsa_dep = dependency('alsa', version : '>= 1.0.24', required : get_option('alsa'))
-if alsa_dep.found()
-  cdata.set('HAVE_ALSA', 1)
-  cdata.set('HAVE_ALSA_UCM', 1)
-endif
-
-asyncns_dep = dependency('libasyncns', version : '>= 0.1', required : get_option('asyncns'))
-if asyncns_dep.found()
-  cdata.set('HAVE_LIBASYNCNS', 1)
-endif
-
 dbus_dep = dependency('dbus-1', version : '>= 1.4.12', required : get_option('dbus'))
 if dbus_dep.found()
   cdata.set('HAVE_DBUS', 1)
 endif
 
-gio_dep = dependency('gio-2.0', version : '>= 2.26.0')
-if get_option('gsettings').enabled()
-  assert(gio_dep.found(), 'GSettings support needs glib I/O library (GIO)')
-  cdata.set('HAVE_GSETTINGS', 1)
-else
-  cdata.set('HAVE_GSETTINGS', 0)
-endif
-
 glib_dep = dependency('glib-2.0', version : '>= 2.28.0', required: get_option('glib'))
 if glib_dep.found()
   cdata.set('HAVE_GLIB', 1)
-endif
-
-gtk_dep = dependency('gtk+-3.0', required : get_option('gtk'))
-if gtk_dep.found()
-  cdata.set('HAVE_GTK', 1)
-endif
-
-have_orcc = false
-orcc_args = []
-orc_dep = dependency('orc-0.4', version : '>= 0.4.11', required : get_option('orc'))
-orcc = find_program('orcc', required : get_option('orc'))
-if orc_dep.found() and orcc.found()
-  have_orcc = true
-  orcc_args = [orcc]
-  #orcc_args = [orcc, '--include', 'glib.h']
-  cdata.set('HAVE_ORC', 1)
-else
-  cdata.set('DISABLE_ORC', 1)
-endif
-
-samplerate_dep = dependency('samplerate', version : '>= 0.1.0', required : get_option('samplerate'))
-if samplerate_dep.found()
-  cdata.set('HAVE_LIBSAMPLERATE', 1)
+  cdata.set('HAVE_GLIB20', 1) # to match the AM_CONDITIONAL for CMake file generation
 endif
 
 sndfile_dep = dependency('sndfile', version : '>= 1.0.20')
 
-soxr_dep = dependency('soxr', version : '>= 0.1.1', required : get_option('soxr'))
-if soxr_dep.found()
-  cdata.set('HAVE_SOXR', 1)
-endif
-
 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)
 endif
-systemd_dep = dependency('systemd', required : get_option('systemd'))
-if systemd_dep.found() and systemduserunitdir == ''
-  systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir')
-endif
-
-libelogind_dep = dependency('libelogind', required : get_option('elogind'))
-if libelogind_dep.found()
-  cdata.set('HAVE_SYSTEMD_LOGIN', 1)
-endif
-
-tcpwrap_dep = cc.find_library('wrap', required: get_option('tcpwrap'))
-if cc.has_header('tcpd.h') and cc.has_function('hosts_access', dependencies : tcpwrap_dep)
-  cdata.set('HAVE_LIBWRAP', 1)
-endif
 
 x11_dep = dependency('x11-xcb', required : get_option('x11'))
-if x11_dep.found()
-  xcb_dep  = dependency('xcb',  required : true, version : '>= 1.6')
-  ice_dep  = dependency('ice',  required : get_option('daemon'))
-  sm_dep   = dependency('sm',   required : get_option('daemon'))
-  xtst_dep = dependency('xtst', required : get_option('daemon'))
-  cdata.set('HAVE_X11', 1)
-  if cc.has_function('XSetIOErrorExitHandler', dependencies: x11_dep)
-    cdata.set('HAVE_XSETIOERROREXITHANDLER', 1)
-  endif
-endif
 
-# Module dependencies
+# OSS support
 if cc.has_header('sys/soundcard.h', required: get_option('oss-output'))
+  # OSS output via daemon module-detect
   cdata.set('HAVE_OSS_OUTPUT', 1)
+  # OSS wrapper
   cdata.set('HAVE_OSS_WRAPPER', 1)
   cdata.set('PULSEDSP_LOCATION', pulsedsp_location)
 endif
 
-if get_option('hal-compat')
-  cdata.set('HAVE_HAL_COMPAT', 1)
+fftw_dep = dependency('fftw3f', required : get_option('fftw'))
+if fftw_dep.found()
+  cdata.set('HAVE_FFTW', 1)
 endif
 
-avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : get_option('avahi'), disabler : true)
-if avahi_dep.found()
-  cdata.set('HAVE_AVAHI', 1)
-else
-  cdata.set('HAVE_AVAHI', 0)
+# Client library dependencies
+
+if get_option('client')
+  asyncns_dep = dependency('libasyncns', version : '>= 0.1', required : get_option('asyncns'))
+  if asyncns_dep.found()
+    cdata.set('HAVE_LIBASYNCNS', 1)
+  endif
+
+  gtk_dep = dependency('gtk+-3.0', required : get_option('gtk'))
+  if gtk_dep.found()
+    cdata.set('HAVE_GTK', 1)
+  endif
 endif
 
-sbc_dep = dependency('sbc', version : '>= 1.0', required : false)
+# Daemon and module dependencies
+
+if get_option('daemon')
+  # FIXME: make sure it's >= 2.2
+  ltdl_dep = cc.find_library('ltdl', required : true)
 
-bluez_dep = dependency('bluez', required : get_option('bluez5'))
+  # FIXME: can meson support libtool -dlopen/-dlpreopen things?
+  #        and do we still want to support this at all?
+  cdata.set('DISABLE_LIBTOOL_PRELOAD', 1)
 
-if bluez_dep.found()
-  assert(dbus_dep.found(), 'BlueZ requires D-Bus support')
-  assert(sbc_dep.found(), 'BlueZ requires SBC support')
-  cdata.set('HAVE_SBC', 1)
-  cdata.set('HAVE_BLUEZ', 1)
-  cdata.set('HAVE_BLUEZ_5', 1)
-  if get_option('bluez5-native-headset')
-    cdata.set('HAVE_BLUEZ_5_NATIVE_HEADSET', 1)
+  if get_option('database') == 'tdb'
+    database_dep = dependency('tdb')
+  elif get_option('database') == 'gdbm'
+    database_dep = cc.find_library('gdbm', required : true)
+  else
+    database_dep = dependency('', required: false)
   endif
-  if get_option('bluez5-ofono-headset')
-    cdata.set('HAVE_BLUEZ_5_OFONO_HEADSET', 1)
+
+  if get_option('legacy-database-entry-format')
+    cdata.set('ENABLE_LEGACY_DATABASE_ENTRY_FORMAT', 1)
   endif
-endif
 
-fftw_dep = dependency('fftw3f', required : get_option('fftw'))
-if fftw_dep.found()
-  cdata.set('HAVE_FFTW', 1)
-endif
+  if get_option('stream-restore-clear-old-devices')
+    cdata.set('STREAM_RESTORE_CLEAR_OLD_DEVICES', 1)
+  endif
 
-jack_dep = dependency('jack', version : '>= 0.117.0', required : get_option('jack'))
-if jack_dep.found()
-  cdata.set('HAVE_JACK', 1)
-endif
+  if get_option('running-from-build-tree')
+    cdata.set('HAVE_RUNNING_FROM_BUILD_TREE', 1)
+  endif
 
-lirc_dep = dependency('lirc', required : get_option('lirc'))
-if lirc_dep.found()
-  cdata.set('HAVE_LIRC', 1)
-endif
+  if get_option('enable-smoother-2')
+    cdata.set('USE_SMOOTHER_2', 1)
+  endif
 
-openssl_dep = dependency('openssl', version : '>= 0.9', required : get_option('openssl'))
-if openssl_dep.found()
-  cdata.set('HAVE_OPENSSL', 1)
-endif
+  alsa_dep = dependency('alsa', version : '>= 1.0.24', required : get_option('alsa'))
+  if alsa_dep.found()
+    cdata.set('HAVE_ALSA', 1)
+    cdata.set('HAVE_ALSA_UCM', 1)
+  endif
 
-speex_dep = dependency('speexdsp', version : '>= 1.2', required : get_option('speex'))
-if speex_dep.found()
-  cdata.set('HAVE_SPEEX', 1)
-endif
+  gio_dep = dependency('gio-2.0', version : '>= 2.26.0')
+  if get_option('gsettings').enabled()
+    assert(gio_dep.found(), 'GSettings support needs glib I/O library (GIO)')
+    cdata.set('HAVE_GSETTINGS', 1)
+  else
+    cdata.set('HAVE_GSETTINGS', 0)
+  endif
 
-udev_dep = dependency('libudev', version : '>= 143', required : get_option('udev'))
-if udev_dep.found()
-  cdata.set('HAVE_UDEV', 1)
-endif
+  have_orcc = false
+  orcc_args = []
+  orc_dep = dependency('orc-0.4', version : '>= 0.4.11', required : get_option('orc'))
+  orcc = find_program('orcc', required : get_option('orc'))
+  if orc_dep.found() and orcc.found()
+    have_orcc = true
+    orcc_args = [orcc]
+    #orcc_args = [orcc, '--include', 'glib.h']
+    cdata.set('HAVE_ORC', 1)
+  else
+    cdata.set('DISABLE_ORC', 1)
+  endif
 
-webrtc_dep = dependency('webrtc-audio-processing', version : '>= 0.2', required : get_option('webrtc-aec'))
-if webrtc_dep.found()
-  cdata.set('HAVE_WEBRTC', 1)
-endif
+  samplerate_dep = dependency('samplerate', version : '>= 0.1.0', required : get_option('samplerate'))
+  if samplerate_dep.found()
+    cdata.set('HAVE_LIBSAMPLERATE', 1)
+  endif
 
-gst_dep = dependency('gstreamer-1.0', version : '>= 1.14', required : get_option('gstreamer'))
-gstapp_dep = dependency('gstreamer-app-1.0', required : get_option('gstreamer'))
-gstrtp_dep = dependency('gstreamer-rtp-1.0', required : get_option('gstreamer'))
+  speex_dep = dependency('speexdsp', version : '>= 1.2', required : get_option('speex'))
+  if speex_dep.found()
+    cdata.set('HAVE_SPEEX', 1)
+  endif
 
-have_gstreamer = false
-if gst_dep.found() and gstapp_dep.found() and gstrtp_dep.found()
-  assert(gio_dep.found(), 'GStreamer-based RTP needs glib I/O library (GIO)')
-  have_gstreamer = true
-endif
+  soxr_dep = dependency('soxr', version : '>= 0.1.1', required : get_option('soxr'))
+  if soxr_dep.found()
+    cdata.set('HAVE_SOXR', 1)
+  endif
+
+  webrtc_dep = dependency('webrtc-audio-processing', version : '>= 0.2', required : get_option('webrtc-aec'))
+  if webrtc_dep.found()
+    cdata.set('HAVE_WEBRTC', 1)
+  endif
+
+  systemd_dep = dependency('systemd', required : get_option('systemd'))
+  if systemd_dep.found() and systemduserunitdir == ''
+    systemduserunitdir = systemd_dep.get_pkgconfig_variable('systemduserunitdir')
+  endif
+
+  libelogind_dep = dependency('libelogind', required : get_option('elogind'))
+  if libelogind_dep.found()
+    cdata.set('HAVE_SYSTEMD_LOGIN', 1)
+  endif
+
+  tcpwrap_dep = cc.find_library('wrap', required: get_option('tcpwrap'))
+  if cc.has_header('tcpd.h') and cc.has_function('hosts_access', dependencies : tcpwrap_dep)
+    cdata.set('HAVE_LIBWRAP', 1)
+  endif
+
+  if x11_dep.found()
+    xcb_dep  = dependency('xcb',  required : true, version : '>= 1.6')
+    ice_dep  = dependency('ice',  required : true)
+    sm_dep   = dependency('sm',   required : true)
+    xtst_dep = dependency('xtst', required : true)
+    cdata.set('HAVE_X11', 1)
+    if cc.has_function('XSetIOErrorExitHandler', dependencies: x11_dep)
+      cdata.set('HAVE_XSETIOERROREXITHANDLER', 1)
+    endif
+  endif
+
+  avahi_dep = dependency('avahi-client', version : '>= 0.6.0', required : get_option('avahi'), disabler : true)
+  if avahi_dep.found()
+    cdata.set('HAVE_AVAHI', 1)
+  else
+    cdata.set('HAVE_AVAHI', 0)
+  endif
 
-bluez5_gst_dep = dependency('gstreamer-1.0', version : '>= 1.14', required : get_option('bluez5-gstreamer'))
-bluez5_gstapp_dep = dependency('gstreamer-app-1.0', required : get_option('bluez5-gstreamer'))
-have_bluez5_gstreamer = false
-if bluez5_gst_dep.found() and bluez5_gstapp_dep.found()
-  have_bluez5_gstreamer = true
-  cdata.set('HAVE_GSTLDAC', 1)
-  cdata.set('HAVE_GSTAPTX', 1)
+  sbc_dep = dependency('sbc', version : '>= 1.0', required : false)
+
+  bluez_dep = dependency('bluez', required : get_option('bluez5'))
+
+  if bluez_dep.found()
+    assert(dbus_dep.found(), 'BlueZ requires D-Bus support')
+    assert(sbc_dep.found(), 'BlueZ requires SBC support')
+    cdata.set('HAVE_SBC', 1)
+    cdata.set('HAVE_BLUEZ', 1)
+    cdata.set('HAVE_BLUEZ_5', 1)
+    if get_option('bluez5-native-headset')
+      cdata.set('HAVE_BLUEZ_5_NATIVE_HEADSET', 1)
+    endif
+    if get_option('bluez5-ofono-headset')
+      cdata.set('HAVE_BLUEZ_5_OFONO_HEADSET', 1)
+    endif
+  endif
+
+  jack_dep = dependency('jack', version : '>= 0.117.0', required : get_option('jack'))
+  if jack_dep.found()
+    cdata.set('HAVE_JACK', 1)
+  endif
+
+  lirc_dep = dependency('lirc', required : get_option('lirc'))
+  if lirc_dep.found()
+    cdata.set('HAVE_LIRC', 1)
+  endif
+
+  openssl_dep = dependency('openssl', version : '>= 0.9', required : get_option('openssl'))
+  if openssl_dep.found()
+    cdata.set('HAVE_OPENSSL', 1)
+  endif
+
+  udev_dep = dependency('libudev', version : '>= 143', required : get_option('udev'))
+  if udev_dep.found()
+    cdata.set('HAVE_UDEV', 1)
+  endif
+
+  if get_option('hal-compat')
+    cdata.set('HAVE_HAL_COMPAT', 1)
+  endif
+
+  gst_dep = dependency('gstreamer-1.0', version : '>= 1.14', required : get_option('gstreamer'))
+  gstapp_dep = dependency('gstreamer-app-1.0', required : get_option('gstreamer'))
+  gstrtp_dep = dependency('gstreamer-rtp-1.0', required : get_option('gstreamer'))
+
+  have_gstreamer = false
+  if gst_dep.found() and gstapp_dep.found() and gstrtp_dep.found()
+    assert(gio_dep.found(), 'GStreamer-based RTP needs glib I/O library (GIO)')
+    have_gstreamer = true
+  endif
+
+  bluez5_gst_dep = dependency('gstreamer-1.0', version : '>= 1.14', required : get_option('bluez5-gstreamer'))
+  bluez5_gstapp_dep = dependency('gstreamer-app-1.0', required : get_option('bluez5-gstreamer'))
+  have_bluez5_gstreamer = false
+  if bluez5_gst_dep.found() and bluez5_gstapp_dep.found()
+    have_bluez5_gstreamer = true
+    cdata.set('HAVE_GSTLDAC', 1)
+    cdata.set('HAVE_GSTAPTX', 1)
+  endif
 endif
 
 # These are required for the CMake file generation
 cdata.set('PA_LIBDIR', libdir)
 cdata.set('PA_INCDIR', includedir)
-if glib_dep.found()
-  cdata.set('HAVE_GLIB20', 1) # to match the AM_CONDITIONAL for CMake file generation
-endif
 
 # Test dependencies
 
@@ -817,81 +830,89 @@ check_dep = dependency('check', version : '>= 0.9.10', required : get_option('te
 if get_option('doxygen')
   subdir('doxygen')
 endif
-subdir('po')
+if get_option('client')
+  subdir('po')
+endif
 if get_option('man')
   subdir('man')
 endif
 subdir('shell-completion/bash')
 subdir('shell-completion/zsh')
 subdir('src')
-subdir('vala')
+if get_option('client')
+ subdir('vala')
+endif
 
 # Now generate config.h from everything above
 configure_file(output : 'config.h', configuration : cdata)
 
-# pkg-config files
-
-pc_cdata = configuration_data()
-
-pc_cdata.set('prefix', prefix)
-pc_cdata.set('exec_prefix', prefix)
-pc_cdata.set('libdir', libdir)
-pc_cdata.set('includedir', includedir)
-pc_cdata.set('modlibexecdir', modlibexecdir)
-pc_cdata.set('PACKAGE_VERSION', pa_version_str)
-pc_cdata.set('PA_MAJORMINOR', pa_version_major_minor)
-# FIXME: the line below is wrong. Currently the meson thread dep lacks documentation,
-# and doesn't allow introspection, ie. none of get_pkgconfig_variable() or
-# get_configtool_variable() work with it, so we have no way to get this flag right,
-# unless we do all the work ourselves. See current work in glib, also meson #553.
-pc_cdata.set('PTHREAD_LIBS', '-pthread')
-
-pc_files = [
-  'libpulse.pc',
-  'libpulse-simple.pc',
-]
+if get_option('client')
 
-if glib_dep.found()
-  pc_files += 'libpulse-mainloop-glib.pc'
-endif
+  # pkg-config files
 
-foreach file : pc_files
-  configure_file(
-    input : file + '.in',
-    output : file,
-    configuration : pc_cdata,
-    install_dir : pkgconfigdir)
-endforeach
+  pc_cdata = configuration_data()
 
-# CMake files
+  pc_cdata.set('prefix', prefix)
+  pc_cdata.set('exec_prefix', prefix)
+  pc_cdata.set('libdir', libdir)
+  pc_cdata.set('includedir', includedir)
+  pc_cdata.set('modlibexecdir', modlibexecdir)
+  pc_cdata.set('PACKAGE_VERSION', pa_version_str)
+  pc_cdata.set('PA_MAJORMINOR', pa_version_major_minor)
+  # FIXME: the line below is wrong. Currently the meson thread dep lacks documentation,
+  # and doesn't allow introspection, ie. none of get_pkgconfig_variable() or
+  # get_configtool_variable() work with it, so we have no way to get this flag right,
+  # unless we do all the work ourselves. See current work in glib, also meson #553.
+  pc_cdata.set('PTHREAD_LIBS', '-pthread')
 
-m4 = find_program('m4', required: true)
+  pc_files = [
+    'libpulse.pc',
+    'libpulse-simple.pc',
+  ]
 
-cmakedir = join_paths(libdir, 'cmake', 'PulseAudio')
+  if glib_dep.found()
+    pc_files += 'libpulse-mainloop-glib.pc'
+  endif
 
-cmake_template_file = configure_file(
-  input : 'PulseAudioConfig.cmake.in',
-  output : 'PulseAudioConfig.cmake.tmp',
-  configuration: cdata,
-)
+  foreach file : pc_files
+    configure_file(
+      input : file + '.in',
+      output : file,
+      configuration : pc_cdata,
+      install_dir : pkgconfigdir)
+  endforeach
 
-custom_target('PulseAudioConfig.cmake',
-  input : cmake_template_file,
-  output : 'PulseAudioConfig.cmake',
-  capture : true,
-  command : [m4, '@INPUT@'],
-  build_by_default : true,
-  install : true,
-  install_dir : cmakedir,
-)
+  # CMake files
 
-configure_file(
-  input : 'PulseAudioConfigVersion.cmake.in',
-  output : 'PulseAudioConfigVersion.cmake',
-  configuration: cdata,
-  install : true,
-  install_dir : cmakedir,
-)
+  m4 = find_program('m4', required: true)
+
+  cmakedir = join_paths(libdir, 'cmake', 'PulseAudio')
+
+  cmake_template_file = configure_file(
+    input : 'PulseAudioConfig.cmake.in',
+    output : 'PulseAudioConfig.cmake.tmp',
+    configuration: cdata,
+  )
+
+  custom_target('PulseAudioConfig.cmake',
+    input : cmake_template_file,
+    output : 'PulseAudioConfig.cmake',
+    capture : true,
+    command : [m4, '@INPUT@'],
+    build_by_default : true,
+    install : true,
+    install_dir : cmakedir,
+  )
+
+  configure_file(
+    input : 'PulseAudioConfigVersion.cmake.in',
+    output : 'PulseAudioConfigVersion.cmake',
+    configuration: cdata,
+    install : true,
+    install_dir : cmakedir,
+  )
+
+endif # client
 
 ############################################################
 
@@ -922,49 +943,66 @@ summary = [
 #  'LIBS:                          @0@'.format(${LIBS}),
   '',
   'Enable pulseaudio daemon:      @0@'.format(get_option('daemon')),
+  'Enable pulseaudio client:      @0@'.format(get_option('client')),
   '',
   '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')),
-  'Enable OSS Output:             @0@'.format(cdata.has('HAVE_OSS_OUTPUT')),
+  'Enable D-Bus:                  @0@'.format(dbus_dep.found()),
+  'Enable GLib 2:                 @0@'.format(glib_dep.found()),
+  'Enable systemd integration:    @0@'.format(libsystemd_dep.found()),
+  'Enable FFTW:                   @0@'.format(fftw_dep.found()),
+  'Enable IPv6:                   @0@'.format(get_option('ipv6')),
+  'Enable Gcov coverage:          @0@'.format(get_option('gcov')),
+  'Enable Valgrind:               @0@'.format(cdata.has('HAVE_VALGRIND_MEMCHECK_H')),
+  'Enable man pages:              @0@'.format(get_option('man')),
+  'Enable unit tests:             @0@'.format(get_option('tests')),
+]
+
+if get_option('client')
+summary += [
+  '',
+  '--- Pulseaudio client features ---',
+  '',
+  'Enable Gtk+ 3:                 @0@'.format(gtk_dep.found()),
+  'Enable Async DNS:              @0@'.format(asyncns_dep.found()),
   'Enable OSS Wrapper:            @0@'.format(cdata.has('HAVE_OSS_WRAPPER')),
+]
+endif
+
+if get_option('daemon')
+summary += [
+  '',
+  '--- Pulseaudio daemon features ---',
+  '',
+  'Safe X11 I/O errors:           @0@'.format(cdata.has('HAVE_XSETIOERROREXITHANDLER')),
+  'Enable Avahi:                  @0@'.format(avahi_dep.found()),
+  'Enable OSS Output:             @0@'.format(cdata.has('HAVE_OSS_OUTPUT')),
 #  'Enable EsounD:                 @0@'.format(${ENABLE_ESOUND}),
   'Enable Alsa:                   @0@'.format(alsa_dep.found()),
+  'Enable Jack:                   @0@'.format(jack_dep.found()),
+  'Enable LIRC:                   @0@'.format(lirc_dep.found()),
 #  'Enable CoreAudio:              @0@'.format(${ENABLE_COREAUDIO}),
 #  'Enable Solaris:                @0@'.format(${ENABLE_SOLARIS}),
 #  'Enable WaveOut:                @0@'.format(${ENABLE_WAVEOUT}),
-  'Enable GLib 2:                 @0@'.format(glib_dep.found()),
   'Enable GSettings:              @0@'.format(gio_dep.found()),
-  'Enable Gtk+ 3:                 @0@'.format(gtk_dep.found()),
-  'Enable Avahi:                  @0@'.format(avahi_dep.found()),
-  'Enable Jack:                   @0@'.format(jack_dep.found()),
-  'Enable Async DNS:              @0@'.format(asyncns_dep.found()),
-  'Enable LIRC:                   @0@'.format(lirc_dep.found()),
-  'Enable D-Bus:                  @0@'.format(dbus_dep.found()),
-  '  Enable BlueZ 5:              @0@'.format(cdata.has('HAVE_BLUEZ_5')),
-  '    Enable native headsets:    @0@'.format(cdata.has('HAVE_BLUEZ_5_NATIVE_HEADSET')),
-  '    Enable  ofono headsets:    @0@'.format(cdata.has('HAVE_BLUEZ_5_OFONO_HEADSET')),
-  '    Enable GStreamer based codecs: @0@'.format(have_bluez5_gstreamer),
-  'Enable udev:                   @0@'.format(udev_dep.found()),
-  '  Enable HAL->udev compat:     @0@'.format(get_option('hal-compat')),
-  'Enable systemd:                @0@'.format(libsystemd_dep.found()),
-  'Enable elogind:                @0@'.format(libelogind_dep.found()),
-  'Enable TCP Wrappers:           @0@'.format(tcpwrap_dep.found()),
+  'Enable BlueZ 5:              @0@'.format(cdata.has('HAVE_BLUEZ_5')),
+  '  Enable native headsets:    @0@'.format(cdata.has('HAVE_BLUEZ_5_NATIVE_HEADSET')),
+  '  Enable  ofono headsets:    @0@'.format(cdata.has('HAVE_BLUEZ_5_OFONO_HEADSET')),
+  '  Enable GStreamer based codecs: @0@'.format(have_bluez5_gstreamer),
+  'Enable GStreamer:              @0@'.format(have_gstreamer),
   'Enable libsamplerate:          @0@'.format(samplerate_dep.found()),
-  'Enable IPv6:                   @0@'.format(get_option('ipv6')),
-  'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
-  'Enable FFTW:                   @0@'.format(fftw_dep.found()),
   'Enable ORC:                    @0@'.format(have_orcc),
-  'Enable GStreamer:              @0@'.format(have_gstreamer),
   'Enable Adrian echo canceller:  @0@'.format(get_option('adrian-aec')),
   'Enable Speex (resampler, AEC): @0@'.format(speex_dep.found()),
   'Enable SoXR (resampler):       @0@'.format(soxr_dep.found()),
   'Enable WebRTC echo canceller:  @0@'.format(webrtc_dep.found()),
-  'Enable Gcov coverage:          @0@'.format(get_option('gcov')),
-  'Enable Valgrind:               @0@'.format(cdata.has('HAVE_VALGRIND_MEMCHECK_H')),
-  'Enable man pages:              @0@'.format(get_option('man')),
-  'Enable unit tests:             @0@'.format(get_option('tests')),
   '',
+  'Enable udev:                   @0@'.format(udev_dep.found()),
+  '  Enable HAL->udev compat:     @0@'.format(get_option('hal-compat')),
+  'Enable systemd units:          @0@'.format(systemd_dep.found()),
+  'Enable elogind:                @0@'.format(libelogind_dep.found()),
+  'Enable TCP Wrappers:           @0@'.format(tcpwrap_dep.found()),
+  'Enable OpenSSL (for Airtunes): @0@'.format(openssl_dep.found()),
   'Database:                      @0@'.format(get_option('database')),
   'Legacy Database Entry Support: @0@'.format(get_option('legacy-database-entry-format')),
   'module-stream-restore:',
@@ -977,47 +1015,48 @@ summary = [
 #  'Force preopen:                 @0@'.format(${FORCE_PREOPEN}),
 #  'Preopened modules:             @0@'.format(${PREOPEN_MODS}),
 ]
+endif
 
 message('\n    '.join(summary))
 
 # Sanity checks
 
-if not speex_dep.found() and not webrtc_dep.found() and not get_option('adrian-aec')
+if get_option('daemon') and not speex_dep.found() and not webrtc_dep.found() and not get_option('adrian-aec')
   error('At least one echo canceller implementation must be available!')
 endif
 
-if samplerate_dep.found()
+if get_option('daemon') and samplerate_dep.found()
   warning('Support for libsamplerate is DEPRECATED')
 endif
 
-if host_machine.system() != 'windows'
-  if not dbus_dep.found()
-    message = [
-      'You do not have D-Bus support enabled. It is strongly recommended',
-      'that you enable D-Bus support if your platform supports it.',
-      'Many parts of PulseAudio use D-Bus, from ConsoleKit interaction',
-      'to the Device Reservation Protocol to speak to JACK, Bluetooth',
-      'support and even a native control protocol for communicating and',
-      'controlling the PulseAudio daemon itself.',
-    ]
-    warning('\n' + '\n'.join(message))
-  endif
-  if host_machine.system() == 'linux' and not udev_dep.found()
-    message = [
-      'You do not have udev support enabled. It is strongly recommended',
-      'that you enable udev support if your platform supports it as it is',
-      'the primary method used to detect hardware audio devices (on Linux)',
-      'and is thus a critical part of PulseAudio on that platform.',
-    ]
-    warning('\n' + '\n'.join(message))
-  endif
-  if not speex_dep.found()
-    message = [
-      'You do not have speex support enabled. It is strongly recommended',
-      'that you enable speex support if your platform supports it as it is',
-      'the primary method used for audio resampling and is thus a critical',
-      'part of PulseAudio on that platform.',
-    ]
-    warning('\n' + '\n'.join(message))
-  endif
+if host_machine.system() != 'windows' and not dbus_dep.found()
+  message = [
+    'You do not have D-Bus support enabled. It is strongly recommended',
+    'that you enable D-Bus support if your platform supports it.',
+    'Many parts of PulseAudio use D-Bus, from ConsoleKit interaction',
+    'to the Device Reservation Protocol to speak to JACK, Bluetooth',
+    'support and even a native control protocol for communicating and',
+    'controlling the PulseAudio daemon itself.',
+  ]
+  warning('\n' + '\n'.join(message))
+endif
+
+if get_option('daemon') and host_machine.system() == 'linux' and not udev_dep.found()
+  message = [
+    'You do not have udev support enabled. It is strongly recommended',
+    'that you enable udev support if your platform supports it as it is',
+    'the primary method used to detect hardware audio devices (on Linux)',
+    'and is thus a critical part of PulseAudio on that platform.',
+  ]
+  warning('\n' + '\n'.join(message))
+endif
+
+if get_option('daemon') and host_machine.system() != 'windows' and not speex_dep.found()
+  message = [
+    'You do not have speex support enabled. It is strongly recommended',
+    'that you enable speex support if your platform supports it as it is',
+    'the primary method used for audio resampling and is thus a critical',
+    'part of PulseAudio on that platform.',
+  ]
+  warning('\n' + '\n'.join(message))
 endif


=====================================
meson_options.txt
=====================================
@@ -1,6 +1,9 @@
 option('daemon',
        type : 'boolean', value : true,
        description : 'Enable building and installation of pulseaudio daemon and supporting configuration files')
+option('client',
+       type : 'boolean', value : true,
+       description : 'Build and install pulseaudio client libraries and utilities')
 option('doxygen',
        type : 'boolean', value : true,
        description : 'Enable building and installation of documentation generated with doxygen')


=====================================
po/meson.build
=====================================
@@ -1,4 +1,3 @@
-i18n = import('i18n')
 i18n.gettext(
   meson.project_name(),
   preset: 'glib',
@@ -7,5 +6,3 @@ i18n.gettext(
   args: ['--msgid-bugs-address=https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/new',
          '--width=90'],
 )
-
-po_dir = meson.current_source_dir()


=====================================
shell-completion/bash/meson.build
=====================================
@@ -3,25 +3,33 @@ if bashcompletiondir != 'no'
 
   if get_option('daemon')
     aliases += [
+      'pulseaudio',
       'pacmd',
       'pasuspender',
     ]
-  endif
 
-  aliases += [
-    'pacat',
-    'pactl',
-    'padsp',
-    'paplay',
-    'parec',
-    'parecord',
-  ]
+    # Create target directory for symlinks
+    if meson.version().version_compare('>= 0.60.0')
+      install_emptydir(bashcompletiondir)
+    else
+      meson.add_install_script('sh', '-c', 'mkdir -p $DESTDIR at 0@'.format(bashcompletiondir))
+    endif
+  endif
 
-  install_data('pulseaudio', install_dir : bashcompletiondir)
+  if get_option('client')
+    aliases += [
+      'pacat',
+      'padsp',
+      'paplay',
+      'parec',
+      'parecord',
+    ]
+    install_data('pactl', install_dir : bashcompletiondir)
+  endif
 
   foreach alias : aliases
     dst = join_paths(bashcompletiondir, alias)
-    cmd = 'ln -fs @0@ $DESTDIR at 1@'.format('pulseaudio', dst)
+    cmd = 'ln -fs @0@ $DESTDIR at 1@'.format('pactl', dst)
     meson.add_install_script('sh', '-c', cmd)
   endforeach
 endif


=====================================
shell-completion/bash/pulseaudio → shell-completion/bash/pactl
=====================================


=====================================
shell-completion/zsh/meson.build
=====================================
@@ -1,3 +1,5 @@
-if zshcompletiondir != 'no'
-  install_data('_pulseaudio', install_dir : zshcompletiondir)
+if get_option('client')
+  if zshcompletiondir != 'no'
+    install_data('_pulseaudio', install_dir : zshcompletiondir)
+  endif
 endif


=====================================
src/daemon/meson.build
=====================================
@@ -30,8 +30,8 @@ executable('pulseaudio',
   install_rpath : privlibdir,
   include_directories : [configinc, topinc],
   link_args : ['-ffast-math'],
-  link_with : [libpulsecore, libpulsecommon, libpulse],
-  dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep, dl_dep, libintl_dep, platform_dep, platform_socket_dep],
+  link_with : [libpulsecore],
+  dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep, dl_dep, libintl_dep, platform_dep, platform_socket_dep, libpulsecommon_dep, libpulse_dep],
   c_args : pa_c_args,
 )
 


=====================================
src/meson.build
=====================================
@@ -188,25 +188,32 @@ else
 endif
 # FIXME: Do SIMD things
 
-libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
-  libpulsecommon_sources,
-  libpulsecommon_headers,
-  include_directories : [configinc, topinc],
-  c_args : [pa_c_args],
-  link_args : [nodelete_link_args],
-  install : true,
-  install_dir : privlibdir,
-  dependencies : [
-    libm_dep, thread_dep, dl_dep, shm_dep, iconv_dep, sndfile_dep, dbus_dep,
-    x11_dep, libsystemd_dep, glib_dep.partial_dependency(compile_args: true),
-    gtk_dep.partial_dependency(compile_args: true), asyncns_dep, libintl_dep,
-    platform_dep, platform_socket_dep, execinfo_dep,
-  ],
-  implicit_include_directories : false)
+if not get_option('client')
+  libpulsecommon_dep = cc.find_library('pulsecommon-' + pa_version_major_minor, dirs : privlibdir, required : true)
+  libpulse_dep = dependency('libpulse', required : true)
+  libpulse_simple_dep = dependency('libpulse-simple', required : true)
+else
+  libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor,
+    libpulsecommon_sources,
+    libpulsecommon_headers,
+    include_directories : [configinc, topinc],
+    c_args : [pa_c_args],
+    link_args : [nodelete_link_args],
+    install : true,
+    install_dir : privlibdir,
+    dependencies : [
+      libm_dep, thread_dep, dl_dep, shm_dep, iconv_dep, sndfile_dep, dbus_dep,
+      x11_dep, libsystemd_dep, glib_dep.partial_dependency(compile_args: true),
+      gtk_dep.partial_dependency(compile_args: true), asyncns_dep, libintl_dep,
+      platform_dep, platform_socket_dep, execinfo_dep,
+    ],
+    implicit_include_directories : false)
+
+  libpulsecommon_dep = declare_dependency(link_with: libpulsecommon)
 
-libpulsecommon_dep = declare_dependency(link_with: libpulsecommon)
+  subdir('pulse')
+endif
 
-subdir('pulse')
 if get_option('daemon')
   subdir('pulsecore')
   subdir('daemon')


=====================================
src/modules/gsettings/meson.build
=====================================
@@ -8,8 +8,7 @@ gsettings_helper = executable('gsettings-helper',
   gsettings_helper_sources,
   c_args : pa_c_args,
   include_directories : [configinc, topinc],
-  link_with : [libpulsecommon, libpulse],
-  dependencies : [gio_dep],
+  dependencies : [gio_dep, glib_dep, libpulsecommon_dep, libpulse_dep],
   install_dir : pulselibexecdir,
   install_rpath : privlibdir,
   install : true,


=====================================
src/modules/meson.build
=====================================
@@ -161,7 +161,7 @@ if dbus_dep.found() and fftw_dep.found()
   ]
 endif
 
-if get_option('gsettings').enabled() and gio_dep.found()
+if get_option('gsettings').enabled() and glib_dep.found() and gio_dep.found()
   subdir('gsettings')
   all_modules += [
     [ 'module-gsettings',


=====================================
src/tests/meson.build
=====================================
@@ -9,28 +9,48 @@
 
 default_tests = []
 
-default_tests += [
-  [ 'channelmap-test', 'channelmap-test.c',
-    [ check_dep, libpulse_dep ] ],
-  [ 'core-util-test', 'core-util-test.c',
-    [ check_dep, libpulse_dep, libpulsecommon_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 ] ],
-  [ 'json-test', 'json-test.c',
-    [ check_dep, libpulse_dep, libpulsecommon_dep ] ],
-  [ 'mainloop-test', 'mainloop-test.c',
-    [ check_dep, libpulse_dep, libpulsecommon_dep ] ],
-  [ 'proplist-test', 'proplist-test.c',
-    [ check_dep, libpulse_dep, libpulsecommon_dep ] ],
-  [ 'thread-mainloop-test', 'thread-mainloop-test.c',
-    [ 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 get_option('client')
+  default_tests += [
+    [ 'channelmap-test', 'channelmap-test.c',
+      [ check_dep, libpulse_dep ] ],
+    [ 'core-util-test', 'core-util-test.c',
+      [ check_dep, libpulse_dep, libpulsecommon_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 ] ],
+    [ 'json-test', 'json-test.c',
+      [ check_dep, libpulse_dep, libpulsecommon_dep ] ],
+    [ 'proplist-test', 'proplist-test.c',
+      [ check_dep, libpulse_dep, libpulsecommon_dep ] ],
+    [ 'thread-mainloop-test', 'thread-mainloop-test.c',
+      [ 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 ] ],
+  ]
+
+  default_tests += [
+    [ 'mainloop-test', 'mainloop-test.c',
+      [ check_dep, libpulse_dep, libpulsecommon_dep ] ],
+  ]
+
+  if cc.has_header('sys/eventfd.h')
+    default_tests += [
+      [ 'srbchannel-test', 'srbchannel-test.c',
+        [ check_dep, libpulse_dep, libpulsecommon_dep ] ]
+    ]
+  endif
+
+  if glib_dep.found()
+    default_tests += [
+      [ 'mainloop-test-glib', 'mainloop-test.c',
+        [ check_dep, glib_dep, libpulse_dep, libpulsecommon_dep, libpulse_mainloop_glib_dep ],
+        [], ['-DGLIB_MAIN_LOOP'] ]
+    ]
+  endif
+endif
 
 if get_option('daemon')
   default_tests += [
@@ -98,16 +118,6 @@ if get_option('daemon')
     ]
   endif
 
-endif
-
-if cc.has_header('sys/eventfd.h')
-  default_tests += [
-    [ 'srbchannel-test', 'srbchannel-test.c',
-      [ check_dep, libpulse_dep, libpulsecommon_dep ] ]
-  ]
-endif
-
-if get_option('daemon')
   if alsa_dep.found()
     default_tests += [
       [ 'alsa-mixer-path-test', 'alsa-mixer-path-test.c',
@@ -117,23 +127,24 @@ if get_option('daemon')
   endif
 endif
 
-if glib_dep.found()
-  default_tests += [
-    [ 'mainloop-test-glib', 'mainloop-test.c',
-      [ check_dep, glib_dep, libpulse_dep, libpulsecommon_dep, libpulse_mainloop_glib_dep ],
-      [], ['-DGLIB_MAIN_LOOP'] ]
-  ]
-endif
-
 # No-run tests
 norun_tests = []
 
-norun_tests += [
-  [ 'pacat-simple', 'pacat-simple.c',
-    [ libpulse_dep, libpulse_simple_dep ] ],
-  [ 'parec-simple', 'parec-simple.c',
-    [ libpulse_dep, libpulse_simple_dep ] ],
-]
+if get_option('client')
+  norun_tests += [
+    [ 'pacat-simple', 'pacat-simple.c',
+      [ libpulse_dep, libpulse_simple_dep ] ],
+    [ 'parec-simple', 'parec-simple.c',
+      [ libpulse_dep, libpulse_simple_dep ] ],
+  ]
+
+  if gtk_dep.found() and glib_dep.found()
+    norun_tests += [
+      [ 'gtk-test', 'gtk-test.c',
+        [ gtk_dep, libpulse_dep, libpulse_mainloop_glib_dep ] ]
+    ]
+  endif
+endif
 
 if get_option('daemon')
   norun_tests += [
@@ -179,26 +190,18 @@ if get_option('daemon')
     ]
   endif
 
-endif
-
-if cc.has_function('pthread_setaffinity_np', dependencies : thread_dep)
-  norun_tests += [
-    [ 'atomic-test', 'atomic-test.c',
-      [ check_dep, libpulsecommon_dep, thread_dep ] ]
-  ]
-endif
-
-if alsa_dep.found()
-  norun_tests += [
-    [ 'alsa-time-test', 'alsa-time-test.c', [ alsa_dep, thread_dep ] ]
-  ]
-endif
+  if cc.has_function('pthread_setaffinity_np', dependencies : thread_dep)
+    norun_tests += [
+      [ 'atomic-test', 'atomic-test.c',
+        [ check_dep, libpulsecommon_dep, thread_dep ] ]
+    ]
+  endif
 
-if gtk_dep.found() and glib_dep.found()
-  norun_tests += [
-    [ 'gtk-test', 'gtk-test.c',
-      [ gtk_dep, libpulse_dep, libpulse_mainloop_glib_dep ] ]
-  ]
+  if alsa_dep.found()
+    norun_tests += [
+      [ 'alsa-time-test', 'alsa-time-test.c', [ alsa_dep, thread_dep ] ]
+    ]
+  endif
 endif
 
 # Generate tests


=====================================
src/utils/meson.build
=====================================
@@ -1,46 +1,48 @@
-pacat_sources = [
-  'pacat.c',
-]
-
-pacat_aliases = [
-  'pamon',
-  'paplay',
-  'parec',
-  'parecord',
-]
-
-executable('pacat',
-  pacat_sources,
-  install: true,
-  install_rpath : privlibdir,
-  include_directories : [configinc, topinc],
-  link_with : [libpulsecommon, libpulse],
-  dependencies : [sndfile_dep, libintl_dep],
-  c_args : pa_c_args,
-)
-
-# Windows doesn't support symbolic links.
-if host_machine.system() != 'windows'
-  foreach alias : pacat_aliases
-    dst = join_paths(bindir, alias)
-    cmd = 'ln -fs @0@ $DESTDIR at 1@'.format('pacat', dst)
-    meson.add_install_script('sh', '-c', cmd)
-  endforeach
-endif
+if get_option('client')
+  pacat_sources = [
+    'pacat.c',
+  ]
+
+  pacat_aliases = [
+    'pamon',
+    'paplay',
+    'parec',
+    'parecord',
+  ]
 
-pactl_sources = [
-  'pactl.c',
-]
+  executable('pacat',
+    pacat_sources,
+    install: true,
+    install_rpath : privlibdir,
+    include_directories : [configinc, topinc],
+    link_with : [libpulsecommon, libpulse],
+    dependencies : [sndfile_dep, libintl_dep],
+    c_args : pa_c_args,
+  )
+
+  # Windows doesn't support symbolic links.
+  if host_machine.system() != 'windows'
+    foreach alias : pacat_aliases
+      dst = join_paths(bindir, alias)
+      cmd = 'ln -fs @0@ $DESTDIR at 1@'.format('pacat', dst)
+      meson.add_install_script('sh', '-c', cmd)
+    endforeach
+  endif
+
+  pactl_sources = [
+    'pactl.c',
+  ]
 
-executable('pactl',
-  pactl_sources,
-  install: true,
-  install_rpath : privlibdir,
-  include_directories : [configinc, topinc],
-  link_with : [libpulsecommon, libpulse],
-  dependencies : [sndfile_dep, libintl_dep],
-  c_args : pa_c_args,
-)
+  executable('pactl',
+    pactl_sources,
+    install: true,
+    install_rpath : privlibdir,
+    include_directories : [configinc, topinc],
+    link_with : [libpulsecommon, libpulse],
+    dependencies : [sndfile_dep, libintl_dep],
+    c_args : pa_c_args,
+  )
+endif
 
 if get_option('daemon')
   if host_machine.system() != 'windows'
@@ -53,8 +55,7 @@ if get_option('daemon')
       install: true,
       install_rpath : privlibdir,
       include_directories : [configinc, topinc],
-      link_with : [libpulsecommon, libpulse],
-      dependencies: [libintl_dep],
+      dependencies: [libintl_dep, libpulsecommon_dep, libpulse_dep],
       c_args : pa_c_args,
     )
 
@@ -67,57 +68,58 @@ if get_option('daemon')
       install: true,
       install_rpath : privlibdir,
       include_directories : [configinc, topinc],
-      link_with : [libpulsecommon, libpulse],
-      dependencies: [libintl_dep],
+      dependencies: [libintl_dep, libpulsecommon_dep, libpulse_dep],
       c_args : pa_c_args,
     )
   endif
 endif
 
-if x11_dep.found()
-  pax11publish_sources = [
-    'pax11publish.c',
-  ]
+if get_option('client')
+  if x11_dep.found()
+    pax11publish_sources = [
+      'pax11publish.c',
+    ]
 
-  executable('pax11publish',
-    pax11publish_sources,
-    install: true,
-    install_rpath : privlibdir,
-    include_directories : [configinc, topinc],
-    link_with : [libpulsecommon, libpulse],
-    dependencies : [x11_dep, libintl_dep],
-    c_args : pa_c_args,
-  )
-endif
+    executable('pax11publish',
+      pax11publish_sources,
+      install: true,
+      install_rpath : privlibdir,
+      include_directories : [configinc, topinc],
+      link_with : [libpulsecommon, libpulse],
+      dependencies : [x11_dep, libintl_dep],
+      c_args : pa_c_args,
+    )
+  endif
 
-if cdata.has('HAVE_OSS_WRAPPER')
-  libpulsecommon_sources = [
-    'padsp.c',
-  ]
+  if cdata.has('HAVE_OSS_WRAPPER')
+    libpulsecommon_sources = [
+      'padsp.c',
+    ]
 
-  libpulsedsp = shared_library('pulsedsp',
-    libpulsecommon_sources,
-    install: true,
-    install_dir : padsplibdir,
-    install_rpath : privlibdir,
-    include_directories : [configinc, topinc],
-    link_with : [libpulsecommon, libpulse],
-    link_args : [nodelete_link_args],
-    dependencies: [thread_dep, dl_dep],
-    c_args : [pa_c_args, '-Wno-nonnull-compare']
-  )
+    libpulsedsp = shared_library('pulsedsp',
+      libpulsecommon_sources,
+      install: true,
+      install_dir : padsplibdir,
+      install_rpath : privlibdir,
+      include_directories : [configinc, topinc],
+      link_with : [libpulsecommon, libpulse],
+      link_args : [nodelete_link_args],
+      dependencies: [thread_dep, dl_dep],
+      c_args : [pa_c_args, '-Wno-nonnull-compare']
+    )
 
-  configure_file(
-    input : 'padsp.in',
-    output : 'padsp',
-    configuration : cdata,
-    install : true,
-    install_dir : bindir,
-  )
-endif
+    configure_file(
+      input : 'padsp.in',
+      output : 'padsp',
+      configuration : cdata,
+      install : true,
+      install_dir : bindir,
+    )
+  endif
 
-if dbus_dep.found() and fftw_dep.found()
-  install_data('qpaeq', install_dir : bindir)
-endif
+  if dbus_dep.found() and fftw_dep.found()
+    install_data('qpaeq', install_dir : bindir)
+  endif
 
-install_data('pa-info', install_dir : bindir)
+  install_data('pa-info', install_dir : bindir)
+endif



View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/1a3ffd4cee4b350c5222c2790fa635da46aa5ff7...56a9743fcb3edd1766754a5ce08860bb5b890d67

-- 
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/compare/1a3ffd4cee4b350c5222c2790fa635da46aa5ff7...56a9743fcb3edd1766754a5ce08860bb5b890d67
You're receiving this email because of your account on gitlab.freedesktop.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-commits/attachments/20211117/7b6c23c6/attachment-0001.htm>


More information about the pulseaudio-commits mailing list