summaryrefslogtreecommitdiffstats
path: root/scripts/ffmpeg-config
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ffmpeg-config')
-rwxr-xr-xscripts/ffmpeg-config15
1 files changed, 14 insertions, 1 deletions
diff --git a/scripts/ffmpeg-config b/scripts/ffmpeg-config
index d82d638..7ff138f 100755
--- a/scripts/ffmpeg-config
+++ b/scripts/ffmpeg-config
@@ -7,7 +7,7 @@ USER_OPTS="$@"
if test -f "$BUILD"/ffmpeg_options ; then
USER_OPTS="$(cat "$BUILD"/ffmpeg_options) $USER_OPTS"
fi
-OPTIONS="--enable-gpl --disable-debug --disable-doc"
+OPTIONS="--enable-gpl --enable-nonfree --disable-debug --disable-doc"
if "$BUILD"/scripts/test-libmpv ; then
OPTIONS="$OPTIONS --enable-pic"
@@ -15,6 +15,19 @@ fi
OPTIONS="$OPTIONS $USER_OPTS"
+# Do FFmpeg's job.
+if ! ( echo "$OPTIONS" | grep -e --enable-openssl ) &&
+ ! ( echo "$OPTIONS" | grep -e --enable-gnutls ) ;
+then
+ if pkg-config openssl ; then
+ OPTIONS="$OPTIONS --enable-openssl"
+ echo "Auto-enabling OpenSSL (creates a non-redistributable binary)."
+ elif pkg-config gnutls ; then
+ OPTIONS="$OPTIONS --enable-gnutls"
+ echo "Auto-enabling GnuTLS."
+ fi
+fi
+
echo Using ffmpeg options: $OPTIONS
mkdir -p "$BUILD"/ffmpeg_build