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