[Git][pulseaudio/pulseaudio][master] build-sys: Fix running on macOS
PulseAudio Marge Bot (@pulseaudio-merge-bot)
gitlab at gitlab.freedesktop.org
Wed May 1 18:56:47 UTC 2024
PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits:
c1990dd0 by Mohamed Akram at 2024-05-01T21:54:17+04:00
build-sys: Fix running on macOS
Ensure modules are built as .so files so that they are found by ltdl at
runtime.
Fix HAVE_COREAUDIO not being set on macOS leading to sound not working
in the default configuration.
Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/3808
Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/817>
- - - - -
2 changed files:
- meson.build
- src/modules/meson.build
Changes:
=====================================
meson.build
=====================================
@@ -152,8 +152,6 @@ cdata.set_quoted('PA_SRCDIR', join_paths(meson.current_source_dir(), 'src'))
cdata.set_quoted('PA_BUILDDIR', meson.current_build_dir())
if host_machine.system() == 'windows'
cdata.set_quoted('PA_SOEXT', '.dll')
-elif host_machine.system() == 'darwin'
- cdata.set_quoted('PA_SOEXT', '.dylib')
else
cdata.set_quoted('PA_SOEXT', '.so')
endif
@@ -192,6 +190,7 @@ endif
# rather than ending up in the config.h file?
if host_machine.system() == 'darwin'
cdata.set('OS_IS_DARWIN', 1)
+ cdata.set('HAVE_COREAUDIO', 1)
cdata.set('_DARWIN_C_SOURCE', '200112L') # Needed to get NSIG on Mac OS
elif host_machine.system() == 'windows'
cdata.set('OS_IS_WIN32', 1)
=====================================
src/modules/meson.build
=====================================
@@ -311,6 +311,12 @@ else
no_undefined_args = []
endif
+module_suffix = []
+if host_machine.system() == 'darwin'
+ # meson defaults to dylib but ltdl expects so
+ module_suffix = 'so'
+endif
+
foreach m : all_modules
name = m[0]
sources = m[1]
@@ -331,5 +337,6 @@ foreach m : all_modules
link_args : [nodelete_link_args, no_undefined_args],
link_with : extra_libs,
name_prefix : '',
+ name_suffix : module_suffix,
implicit_include_directories : false)
endforeach
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/c1990dd02647405b0c13aab59f75d05cbb202336
--
View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/c1990dd02647405b0c13aab59f75d05cbb202336
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/20240501/1660f181/attachment-0001.htm>
More information about the pulseaudio-commits
mailing list