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