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