]> git.sesse.net Git - vlc/blob - projects/macosx/framework/Configure.sh
Cosmetic: clean up ws & comments in Pre-Compile.sh
[vlc] / projects / macosx / framework / Configure.sh
1 #
2 # Configure script
3 #
4 #   used by VLCKit.xcodeproj
5
6 if test "x$SYMROOT" = "x"; then
7     echo " This script is bound to be launched by VLCKit.xcodeproj, not you"
8     exit 1
9 fi
10
11 if test "$ACTION" = "clean"; then
12     rm -Rf $VLC_BUILD_DIR
13     exit 0
14 fi
15
16 # Construct the vlc_build_dir
17 mkdir -p $VLC_BUILD_DIR
18 cd $VLC_BUILD_DIR
19
20 # Construct the argument list
21 echo "Building for $ARCHS with sdk=\"$SDKROOT\" in $VLC_BUILD_DIR"
22
23 args="--disable-nls $args"
24
25 # Mac OS X related options
26 args="--disable-macosx $args" # Disable old gui/macosx
27 args="--disable-macosx-vlc-app $args" # Don't build old vlc.app
28
29 args="--with-macosx-version-min=10.6 $args"
30
31 # optional modules
32 args="--enable-merge-ffmpeg $args"
33 args="--enable-faad $args"
34 args="--enable-flac $args"
35 args="--enable-theora $args"
36 args="--enable-shout $args"
37 args="--enable-caca $args"
38 args="--enable-twolame $args"
39 args="--enable-realrtsp $args"
40 args="--enable-libass $args"
41 args="--enable-macosx-audio $args"
42 args="--enable-macosx-dialog-provider $args"
43 args="--enable-macosx-eyetv $args"
44 args="--enable-macosx-qtkit $args"
45 args="--enable-macosx-vout $args"
46
47 # disabled stuff
48 args="--disable-growl $args"
49 args="--disable-ncurses $args"
50 args="--disable-httpd $args"
51 args="--disable-vlm $args"
52 args="--disable-skins2 $args"
53 args="--disable-glx $args"
54 args="--disable-xvideo $args"
55 args="--disable-xcb $args"
56 args="--disable-sdl $args"
57 args="--disable-sdl-image $args"
58 args="--disable-visual $args"
59
60 if test "x$SDKROOT" != "x"
61 then
62     args="--with-macosx-sdk=$SDKROOT $args"
63 fi
64
65 # Debug Flags
66 if test "$CONFIGURATION" = "Debug"; then
67     args="--enable-debug $args"
68 fi
69
70 top_srcdir="$VLC_SRC_DIR"
71
72 # 64 bits switches
73 for arch in $ARCHS; do
74     this_args="$args"
75
76     # where to install
77     this_args="--prefix=${VLC_BUILD_DIR}/$arch/vlc_install_dir $this_args"
78
79     input="$top_srcdir/configure"
80     output="$arch/Makefile"
81     if test -e ${output} && test ${output} -nt ${input}; then
82         echo "No need to re-run configure for $arch"
83         continue;
84     fi
85
86     # Construct the vlc_build_dir/$arch
87     mkdir -p $arch
88     cd $arch
89
90     echo "Running [$arch] configure $this_args"
91     if test $arch = "x86_64"; then
92         export CFLAGS="-m64 -arch x86_64"
93         export CXXFLAGS="-m64 -arch x86_64"
94         export OBJCFLAGS="-m64 -arch x86_64"
95         export CPPFLAGS="-m64 -arch x86_64"
96         this_args="--with-contrib=$top_srcdir/contrib/x86_64-apple-darwin10 $this_args"
97         export PATH=$top_srcdir/extras/tools/build/bin:$top_srcdir/contrib/x86_64-apple-darwin10/bin:$PATH
98         export PKG_CONFIG_PATH=$top_srcdir/contrib/x86_64-apple-darwin10/lib/pkgconfig
99         $top_srcdir/configure --build=x86_64-apple-darwin10 $this_args
100     fi
101     if test $arch = "i386"; then
102         export CFLAGS="-m32 -arch i386"
103         export CXXFLAGS="-m32 -arch i386"
104         export OBJCFLAGS="-m32 -arch i386"
105         export CPPFLAGS="-m32 -arch i386"
106         this_args="--with-contrib=$top_srcdir/contrib/i686-apple-darwin9 $this_args"
107         $top_srcdir/configure --build=i686-apple-darwin9 $this_args
108     fi
109     if test $arch = "ppc"; then
110         export CFLAGS="-m32 -arch ppc"
111         export CXXFLAGS="-m32 -arch ppc"
112         export OBJCFLAGS="-m32 -arch ppc"
113         export CPPFLAGS="-m32 -arch ppc"
114         this_args="--with-contrib=$top_srcdir/contrib/powerpc-apple-darwin9 $this_args"
115         $top_srcdir/configure --build=powerpc-apple-darwin9 $this_args
116     fi
117     cd ..
118 done