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