Mercurial > mplayer.hg
annotate configure @ 417:1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
author | arpi_esp |
---|---|
date | Sat, 14 Apr 2001 21:16:23 +0000 |
parents | c39058295939 |
children | d19a3da6ac13 |
rev | line source |
---|---|
1 | 1 #!/bin/sh |
2 | |
3 # | |
4 # MPlayer configurator. (C) 2000 Pontscho/fresh!mindworkz | |
5 # pontscho@makacs.poliod.hu | |
6 # | |
4 | 7 # Changes in reversed order: |
1 | 8 # |
209
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
9 # 2001/03/24 by Mike Graffam: |
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
10 # - added autodetect code for XF86VidMode, along with explicit --enable-vm |
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
11 # |
196 | 12 # 2001/03/22 by Bivanbi: |
13 # - new option: --cc (to specify C compiler path+name) | |
14 # | |
15 # 2001/03/08 by LGB: | |
59 | 16 # - DGA detection-o-matic :) |
17 # - '--disable-dga' option to force disabling DGA vo driver compiling into mplayer | |
18 # - line about '--enable-dga' is added to the help message | |
19 # | |
196 | 20 # 2001/02/26 by A'rpi: |
11 | 21 # - added DGA option: --enable-dga |
22 # - no notify if --with-win32libdir used [Tibcu] | |
23 # | |
196 | 24 # 2001/02/25 by LGB: |
4 | 25 # - TMPDIR or TEMPDIR variable is honored during tests for temporary files |
26 # - ChangeLog inside configure was reversed ;-) | |
1 | 27 # |
28 # some changes by A'rpi/ESP-team: | |
4 | 29 # - added 'athlon' target for the new athlongcc [Ian Kumlien] |
30 # - applied _win32libdir=-L patch by Magnus Pfeffer | |
1 | 31 # |
32 # some changes by LGB: | |
33 # - Ehhh, AMD K6-2 returns with cpuid 5 ;-) Changing back Arpi's last change :) | |
34 # More info: AMD K6-2 reports with family 5, duron with 6, so I attached | |
35 # much finer CPU type detection based on Linux kernel's one :) | |
36 # (k5: 5, model<6, k6: 5, model>=6, k7: 6, model=any) | |
37 # - On some exit point (error) temporary files were not deleted. Fixed. | |
38 # - $TMP and $TMP2 are renamed to $TMPC and $TMPO ;-) | |
39 # - Some useless { ... } are removed | |
40 # | |
41 # some changes by A'rpi/ESP-team: | |
11 | 42 # - the --with-win32libdir patch by Aaron Hope applied |
4 | 43 # - some english bugfix again :) |
44 # - cpu type selection changed: | |
45 # ( k7->k6->k5-> ) || (i686->pentiumpro-> ) pentium-> i486 -> i386 -> error! | |
46 # - cpu type for AMD/family=5 changed k6->k5 | |
47 # | |
48 # some changes by LGB (Gábor Lénárt): | |
49 # - SOME gcc may support 'k7', so I added tests for ALL CPU type optimization | |
50 # switches with the ability to find out the best optimization for your CPU. | |
51 # - Help moved to the begining to avoid tests if user only wants help. | |
52 # - A one lined help to indicate detailed help for users | |
53 # - Fixed /tmp race (PIDs can be predicted, I added random numbers as well) | |
54 # | |
55 # some changes by A'rpi/ESP-team: | |
56 # - some english bugfix :) | |
57 # - removed _??exists flags, _?? is enough... | |
58 # - creating only config.mak files instead of whole Makefiles | |
1 | 59 # |
60 # -- | |
61 | |
62 | |
63 # LGB: Help moved here. | |
64 | |
65 if [ "$1" = "--help" -o "$1" = "-help" -o "$1" = "-h" ]; then | |
66 cat << EOF | |
67 | |
68 usage: $0 [options] | |
69 | |
70 params: | |
196 | 71 --cc use this C compiler to build MPlayer [gcc] |
1 | 72 --enable-mmx build with mmx support [autodetect] |
350 | 73 --enable-mmx2 build with mmx2 support (PIII, Athlon) [autodetect] |
1 | 74 --enable-3dnow build with 3dnow! support [autodetect] |
75 --enable-sse build with sse support [autodetect] | |
76 --enable-gl build with OpenGL render support [autodetect] | |
59 | 77 --enable-dga build with DGA support [autodetect] |
287 | 78 --enable-svga build with SVGAlib support [autodetect] |
1 | 79 --enable-sdl build with SDL render support [def.: disabled!] |
80 --enable-mga build with mga_vid support [autodetect, if /dev/mga_vid | |
81 is available] | |
82 --enable-xmga build with mga_vid X Window support [autodetect, | |
83 if both /dev/mga_vid and x11 are available] | |
84 --enable-xv build with Xv render support for X 4.x [autodetect] | |
209
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
85 --enable-vm build with XF86VidMode support for x11 driver |
1 | 86 --enable-x11 build with X11 render support [autodetect] |
225 | 87 --enable-fbdev build with FBDev render support [_not_ autodetected] |
1 | 88 --enable-mlib build with MLIB support ( only Solaris ) |
89 | |
90 --enable-termcap use termcap database for key codes | |
91 --enable-xmmp use XMMP audio drivers | |
92 --enable-lirc enable LIRC (remote control) support | |
93 | |
94 --with-x11libdir=DIR X library files are in DIR | |
95 --with-win32libdir=DIR windows codec files | |
96 | |
97 --size-x=SIZE default screen width | |
98 --size-y=SIZE default screen height | |
99 EOF | |
100 exit 0 | |
101 fi | |
102 | |
103 # LGB: Some inital help | |
104 | |
105 echo "You can get detailed help on configure with: $0 --help" | |
106 echo "Please wait while ./configure discovers your software and hardware environment!" | |
107 | |
108 # LGB: temporary files | |
109 | |
4 | 110 TMPC="mplayer-conf-${RANDOM}-$$-${RANDOM}.c" |
111 TMPO="mplayer-conf-${RANDOM}-$$-${RANDOM}.o" | |
1 | 112 |
4 | 113 if [ ! -z $TMPDIR ]; then |
114 TMPC="${TMPDIR}/${TMPC}" | |
115 TMPO="${TMPDIR}/${TMPO}" | |
116 elif [ ! -z $TEMPDIR ]; then | |
117 TMPC="${TEMPDIR}/${TMPC}" | |
118 TMPO="${TEMPDIR}/${TMPO}" | |
119 else | |
120 TMPC="/tmp/${TMPC}" | |
121 TMPO="/tmp/${TMPO}" | |
122 fi | |
1 | 123 |
124 # --- | |
125 | |
126 # config files | |
127 CCONF='config.h' | |
128 MCONF='config.mak' | |
129 | |
196 | 130 # --- Check for C compiler: |
131 | |
132 _cc=gcc | |
417
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
133 _x11=auto |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
134 |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
135 _x11libdir= |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
136 if [ -e /usr/X11R6 ]; then |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
137 _x11libdir=-L/usr/X11R6/lib |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
138 else |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
139 if [ -e /usr/X11 ]; then |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
140 _x11libdir=-L/usr/X11/lib |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
141 fi |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
142 fi |
196 | 143 |
144 for ac_option | |
145 do | |
146 case "$ac_option" in | |
147 --cc=*) | |
148 _cc=`echo $ac_option | cut -d '=' -f 2` | |
149 ;; | |
417
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
150 --with-x11libdir=*) |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
151 _x11libdir=-L`echo $ac_option | cut -d '=' -f 2` |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
152 ;; |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
153 --enable-x11) |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
154 _x11=yes |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
155 ;; |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
156 --disable-x11) |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
157 _x11=no |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
158 ;; |
196 | 159 esac |
160 done | |
161 | |
1 | 162 # --- |
163 | |
164 TAB=`echo -n -e "\t"` | |
165 pname=`cat /proc/cpuinfo | grep 'model name' | cut -d ':' -f 2` | |
166 pparam=`cat /proc/cpuinfo | grep 'features' | cut -d ':' -f 2` | |
167 if [ -z "$pparam" ]; then | |
168 pparam=`cat /proc/cpuinfo | grep 'flags' | cut -d ':' -f 2` | |
169 fi | |
170 pvendor=`cat /proc/cpuinfo | grep 'vendor_id' | cut -d ':' -f 2 | cut -d ' ' -f 2` | |
171 pfamily=`cat /proc/cpuinfo | grep 'cpu family' | cut -d ':' -f 2 | cut -d ' ' -f 2` | |
172 pmodel=`cat /proc/cpuinfo | grep "model$TAB" | cut -d ':' -f 2 | cut -d ' ' -f 2` | |
173 pstepping=`cat /proc/cpuinfo | grep 'stepping' | cut -d ':' -f 2 | cut -d ' ' -f 2` | |
174 | |
175 _mmx=no | |
350 | 176 _mmx2=no |
1 | 177 _3dnow=no |
178 _mtrr=no | |
179 _sse=no | |
180 _mga=no | |
181 _gl=no | |
182 _sdl=no | |
183 _xv=no | |
209
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
184 _vm=no |
1 | 185 _3dfx=no |
186 _syncfb=no | |
187 _mlib=no | |
188 _mpg123=no | |
189 _xmga=no | |
11 | 190 _dga=no |
233
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
191 _dga2=no |
287 | 192 _svga=no |
417
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
193 _fbdev=yes |
1 | 194 _lirc=no |
330 | 195 _xdpms=no |
1 | 196 |
197 _x=1 | |
198 _y=1 | |
199 | |
200 _gllib= | |
201 _sdllib= | |
417
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
202 _xvlib= |
1 | 203 _x11lib= |
204 | |
205 for i in `echo $pparam`; do | |
206 | |
207 case "$i" in | |
208 3dnow) | |
209 _3dnow=yes | |
210 _mpg123=yes | |
211 ;; | |
212 mmx) | |
213 _mmx=yes | |
214 ;; | |
350 | 215 mmxext) |
216 _mmx2=yes | |
217 ;; | |
1 | 218 mtrr) |
219 _mtrr=yes | |
220 ;; | |
221 k6_mtrr) | |
222 _mtrr=yes | |
223 ;; | |
224 xmm) | |
225 _sse=yes | |
356 | 226 _mmx2=yes |
1 | 227 ;; |
228 sse) | |
229 _sse=yes | |
356 | 230 _mmx2=yes |
1 | 231 ;; |
232 kni) | |
233 _sse=yes | |
356 | 234 _mmx2=yes |
1 | 235 ;; |
236 esac | |
237 | |
238 done | |
239 | |
240 | |
241 _win32libdirnotify=no | |
242 if [ -e /usr/lib/win32 ]; then | |
243 _win32libdir=/usr/lib/win32 | |
244 else | |
245 if [ -e /usr/local/lib/win32 ]; then | |
246 _win32libdir=/usr/local/lib/win32 | |
247 else | |
248 # This is our default: | |
249 _win32libdir=/usr/lib/win32 | |
250 _win32libdirnotify=yes | |
251 fi | |
252 fi | |
253 | |
254 | |
255 if [ -e /dev/mga_vid ]; then | |
256 _mga=yes | |
257 _syncfb=yes | |
258 fi | |
259 | |
260 proc=pentium | |
261 | |
262 case "$pvendor" in | |
263 AuthenticAMD) | |
264 case "$pfamily" in | |
265 3) | |
266 proc=i386 | |
267 ;; | |
268 4) | |
269 proc=i486 | |
270 ;; | |
271 5) | |
272 if [ $pmodel -ge 6 ]; then # LGB: models are: K5/SSA5 K5 K5 K5 ? ? K6 K6 K6-2 K6-3 | |
273 proc=k6 | |
274 else | |
275 proc=k5 | |
276 fi | |
277 ;; | |
278 6|7) # LGB: Though it seems Athlon CPUs returns with "6" | |
279 proc=k7 | |
280 ;; | |
281 *) | |
282 proc=pentium | |
283 ;; | |
284 esac | |
285 ;; | |
286 GenuineIntel) | |
287 case "$pfamily" in | |
288 3) | |
289 proc=i386 | |
290 ;; | |
291 4) | |
292 proc=i486 | |
293 ;; | |
294 5) | |
295 proc=pentium | |
296 ;; | |
297 6) | |
298 proc=i686 | |
299 ;; | |
300 *) | |
301 proc=pentium | |
302 ;; | |
303 esac | |
304 ;; | |
305 unknown) # added by Gabucino - upon Tibcu's request | |
306 case "$pfamily" in | |
307 3) | |
308 proc=i386 | |
309 ;; | |
310 4) | |
311 proc=i486 | |
312 ;; | |
313 *) | |
314 proc=pentium | |
315 ;; | |
316 esac | |
317 ;; | |
318 *) | |
319 proc=pentium | |
320 ;; | |
321 esac | |
322 | |
323 # --- | |
324 | |
325 cat > $TMPC << EOF | |
326 int main( void ) { return 0; } | |
327 EOF | |
328 | |
329 # check that gcc supports our cpu, if not, fallback to pentium | |
330 # LGB: check -mcpu and -march swithing step by step with enabling | |
331 # to fall back till 386. | |
332 | |
333 #echo -n "Checking your GCC CPU optimalization abilities: " | |
334 if [ "$proc" = "k7" ]; then | |
335 # echo -n "trying k7 " | |
196 | 336 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=athlon |
1 | 337 fi |
338 if [ "$proc" = "athlon" ]; then | |
339 # echo -n "trying athlon " | |
196 | 340 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=k6 |
1 | 341 fi |
342 if [ "$proc" = "k6" ]; then | |
343 # echo -n "trying k6 " | |
196 | 344 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=k5 |
1 | 345 fi |
346 if [ "$proc" = "k5" ]; then | |
347 # echo -n "trying k5 " | |
196 | 348 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=pentium |
1 | 349 fi |
350 if [ "$proc" = "i686" ]; then | |
351 # echo -n "trying i686 " | |
196 | 352 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=pentiumpro |
1 | 353 fi |
354 if [ "$proc" = "pentiumpro" ]; then | |
355 # echo -n "trying pentiumpro " | |
196 | 356 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=pentium |
1 | 357 fi |
358 if [ "$proc" = "pentium" ]; then | |
359 # echo -n "trying pentium " | |
196 | 360 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=i486 |
1 | 361 fi |
362 if [ "$proc" = "i486" ]; then | |
363 # echo -n "trying i486 " | |
196 | 364 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=i386 |
1 | 365 fi |
366 if [ "$proc" = "i386" ]; then | |
367 # echo -n "trying i386 " | |
196 | 368 $_cc $TMPC -o $TMPO -march=$proc -mcpu=$proc &> /dev/null || proc=error |
1 | 369 fi |
370 if [ "$proc" = "error" ]; then | |
371 echo | |
372 echo "Your gcc does not support even \"i386\" for '-march' and '-mcpu'." >&2 | |
373 rm -f $TMPC $TMPO | |
374 exit | |
375 fi | |
376 #echo "DONE (${proc})." | |
377 | |
378 | |
417
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
379 $_cc $TMPC -o $TMPO -lvgagl -lvga &> /dev/null && _svga=yes |
1 | 380 |
417
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
381 $_cc $TMPC -o $TMPO -lpthread &> /dev/null || \ |
1 | 382 { echo "Lib pthread not found."; rm -f $TMPC $TMPO ; exit 1; } |
383 | |
384 # SDL disabled by default (0.11pre22-) because of the compilation problems | |
385 # this is very buggy & experimental code, use it only if you really need it!! | |
386 _have_sdl=no | |
417
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
387 $_cc $TMPC -o $TMPO -L/usr/local/lib/ -lSDL -lpthread &> /dev/null && _have_sdl=yes |
1 | 388 |
389 _termcap=no | |
196 | 390 $_cc $TMPC -o $TMPO -ltermcap &> /dev/null && _termcap=yes |
1 | 391 |
392 _binutils=no | |
393 as libac3/downmix/downmix_i386.S -o $TMPO &> /dev/null && _binutils=yes | |
394 | |
417
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
395 # ----------- Check X11 and related libs (GL, Xxf86vm, Xv, DGA) -------------- |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
396 |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
397 if [ $_x11 = auto ]; then |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
398 _x11=no |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
399 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext &> /dev/null && _x11=yes |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
400 fi |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
401 |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
402 if [ $_x11 = yes ]; then |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
403 |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
404 $_cc $TMPC -o $TMPO $_x11libdir -lX11 -lXext -lXdpms &> /dev/null && _xdpms=yes |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
405 $_cc $TMPC -o $TMPO $_x11libdir -lXv &> /dev/null && _xv=yes |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
406 |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
407 $_cc $TMPC -o $TMPO $_x11libdir -lGL &> /dev/null && _gl=yes |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
408 |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
409 cat > $TMPC << EOF |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
410 #include <GL/gl.h> |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
411 int main( void ) { return 0; } |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
412 EOF |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
413 $_cc $TMPC -o $TMPO $_x11libdir -lGL &> /dev/null || \ |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
414 { _gl=no; echo "GL includes not found!";} |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
415 |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
416 $_cc $TMPC -o $TMPO $_x11libdir -lXxf86vm &> /dev/null && _vm=yes |
59 | 417 |
418 cat > $TMPC << EOF | |
419 #include <stdio.h> | |
420 #include <X11/Xlib.h> | |
421 #include <X11/extensions/xf86dga.h> | |
422 int main (void) { return 0;} | |
423 EOF | |
424 | |
196 | 425 $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm &> /dev/null && _dga=yes |
59 | 426 # Note: the -lXxf86vm library is the VideoMode extension and though it's |
427 # not needed for DGA, AFAIK every distribution packages together with DGA | |
428 # stuffs named 'X extensions' or something similar. This check can be usefull | |
429 # for further mplayer versions to set resolution by mplayer itself. | |
430 # If you run into problems, remove '-lXxf86vm'. | |
431 | |
233
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
432 # Check if DGA is 2.0 or greater |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
433 cat > $TMPC << EOF |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
434 #include <stdio.h> |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
435 #include <X11/Xlib.h> |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
436 #include <X11/extensions/xf86dga.h> |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
437 int main (void) { XDGAMode mode; XDGADevice device; return 0;} |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
438 EOF |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
439 |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
440 _dga2=no |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
441 $_cc $TMPC -o $TMPO -L/usr/X11R6/lib -L/usr/X11/lib -lX11 -lXext -lXxf86dga -lXxf86vm &> /dev/null && _dga2=yes |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
442 |
417
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
443 fi |
1 | 444 |
445 rm -f $TMPC $TMPO | |
446 | |
447 # --- | |
448 | |
449 # check for the parameters. | |
450 | |
451 for ac_option | |
452 do | |
453 case "$ac_option" in | |
454 --enable-sse) | |
455 _sse=yes | |
456 ;; | |
457 --enable-3dnow) | |
458 _3dnow=yes | |
459 ;; | |
460 --enable-mmx) | |
461 _mmx=yes | |
462 ;; | |
350 | 463 --enable-mmx2) |
464 _mmx2=yes | |
465 ;; | |
72 | 466 --enable-mtrr) |
467 _mtrr=yes | |
468 ;; | |
1 | 469 --enable-gl) |
470 _gl=yes | |
471 ;; | |
472 --enable-sdl) | |
473 _sdl=yes | |
474 ;; | |
475 --enable-mga) | |
476 _mga=yes | |
477 ;; | |
478 --enable-xmga) | |
479 _xmga=yes | |
480 ;; | |
287 | 481 --enable-svga) |
482 _svga=yes | |
483 ;; | |
11 | 484 --enable-dga) |
485 _dga=yes | |
233
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
486 ;; |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
487 --enable-dga2) |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
488 _dga2=yes |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
489 ;; |
1 | 490 --enable-xv) |
491 _xv=yes | |
492 ;; | |
209
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
493 --enable-vm) |
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
494 _vm=yes |
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
495 ;; |
1 | 496 --enable-3dfx) |
497 _3dfx=yes | |
498 ;; | |
499 --enable-syncfb) | |
500 _syncfb=yes | |
501 ;; | |
225 | 502 --enable-fbdev) |
503 _fbdev=yes | |
504 ;; | |
1 | 505 --enable-mlib) |
506 _mlib=yes | |
507 ;; | |
508 --enable-termcap) | |
509 _termcap=yes | |
510 ;; | |
511 --enable-xmmp) | |
512 _xmmp=yes | |
513 ;; | |
514 --enable-lirc) | |
515 _lirc=yes | |
516 ;; | |
517 --disable-sse) | |
518 _sse=no | |
519 ;; | |
520 --disable-3dnow) | |
521 _3dnow=no | |
522 ;; | |
523 --disable-mmx) | |
524 _mmx=no | |
350 | 525 _mmx2=no |
1 | 526 ;; |
72 | 527 --disable-mtrr) |
528 _mtrr=no | |
529 ;; | |
1 | 530 --disable-gl) |
531 _gl=no | |
532 ;; | |
533 --disable-sdl) | |
534 _sdl=no | |
535 ;; | |
536 --disable-mga) | |
537 _mga=no | |
538 ;; | |
539 --disable-xmga) | |
540 _xmga=no | |
541 ;; | |
542 --disable-xv) | |
543 _xv=no | |
544 ;; | |
209
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
545 --disable-vm) |
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
546 _vm=no |
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
547 ;; |
1 | 548 --disable-mlib) |
549 _mlib=no | |
550 ;; | |
287 | 551 --disable-svga) |
552 _svga=no | |
553 ;; | |
59 | 554 --disable-dga) |
555 _dga=no | |
556 ;; | |
233
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
557 --disable-dga2) |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
558 _dga2=no |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
559 ;; |
225 | 560 --disable-fbdev) |
561 _fbdev=no | |
562 ;; | |
1 | 563 --disable-termcap) |
564 _termcap=no | |
565 ;; | |
566 --with-win32libdir=*) | |
567 _win32libdir=`echo $ac_option | cut -d '=' -f 2` | |
11 | 568 _win32libdirnotify=no |
1 | 569 ;; |
570 --size-x=*) | |
571 _x=`echo $ac_option | cut -d '=' -f 2` | |
572 ;; | |
573 --size-y=*) | |
574 _y=`echo $ac_option | cut -d '=' -f 2` | |
575 ;; | |
417
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
576 --with-x11libdir=*) |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
577 ;; |
196 | 578 --cc=*) |
579 ;; | |
1 | 580 esac |
581 done | |
582 | |
417
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
583 if [ $_x11 = 'yes' ]; then |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
584 if [ $_mga = 'yes' ]; then |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
585 _xmga=yes |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
586 fi |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
587 fi |
1afdd7a8eaf9
small fixes, x11libdir and --disable-x11 works before the detection
arpi_esp
parents:
356
diff
changeset
|
588 |
1 | 589 # to screen. |
196 | 590 echo "Using C compiler: $_cc" |
1 | 591 echo "Checking for cpu vendor ... $pvendor ( $pfamily:$pmodel:$pstepping )" |
592 echo "Checking for cpu type ... $pname" | |
593 echo "Optimizing to ... $proc" | |
594 echo "Checking for mmx support ... $_mmx" | |
350 | 595 echo "Checking for mmx2 support ... $_mmx2" |
1 | 596 echo "Checking for 3dnow support ... $_3dnow" |
597 echo "Checking for sse support ... $_sse" | |
598 echo "Checking for mtrr support ... $_mtrr" | |
599 echo "Screen size ... ${_x}x${_y}" | |
600 echo "Checking for X11 libs ... $_x11libdir" | |
601 echo "Checking mga_vid device ... $_mga" | |
602 echo "Checking for xmga ... $_xmga" | |
603 echo "Checking for SDL ... $_sdl" | |
604 echo "Checking for OpenGL ... $_gl" | |
605 echo "Checking for Xv ... $_xv" | |
606 echo "Checking for X11 ... $_x11" | |
59 | 607 echo "Checking for DGA ... $_dga" |
233
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
608 echo "Checking for DGA 2.0 .. $_dga2" |
209
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
609 echo "Checking for Xf86VM ... $_vm" |
287 | 610 echo "Checking for SVGAlib ... $_svga" |
225 | 611 echo "Checking for FBDev ... $_fbdev" |
1 | 612 # write conf files. |
613 | |
614 if [ $_gl = yes ]; then | |
615 _gllib='-lGL' | |
616 fi | |
617 | |
618 if [ $_x11 = yes ]; then | |
330 | 619 if [ $_xdpms = yes ]; then |
620 _x11lib='-lX11 -lXext -lXdpms' | |
621 else | |
622 _x11lib='-lX11 -lXext' | |
623 fi | |
1 | 624 fi |
625 | |
626 if [ $_xv = yes ]; then | |
627 _xvlib='-lXv' | |
628 fi | |
629 | |
630 if [ $_sdl = yes ]; then | |
631 _sdllib='-lSDL -lpthread' | |
632 fi | |
633 | |
14 | 634 if [ $_dga = yes ]; then |
635 _dgalib='-lXxf86dga' | |
636 fi | |
637 | |
287 | 638 if [ $_svga = yes ]; then |
289 | 639 _svgalib='-lvgagl -lvga' |
287 | 640 fi |
641 | |
209
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
642 if [ $_vm = yes ]; then |
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
643 _vmlib='-lXxf86vm' |
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
644 fi |
14 | 645 |
1 | 646 if [ "$_termcap" = "yes" ]; then |
647 _termcap='#define USE_TERMCAP' | |
648 _libtermcap='-ltermcap' | |
649 else | |
650 _termcap='#undef USE_TERMCAP' | |
651 _libtermcap='' | |
652 fi | |
653 | |
654 if [ "$_xmmp" = "yes" ]; then | |
655 _xmmpaudio='#define USE_XMMP_AUDIO' | |
656 _xmmplibs='-Llibxmm -lxmm' | |
657 else | |
658 _xmmpaudio='#undef USE_XMMP_AUDIO' | |
659 fi | |
660 | |
661 if [ "$_lirc" = "yes" ]; then | |
662 _lircdefs='#define HAVE_LIRC' | |
663 _lirclibs='-llirc_client' | |
664 else | |
665 _lircdefs='#undef HAVE_LIRC' | |
666 _lirclibs='' | |
667 fi | |
668 | |
669 | |
670 echo | |
671 echo "Creating $MCONF" | |
672 cat > $MCONF << EOF | |
673 | |
674 # -------- Generated by ./configure ----------- | |
675 | |
676 AR=ar | |
196 | 677 CC=$_cc |
1 | 678 # OPTFLAGS=-O4 -march=$proc -mcpu=$proc -pipe -fomit-frame-pointer -ffast-math |
679 OPTFLAGS=-O4 -march=$proc -mcpu=$proc -pipe -ffast-math | |
14 | 680 # LIBS=-L/usr/lib -L/usr/local/lib $_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib |
287 | 681 X_LIBS=$_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib $_vmlib $_svgalib |
1 | 682 TERMCAP_LIB=$_libtermcap |
683 XMM_LIBS = $_xmmplibs | |
684 LIRC_LIBS = $_lirclibs | |
685 WIN32_PATH=-DWIN32_PATH=\"$_win32libdir\" | |
686 | |
687 EOF | |
688 # echo 'CFLAGS=$(OPTFLAGS) -Wall -DMPG12PLAY' >> config.mak | |
689 | |
690 echo "Creating $CCONF" | |
691 | |
692 if [ "$_mmx" = "yes" ]; then | |
693 _mmx='#define HAVE_MMX' | |
694 else | |
695 _mmx='#undef HAVE_MMX' | |
696 fi | |
697 | |
350 | 698 if [ "$_mmx2" = "yes" ]; then |
699 _mmx2='#define HAVE_MMX2' | |
700 else | |
701 _mmx2='#undef HAVE_MMX2' | |
702 fi | |
703 | |
1 | 704 if [ $_3dnow = yes ]; then |
705 _3dnowm='#define HAVE_3DNOW' | |
706 else | |
707 _3dnowm='#undef HAVE_3DNOW' | |
708 fi | |
709 | |
710 if [ $_sse = yes ]; then | |
711 _ssem='#define HAVE_SSE' | |
712 else | |
713 _ssem='#undef HAVE_SSE' | |
714 fi | |
715 | |
716 # --- | |
717 | |
718 _vosrc='' | |
719 | |
720 if [ $_mlib = yes ]; then | |
721 _mlib='#define HAVE_MLIB' | |
722 _vosrc=$_vosrc' yuv2rgb_mlib.c' | |
723 else | |
724 _mlib='#undef HAVE_MLIB' | |
725 fi | |
726 | |
727 # --- | |
728 | |
729 if [ $_gl = yes ]; then | |
730 _gl='#define HAVE_GL' | |
731 _vosrc=$_vosrc' vo_gl.c' | |
732 else | |
733 _gl='#undef HAVE_GL' | |
734 fi | |
735 | |
736 if [ $_sdl = yes ]; then | |
737 _sdldef='#define HAVE_SDL' | |
738 _vosrc=$_vosrc' vo_sdl.c' | |
739 else | |
740 _sdldef='#undef HAVE_SDL' | |
741 fi | |
742 | |
743 if [ $_x11 = yes ]; then | |
744 _x11='#define HAVE_X11' | |
745 _vosrc=$_vosrc' vo_x11.c' | |
746 else | |
747 _x11='#undef HAVE_X11' | |
748 fi | |
749 | |
750 if [ $_xv = yes ]; then | |
751 _xv='#define HAVE_XV' | |
752 _vosrc=$_vosrc' vo_xv.c' | |
753 else | |
754 _xv='#undef HAVE_XV' | |
755 fi | |
756 | |
209
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
757 if [ $_vm = yes ]; then |
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
758 _vm='#define HAVE_XF86VM' |
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
759 else |
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
760 _vm='#undef HAVE_XF86VM' |
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
761 fi |
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
762 |
1 | 763 # --- |
764 | |
765 if [ $_mga = yes ]; then | |
766 _mga='#define HAVE_MGA' | |
767 _vosrc=$_vosrc' vo_mga.c' | |
768 else | |
769 _mga='#undef HAVE_MGA' | |
770 fi | |
771 if [ $_xmga = yes ]; then | |
772 _vosrc=$_vosrc' vo_xmga.c' | |
773 fi | |
774 | |
775 if [ $_syncfb = yes ]; then | |
776 _syncfb='#define HAVE_SYNCFB' | |
777 _vosrc=$_vosrc' vo_syncfb.c' | |
778 else | |
779 _syncfb='#undef HAVE_SYNCFB' | |
780 fi | |
781 | |
782 if [ $_3dfx = yes ]; then | |
783 _3dfx='#define HAVE_3DFX' | |
784 _vosrc=$_vosrc' vo_3dfx.c' | |
785 else | |
786 _3dfx='#undef HAVE_3DFX' | |
787 fi | |
788 | |
287 | 789 if [ $_svga = yes ]; then |
790 _svga='#define HAVE_SVGALIB' | |
791 _vosrc=$_vosrc' vo_svga.c' | |
792 else | |
793 _svga='#undef HAVE_SVGALIB' | |
794 fi | |
795 | |
11 | 796 if [ $_dga = yes ]; then |
797 _dga='#define HAVE_DGA' | |
38 | 798 _vosrc=$_vosrc' vo_dga.c vo_fsdga.c' |
11 | 799 else |
800 _dga='#undef HAVE_DGA' | |
801 fi | |
802 | |
233
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
803 if [ $_dga2 = yes ]; then |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
804 _dga2='#define HAVE_DGA2' |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
805 _vosrc=$_vosrc' vo_dga.c vo_fsdga.c' |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
806 else |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
807 _dga2='#undef HAVE_DGA2' |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
808 fi |
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
809 |
225 | 810 if [ $_fbdev = yes ]; then |
811 _fbdev='#define HAVE_FBDEV' | |
812 _vosrc=$_vosrc' vo_fbdev.c' | |
813 else | |
814 _fbdev='#undef HAVE_FBDEV' | |
815 fi | |
816 | |
1 | 817 if [ $_mpg123 = yes ]; then |
818 _mpg123='#define DEFAULT_MPG123' | |
819 else | |
820 _mpg123='#undef DEFAULT_MPG123' | |
821 fi | |
822 | |
823 cat > $CCONF << EOF | |
824 | |
825 /* -------- Generated by ./configure ----------- */ | |
826 | |
827 /* Define this to enable avg. byte/sec-based AVI sync method by default: | |
828 (use -bps or -nobps commandline option for run-time method selection) */ | |
829 #undef AVI_SYNC_BPS | |
830 | |
831 /* Undefine this if you want soundcard-only timing by default: | |
832 You can still change this with the -alsa or -noalsa command-line option! | |
833 (This function was originally impemented to solve ALSA driver's big | |
834 buffer problems, but it seems to be useful for every soundcard drivers) */ | |
835 #define ALSA_TIMER | |
836 | |
837 /* Undefine this if your soundcard driver has no working select(). | |
838 If you have kernel Oops, player hangups, or just no audio, you should | |
839 try to recompile MPlayer with this option disabled! */ | |
840 #define HAVE_AUDIO_SELECT | |
841 | |
842 /* You have a choice for MP3 decoding: mp3lib(mpg123) or Win32(l3codeca.acm) | |
843 #define this if you prefer mpg123 (with 3Dnow! support) than l3codeca.acm | |
844 (with mmx/sse optimizations) | |
845 You can still change it runtime using -afm 1 (mpg123) or -afm 4 (l3codeca)*/ | |
846 $_mpg123 | |
847 | |
848 /* XMMP support: (test code) */ | |
849 $_xmmpaudio | |
850 #define LIBDIR "/usr/local/lib" | |
851 #define PLUGINDIR LIBDIR "/xmmp/Plugins" | |
852 #define XMMP_AUDIO_DRIVER PLUGINDIR "/Sound/oss.so" | |
853 | |
854 /* LIRC (remote control, see www.lirc.org) support: */ | |
855 $_lircdefs | |
856 | |
41 | 857 /* Define this to enable MPEG 1/2 image postprocessing (requires FAST cpu!) */ |
858 #define MPEG12_POSTPROC | |
859 | |
1 | 860 /* Define if your processor stores words with the most significant |
861 byte first (like Motorola and SPARC, unlike Intel and VAX). */ | |
862 /* #define WORDS_BIGENDIAN */ | |
863 | |
864 #define ARCH_X86 | |
865 | |
866 ///////////////////////////////////////////////////////////////////////////// | |
867 // | |
868 // NOTE: Instead of modifying these here, use the --enable/--disable options | |
869 // of the ./configure script! See ./configure --help for details. | |
870 // | |
871 ///////////////////////////////////////////////////////////////////////////// | |
872 | |
873 /* termcap flag for getch2.c */ | |
874 $_termcap | |
875 | |
876 /* Extension defines */ | |
877 $_mlib // available only on solaris | |
878 $_3dnowm // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.) | |
879 $_mmx // only define if you have MMX | |
350 | 880 $_mmx2 // only define if you have MMX2 |
1 | 881 $_ssem // only define if you have SSE (Intel Pentium III or Celeron II) |
882 | |
883 /* libvo options */ | |
884 #define SCREEN_SIZE_X $_x | |
885 #define SCREEN_SIZE_Y $_y | |
886 $_x11 | |
887 $_xv | |
209
26d2d4d3331a
Addes autodetection of XF86VidMode to configure, and adds a description of
mgraffam
parents:
196
diff
changeset
|
888 $_vm |
1 | 889 $_gl |
11 | 890 $_dga |
233
f62ccacbe1e5
Changes to configure to autodetect DGA 2.0 functionality, and to only use
mgraffam
parents:
225
diff
changeset
|
891 $_dga2 |
1 | 892 $_sdldef |
893 $_3dfx | |
894 $_mga | |
895 $_syncfb | |
225 | 896 $_fbdev |
287 | 897 $_svga |
1 | 898 |
23 | 899 #if defined(HAVE_GL)||defined(HAVE_X11)||defined(HAVE_XV) |
1 | 900 #define X11_FULLSCREEN |
901 #endif | |
902 | |
903 EOF | |
904 | |
905 echo "Creating libvo/config.mak" | |
906 | |
907 _voobj=`echo $_vosrc | sed -e 's/\.c/\.o/g'` | |
908 | |
909 cat > libvo/config.mak << EOF | |
910 | |
911 include ../config.mak | |
912 | |
913 OPTIONAL_SRCS=$_vosrc | |
914 OPTIONAL_OBJS=$_voobj | |
915 | |
916 EOF | |
917 | |
918 echo "Creating libac3/config.mak" | |
919 | |
920 if [ $_sse = yes ]; then | |
921 _downmixc='downmix/downmix_kni.S' | |
922 _downmixo='downmix/downmix_kni.o' | |
923 else | |
924 if [ $_binutils = yes ]; then | |
925 _downmixc='downmix/downmix_i386.S' | |
926 _downmixo='downmix/downmix_i386.o' | |
927 else | |
928 _downmixc='downmix/downmix.c' | |
929 _downmixo='downmix/downmix.o' | |
930 cat << EOF | |
931 | |
932 !!! Warning! fallback to slow downmix.c due the old binutils. | |
933 !!! Upgrade for better audio decoding performance. | |
934 | |
935 EOF | |
936 fi | |
937 fi | |
938 | |
939 cat > libac3/config.mak << EOF | |
940 | |
941 include ../config.mak | |
942 | |
943 OPTIONAL_SRCS = $_downmixc | |
944 OPTIONAL_OBJS = $_downmixo | |
945 | |
946 EOF | |
947 | |
948 echo "Creating mp3lib/config.mak" | |
949 | |
950 if [ $_3dnow = yes ]; then | |
951 _3dnowobjectsrcs='dct36_3dnow.s dct64_3dnow.s decode_3dnow.s' | |
952 _3dnowobjectobjs='dct36_3dnow.o dct64_3dnow.o decode_3dnow.o' | |
953 else | |
954 _3dnowobjectsrcs= | |
955 _3dnowobjectobjs= | |
956 fi | |
957 | |
958 cat > mp3lib/config.mak << EOF | |
959 | |
960 include ../config.mak | |
961 | |
962 OPTIONAL_SRCS = $_3dnowobjectsrcs | |
963 OPTIONAL_OBJS = $_3dnowobjectobjs | |
964 | |
965 EOF | |
966 | |
967 cat << EOF | |
968 | |
969 Config files successfully generated by ./configure ! | |
970 Please check config.h and config.mak files, tune CPU | |
971 and optimization flags if you don't like these defaults. | |
972 You can compile the program with 'make dep;make' and | |
973 install with 'make install'. Good luck! | |
974 | |
975 EOF | |
976 | |
977 if [ $_mtrr = yes ]; then | |
978 echo "Please check mtrr settings at /proc/mtrr (see DOCS/MTRR)" | |
979 echo | |
980 fi | |
981 | |
982 if [ $_sdl = no ]; then | |
983 if [ $_have_sdl = yes ]; then | |
984 echo "You have libSDL installed, but SDL support is disabled by default." | |
985 echo "If you want to compile MPlayer with SDL support, re-run ./configure" | |
986 echo "with --enable-sdl. But it's very buggy & experimental code, use it" | |
987 echo "only if you really need it! And it works(?) *ONLY* with SDL v1.1.7 !" | |
988 echo "(SDL driver is NOT supported, so do NOT report bugs relating to SDL!)" | |
989 echo | |
990 fi | |
991 fi | |
992 | |
993 if [ $_win32libdirnotify = yes ]; then | |
994 echo "Missing WIN32 codecs dir at $_win32libdir !" | |
995 echo "Make it and copy DLL files to there! (You can get them from your windows" | |
996 echo "directory or download ftp://thot.banki.hu/esp-team/linux/MPlayer/w32codec.zip" | |
997 else | |
998 echo "Ok, Win32 codecs directory at $_win32libdir already exists." | |
999 fi | |
1000 |