Commit bff16308 authored by Rasmus Thomsen's avatar Rasmus Thomsen Committed by Tanu Kaskinen

meson: link libintl if it's not provided by libc

This fixes the build on musl with external gettext
parent d72a3a5e
Pipeline #66224 passed with stage
in 4 minutes and 43 seconds
......@@ -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')
......
......@@ -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,
)
......
......@@ -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)
......
......@@ -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,
......
......@@ -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,
......
......@@ -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,
......
......@@ -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 : '',
......
......@@ -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,
......
......@@ -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)
......
......@@ -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)
......
......@@ -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' ] ]
]
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment