From 56a9743fcb3edd1766754a5ce08860bb5b890d67 Mon Sep 17 00:00:00 2001 From: "Igor V. Kovalenko" Date: Thu, 11 Nov 2021 01:44:30 +0300 Subject: [PATCH] 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: --- meson.build | 26 +++++++++++++------------- src/modules/gsettings/meson.build | 2 +- src/modules/meson.build | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index 5f51f3a30..af921e7b4 100644 --- a/meson.build +++ b/meson.build @@ -596,6 +596,12 @@ if dbus_dep.found() cdata.set('HAVE_DBUS', 1) endif +glib_dep = dependency('glib-2.0', version : '>= 2.28.0', required: get_option('glib')) +if glib_dep.found() + cdata.set('HAVE_GLIB', 1) + cdata.set('HAVE_GLIB20', 1) # to match the AM_CONDITIONAL for CMake file generation +endif + sndfile_dep = dependency('sndfile', version : '>= 1.0.20') libsystemd_dep = dependency('libsystemd', required : get_option('systemd')) @@ -616,6 +622,11 @@ if cc.has_header('sys/soundcard.h', required: get_option('oss-output')) cdata.set('PULSEDSP_LOCATION', pulsedsp_location) endif +fftw_dep = dependency('fftw3f', required : get_option('fftw')) +if fftw_dep.found() + cdata.set('HAVE_FFTW', 1) +endif + # Client library dependencies if get_option('client') @@ -624,12 +635,6 @@ if get_option('client') cdata.set('HAVE_LIBASYNCNS', 1) endif - glib_dep = dependency('glib-2.0', version : '>= 2.28.0', required: get_option('glib')) - if glib_dep.found() - cdata.set('HAVE_GLIB', 1) - cdata.set('HAVE_GLIB20', 1) # to match the AM_CONDITIONAL for CMake file generation - endif - gtk_dep = dependency('gtk+-3.0', required : get_option('gtk')) if gtk_dep.found() cdata.set('HAVE_GTK', 1) @@ -768,11 +773,6 @@ if get_option('daemon') endif endif - fftw_dep = dependency('fftw3f', required : get_option('fftw')) - if fftw_dep.found() - cdata.set('HAVE_FFTW', 1) - endif - jack_dep = dependency('jack', version : '>= 0.117.0', required : get_option('jack')) if jack_dep.found() cdata.set('HAVE_JACK', 1) @@ -948,7 +948,9 @@ summary = [ 'Enable memfd shared memory: @0@'.format(cdata.has('HAVE_MEMFD')), 'Enable X11: @0@'.format(x11_dep.found()), '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')), @@ -961,7 +963,6 @@ summary += [ '', '--- Pulseaudio client features ---', '', - 'Enable GLib 2: @0@'.format(glib_dep.found()), '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')), @@ -990,7 +991,6 @@ summary += [ ' Enable GStreamer based codecs: @0@'.format(have_bluez5_gstreamer), 'Enable GStreamer: @0@'.format(have_gstreamer), 'Enable libsamplerate: @0@'.format(samplerate_dep.found()), - 'Enable FFTW: @0@'.format(fftw_dep.found()), 'Enable ORC: @0@'.format(have_orcc), 'Enable Adrian echo canceller: @0@'.format(get_option('adrian-aec')), 'Enable Speex (resampler, AEC): @0@'.format(speex_dep.found()), diff --git a/src/modules/gsettings/meson.build b/src/modules/gsettings/meson.build index 9604699e7..32177e3ec 100644 --- a/src/modules/gsettings/meson.build +++ b/src/modules/gsettings/meson.build @@ -8,7 +8,7 @@ gsettings_helper = executable('gsettings-helper', gsettings_helper_sources, c_args : pa_c_args, include_directories : [configinc, topinc], - dependencies : [gio_dep, libpulsecommon_dep, libpulse_dep], + dependencies : [gio_dep, glib_dep, libpulsecommon_dep, libpulse_dep], install_dir : pulselibexecdir, install_rpath : privlibdir, install : true, diff --git a/src/modules/meson.build b/src/modules/meson.build index 3284d5724..1ae172971 100644 --- a/src/modules/meson.build +++ b/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',