summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-08-30 22:47:29 -0500
committersfan5 <sfan5@live.de>2023-09-01 10:38:56 +0200
commitbfa7a69e11a2d1b1f696247528c409fdb5fb3cf6 (patch)
tree7eb6b073a3f8b4e30b57f12f6283607e51ebbdff /scripts
parentf70466d5b2bc00c7efa5f4468b19f5322cdb8fbb (diff)
downloadmpv-build-bfa7a69e11a2d1b1f696247528c409fdb5fb3cf6.tar.bz2
mpv-build-bfa7a69e11a2d1b1f696247528c409fdb5fb3cf6.tar.xz
scripts/mpv-config: check platform when adding flags
When building libmpv against the static ffmpeg libraries, we have to add the -Wl,-Bsymbolic linker flags. The problem is that these are only valid for ELF which doesn't apply to all OSes (namely, macOS). Solve this by simply checking the output from uname and seeing if it matches a known ELF platform like linux, bsd, or solaris (who uses this?). Fixes #216.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mpv-config5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/mpv-config b/scripts/mpv-config
index 5d6aa17..829ac50 100755
--- a/scripts/mpv-config
+++ b/scripts/mpv-config
@@ -12,7 +12,10 @@ if test -f "$BUILD"/mpv_options ; then
fi
if "$BUILD"/scripts/test-libmpv; then
- OPTIONS="-Dc_link_args='-Wl,-Bsymbolic'"
+ platform=$(uname | tr '[:upper:]' '[:lower:]')
+ case "$platform" in
+ *bsd*|*linux*|*solaris*) OPTIONS="-Dc_link_args='-Wl,-Bsymbolic'" ;;
+ esac
fi
case "$PKG_CONFIG_PATH" in