-
Notifications
You must be signed in to change notification settings - Fork 6
/
configure.sh
executable file
·62 lines (52 loc) · 2.32 KB
/
configure.sh
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh
if [ -z "$ANDROID_NDK" ]; then
echo "Please set the ANDROID_NDK environment variable with its path."
exit 1
fi
# old android paths...
#ANDROID_BIN="$ANDROID_NDK/build/prebuilt/linux-x86/arm-eabi-4.4.0/bin/"
#ANDROID_INCLUDE="$ANDROID_NDK/build/platforms/android-8/arch-arm/usr/include"
#ANDROID_LIB="$ANDROID_NDK/build/platforms/android-8/arch-arm/usr/lib"
ANDROID_BIN=$ANDROID_NDK/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/
ANDROID_INCLUDE=$ANDROID_NDK/platforms/android-9/arch-arm/usr/include
ANDROID_LIB=$ANDROID_NDK/platforms/android-9/arch-arm/usr/lib
VLC_SOURCEDIR="`pwd`/.."
if [ -e "$VLC_SOURCEDIR/extras/contrib/hosts/arm-eabi/lib/libavcodec.a" ]; then
FFMPEG_SWITCH="--enable-swscale --enable-avcodec --enable-avformat"
else
FFMPEG_SWITCH="--disable-swscale --disable-avcodec --disable-avformat"
fi
DEPS_LIBDIR="$VLC_SOURCEDIR/extras/contrib/hosts/arm-eabi/lib"
DEPS_INCLDIR="$VLC_SOURCEDIR/extras/contrib/hosts/arm-eabi/include"
# needed for old ndk: change all the arm-linux-androideabi to arm-eabi
# the --host is kept on purpose because otherwise libtool complains..
PATH="$ANDROID_BIN":$PATH \
CPPFLAGS="-I$ANDROID_INCLUDE" \
LDFLAGS="-Wl,-rpath-link=$ANDROID_LIB,-Bdynamic,-dynamic-linker=/system/bin/linker -Wl,--no-undefined -Wl,-shared -L$ANDROID_LIB" \
CFLAGS="" \
LIBS="-lc -ldl -lgcc" \
CC="arm-linux-androideabi-gcc -nostdlib" CXX="arm-linux-androideabi-g++ -nostdlib" \
NM="arm-linux-androideabi-nm" STRIP="arm-linux-androideabi-strip" \
PKG_CONFIG_LIBDIR="$VLC_SOURCEDIR/extras/contrib/hosts/arm-eabi/lib/pkgconfig" \
sh ../configure --host=arm-eabi-linux --build=x86_64-unknown-linux \
--enable-static-modules \
--enable-debug \
--disable-qt4 \
--disable-skins2 \
--disable-mad \
--disable-mkv \
--disable-live555 \
--disable-a52 \
--disable-libgcrypt \
--disable-remoteosd \
--disable-lua \
$FFMPEG_SWITCH \
--disable-xcb \
--disable-dbus \
--disable-vcd \
--disable-v4l2 \
--disable-atmo \
--disable-vlc \
--enable-opensles \
--enable-android \
--enable-egl-android