summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-02-12 22:05:29 +0100
committerwm4 <wm4@nowhere>2015-02-12 22:05:29 +0100
commitc4621d4a468e9f83725279a1385479a009993ba8 (patch)
tree8fcba6d75066c31fb934baaa45a4d1d9e0d73688 /scripts
parentf4c54ee729d41b9faa8f6c5d6552ab379a7db299 (diff)
downloadmpv-build-c4621d4a468e9f83725279a1385479a009993ba8.tar.bz2
mpv-build-c4621d4a468e9f83725279a1385479a009993ba8.tar.xz
Autodetect OpenSSL or GnuTLS
I'll probably regret it. There's also a very small chance that the pkg-config things I'm checking are debian-specific. Fixes #54.
Diffstat (limited to 'scripts')
-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