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