meson: add option extra_library_paths
This patch adds an option extra_library_paths
to the build, allowing users to inject additional paths that will be used to search for shared libraries at run-time.
This is particularly useful whenever the libs are not installed in default locations such as /usr/local/lib
and /usr/lib
, as is the case for Homebrew, when installed on a macOS Silicon machine. Setting environment variables such as DYLD_LIBRARY_PATH
or DYLD_FALLBACK_LIBRARY_PATH
instead has been observed to lead to strange conflicts and segfaults and is not considered a suitable alternative.