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