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