1fbd46fd63cb094641264635e39776abe577cdda
[vlc.git] / build-vlc
1 #!/bin/sh
2
3 FEATURES="
4 SKINS skins2
5 PDA pda
6 WXWIDGETS wxwidgets
7 OPIE opie
8 MACOSX macosx
9 QNX qnx
10 NCURSES ncurses
11 XOSD xosd
12 VISUAL visual
13 GOOM goom
14 SLP slp
15 LIRC lirc
16 JOYSTICK joystick
17 CORBA corba
18 LIVEDOTCOM livedotcom
19 DVDREAD dvdread
20 DVDNAV dvdnav
21 DSHOW dshow
22 DVBPSI dvbpsi
23 V4L v4l
24 PVR pvr
25 VCD vcd
26 SATELLITE satellite
27 DVB dvb
28 OGG ogg
29 MKV mkv
30 MOD mod
31 CDIO libcdio
32 VCDX vcdx
33 CDDAX cddax
34 CDDB libcddb
35 X11 x11
36 XVIDEO xvideo
37 GLX glx
38 FB fb
39 MGA mga
40 SDL sdl
41 FREETYPE freetype
42 FRIBIDI fribidi
43 SVG svg
44 QTE qte
45 HD1000V hd1000v
46 DIRECTX directx
47 WINGDI wingdi
48 SVGALIB svgalib
49 GGI ggi
50 GLIDE glide
51 AA aa
52 CACA caca
53 OSS oss
54 ESD esd
55 ARTS arts
56 ALSA alsa
57 WAVEOUT waveout
58 COREAUDIO coreaudio
59 HD1000A hd1000a
60 MAD mad
61 FFMPEG ffmpeg
62 FAAD faad
63 QUICKTIME quicktime
64 A52 a52
65 DTS dts
66 FLAC flac
67 LIBMPEG2 libmpeg2
68 VORBIS vorbis
69 TREMOR tremor
70 SPEEX speex
71 TARKIN tarkin
72 THEORA theora
73 CMML cmml
74 UTF8 utf8
75 PTH pth
76 ST st
77 GPROF gprof
78 CPROF cprof
79 MOZILLA mozilla
80 TESTSUITE testsuite
81 OPTIMIZATIONS optimizations
82 ALTIVEC altivec
83 DEBUG debug
84 RELEASE release
85 SOUT sout
86 WITHFFMPEGMP3LAME ffmpeg-mp3lame
87 WITHFFMPEGFAAC ffmpeg-faac
88 GALAKTOS galaktos
89 HTTPD httpd
90 "
91 PATHS="
92 WITHXML2CONFIGPATH xml2-config-path
93 WITHWXCONFIGPATH wx-config-path
94 WITHWXCONFIG wx-config
95 WITHQTE qte
96 WITHGOOMTREE goom-tree
97 WITHSLP slp
98 WITHLIVEDOTCOMTREE livedotcom-tree
99 WITHDVDREAD dvdread
100 WITHDVDREADTREEE dvdread-tree
101 WITHDVDNAVCONFIGPATH dvdnav-config-path
102 WITHDVBPSI dvbpsi
103 WITHDVBPSITREE dvbpsi-tree
104 WITHV4L v4l
105 WITHDVB dvb
106 WITHSDLCONFIGPATH sdl-config-path
107 WITHSDLPREFIX sdl-prefix
108 WITHFREETYPECONFIGPATH freetype-config-path
109 WITHFRIBIDICONFIGPATH fribidi-config-path
110 WITHQTE qte
111 WITHDIRECTX directx
112 WITHGGI ggi
113 WITHGLIDE glide
114 WITHCACACONFIGPATH caca-config-path
115 WITHMAD mad
116 WITHMADTREE mad-tree
117 WITHFFMPEGTREE ffmpeg-tree
118 WITHFAADTREE faad-tree
119 WITHA52 a52
120 WITHA52TREE a52-tree
121 WITHDTSTREE dts-tree
122 WITHLIBMPEG2TREE libmpeg2-tree
123 WITHTARKINTREE tarkin-tree
124 WITHMOZILLASDKPATH mozilla-sdk-path
125 ENDIANNESS words
126 "
127 if [ ! -e .config ]
128 then
129    ./menuconfig
130 fi
131
132 if [ -e .cmd ]
133 then
134    echo ".cmd still exist. Removing it."
135    rm -f .cmd
136 fi
137
138 echo -n "./configure " > .cmd
139 source .config
140
141 check_features () {
142 while [ -n "$1" ]
143 do
144    eval x="\$CONFIG_$1"
145    if [ "$x" == "y" ]
146    then
147       if [ "$1" == "WITHFFMPEGMP3LAME" ] || [ "$1" == "WITHFFMPEGFAAC" ]
148       then
149          echo -n "--with-$2 " >> .cmd
150       else
151          echo -n "--enable-$2 " >> .cmd
152       fi
153    else
154       if [ "$1" != "WITHFFMPEGMP3LAME" ] && [ "$1" != "WITHFFMPEGFAAC" ]
155       then
156          echo -n "--disable-$2 " >> .cmd
157       fi
158    fi
159    shift; shift
160 done
161 }
162
163 check_paths () {
164 while [ -n "$1" ]
165 do
166    if [ -n $1 ]
167    then
168       eval x="\$CONFIG_$1"
169       if [ "$x" != "" ]
170       then
171          echo -n "--with-$2=$x " >> .cmd
172       fi
173    fi
174    shift; shift
175 done
176 }
177
178 check_features $FEATURES
179 check_paths $PATHS
180
181 if [ ! -e configure ]
182 then
183    ./bootstrap
184 fi
185
186 source .cmd
187 make
188 rm -f .cmd