diff options
author | Rasmus Thomsen <oss@cogitri.dev> | 2019-09-15 14:22:49 +0200 |
---|---|---|
committer | Tanu Kaskinen <tanuk@iki.fi> | 2019-09-25 04:42:03 +0000 |
commit | bff163089c5cd629116391cde55f55c73f422d10 (patch) | |
tree | 13b7d9ab64f80b498364e9aa2300778bd179f611 | |
parent | d72a3a5eca7e43c24fe16f5b2ed493ae1d12720f (diff) | |
download | pulseaudio-bff163089c5cd629116391cde55f55c73f422d10.tar.gz |
meson: link libintl if it's not provided by libc
This fixes the build on musl with external gettext
-rw-r--r-- | meson.build | 6 | ||||
-rw-r--r-- | src/daemon/meson.build | 2 | ||||
-rw-r--r-- | src/meson.build | 2 | ||||
-rw-r--r-- | src/modules/alsa/meson.build | 2 | ||||
-rw-r--r-- | src/modules/bluetooth/meson.build | 2 | ||||
-rw-r--r-- | src/modules/echo-cancel/meson.build | 2 | ||||
-rw-r--r-- | src/modules/meson.build | 2 | ||||
-rw-r--r-- | src/modules/raop/meson.build | 2 | ||||
-rw-r--r-- | src/pulse/meson.build | 2 | ||||
-rw-r--r-- | src/pulsecore/meson.build | 2 | ||||
-rw-r--r-- | src/tests/meson.build | 4 | ||||
-rw-r--r-- | src/utils/meson.build | 8 |
12 files changed, 22 insertions, 14 deletions
diff --git a/meson.build b/meson.build index a10a1b3c8..59cba00cb 100644 --- a/meson.build +++ b/meson.build @@ -296,6 +296,12 @@ if cc.has_function('SYS_memfd_create', prefix : '#include <sys/syscall.h>') cdata.set('HAVE_MEMFD', 1) endif +if cc.has_function('dgettext') + libintl_dep = [] +else + libintl_dep = cc.find_library('intl') +endif + # Symbols if cc.has_header_symbol('signal.h', 'SIGXCPU') diff --git a/src/daemon/meson.build b/src/daemon/meson.build index 9bc3bf18e..9c9f807e7 100644 --- a/src/daemon/meson.build +++ b/src/daemon/meson.build @@ -31,7 +31,7 @@ executable('pulseaudio', include_directories : [configinc, topinc], link_args : ['-ffast-math'], link_with : [libpulsecore, libpulsecommon, libpulse], - dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep, dl_dep], + dependencies : [ltdl_dep, cap_dep, dbus_dep, libsystemd_dep, dl_dep, libintl_dep], c_args : pa_c_args, ) diff --git a/src/meson.build b/src/meson.build index c9b71a484..832c0de0d 100644 --- a/src/meson.build +++ b/src/meson.build @@ -183,7 +183,7 @@ libpulsecommon = shared_library('pulsecommon-' + pa_version_major_minor, install_dir : privlibdir, dependencies : [ libm_dep, thread_dep, dl_dep, shm_dep, iconv_dep, sndfile_dep, dbus_dep, - x11_dep, libsystemd_dep, glib_dep, gtk_dep, asyncns_dep + x11_dep, libsystemd_dep, glib_dep, gtk_dep, asyncns_dep, libintl_dep, ], implicit_include_directories : false) diff --git a/src/modules/alsa/meson.build b/src/modules/alsa/meson.build index 5309dc108..f31eeb5f5 100644 --- a/src/modules/alsa/meson.build +++ b/src/modules/alsa/meson.build @@ -32,7 +32,7 @@ libalsa_util = shared_library('alsa-util', c_args : [pa_c_args, server_c_args], link_args : [nodelete_link_args], include_directories : [configinc, topinc], - dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, alsa_dep, dbus_dep, libatomic_ops_dep, libm_dep, udev_dep], + dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, alsa_dep, dbus_dep, libatomic_ops_dep, libm_dep, udev_dep, libintl_dep], install : true, install_rpath : privlibdir, install_dir : modlibexecdir, diff --git a/src/modules/bluetooth/meson.build b/src/modules/bluetooth/meson.build index 7b3de6bc3..9982cbafc 100644 --- a/src/modules/bluetooth/meson.build +++ b/src/modules/bluetooth/meson.build @@ -26,7 +26,7 @@ libbluez5_util = shared_library('bluez5-util', c_args : [pa_c_args, server_c_args], link_args : [nodelete_link_args], include_directories : [configinc, topinc], - dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, dbus_dep, sbc_dep], + dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, dbus_dep, sbc_dep, libintl_dep], install : true, install_rpath : privlibdir, install_dir : modlibexecdir, diff --git a/src/modules/echo-cancel/meson.build b/src/modules/echo-cancel/meson.build index 171a41482..641cd35e7 100644 --- a/src/modules/echo-cancel/meson.build +++ b/src/modules/echo-cancel/meson.build @@ -14,7 +14,7 @@ libwebrtc_util = shared_library('webrtc-util', libwebrtc_util_sources, cpp_args : [pa_c_args, server_c_args], include_directories : [configinc, topinc], - dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libatomic_ops_dep, webrtc_dep], + dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libatomic_ops_dep, webrtc_dep, libintl_dep], link_args : [nodelete_link_args, '-Wl,--unresolved-symbols=ignore-in-object-files'], install : true, install_rpath : privlibdir, diff --git a/src/modules/meson.build b/src/modules/meson.build index dd2241f42..5f0437164 100644 --- a/src/modules/meson.build +++ b/src/modules/meson.build @@ -284,7 +284,7 @@ foreach m : all_modules install : true, install_rpath : rpath_dirs, install_dir : modlibexecdir, - dependencies : [thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep] + extra_deps, + dependencies : [thread_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep, libintl_dep] + extra_deps, link_args : [nodelete_link_args, '-Wl,--no-undefined' ], link_with : extra_libs, name_prefix : '', diff --git a/src/modules/raop/meson.build b/src/modules/raop/meson.build index e98bb4538..533580c06 100644 --- a/src/modules/raop/meson.build +++ b/src/modules/raop/meson.build @@ -23,7 +23,7 @@ libraop = shared_library('raop', c_args : [pa_c_args, server_c_args], link_args : [nodelete_link_args], include_directories : [configinc, topinc], - dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, librtp_dep, openssl_dep], + dependencies : [libpulse_dep, libpulsecommon_dep, libpulsecore_dep, librtp_dep, openssl_dep, libintl_dep], install : true, install_rpath : rpath_dirs, install_dir : modlibexecdir, diff --git a/src/pulse/meson.build b/src/pulse/meson.build index 00c686772..28c24887e 100644 --- a/src/pulse/meson.build +++ b/src/pulse/meson.build @@ -81,7 +81,7 @@ libpulse = shared_library('pulse', link_args : [nodelete_link_args, versioning_link_args], install : true, install_rpath : privlibdir, - dependencies : [libm_dep, thread_dep, libpulsecommon_dep, dbus_dep, dl_dep, iconv_dep], + dependencies : [libm_dep, thread_dep, libpulsecommon_dep, dbus_dep, dl_dep, iconv_dep, libintl_dep], implicit_include_directories : false) libpulse_dep = declare_dependency(link_with: libpulse) diff --git a/src/pulsecore/meson.build b/src/pulsecore/meson.build index 19f6b9e99..0bd596cbd 100644 --- a/src/pulsecore/meson.build +++ b/src/pulsecore/meson.build @@ -198,7 +198,7 @@ libpulsecore = shared_library('pulsecore-' + pa_version_major_minor, install_rpath : privlibdir, install_dir : privlibdir, link_with : libpulsecore_simd_lib, - dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, libatomic_ops_dep, orc_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep], + dependencies : [libm_dep, libpulsecommon_dep, libpulse_dep, ltdl_dep, shm_dep, sndfile_dep, database_dep, dbus_dep, libatomic_ops_dep, orc_dep, samplerate_dep, soxr_dep, speex_dep, x11_dep, libintl_dep], implicit_include_directories : false) libpulsecore_dep = declare_dependency(link_with: libpulsecore) diff --git a/src/tests/meson.build b/src/tests/meson.build index 621c2c965..643a08dc2 100644 --- a/src/tests/meson.build +++ b/src/tests/meson.build @@ -53,7 +53,7 @@ default_tests = [ [ 'queue-test', 'queue-test.c', [ check_dep, libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ], [ 'resampler-test', 'resampler-test.c', - [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ] ], + [ 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', @@ -143,7 +143,7 @@ echo_cancel_test_sources += module_echo_cancel_orc_sources norun_tests += [ [ 'echo-cancel-test', echo_cancel_test_sources, - module_echo_cancel_deps + [ libpulse_dep, libpulsecommon_dep, libpulsecore_dep ], + 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' ] ] ] diff --git a/src/utils/meson.build b/src/utils/meson.build index d00e030ae..dedf4e404 100644 --- a/src/utils/meson.build +++ b/src/utils/meson.build @@ -15,7 +15,7 @@ executable('pacat', install_rpath : privlibdir, include_directories : [configinc, topinc], link_with : [libpulsecommon, libpulse], - dependencies : [sndfile_dep], + dependencies : [sndfile_dep, libintl_dep], c_args : pa_c_args, ) @@ -36,7 +36,7 @@ executable('pactl', install_rpath : privlibdir, include_directories : [configinc, topinc], link_with : [libpulsecommon, libpulse], - dependencies : [sndfile_dep], + dependencies : [sndfile_dep, libintl_dep], c_args : pa_c_args, ) @@ -50,6 +50,7 @@ executable('pasuspender', install_rpath : privlibdir, include_directories : [configinc, topinc], link_with : [libpulsecommon, libpulse], + dependencies: [libintl_dep], c_args : pa_c_args, ) @@ -63,6 +64,7 @@ executable('pacmd', install_rpath : privlibdir, include_directories : [configinc, topinc], link_with : [libpulsecommon, libpulse], + dependencies: [libintl_dep], c_args : pa_c_args, ) @@ -77,7 +79,7 @@ if x11_dep.found() install_rpath : privlibdir, include_directories : [configinc, topinc], link_with : [libpulsecommon, libpulse], - dependencies : [x11_dep], + dependencies : [x11_dep, libintl_dep], c_args : pa_c_args, ) endif |