-
-
Notifications
You must be signed in to change notification settings - Fork 150
/
configure.sh
executable file
·113 lines (103 loc) · 3.81 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#!/bin/sh
if [ -z "$ANDROID_NDK" ]; then
echo "Please set the ANDROID_NDK environment variable with its path."
exit 1
fi
if [ -z "$ANDROID_ABI" ]; then
echo "Please set ANDROID_ABI to your architecture: armeabi-v7a, armeabi, x86 or mips."
exit 1
fi
# Must use android-9 here. Any replacement functions needed are in the vlc-android/jni
# folder.
ANDROID_API=android-9
VLC_SOURCEDIR=..
CFLAGS="-g -O2 -fstrict-aliasing -funsafe-math-optimizations"
if [ -n "$HAVE_ARM" ]; then
CFLAGS="${CFLAGS} -mlong-calls"
fi
LDFLAGS="-Wl,-Bdynamic,-dynamic-linker=/system/bin/linker -Wl,--no-undefined"
if [ -n "$HAVE_ARM" ]; then
if [ ${ANDROID_ABI} = "armeabi-v7a" ]; then
EXTRA_PARAMS=" --enable-neon"
LDFLAGS="$LDFLAGS -Wl,--fix-cortex-a8"
fi
fi
CPPFLAGS="-I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++${CXXSTL}/include -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++${CXXSTL}/libs/${ANDROID_ABI}/include"
LDFLAGS="$LDFLAGS -L${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++${CXXSTL}/libs/${ANDROID_ABI}"
SYSROOT=$ANDROID_NDK/platforms/$ANDROID_API/arch-$PLATFORM_SHORT_ARCH
ANDROID_BIN=`echo $ANDROID_NDK/toolchains/${PATH_HOST}-${GCCVER}/prebuilt/\`uname|tr A-Z a-z\`-*/bin/`
CROSS_COMPILE=${ANDROID_BIN}/${TARGET_TUPLE}-
CPPFLAGS="$CPPFLAGS" \
CFLAGS="$CFLAGS ${VLC_EXTRA_CFLAGS}" \
CXXFLAGS="$CFLAGS" \
LDFLAGS="$LDFLAGS" \
CC="${CROSS_COMPILE}gcc --sysroot=${SYSROOT}" \
CXX="${CROSS_COMPILE}g++ --sysroot=${SYSROOT}" \
NM="${CROSS_COMPILE}nm" \
STRIP="${CROSS_COMPILE}strip" \
RANLIB="${CROSS_COMPILE}ranlib" \
AR="${CROSS_COMPILE}ar" \
PKG_CONFIG_LIBDIR=$VLC_SOURCEDIR/contrib/$TARGET_TUPLE/lib/pkgconfig \
sh $VLC_SOURCEDIR/configure --host=$TARGET_TUPLE --build=x86_64-unknown-linux $EXTRA_PARAMS \
--disable-nls \
--enable-live555 --enable-realrtsp \
--enable-avformat \
--enable-swscale \
--enable-avcodec \
--enable-opus \
--enable-opensles \
--enable-android-surface \
--enable-mkv \
--enable-taglib \
--enable-dvbpsi \
--disable-vlc --disable-shared \
--disable-update-check \
--disable-vlm \
--disable-dbus \
--disable-lua \
--disable-vcd \
--disable-v4l2 \
--disable-gnomevfs \
--enable-dvdread \
--enable-dvdnav \
--disable-bluray \
--disable-linsys \
--disable-decklink \
--disable-libva \
--disable-dv1394 \
--disable-mod \
--disable-sid \
--disable-gme \
--disable-tremor \
--disable-mad \
--disable-dca \
--disable-sdl-image \
--disable-zvbi \
--disable-fluidsynth \
--disable-jack \
--disable-pulse \
--disable-alsa \
--disable-samplerate \
--disable-sdl \
--disable-xcb \
--disable-atmo \
--disable-qt \
--disable-skins2 \
--disable-mtp \
--disable-notify \
--enable-libass \
--disable-svg \
--disable-udev \
--enable-libxml2 \
--disable-caca \
--disable-glx \
--enable-egl \
--enable-gles2 \
--disable-goom \
--disable-projectm \
--disable-sout \
--enable-vorbis \
--disable-faad \
--disable-x264 \
--disable-schroedinger --disable-dirac \
$*