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