diff options
author | wm4 <wm4@nowhere> | 2015-02-12 22:05:29 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-02-12 22:05:29 +0100 |
commit | c4621d4a468e9f83725279a1385479a009993ba8 (patch) | |
tree | 8fcba6d75066c31fb934baaa45a4d1d9e0d73688 | |
parent | f4c54ee729d41b9faa8f6c5d6552ab379a7db299 (diff) | |
download | mpv-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.
-rw-r--r-- | README.rst | 6 | ||||
-rwxr-xr-x | scripts/ffmpeg-config | 15 |
2 files changed, 17 insertions, 4 deletions
@@ -57,8 +57,10 @@ Essential dependencies (incomplete list): - Audio output development headers (libasound, pulseaudio) - fribidi, freetype, fontconfig development headers (for libass) - libjpeg +- OpenSSL or GnuTLS development headers if you want to open https links + (this is also needed to make youtube-dl interaction work) - youtube-dl (at runtime) if you want to play Youtube videos directly - (also requires ytdl=yes in ~/.config/mpv/mpv.conf) + (a builtin mpv script will call it) - libx264/libmp3lame/libfdk-aac if you want to use encoding (you have to add these options explicitly to the ffmpeg options, as ffmpeg won't autodetect these libraries; see next section) @@ -83,8 +85,6 @@ example, to enable some dependencies needed for encoding: echo --enable-libfdk-aac >> ffmpeg_options - echo --enable-nonfree >> ffmpeg_options - Do this in the mpv-build top-level directory (the same that contains the build scripts and this readme file). It must be done prior running ./build or ./rebuild. 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 |