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