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