blob: b83bfe9b31ccfd4e33963d4b28aa2ff64354b7e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
#!/bin/sh
set -e
BUILD="$(pwd)"
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"
if "$BUILD"/scripts/test-libmpv ; then
OPTIONS="$OPTIONS --enable-pic"
fi
OPTIONS="$OPTIONS $USER_OPTS"
# Do FFmpeg's job.
if ! ( echo "$OPTIONS" | grep -q -e --enable-openssl ) &&
! ( echo "$OPTIONS" | grep -q -e --enable-gnutls ) ;
then
if pkg-config gnutls ; then
OPTIONS="$OPTIONS --enable-gnutls"
echo "Auto-enabling GnuTLS."
elif pkg-config openssl ; then
OPTIONS="$OPTIONS --enable-nonfree --enable-openssl"
echo "Auto-enabling OpenSSL (creates a non-redistributable binary)."
fi
fi
case "$PKG_CONFIG_PATH" in
'')
export PKG_CONFIG_PATH="$BUILD/build_libs/lib/pkgconfig"
;;
*)
export PKG_CONFIG_PATH="$BUILD/build_libs/lib/pkgconfig:$PKG_CONFIG_PATH"
;;
esac
echo Using ffmpeg options: $OPTIONS
mkdir -p "$BUILD"/ffmpeg_build
cd "$BUILD"/ffmpeg_build
"$BUILD"/ffmpeg/configure --prefix="$BUILD"/build_libs --enable-static --disable-shared $OPTIONS
|