forked from strukturag/VLCKit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfigure.sh
109 lines (92 loc) · 2.79 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
#
# Configure script
#
# used by VLCKit.xcodeproj
if test "x$SYMROOT" = "x"; then
echo " This script is bound to be launched by VLCKit.xcodeproj, not you"
exit 1
fi
if test "$ACTION" = "clean"; then
rm -Rf $VLC_BUILD_DIR
exit 0
fi
# Construct the vlc_build_dir
mkdir -p $VLC_BUILD_DIR
cd $VLC_BUILD_DIR
# Construct the argument list
echo "Building for $ARCHS with sdk=\"$SDKROOT\" in $VLC_BUILD_DIR"
args="--disable-nls $args"
# Mac OS X related options
args="--disable-macosx $args" # Disable old gui/macosx
args="--disable-macosx-vlc-app $args" # Don't build old vlc.app
args="--with-macosx-version-min=10.7 $args"
# optional modules
args="--enable-merge-ffmpeg $args"
args="--enable-faad $args"
args="--enable-flac $args"
args="--enable-theora $args"
args="--enable-shout $args"
args="--enable-twolame $args"
args="--enable-realrtsp $args"
args="--enable-libass $args"
args="--enable-macosx-audio $args"
args="--enable-macosx-dialog-provider $args"
args="--enable-macosx-eyetv $args"
args="--disable-macosx-qtkit $args"
args="--disable-quicktime $args"
args="--enable-macosx-vout $args"
# disabled stuff
args="--disable-growl $args"
args="--disable-caca $args"
args="--disable-ncurses $args"
args="--disable-httpd $args"
args="--disable-vlm $args"
args="--disable-skins2 $args"
args="--disable-glx $args"
args="--disable-xvideo $args"
args="--disable-xcb $args"
args="--disable-sdl $args"
args="--disable-sdl-image $args"
args="--disable-samplerate $args"
args="--disable-vda $args"
if test "x$SDKROOT" != "x"
then
args="--with-macosx-sdk=$SDKROOT $args"
fi
# Debug Flags
if test "$CONFIGURATION" = "Debug"; then
optim="-g"
else
optim=""
fi
# 64 bits switches
for arch in $ARCHS; do
this_args="$args"
# where to install
this_args="--prefix=${VLC_BUILD_DIR}/$arch/vlc_install_dir $this_args"
input="$VLC_SRC_DIR/configure"
output="$arch/Makefile"
if test -e ${output} && test ${output} -nt ${input}; then
echo "No need to re-run configure for $arch"
continue;
fi
# Construct the vlc_build_dir/$arch
mkdir -p $arch
cd $arch
if test $arch = "x86_64"; then
export CFLAGS="-m64 -arch x86_64 $optim"
export CXXFLAGS="-m64 -arch x86_64 $optim"
export OBJCFLAGS="-m64 -arch x86_64 $optim"
export CPPFLAGS="-m64 -arch x86_64 $optim"
this_args="--build=x86_64-apple-darwin11 --with-contrib=$VLC_SRC_DIR/contrib/x86_64-apple-darwin11 $this_args"
export PATH=$VLC_SRC_DIR/extras/tools/build/bin:$VLC_SRC_DIR/contrib/x86_64-apple-darwin11/bin:$PATH
export PKG_CONFIG_PATH=$VLC_SRC_DIR/contrib/x86_64-apple-darwin11/lib/pkgconfig
fi
echo "Running [$arch] configure $this_args"
$VLC_SRC_DIR/configure $this_args
err=$?
if test $err != 0; then
exit $err
fi
cd ..
done