summaryrefslogtreecommitdiffstats
path: root/scripts/ffmpeg-config
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-06-26 22:22:53 +0200
committerwm4 <wm4@nowhere>2014-06-26 22:22:53 +0200
commit5753fa512f4cb7d18438e5685cd2ded4f7b043fc (patch)
treec66c8e01ceed3b3f36e79aadc1a95955aef5e1c4 /scripts/ffmpeg-config
parentf2a85954159b7e5af087ad185dbb5201e87d4765 (diff)
downloadmpv-build-5753fa512f4cb7d18438e5685cd2ded4f7b043fc.tar.bz2
mpv-build-5753fa512f4cb7d18438e5685cd2ded4f7b043fc.tar.xz
Allow building libmpv
The tricky part is enabling PIC for all libraries if required. We don't always enable PIC, because I'm unsure about its performance or binary size impact. So play it safe.
Diffstat (limited to 'scripts/ffmpeg-config')
-rwxr-xr-xscripts/ffmpeg-config8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/ffmpeg-config b/scripts/ffmpeg-config
index 163fd0f..e68ff55 100755
--- a/scripts/ffmpeg-config
+++ b/scripts/ffmpeg-config
@@ -7,7 +7,13 @@ USER_OPTS="$@"
if test -f "$BUILD"/ffmpeg_options ; then
USER_OPTS="$(cat "$BUILD"/ffmpeg_options) $USER_OPTS"
fi
-OPTIONS="--enable-gpl --enable-avresample --disable-debug --disable-doc $USER_OPTS"
+OPTIONS="--enable-gpl --enable-avresample --disable-debug --disable-doc"
+
+if "$BUILD"/scripts/test-libmpv ; then
+ OPTIONS="$OPTIONS --enable-pic"
+fi
+
+OPTIONS="$OPTIONS $USER_OPTS"
echo Using ffmpeg options: $OPTIONS