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 ;;
|
|
404 --enable-gl)
|
|
405 _gl=yes
|
|
406 ;;
|
|
407 --enable-sdl)
|
|
408 _sdl=yes
|
|
409 ;;
|
|
410 --enable-mga)
|
|
411 _mga=yes
|
|
412 ;;
|
|
413 --enable-xmga)
|
|
414 _xmga=yes
|
|
415 ;;
|
11
|
416 --enable-dga)
|
|
417 _dga=yes
|
|
418 ;;
|
1
|
419 --enable-xv)
|
|
420 _xv=yes
|
|
421 ;;
|
|
422 --enable-x11)
|
|
423 _x11=yes
|
|
424 ;;
|
|
425 --enable-3dfx)
|
|
426 _3dfx=yes
|
|
427 ;;
|
|
428 --enable-syncfb)
|
|
429 _syncfb=yes
|
|
430 ;;
|
|
431 --enable-mlib)
|
|
432 _mlib=yes
|
|
433 ;;
|
|
434 --enable-termcap)
|
|
435 _termcap=yes
|
|
436 ;;
|
|
437 --enable-xmmp)
|
|
438 _xmmp=yes
|
|
439 ;;
|
|
440 --enable-lirc)
|
|
441 _lirc=yes
|
|
442 ;;
|
|
443 --disable-sse)
|
|
444 _sse=no
|
|
445 ;;
|
|
446 --disable-3dnow)
|
|
447 _3dnow=no
|
|
448 ;;
|
|
449 --disable-mmx)
|
|
450 _mmx=no
|
|
451 ;;
|
|
452 --disable-gl)
|
|
453 _gl=no
|
|
454 ;;
|
|
455 --disable-sdl)
|
|
456 _sdl=no
|
|
457 ;;
|
|
458 --disable-mga)
|
|
459 _mga=no
|
|
460 ;;
|
|
461 --disable-xmga)
|
|
462 _xmga=no
|
|
463 ;;
|
|
464 --disable-xv)
|
|
465 _xv=no
|
|
466 ;;
|
|
467 --disable-x11)
|
|
468 _x11=no
|
|
469 ;;
|
|
470 --disable-mlib)
|
|
471 _mlib=no
|
|
472 ;;
|
59
|
473 --disable-dga)
|
|
474 _dga=no
|
|
475 ;;
|
1
|
476 --disable-termcap)
|
|
477 _termcap=no
|
|
478 ;;
|
|
479 --with-x11libdir=*)
|
|
480 _x11libdir=-L`echo $ac_option | cut -d '=' -f 2`
|
|
481 ;;
|
|
482 --with-win32libdir=*)
|
|
483 _win32libdir=`echo $ac_option | cut -d '=' -f 2`
|
11
|
484 _win32libdirnotify=no
|
1
|
485 ;;
|
|
486 --size-x=*)
|
|
487 _x=`echo $ac_option | cut -d '=' -f 2`
|
|
488 ;;
|
|
489 --size-y=*)
|
|
490 _y=`echo $ac_option | cut -d '=' -f 2`
|
|
491 ;;
|
|
492 esac
|
|
493 done
|
|
494
|
|
495 # to screen.
|
|
496
|
|
497 echo "Checking for cpu vendor ... $pvendor ( $pfamily:$pmodel:$pstepping )"
|
|
498 echo "Checking for cpu type ... $pname"
|
|
499 echo "Optimizing to ... $proc"
|
|
500 echo "Checking for mmx support ... $_mmx"
|
|
501 echo "Checking for 3dnow support ... $_3dnow"
|
|
502 echo "Checking for sse support ... $_sse"
|
|
503 echo "Checking for mtrr support ... $_mtrr"
|
|
504 echo "Screen size ... ${_x}x${_y}"
|
|
505 echo "Checking for X11 libs ... $_x11libdir"
|
|
506 echo "Checking mga_vid device ... $_mga"
|
|
507 echo "Checking for xmga ... $_xmga"
|
|
508 echo "Checking for SDL ... $_sdl"
|
|
509 echo "Checking for OpenGL ... $_gl"
|
|
510 echo "Checking for Xv ... $_xv"
|
|
511 echo "Checking for X11 ... $_x11"
|
59
|
512 echo "Checking for DGA ... $_dga"
|
1
|
513
|
|
514 # write conf files.
|
|
515
|
|
516 if [ $_gl = yes ]; then
|
|
517 _gllib='-lGL'
|
|
518 fi
|
|
519
|
|
520 if [ $_x11 = yes ]; then
|
|
521 _x11lib='-lX11 -lXext'
|
|
522 fi
|
|
523
|
|
524 if [ $_xv = yes ]; then
|
|
525 _xvlib='-lXv'
|
|
526 fi
|
|
527
|
|
528 if [ $_sdl = yes ]; then
|
|
529 _sdllib='-lSDL -lpthread'
|
|
530 fi
|
|
531
|
14
|
532 if [ $_dga = yes ]; then
|
|
533 _dgalib='-lXxf86dga'
|
|
534 fi
|
|
535
|
|
536
|
1
|
537 if [ "$_termcap" = "yes" ]; then
|
|
538 _termcap='#define USE_TERMCAP'
|
|
539 _libtermcap='-ltermcap'
|
|
540 else
|
|
541 _termcap='#undef USE_TERMCAP'
|
|
542 _libtermcap=''
|
|
543 fi
|
|
544
|
|
545 if [ "$_xmmp" = "yes" ]; then
|
|
546 _xmmpaudio='#define USE_XMMP_AUDIO'
|
|
547 _xmmplibs='-Llibxmm -lxmm'
|
|
548 else
|
|
549 _xmmpaudio='#undef USE_XMMP_AUDIO'
|
|
550 fi
|
|
551
|
|
552 if [ "$_lirc" = "yes" ]; then
|
|
553 _lircdefs='#define HAVE_LIRC'
|
|
554 _lirclibs='-llirc_client'
|
|
555 else
|
|
556 _lircdefs='#undef HAVE_LIRC'
|
|
557 _lirclibs=''
|
|
558 fi
|
|
559
|
|
560
|
|
561 echo
|
|
562 echo "Creating $MCONF"
|
|
563 cat > $MCONF << EOF
|
|
564
|
|
565 # -------- Generated by ./configure -----------
|
|
566
|
|
567 AR=ar
|
|
568 CC=gcc
|
|
569 # OPTFLAGS=-O4 -march=$proc -mcpu=$proc -pipe -fomit-frame-pointer -ffast-math
|
|
570 OPTFLAGS=-O4 -march=$proc -mcpu=$proc -pipe -ffast-math
|
14
|
571 # LIBS=-L/usr/lib -L/usr/local/lib $_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib
|
|
572 X_LIBS=$_x11libdir $_gllib $_sdllib $_dgalib $_x11lib $_xvlib
|
1
|
573 TERMCAP_LIB=$_libtermcap
|
|
574 XMM_LIBS = $_xmmplibs
|
|
575 LIRC_LIBS = $_lirclibs
|
|
576 WIN32_PATH=-DWIN32_PATH=\"$_win32libdir\"
|
|
577
|
|
578 EOF
|
|
579 # echo 'CFLAGS=$(OPTFLAGS) -Wall -DMPG12PLAY' >> config.mak
|
|
580
|
|
581 echo "Creating $CCONF"
|
|
582
|
|
583 if [ "$_mmx" = "yes" ]; then
|
|
584 _mmx='#define HAVE_MMX'
|
|
585 else
|
|
586 _mmx='#undef HAVE_MMX'
|
|
587 fi
|
|
588
|
|
589 if [ $_3dnow = yes ]; then
|
|
590 _3dnowm='#define HAVE_3DNOW'
|
|
591 else
|
|
592 _3dnowm='#undef HAVE_3DNOW'
|
|
593 fi
|
|
594
|
|
595 if [ $_sse = yes ]; then
|
|
596 _ssem='#define HAVE_SSE'
|
|
597 else
|
|
598 _ssem='#undef HAVE_SSE'
|
|
599 fi
|
|
600
|
|
601 # ---
|
|
602
|
|
603 _vosrc=''
|
|
604
|
|
605 if [ $_mlib = yes ]; then
|
|
606 _mlib='#define HAVE_MLIB'
|
|
607 _vosrc=$_vosrc' yuv2rgb_mlib.c'
|
|
608 else
|
|
609 _mlib='#undef HAVE_MLIB'
|
|
610 fi
|
|
611
|
|
612 # ---
|
|
613
|
|
614 if [ $_gl = yes ]; then
|
|
615 _gl='#define HAVE_GL'
|
|
616 _vosrc=$_vosrc' vo_gl.c'
|
|
617 else
|
|
618 _gl='#undef HAVE_GL'
|
|
619 fi
|
|
620
|
|
621 if [ $_sdl = yes ]; then
|
|
622 _sdldef='#define HAVE_SDL'
|
|
623 _vosrc=$_vosrc' vo_sdl.c'
|
|
624 else
|
|
625 _sdldef='#undef HAVE_SDL'
|
|
626 fi
|
|
627
|
|
628 if [ $_x11 = yes ]; then
|
|
629 _x11='#define HAVE_X11'
|
|
630 _vosrc=$_vosrc' vo_x11.c'
|
|
631 else
|
|
632 _x11='#undef HAVE_X11'
|
|
633 fi
|
|
634
|
|
635 if [ $_xv = yes ]; then
|
|
636 _xv='#define HAVE_XV'
|
|
637 _vosrc=$_vosrc' vo_xv.c'
|
|
638 else
|
|
639 _xv='#undef HAVE_XV'
|
|
640 fi
|
|
641
|
|
642 # ---
|
|
643
|
|
644 if [ $_mga = yes ]; then
|
|
645 _mga='#define HAVE_MGA'
|
|
646 _vosrc=$_vosrc' vo_mga.c'
|
|
647 else
|
|
648 _mga='#undef HAVE_MGA'
|
|
649 fi
|
|
650 if [ $_xmga = yes ]; then
|
|
651 _vosrc=$_vosrc' vo_xmga.c'
|
|
652 fi
|
|
653
|
|
654 if [ $_syncfb = yes ]; then
|
|
655 _syncfb='#define HAVE_SYNCFB'
|
|
656 _vosrc=$_vosrc' vo_syncfb.c'
|
|
657 else
|
|
658 _syncfb='#undef HAVE_SYNCFB'
|
|
659 fi
|
|
660
|
|
661 if [ $_3dfx = yes ]; then
|
|
662 _3dfx='#define HAVE_3DFX'
|
|
663 _vosrc=$_vosrc' vo_3dfx.c'
|
|
664 else
|
|
665 _3dfx='#undef HAVE_3DFX'
|
|
666 fi
|
|
667
|
11
|
668 if [ $_dga = yes ]; then
|
|
669 _dga='#define HAVE_DGA'
|
38
|
670 _vosrc=$_vosrc' vo_dga.c vo_fsdga.c'
|
11
|
671 else
|
|
672 _dga='#undef HAVE_DGA'
|
|
673 fi
|
|
674
|
1
|
675 if [ $_mpg123 = yes ]; then
|
|
676 _mpg123='#define DEFAULT_MPG123'
|
|
677 else
|
|
678 _mpg123='#undef DEFAULT_MPG123'
|
|
679 fi
|
|
680
|
|
681 cat > $CCONF << EOF
|
|
682
|
|
683 /* -------- Generated by ./configure ----------- */
|
|
684
|
|
685 /* Define this to enable avg. byte/sec-based AVI sync method by default:
|
|
686 (use -bps or -nobps commandline option for run-time method selection) */
|
|
687 #undef AVI_SYNC_BPS
|
|
688
|
|
689 /* Undefine this if you want soundcard-only timing by default:
|
|
690 You can still change this with the -alsa or -noalsa command-line option!
|
|
691 (This function was originally impemented to solve ALSA driver's big
|
|
692 buffer problems, but it seems to be useful for every soundcard drivers) */
|
|
693 #define ALSA_TIMER
|
|
694
|
|
695 /* Undefine this if your soundcard driver has no working select().
|
|
696 If you have kernel Oops, player hangups, or just no audio, you should
|
|
697 try to recompile MPlayer with this option disabled! */
|
|
698 #define HAVE_AUDIO_SELECT
|
|
699
|
|
700 /* You have a choice for MP3 decoding: mp3lib(mpg123) or Win32(l3codeca.acm)
|
|
701 #define this if you prefer mpg123 (with 3Dnow! support) than l3codeca.acm
|
|
702 (with mmx/sse optimizations)
|
|
703 You can still change it runtime using -afm 1 (mpg123) or -afm 4 (l3codeca)*/
|
|
704 $_mpg123
|
|
705
|
|
706 /* XMMP support: (test code) */
|
|
707 $_xmmpaudio
|
|
708 #define LIBDIR "/usr/local/lib"
|
|
709 #define PLUGINDIR LIBDIR "/xmmp/Plugins"
|
|
710 #define XMMP_AUDIO_DRIVER PLUGINDIR "/Sound/oss.so"
|
|
711
|
|
712 /* LIRC (remote control, see www.lirc.org) support: */
|
|
713 $_lircdefs
|
|
714
|
41
|
715 /* Define this to enable MPEG 1/2 image postprocessing (requires FAST cpu!) */
|
|
716 #define MPEG12_POSTPROC
|
|
717
|
1
|
718 /* Define if your processor stores words with the most significant
|
|
719 byte first (like Motorola and SPARC, unlike Intel and VAX). */
|
|
720 /* #define WORDS_BIGENDIAN */
|
|
721
|
|
722 #define ARCH_X86
|
|
723
|
|
724 /////////////////////////////////////////////////////////////////////////////
|
|
725 //
|
|
726 // NOTE: Instead of modifying these here, use the --enable/--disable options
|
|
727 // of the ./configure script! See ./configure --help for details.
|
|
728 //
|
|
729 /////////////////////////////////////////////////////////////////////////////
|
|
730
|
|
731 /* termcap flag for getch2.c */
|
|
732 $_termcap
|
|
733
|
|
734 /* Extension defines */
|
|
735 $_mlib // available only on solaris
|
|
736 $_3dnowm // only define if you have 3DNOW (AMD k6-2, AMD Athlon, iDT WinChip, etc.)
|
|
737 $_mmx // only define if you have MMX
|
|
738 $_ssem // only define if you have SSE (Intel Pentium III or Celeron II)
|
|
739
|
|
740 /* libvo options */
|
|
741 #define SCREEN_SIZE_X $_x
|
|
742 #define SCREEN_SIZE_Y $_y
|
|
743 $_x11
|
|
744 $_xv
|
|
745 $_gl
|
11
|
746 $_dga
|
1
|
747 $_sdldef
|
|
748 $_3dfx
|
|
749 $_mga
|
|
750 $_syncfb
|
|
751
|
23
|
752 #if defined(HAVE_GL)||defined(HAVE_X11)||defined(HAVE_XV)
|
1
|
753 #define X11_FULLSCREEN
|
|
754 #endif
|
|
755
|
|
756 EOF
|
|
757
|
|
758 echo "Creating libvo/config.mak"
|
|
759
|
|
760 _voobj=`echo $_vosrc | sed -e 's/\.c/\.o/g'`
|
|
761
|
|
762 cat > libvo/config.mak << EOF
|
|
763
|
|
764 include ../config.mak
|
|
765
|
|
766 OPTIONAL_SRCS=$_vosrc
|
|
767 OPTIONAL_OBJS=$_voobj
|
|
768
|
|
769 EOF
|
|
770
|
|
771 echo "Creating libac3/config.mak"
|
|
772
|
|
773 if [ $_sse = yes ]; then
|
|
774 _downmixc='downmix/downmix_kni.S'
|
|
775 _downmixo='downmix/downmix_kni.o'
|
|
776 else
|
|
777 if [ $_binutils = yes ]; then
|
|
778 _downmixc='downmix/downmix_i386.S'
|
|
779 _downmixo='downmix/downmix_i386.o'
|
|
780 else
|
|
781 _downmixc='downmix/downmix.c'
|
|
782 _downmixo='downmix/downmix.o'
|
|
783 cat << EOF
|
|
784
|
|
785 !!! Warning! fallback to slow downmix.c due the old binutils.
|
|
786 !!! Upgrade for better audio decoding performance.
|
|
787
|
|
788 EOF
|
|
789 fi
|
|
790 fi
|
|
791
|
|
792 cat > libac3/config.mak << EOF
|
|
793
|
|
794 include ../config.mak
|
|
795
|
|
796 OPTIONAL_SRCS = $_downmixc
|
|
797 OPTIONAL_OBJS = $_downmixo
|
|
798
|
|
799 EOF
|
|
800
|
|
801 echo "Creating mp3lib/config.mak"
|
|
802
|
|
803 if [ $_3dnow = yes ]; then
|
|
804 _3dnowobjectsrcs='dct36_3dnow.s dct64_3dnow.s decode_3dnow.s'
|
|
805 _3dnowobjectobjs='dct36_3dnow.o dct64_3dnow.o decode_3dnow.o'
|
|
806 else
|
|
807 _3dnowobjectsrcs=
|
|
808 _3dnowobjectobjs=
|
|
809 fi
|
|
810
|
|
811 cat > mp3lib/config.mak << EOF
|
|
812
|
|
813 include ../config.mak
|
|
814
|
|
815 OPTIONAL_SRCS = $_3dnowobjectsrcs
|
|
816 OPTIONAL_OBJS = $_3dnowobjectobjs
|
|
817
|
|
818 EOF
|
|
819
|
|
820 cat << EOF
|
|
821
|
|
822 Config files successfully generated by ./configure !
|
|
823 Please check config.h and config.mak files, tune CPU
|
|
824 and optimization flags if you don't like these defaults.
|
|
825 You can compile the program with 'make dep;make' and
|
|
826 install with 'make install'. Good luck!
|
|
827
|
|
828 EOF
|
|
829
|
|
830 if [ $_mtrr = yes ]; then
|
|
831 echo "Please check mtrr settings at /proc/mtrr (see DOCS/MTRR)"
|
|
832 echo
|
|
833 fi
|
|
834
|
|
835 if [ $_sdl = no ]; then
|
|
836 if [ $_have_sdl = yes ]; then
|
|
837 echo "You have libSDL installed, but SDL support is disabled by default."
|
|
838 echo "If you want to compile MPlayer with SDL support, re-run ./configure"
|
|
839 echo "with --enable-sdl. But it's very buggy & experimental code, use it"
|
|
840 echo "only if you really need it! And it works(?) *ONLY* with SDL v1.1.7 !"
|
|
841 echo "(SDL driver is NOT supported, so do NOT report bugs relating to SDL!)"
|
|
842 echo
|
|
843 fi
|
|
844 fi
|
|
845
|
|
846 if [ $_win32libdirnotify = yes ]; then
|
|
847 echo "Missing WIN32 codecs dir at $_win32libdir !"
|
|
848 echo "Make it and copy DLL files to there! (You can get them from your windows"
|
|
849 echo "directory or download ftp://thot.banki.hu/esp-team/linux/MPlayer/w32codec.zip"
|
|
850 else
|
|
851 echo "Ok, Win32 codecs directory at $_win32libdir already exists."
|
|
852 fi
|
|
853
|