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