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