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