Commit | Line | Data |
---|---|---|
de6d9b64 | 1 | #!/bin/sh |
0f3cb305 | 2 | # |
5cbcf02c | 3 | # ffmpeg configure script (c) 2000, 2001, 2002 Fabrice Bellard |
0f3cb305 | 4 | # |
cf9d24ad DC |
5 | |
6 | if test x"$1" = x"-h" -o x"$1" = x"--help" ; then | |
7 | cat << EOF | |
8 | ||
9 | Usage: configure [options] | |
10 | Options: [defaults in brackets after descriptions] | |
11 | ||
12 | EOF | |
13 | echo "Standard options:" | |
14 | echo " --help print this message" | |
15 | echo " --prefix=PREFIX install in PREFIX [$prefix]" | |
16 | echo " --mandir=DIR man documentation in DIR [PREFIX/man]" | |
17 | echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]" | |
18 | echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]" | |
19 | echo " --enable-faad enable faad support via libfaad [default=no]" | |
20 | echo " --enable-faadbin build faad support with runtime linking [default=no]" | |
21 | echo " --enable-faac enable faac support via libfaac [default=no]" | |
1ddadfa9 | 22 | echo " --enable-xvid enable xvid support via xvidcore [default=no]" |
cf9d24ad DC |
23 | echo " --enable-mingw32 enable mingw32 native/cross windows compile" |
24 | echo " --enable-a52 enable GPL'ed A52 support [default=no]" | |
25 | echo " --enable-a52bin open liba52.so.0 at runtime [default=no]" | |
23c99253 | 26 | echo " --enable-dts enable GPL'ed DTS support [default=no]" |
cf9d24ad DC |
27 | echo " --enable-pp enable GPL'ed post processing support [default=no]" |
28 | echo " --enable-shared-pp use libpostproc.so [default=no]" | |
29 | echo " --enable-shared build shared libraries [default=no]" | |
30 | echo " --enable-amr_nb enable amr_nb float audio codec" | |
31 | echo " --enable-amr_nb-fixed use fixed point for amr-nb codec" | |
64cba748 | 32 | echo " --enable-amr_wb enable amr_wb float audio codec" |
cf9d24ad | 33 | echo " --enable-sunmlib use Sun medialib [default=no]" |
9c3d33d6 | 34 | echo " --enable-pthreads use pthreads [default=no]" |
b2e3c528 | 35 | echo " --enable-gpl allow use of gpl code, the resulting libav* and ffmpeg will be under gpl [default=no]" |
cf9d24ad DC |
36 | echo "" |
37 | echo "Advanced options (experts only):" | |
38 | echo " --source-path=PATH path of source code [$source_path]" | |
39 | echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]" | |
40 | echo " --cc=CC use C compiler CC [$cc]" | |
41 | echo " --make=MAKE use specified make [$make]" | |
42 | echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]" | |
43 | echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]" | |
44 | echo " --extra-libs=ELIBS add ELIBS [$ELIBS]" | |
45 | echo " --cpu=CPU force cpu to CPU [$cpu]" | |
46 | echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)" | |
47 | echo " --powerpc-perf-enable enable performance report on PPC (requires enabling PMC)" | |
48 | echo " --disable-mmx disable mmx usage" | |
49 | echo " --disable-altivec disable AltiVec usage" | |
50 | echo " --disable-audio-oss disable OSS audio support [default=no]" | |
51 | echo " --disable-audio-beos disable BeOS audio support [default=no]" | |
52 | echo " --disable-v4l disable video4linux grabbing [default=no]" | |
53 | echo " --disable-dv1394 disable DV1394 grabbing [default=no]" | |
54 | echo " --disable-network disable network support [default=no]" | |
55 | echo " --disable-zlib disable zlib [default=no]" | |
56 | echo " --disable-simple_idct disable simple IDCT routines [default=no]" | |
57 | echo " --disable-vhook disable video hooking support" | |
58 | echo " --enable-gprof enable profiling with gprof [$gprof]" | |
59 | echo " --disable-debug disable debugging symbols" | |
60 | echo " --disable-opts disable compiler optimizations" | |
61 | echo " --disable-mpegaudio-hp faster (but less accurate)" | |
62 | echo " mpegaudio decoding [default=no]" | |
63 | echo " --disable-ffserver disable ffserver build" | |
64 | echo " --disable-ffplay disable ffplay build" | |
65 | echo " --disable-risky disables patent encumbered codecs" | |
66 | echo " --enable-small optimize for size instead of speed" | |
da9b170c | 67 | echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers" |
65d1bea2 | 68 | echo " --disable-strip disable stripping of executables and shared libraries" |
cf9d24ad DC |
69 | echo "" |
70 | echo "NOTE: The object files are build at the place where configure is launched" | |
71 | exit 1 | |
72 | fi | |
73 | ||
0f3cb305 | 74 | # set temporary file name |
57514323 | 75 | if test ! -z "$TMPDIR" ; then |
0f3cb305 | 76 | TMPDIR1="${TMPDIR}" |
57514323 | 77 | elif test ! -z "$TEMPDIR" ; then |
0f3cb305 | 78 | TMPDIR1="${TEMPDIR}" |
3d204385 | 79 | else |
0f3cb305 | 80 | TMPDIR1="/tmp" |
3d204385 NK |
81 | fi |
82 | ||
0f3cb305 FB |
83 | TMPC="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c" |
84 | TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o" | |
f3ec2d46 | 85 | TMPE="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}" |
0f3cb305 FB |
86 | TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S" |
87 | TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h" | |
88 | ||
de6d9b64 FB |
89 | # default parameters |
90 | prefix="/usr/local" | |
23a65308 | 91 | mandir="" |
951bf3e6 | 92 | bindir="" |
0f3cb305 | 93 | cross_prefix="" |
de6d9b64 FB |
94 | cc="gcc" |
95 | ar="ar" | |
be7109c1 | 96 | ranlib="ranlib" |
4a908fbc | 97 | make="make" |
0f3cb305 | 98 | strip="strip" |
de6d9b64 | 99 | cpu=`uname -m` |
a4adb608 | 100 | tune="generic" |
e45a2872 | 101 | powerpc_perf="no" |
0f3cb305 | 102 | mmx="default" |
ab6c65f6 | 103 | altivec="default" |
d46aba26 | 104 | mmi="default" |
de6d9b64 | 105 | case "$cpu" in |
ef0bc4c9 | 106 | i386|i486|i586|i686|i86pc|BePC) |
de6d9b64 | 107 | cpu="x86" |
de6d9b64 | 108 | ;; |
053dea12 AJ |
109 | x86_64) |
110 | if [ "`$cc -dumpmachine | grep x86_64 | cut -d- -f1`" = "x86_64" -a \ | |
111 | -z "`echo $CFLAGS | grep -- -m32`" ]; then | |
112 | cpu="x86_64" | |
113 | else | |
114 | cpu="x86" | |
115 | fi | |
116 | ;; | |
93caefc7 AB |
117 | # armv4l is a subset of armv5tel |
118 | armv4l|armv5tel) | |
6ed7422a | 119 | cpu="armv4l" |
6ed7422a | 120 | ;; |
91d1f1a4 NK |
121 | alpha) |
122 | cpu="alpha" | |
91d1f1a4 | 123 | ;; |
a43bd1d7 | 124 | "Power Macintosh"|ppc) |
90cee0c3 MN |
125 | cpu="powerpc" |
126 | ;; | |
d46aba26 LS |
127 | mips) |
128 | cpu="mips" | |
129 | ;; | |
bb476ff3 | 130 | sun4u|sparc64) |
a7beab73 RS |
131 | cpu="sparc64" |
132 | ;; | |
bb476ff3 JM |
133 | sparc) |
134 | cpu="sparc" | |
135 | ;; | |
bdb2e37c AB |
136 | sh4) |
137 | cpu="sh4" | |
138 | ;; | |
de6d9b64 | 139 | *) |
0f3cb305 | 140 | cpu="unknown" |
de6d9b64 FB |
141 | ;; |
142 | esac | |
143 | gprof="no" | |
5cbcf02c FB |
144 | v4l="yes" |
145 | audio_oss="yes" | |
dfdfa47c | 146 | audio_beos="no" |
8aa3ee32 | 147 | dv1394="yes" |
5cbcf02c | 148 | network="yes" |
0147f198 | 149 | zlib="yes" |
a6741398 | 150 | mp3lame="no" |
81e0d0b4 | 151 | vorbis="no" |
0fc50e58 ZK |
152 | faad="no" |
153 | faadbin="no" | |
29d48296 | 154 | faac="no" |
1ddadfa9 | 155 | xvid="no" |
ba9261e5 | 156 | a52="no" |
57514323 | 157 | a52bin="no" |
23c99253 | 158 | dts="no" |
ba9261e5 | 159 | pp="no" |
bba9b16c | 160 | shared_pp="no" |
732d9245 | 161 | mingw32="no" |
3f027ca7 | 162 | cygwin="no" |
f3ec2d46 | 163 | os2="no" |
83286d2a | 164 | lshared="no" |
cddf3f45 GM |
165 | optimize="yes" |
166 | debug="yes" | |
65d1bea2 | 167 | dostrip="yes" |
ef0bc4c9 | 168 | extralibs="-lm" |
c02dbee1 | 169 | simpleidct="yes" |
0f3cb305 | 170 | bigendian="no" |
7f965c1c | 171 | inttypes="yes" |
b5c950c4 | 172 | emu_fast_int="no" |
a8721c09 | 173 | vhook="default" |
adbc0510 PG |
174 | dlfcn="no" |
175 | dlopen="no" | |
1eb2212e | 176 | mpegaudio_hp="yes" |
e1707f52 | 177 | SHFLAGS=-shared |
26b35efb | 178 | netserver="no" |
4baca069 | 179 | need_inet_aton="no" |
8154d2e0 | 180 | ffserver="yes" |
a86b921c | 181 | ffplay="yes" |
4baca069 PG |
182 | LDFLAGS=-Wl,--warn-common |
183 | FFSLDFLAGS=-Wl,-E | |
f3ec2d46 SG |
184 | LIBPREF="lib" |
185 | LIBSUF=".a" | |
186 | SLIBPREF="lib" | |
187 | SLIBSUF=".so" | |
951bf3e6 | 188 | EXESUF="" |
1d0d55da | 189 | risky="yes" |
891f64b3 | 190 | amr_nb="no" |
d663a1fd | 191 | amr_wb="no" |
bc634f6f | 192 | amr_nb_fixed="no" |
f80f7964 | 193 | sunmlib="no" |
9c3d33d6 | 194 | pthreads="no" |
b2e3c528 | 195 | gpl="no" |
da9b170c | 196 | memalignhack="no" |
ef0bc4c9 FR |
197 | |
198 | # OS specific | |
199 | targetos=`uname -s` | |
200 | case $targetos in | |
201 | BeOS) | |
202 | prefix="/boot/home/config" | |
203 | # helps building libavcodec | |
cddf3f45 | 204 | CFLAGS="-DPIC -fomit-frame-pointer" |
31ba0b4d | 205 | # 3 gcc releases known for BeOS, each with ugly bugs |
b2924696 | 206 | gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`" |
31ba0b4d FR |
207 | case "$gcc_version" in |
208 | 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc" | |
209 | mmx="no" | |
210 | ;; | |
211 | *20010315*) echo "BeBits gcc" | |
212 | CFLAGS="$CFLAGS -fno-expensive-optimizations" | |
213 | ;; | |
214 | esac | |
e1707f52 MN |
215 | SHFLAGS=-nostart |
216 | # disable linux things | |
217 | audio_oss="no" | |
5cbcf02c | 218 | v4l="no" |
8aa3ee32 | 219 | dv1394="no" |
dfdfa47c FR |
220 | # enable beos things |
221 | audio_beos="yes" | |
ef0bc4c9 FR |
222 | # no need for libm, but the inet stuff |
223 | # Check for BONE | |
224 | if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then | |
225 | extralibs="-lbind -lsocket" | |
226 | else | |
26b35efb | 227 | netserver="yes" |
4baca069 | 228 | need_inet_aton="yes" |
26b35efb | 229 | extralibs="-lnet" |
ef0bc4c9 | 230 | fi ;; |
4baca069 PG |
231 | SunOS) |
232 | v4l="no" | |
233 | audio_oss="no" | |
8aa3ee32 | 234 | dv1394="no" |
4baca069 PG |
235 | make="gmake" |
236 | LDFLAGS="" | |
237 | FFSLDFLAGS="" | |
238 | need_inet_aton="yes" | |
239 | extralibs="$extralibs -lsocket -lnsl" | |
240 | ;; | |
9c938e77 PG |
241 | FreeBSD) |
242 | v4l="no" | |
243 | audio_oss="yes" | |
8aa3ee32 | 244 | dv1394="no" |
9c938e77 | 245 | make="gmake" |
12043e1d SS |
246 | CFLAGS="-pthread" |
247 | LDFLAGS="$LDFLAGS -export-dynamic -pthread" | |
9c938e77 | 248 | ;; |
4a908fbc | 249 | BSD/OS) |
5cbcf02c | 250 | v4l="no" |
6063bce7 | 251 | audio_oss="yes" |
8aa3ee32 | 252 | dv1394="no" |
4a908fbc AB |
253 | extralibs="-lpoll -lgnugetopt -lm" |
254 | make="gmake" | |
255 | ;; | |
90cee0c3 | 256 | Darwin) |
a43bd1d7 | 257 | cc="cc" |
90cee0c3 MN |
258 | v4l="no" |
259 | audio_oss="no" | |
8aa3ee32 | 260 | dv1394="no" |
d3b15036 | 261 | ffserver="no" |
a43bd1d7 | 262 | SHFLAGS="-dynamiclib" |
90cee0c3 | 263 | extralibs="" |
a43bd1d7 | 264 | darwin="yes" |
47930f09 | 265 | strip="strip -x" |
4850b2d2 | 266 | LDFLAGS="-Wl,-d" |
4baca069 | 267 | FFSLDFLAGS=-Wl,-bind_at_load |
90cee0c3 | 268 | ;; |
732d9245 | 269 | MINGW32*) |
951bf3e6 FB |
270 | # Note: the rest of the mingw32 config is done afterwards as mingw32 |
271 | # can be forced on command line for linux cross compilation | |
732d9245 BE |
272 | mingw32="yes" |
273 | ;; | |
3f027ca7 FB |
274 | CYGWIN*) |
275 | v4l="no" | |
276 | audio_oss="yes" | |
8aa3ee32 | 277 | dv1394="no" |
3f027ca7 FB |
278 | extralibs="" |
279 | cygwin="yes" | |
280 | test -f /usr/include/inttypes.h || \ | |
281 | test -f /usr/local/include/inttypes.h || \ | |
282 | echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \ | |
24689bce | 283 | "/usr/local/include/inttypes.h !!!" |
3f027ca7 | 284 | ;; |
b55e4ef4 | 285 | Linux) |
4baca069 | 286 | LDFLAGS="$LDFLAGS -rdynamic" |
b55e4ef4 | 287 | ;; |
99614dd4 MB |
288 | IRIX*) |
289 | ranlib="echo ignoring ranlib" | |
290 | v4l="no" | |
291 | audio_oss="no" | |
292 | make="gmake" | |
293 | ;; | |
f3ec2d46 SG |
294 | OS/2) |
295 | TMPE=$TMPE".exe" | |
69db4e10 SG |
296 | ar="emxomfar -p64" |
297 | ranlib="echo ignoring ranlib" | |
298 | strip="echo ignoring strip" | |
cddf3f45 | 299 | CFLAGS="-Zomf" |
69db4e10 | 300 | LDFLAGS="-Zomf -Zstack 16384 -s" |
f3ec2d46 SG |
301 | SHFLAGS="" |
302 | FFSLDFLAGS="" | |
303 | LIBPREF="" | |
304 | LIBSUF=".lib" | |
305 | SLIBPREF="" | |
306 | SLIBSUF=".dll" | |
951bf3e6 | 307 | EXESUF=".exe" |
f3ec2d46 SG |
308 | extralibs="" |
309 | v4l="no" | |
310 | audio_oss="no" | |
8aa3ee32 | 311 | dv1394="no" |
f3ec2d46 SG |
312 | network="no" |
313 | ffserver="no" | |
314 | os2="yes" | |
315 | ;; | |
ef0bc4c9 FR |
316 | *) ;; |
317 | esac | |
de6d9b64 | 318 | |
6852ac95 RD |
319 | # From mplayer configure. We need TARGET_OS available |
320 | # to the Makefile, so it can distinguish between flavors | |
321 | # of AltiVec on PowerPC | |
322 | TARGET_OS=`( uname -s ) 2>&1` | |
323 | case "$TARGET_OS" in | |
324 | Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU) | |
325 | ;; | |
326 | IRIX*) | |
327 | TARGET_OS=IRIX | |
328 | ;; | |
329 | HP-UX*) | |
330 | TARGET_OS=HP-UX | |
331 | ;; | |
332 | [cC][yY][gG][wW][iI][nN]*) | |
333 | TARGET_OS=CYGWIN | |
334 | ;; | |
335 | *) | |
336 | TARGET_OS="$TARGET_OS-UNKNOWN" | |
337 | ;; | |
338 | esac | |
339 | ||
0f3cb305 FB |
340 | # find source path |
341 | # XXX: we assume an absolute path is given when launching configure, | |
342 | # except in './configure' case. | |
586bc755 | 343 | source_path="`echo $0 | sed -e 's#/configure##'`" |
0f3cb305 FB |
344 | source_path_used="yes" |
345 | if test -z "$source_path" -o "$source_path" = "." ; then | |
346 | source_path=`pwd` | |
347 | source_path_used="no" | |
de6d9b64 FB |
348 | fi |
349 | ||
350 | for opt do | |
351 | case "$opt" in | |
352 | --prefix=*) prefix=`echo $opt | cut -d '=' -f 2` | |
353 | ;; | |
23a65308 FB |
354 | --mandir=*) mandir=`echo $opt | cut -d '=' -f 2` |
355 | ;; | |
0f3cb305 FB |
356 | --source-path=*) source_path=`echo $opt | cut -d '=' -f 2` |
357 | ;; | |
358 | --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2` | |
359 | ;; | |
de6d9b64 FB |
360 | --cc=*) cc=`echo $opt | cut -d '=' -f 2` |
361 | ;; | |
4a908fbc AB |
362 | --make=*) make=`echo $opt | cut -d '=' -f 2` |
363 | ;; | |
0f3cb305 FB |
364 | --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}" |
365 | ;; | |
366 | --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=} | |
367 | ;; | |
368 | --extra-libs=*) extralibs=${opt#--extra-libs=} | |
369 | ;; | |
de6d9b64 FB |
370 | --cpu=*) cpu=`echo $opt | cut -d '=' -f 2` |
371 | ;; | |
a4adb608 MN |
372 | --tune=*) tune=`echo $opt | cut -d '=' -f 2` |
373 | ;; | |
e45a2872 RD |
374 | --powerpc-perf-enable) powerpc_perf="yes" |
375 | ;; | |
de6d9b64 FB |
376 | --disable-mmx) mmx="no" |
377 | ;; | |
ab6c65f6 BF |
378 | --disable-altivec) altivec="no" |
379 | ;; | |
de6d9b64 FB |
380 | --enable-gprof) gprof="yes" |
381 | ;; | |
5cbcf02c FB |
382 | --disable-v4l) v4l="no" |
383 | ;; | |
384 | --disable-audio-oss) audio_oss="no" | |
385 | ;; | |
dfdfa47c FR |
386 | --disable-audio-beos) audio_beos="no" |
387 | ;; | |
8aa3ee32 MK |
388 | --disable-dv1394) dv1394="no" |
389 | ;; | |
ffc0ef96 | 390 | --disable-network) network="no"; ffserver="no" |
5cbcf02c | 391 | ;; |
0147f198 FR |
392 | --disable-zlib) zlib="no" |
393 | ;; | |
ba9261e5 | 394 | --enable-a52) a52="yes" |
6ed7422a | 395 | ;; |
9c938e77 | 396 | --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs" |
57514323 | 397 | ;; |
23c99253 MN |
398 | --enable-dts) dts="yes" ; extralibs="$extralibs -ldts" |
399 | ;; | |
ba9261e5 | 400 | --enable-pp) pp="yes" |
bba9b16c MN |
401 | ;; |
402 | --enable-shared-pp) shared_pp="yes" | |
403 | ;; | |
a6741398 J |
404 | --enable-mp3lame) mp3lame="yes" |
405 | ;; | |
81e0d0b4 MH |
406 | --enable-vorbis) vorbis="yes" |
407 | ;; | |
445ad18d ZK |
408 | --enable-faad) faad="yes" |
409 | ;; | |
410 | --enable-faadbin) faadbin="yes" | |
411 | ;; | |
29d48296 MN |
412 | --enable-faac) faac="yes" |
413 | ;; | |
1ddadfa9 AT |
414 | --enable-xvid) xvid="yes" |
415 | ;; | |
68892110 PG |
416 | --disable-vhook) vhook="no" |
417 | ;; | |
c02dbee1 | 418 | --disable-simple_idct) simpleidct="no" |
045ed63f | 419 | ;; |
732d9245 BE |
420 | --enable-mingw32) mingw32="yes" |
421 | ;; | |
83286d2a | 422 | --enable-shared) lshared="yes" |
0319c531 | 423 | ;; |
cddf3f45 GM |
424 | --disable-debug) debug="no" |
425 | ;; | |
426 | --disable-opts) optimize="no" | |
427 | ;; | |
1eb2212e FB |
428 | --disable-mpegaudio-hp) mpegaudio_hp="no" |
429 | ;; | |
8154d2e0 FB |
430 | --disable-ffserver) ffserver="no" |
431 | ;; | |
a86b921c FB |
432 | --disable-ffplay) ffplay="no" |
433 | ;; | |
1d0d55da MN |
434 | --disable-risky) risky="no" |
435 | ;; | |
cddf3f45 | 436 | --enable-small) optimize="small" |
553a6284 | 437 | ;; |
891f64b3 | 438 | --enable-amr_nb) amr_nb="yes" |
439 | ;; | |
bc634f6f ZK |
440 | --enable-amr_nb-fixed) amr_nb_fixed="yes" |
441 | ;; | |
64cba748 MN |
442 | --enable-amr_wb) amr_wb="yes" |
443 | ;; | |
f80f7964 RS |
444 | --enable-sunmlib) sunmlib="yes" |
445 | ;; | |
9c3d33d6 MN |
446 | --enable-pthreads) pthreads="yes" |
447 | ;; | |
b2e3c528 MN |
448 | --enable-gpl) gpl="yes" |
449 | ;; | |
da9b170c MN |
450 | --enable-memalign-hack) memalignhack="yes" |
451 | ;; | |
65d1bea2 MB |
452 | --disable-strip) dostrip="no" |
453 | ;; | |
de6d9b64 FB |
454 | esac |
455 | done | |
456 | ||
b2e3c528 MN |
457 | if test "$gpl" != "yes"; then |
458 | if test "$pp" != "no" -o "$shared_pp" != "no"; then | |
459 | echo "The Postprocessing code is under GPL and --enable-gpl is not specified" | |
460 | fail="yes" | |
461 | fi | |
462 | ||
463 | if test "$a52" != "no" -o "$a52bin" != "no"; then | |
464 | echo "liba52 is under GPL and --enable-gpl is not specified" | |
465 | fail="yes" | |
466 | fi | |
23c99253 | 467 | |
1ddadfa9 AT |
468 | if test "$xvid" != "no"; then |
469 | echo "libxvidcore is under GPL and --enable-gpl is not specified" | |
470 | fail="yes" | |
471 | fi | |
472 | ||
23c99253 MN |
473 | if test "$dts" != "no"; then |
474 | echo "libdts is under GPL and --enable-gpl is not specified" | |
475 | fail="yes" | |
476 | fi | |
b2e3c528 MN |
477 | |
478 | if test "$faad" != "no" -o "$faadbin" != "no"; then | |
479 | cat > $TMPC << EOF | |
480 | #include <faad.h> | |
481 | int main( void ) { return 0; } | |
482 | EOF | |
483 | ||
484 | if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then | |
485 | cat > $TMPC << EOF | |
486 | #include <faad.h> | |
487 | #ifndef FAAD2_VERSION | |
488 | ok faad1 | |
489 | #endif | |
490 | int main( void ) { return 0; } | |
491 | EOF | |
492 | if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then | |
493 | echo "faad2 is under GPL and --enable-gpl is not specified" | |
494 | fail="yes" | |
495 | fi | |
496 | else | |
497 | faad="no" | |
498 | faadbin="no" | |
499 | echo "faad test failed" | |
500 | fi | |
501 | fi | |
502 | ||
503 | ||
a18b5183 | 504 | if test "$fail" = "yes"; then |
b2e3c528 MN |
505 | exit 1 |
506 | fi | |
507 | fi | |
508 | ||
0f3cb305 FB |
509 | # compute mmx state |
510 | if test $mmx = "default"; then | |
053dea12 | 511 | if test $cpu = "x86" -o $cpu = "x86_64"; then |
0f3cb305 FB |
512 | mmx="yes" |
513 | else | |
514 | mmx="no" | |
515 | fi | |
516 | fi | |
517 | ||
cf9d24ad | 518 | #Darwin CC versions |
75388c74 | 519 | needmdynamicnopic="no" |
cf9d24ad | 520 | if test $targetos = Darwin; then |
b2924696 | 521 | if test -n "`$cc -v 2>&1 | grep xlc`"; then |
747a0554 | 522 | CFLAGS="$CFLAGS -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto" |
cf9d24ad | 523 | else |
b2924696 | 524 | gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`" |
cf9d24ad DC |
525 | case "$gcc_version" in |
526 | *2.95*) | |
747a0554 | 527 | CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer" |
cf9d24ad | 528 | ;; |
75388c74 | 529 | *3.*) |
747a0554 | 530 | CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare" |
75388c74 MN |
531 | if test "$lshared" = no; then |
532 | needmdynamicnopic="yes" | |
533 | fi | |
cf9d24ad DC |
534 | ;; |
535 | *) | |
747a0554 | 536 | CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer" |
75388c74 MN |
537 | if test "$lshared" = no; then |
538 | needmdynamicnopic="yes" | |
539 | fi | |
cf9d24ad DC |
540 | ;; |
541 | esac | |
542 | fi | |
543 | fi | |
544 | ||
ab6c65f6 BF |
545 | # Can only do AltiVec on PowerPC |
546 | if test $altivec = "default"; then | |
547 | if test $cpu = "powerpc"; then | |
548 | altivec="yes" | |
549 | else | |
550 | altivec="no" | |
551 | fi | |
552 | fi | |
553 | ||
a4adb608 MN |
554 | # Add processor-specific flags |
555 | TUNECPU="generic" | |
9007f514 | 556 | POWERPCMODE="32bits" |
a4adb608 MN |
557 | if test $tune != "generic"; then |
558 | case $tune in | |
559 | 601|ppc601|PowerPC601) | |
560 | CFLAGS="$CFLAGS -mcpu=601" | |
561 | if test $altivec = "yes"; then | |
562 | echo "WARNING: tuning for PPC601 but altivec enabled !"; | |
563 | fi | |
564 | TUNECPU=ppc601 | |
565 | ;; | |
566 | 603*|ppc603*|PowerPC603*) | |
567 | CFLAGS="$CFLAGS -mcpu=603" | |
568 | if test $altivec = "yes"; then | |
569 | echo "WARNING: tuning for PPC603 but altivec enabled !"; | |
570 | fi | |
571 | TUNECPU=ppc603 | |
572 | ;; | |
573 | 604*|ppc604*|PowerPC604*) | |
574 | CFLAGS="$CFLAGS -mcpu=604" | |
575 | if test $altivec = "yes"; then | |
576 | echo "WARNING: tuning for PPC604 but altivec enabled !"; | |
577 | fi | |
578 | TUNECPU=ppc604 | |
579 | ;; | |
8d6625b6 | 580 | G3|g3|75*|ppc75*|PowerPC75*) |
fe0f2a97 | 581 | CFLAGS="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt" |
a4adb608 MN |
582 | if test $altivec = "yes"; then |
583 | echo "WARNING: tuning for PPC75x but altivec enabled !"; | |
584 | fi | |
585 | TUNECPU=ppc750 | |
586 | ;; | |
8d6625b6 | 587 | G4|g4|745*|ppc745*|PowerPC745*) |
fe0f2a97 | 588 | CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt" |
3efd4952 RD |
589 | if test $altivec = "no"; then |
590 | echo "WARNING: tuning for PPC745x but altivec disabled !"; | |
591 | fi | |
592 | TUNECPU=ppc7450 | |
593 | ;; | |
594 | 74*|ppc74*|PowerPC74*) | |
fe0f2a97 | 595 | CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt" |
a4adb608 MN |
596 | if test $altivec = "no"; then |
597 | echo "WARNING: tuning for PPC74xx but altivec disabled !"; | |
598 | fi | |
e45a2872 | 599 | TUNECPU=ppc7400 |
a4adb608 | 600 | ;; |
8d6625b6 | 601 | G5|g5|970|ppc970|PowerPC970|power4*|Power4*) |
9007f514 | 602 | CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64" |
a4adb608 MN |
603 | if test $altivec = "no"; then |
604 | echo "WARNING: tuning for PPC970 but altivec disabled !"; | |
605 | fi | |
606 | TUNECPU=ppc970 | |
9007f514 | 607 | POWERPCMODE="64bits" |
a4adb608 MN |
608 | ;; |
609 | *) | |
610 | echo "WARNING: unknown CPU "$tune", ignored" | |
611 | ;; | |
612 | esac | |
613 | fi | |
614 | ||
cf9d24ad | 615 | # AltiVec flags: The FSF version of GCC differs from the Apple version |
b6e52719 MD |
616 | if test $cpu = "powerpc"; then |
617 | if test $altivec = "yes"; then | |
b2924696 | 618 | if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then |
b6e52719 MD |
619 | CFLAGS="$CFLAGS -faltivec" |
620 | else | |
621 | CFLAGS="$CFLAGS -maltivec -mabi=altivec" | |
622 | fi | |
623 | fi | |
624 | fi | |
625 | ||
a9a07762 MN |
626 | # See if we have <altivec.h> |
627 | cat > $TMPC << EOF | |
628 | #include <altivec.h> | |
629 | int main( void ) { return 0; } | |
630 | EOF | |
631 | ||
632 | _altivec_h="no" | |
b6e52719 | 633 | if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then |
a9a07762 MN |
634 | _altivec_h="yes" |
635 | fi | |
636 | ||
ab6c65f6 BF |
637 | # See does our compiler support Motorola AltiVec C API |
638 | if test $altivec = "yes"; then | |
a9a07762 | 639 | if test $_altivec_h = "yes"; then |
ab6c65f6 | 640 | cat > $TMPC << EOF |
a9a07762 | 641 | #include <altivec.h> |
ab6c65f6 BF |
642 | int main(void) { |
643 | vector signed int v1, v2, v3; | |
644 | v1 = vec_add(v2,v3); | |
645 | return 0; | |
646 | } | |
647 | EOF | |
a9a07762 MN |
648 | else |
649 | cat > $TMPC << EOF | |
650 | int main(void) { | |
651 | vector signed int v1, v2, v3; | |
652 | v1 = vec_add(v2,v3); | |
653 | return 0; | |
654 | } | |
655 | EOF | |
656 | fi | |
b6e52719 | 657 | $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no" |
ab6c65f6 BF |
658 | fi |
659 | ||
d46aba26 LS |
660 | # Can only do mmi on mips |
661 | if test $mmi = "default"; then | |
662 | if test $cpu = "mips"; then | |
663 | mmi="yes" | |
664 | else | |
665 | mmi="no" | |
666 | fi | |
667 | fi | |
668 | ||
669 | # See does our compiler support mmi | |
670 | if test $mmi = "yes"; then | |
671 | cat > $TMPC << EOF | |
672 | int main(void) { | |
673 | __asm__ ("lq \$2, 0(\$2)"); | |
674 | return 0; | |
675 | } | |
676 | EOF | |
f3ec2d46 | 677 | $cc -o $TMPE $TMPC 2> /dev/null || mmi="no" |
d46aba26 LS |
678 | fi |
679 | ||
732d9245 | 680 | if test "$mingw32" = "yes" ; then |
732d9245 BE |
681 | v4l="no" |
682 | audio_oss="no" | |
8aa3ee32 | 683 | dv1394="no" |
951bf3e6 | 684 | ffserver="no" |
732d9245 | 685 | network="no" |
951bf3e6 FB |
686 | LIBPREF="" |
687 | LIBSUF=".lib" | |
688 | SLIBPREF="" | |
689 | SLIBSUF=".dll" | |
690 | EXESUF=".exe" | |
691 | prefix="/c/Program Files/FFmpeg" | |
692 | bindir="$prefix" | |
732d9245 BE |
693 | fi |
694 | ||
0f3cb305 FB |
695 | cc="${cross_prefix}${cc}" |
696 | ar="${cross_prefix}${ar}" | |
be7109c1 | 697 | ranlib="${cross_prefix}${ranlib}" |
0f3cb305 FB |
698 | strip="${cross_prefix}${strip}" |
699 | ||
487a54d7 FB |
700 | if test -z "$cross_prefix" ; then |
701 | ||
3d204385 | 702 | # --- |
a3999908 MN |
703 | # big/little endian test |
704 | cat > $TMPC << EOF | |
705 | #include <inttypes.h> | |
706 | int main(int argc, char ** argv){ | |
707 | volatile uint32_t i=0x01234567; | |
708 | return (*((uint8_t*)(&i))) == 0x67; | |
709 | } | |
710 | EOF | |
711 | ||
f3ec2d46 SG |
712 | if $cc -o $TMPE $TMPC 2>/dev/null ; then |
713 | $TMPE && bigendian="yes" | |
a3999908 MN |
714 | else |
715 | echo big/little test failed | |
716 | fi | |
717 | ||
487a54d7 FB |
718 | else |
719 | ||
720 | # if cross compiling, cannot launch a program, so make a static guess | |
721 | if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then | |
722 | bigendian="yes" | |
723 | fi | |
724 | ||
725 | fi | |
726 | ||
a3999908 | 727 | # --- |
7f965c1c CF |
728 | # *inttypes.h* test |
729 | cat > $TMPC << EOF | |
730 | #include <inttypes.h> | |
731 | int main(int argc, char ** argv){ | |
732 | return 0; | |
733 | } | |
734 | EOF | |
735 | ||
736 | $cc -o $TMPE $TMPC 2>/dev/null || inttypes="no" | |
737 | ||
738 | # --- | |
b5c950c4 MN |
739 | # *int_fast* test |
740 | cat > $TMPC << EOF | |
741 | #include <inttypes.h> | |
742 | int main(int argc, char ** argv){ | |
743 | volatile uint_fast64_t i=0x01234567; | |
744 | return 0; | |
745 | } | |
746 | EOF | |
747 | ||
748 | $cc -o $TMPE $TMPC 2>/dev/null || emu_fast_int="yes" | |
749 | ||
750 | # --- | |
3d204385 NK |
751 | # check availability of some header files |
752 | ||
753 | cat > $TMPC << EOF | |
754 | #include <malloc.h> | |
755 | int main( void ) { return 0; } | |
756 | EOF | |
757 | ||
758 | _memalign=no | |
759 | _malloc_h=no | |
f3ec2d46 | 760 | if $cc -o $TMPE $TMPC 2> /dev/null ; then |
3d204385 NK |
761 | _malloc_h=yes |
762 | _memalign=yes | |
763 | # check for memalign - atmos | |
764 | cat > $TMPC << EOF | |
765 | #include <malloc.h> | |
766 | int main ( void ) { | |
767 | char *string = NULL; | |
768 | string = memalign(64, sizeof(char)); | |
769 | return 0; | |
770 | } | |
771 | EOF | |
f3ec2d46 | 772 | $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no |
3d204385 NK |
773 | fi |
774 | ||
8bf5d58f MN |
775 | if test "$_memalign" = "no" -a "$mmx" = "yes" -a "$memalignhack" != "yes"; then |
776 | echo "error, no memalign() but sse enabled, either disable it or use --enable-memalign-hack" | |
777 | exit 1 | |
778 | fi | |
779 | ||
68892110 | 780 | cat > $TMPC << EOF |
5e4639e2 GM |
781 | #include <time.h> |
782 | int main( void ) { localtime_r(NULL, NULL); } | |
783 | EOF | |
784 | ||
785 | localtime_r=no | |
786 | if $cc -o $TMPE $TMPC 2> /dev/null ; then | |
787 | localtime_r=yes | |
788 | fi | |
789 | ||
0147f198 FR |
790 | if test "$zlib" = "yes"; then |
791 | # check for zlib - mmu_man | |
792 | cat > $TMPC << EOF | |
793 | #include <zlib.h> | |
794 | int main ( void ) { | |
795 | if (zlibVersion() != ZLIB_VERSION) | |
796 | puts("zlib version differs !!!"); | |
797 | return 1; | |
798 | return 0; | |
799 | } | |
800 | EOF | |
16806499 | 801 | $cc $CFLAGS -o $TMPE $TMPC -lz 2> /dev/null || zlib="no" |
f3ec2d46 | 802 | # $TMPE 2> /dev/null > /dev/null || zlib="no" |
0147f198 FR |
803 | # XXX: more tests needed - runtime test |
804 | fi | |
805 | if test "$zlib" = "yes"; then | |
806 | extralibs="$extralibs -lz" | |
807 | fi | |
808 | ||
95e2ce4a MN |
809 | # test for lrintf in math.h |
810 | cat > $TMPC << EOF | |
811 | #define _ISOC9X_SOURCE 1 | |
812 | #include <math.h> | |
813 | int main( void ) { return (lrintf(3.999f) > 0)?0:1; } | |
814 | EOF | |
815 | ||
816 | have_lrintf="no" | |
f3ec2d46 | 817 | if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then |
95e2ce4a | 818 | have_lrintf="yes" |
c2b9685e MN |
819 | # allanc@chickenandporn.com: cannot execute cross-compiled |
820 | # code on the host. Only execute if not cross-compiling. | |
821 | if test -z "$cross_prefix" ; then | |
822 | $TMPE 2> /dev/null > /dev/null || have_lrintf="no" | |
823 | fi | |
95e2ce4a MN |
824 | fi |
825 | ||
c13e1abd FH |
826 | _restrict= |
827 | for restrict_keyword in restrict __restrict__ __restrict; do | |
828 | echo "void foo(char * $restrict_keyword p);" > $TMPC | |
829 | if $cc -c -o $TMPO $TMPC 2> /dev/null; then | |
830 | _restrict=$restrict_keyword | |
831 | break; | |
832 | fi | |
833 | done | |
834 | ||
52b41d7f FB |
835 | # test gcc version to see if vector builtins can be used |
836 | # currently only used on i386 for MMX builtins | |
837 | cat > $TMPC << EOF | |
053dea12 | 838 | #include <xmmintrin.h> |
52b41d7f FB |
839 | int main(void) { |
840 | #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) | |
841 | return 0; | |
842 | #else | |
843 | #error no vector builtins | |
844 | #endif | |
845 | } | |
846 | EOF | |
847 | ||
848 | builtin_vector=no | |
849 | if $cc -o $TMPO $TMPC 2> /dev/null ; then | |
850 | builtin_vector=yes | |
a8721c09 FB |
851 | fi |
852 | ||
853 | # dlopen/dlfcn.h probing | |
854 | ||
855 | cat > $TMPC << EOF | |
856 | #include <dlfcn.h> | |
857 | int main( void ) { return (int) dlopen("foo", 0); } | |
858 | EOF | |
859 | ||
860 | ldl=-ldl | |
861 | ||
cf9d24ad | 862 | if $cc -o $TMPE $TMPC -ldl > /dev/null 2>&1 ; then |
a8721c09 FB |
863 | dlfcn=yes |
864 | dlopen=yes | |
865 | fi | |
866 | ||
cf9d24ad | 867 | if $cc -o $TMPE $TMPC > /dev/null 2>&1 ; then |
a8721c09 FB |
868 | dlfcn=yes |
869 | dlopen=yes | |
870 | ldl="" | |
871 | fi | |
872 | ||
873 | cat > $TMPC << EOF | |
874 | int main( void ) { return (int) dlopen("foo", 0); } | |
875 | EOF | |
876 | ||
cf9d24ad | 877 | if $cc -o $TMPE $TMPC -ldl > /dev/null 2>&1 ; then |
a8721c09 FB |
878 | dlopen=yes |
879 | fi | |
880 | ||
cf9d24ad | 881 | if $cc -o $TMPE $TMPC > /dev/null 2>&1 ; then |
a8721c09 FB |
882 | dlopen=yes |
883 | ldl="" | |
884 | fi | |
885 | ||
886 | if test "$vhook" = "default" ; then | |
887 | vhook="$dlopen" | |
888 | fi | |
889 | ||
a86b921c FB |
890 | ########################################## |
891 | # imlib probe | |
892 | ||
a8721c09 FB |
893 | cat > $TMPC << EOF |
894 | #include <X11/Xlib.h> | |
895 | #include <Imlib2.h> | |
896 | int main( void ) { return (int) imlib_load_font("foo"); } | |
897 | EOF | |
898 | ||
899 | imlib2=no | |
7802d373 | 900 | if $cc -o $TMPE $TMPC -lImlib2 -lm > /dev/null 2>&1 ; then |
a8721c09 | 901 | imlib2=yes |
52b41d7f FB |
902 | fi |
903 | ||
a86b921c FB |
904 | ########################################## |
905 | # freetype probe | |
906 | ||
04511d53 PG |
907 | cat > $TMPC << EOF |
908 | #include <ft2build.h> | |
909 | int main( void ) { return (int) FT_Init_FreeType(0); } | |
910 | EOF | |
911 | ||
912 | freetype2=no | |
69db4e10 | 913 | if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then |
e2a3cd59 | 914 | if (freetype-config --version) >/dev/null 2>&1 ; then |
cf9d24ad | 915 | if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` > /dev/null 2>&1 ; then |
dee076fc | 916 | freetype2=yes |
04511d53 | 917 | fi |
dee076fc | 918 | fi |
04511d53 PG |
919 | fi |
920 | ||
a86b921c FB |
921 | ########################################## |
922 | # SDL probe | |
923 | ||
924 | cat > $TMPC << EOF | |
925 | #include <SDL.h> | |
31319a8c | 926 | #undef main /* We don't want SDL to override our main() */ |
a86b921c FB |
927 | int main( void ) { return SDL_Init (SDL_INIT_VIDEO); } |
928 | EOF | |
929 | ||
930 | sdl_too_old=no | |
931 | sdl=no | |
e2a3cd59 | 932 | if (sdl-config --version) >/dev/null 2>&1 ; then |
cf9d24ad | 933 | if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` > /dev/null 2>&1 ; then |
a86b921c FB |
934 | _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'` |
935 | if test "$_sdlversion" -lt 121 ; then | |
936 | sdl_too_old=yes | |
937 | else | |
938 | sdl=yes | |
939 | fi | |
940 | fi | |
c3f6b472 | 941 | fi |
a86b921c | 942 | |
146ea952 NB |
943 | ########################################## |
944 | # texi2html probe | |
945 | ||
946 | texi2html=no | |
e2a3cd59 | 947 | if (texi2html -version) >/dev/null 2>&1; then |
146ea952 NB |
948 | texi2html=yes |
949 | fi | |
950 | ||
b2924696 | 951 | case "`$cc -v 2>&1 | grep version`" in |
cf9d24ad DC |
952 | *gcc*) |
953 | CFLAGS="-Wall $CFLAGS" | |
954 | ;; | |
955 | *) | |
956 | ;; | |
957 | esac | |
958 | ||
94a3401e FB |
959 | if test "$sdl" = "no" ; then |
960 | ffplay=no | |
961 | fi | |
962 | ||
cddf3f45 | 963 | if test "$debug" = "yes"; then |
7906085f | 964 | CFLAGS="-g $CFLAGS" |
cddf3f45 GM |
965 | fi |
966 | ||
967 | if test "$optimize" = "small"; then | |
98ca7790 | 968 | # CFLAGS=${CFLAGS//-O3/-Os} |
553a6284 MN |
969 | CFLAGS="$CFLAGS -Os" |
970 | fi | |
971 | ||
cddf3f45 | 972 | if test "$optimize" = "yes"; then |
b2924696 | 973 | if test -n "`$cc -v 2>&1 | grep xlc`"; then |
cf9d24ad DC |
974 | CFLAGS="$CFLAGS -O5" |
975 | LDFLAGS="$LDFLAGS -O5" | |
976 | else | |
7906085f | 977 | CFLAGS="-O3 $CFLAGS" |
cf9d24ad | 978 | fi |
cddf3f45 GM |
979 | fi |
980 | ||
951bf3e6 FB |
981 | if test x"$bindir" = x""; then |
982 | bindir="${prefix}/bin" | |
983 | fi | |
984 | ||
23a65308 FB |
985 | if test x"$mandir" = x""; then |
986 | mandir="${prefix}/man" | |
987 | fi | |
988 | ||
de6d9b64 | 989 | echo "Install prefix $prefix" |
0f3cb305 | 990 | echo "Source path $source_path" |
de6d9b64 | 991 | echo "C compiler $cc" |
4a908fbc | 992 | echo "make $make" |
a4adb608 | 993 | echo "CPU $cpu ($tune)" |
0f3cb305 | 994 | echo "Big Endian $bigendian" |
7f965c1c | 995 | echo "inttypes.h $inttypes" |
b5c950c4 | 996 | echo "broken inttypes.h $emu_fast_int" |
053dea12 | 997 | if test $cpu = "x86" -o $cpu = "x86_64"; then |
de6d9b64 | 998 | echo "MMX enabled $mmx" |
52b41d7f | 999 | echo "Vector Builtins $builtin_vector" |
e41e8342 FB |
1000 | fi |
1001 | if test $cpu = "mips"; then | |
d46aba26 | 1002 | echo "MMI enabled $mmi" |
e41e8342 FB |
1003 | fi |
1004 | if test $cpu = "powerpc"; then | |
ab6c65f6 | 1005 | echo "AltiVec enabled $altivec" |
e41e8342 | 1006 | fi |
de6d9b64 | 1007 | echo "gprof enabled $gprof" |
0147f198 | 1008 | echo "zlib enabled $zlib" |
a6741398 | 1009 | echo "mp3lame enabled $mp3lame" |
81e0d0b4 | 1010 | echo "vorbis enabled $vorbis" |
445ad18d ZK |
1011 | echo "faad enabled $faad" |
1012 | echo "faadbin enabled $faadbin" | |
29d48296 | 1013 | echo "faac enabled $faac" |
1ddadfa9 | 1014 | echo "xvid enabled $xvid" |
5cbcf02c | 1015 | echo "a52 support $a52" |
57514323 | 1016 | echo "a52 dlopened $a52bin" |
23c99253 | 1017 | echo "dts support $dts" |
bba9b16c | 1018 | echo "pp support $pp" |
cddf3f45 | 1019 | echo "debug symbols $debug" |
65d1bea2 | 1020 | echo "strip symbols $dostrip" |
cddf3f45 | 1021 | echo "optimize $optimize" |
bba9b16c | 1022 | echo "shared pp $shared_pp" |
47930f09 | 1023 | echo "Video hooking $vhook" |
a86b921c FB |
1024 | echo "SDL support $sdl" |
1025 | if test $sdl_too_old = "yes"; then | |
1026 | echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support" | |
1027 | fi | |
1d0d55da | 1028 | echo "risky / patent encumbered codecs $risky" |
68892110 PG |
1029 | |
1030 | if test "$vhook" = "yes" ; then | |
47930f09 | 1031 | echo "Imlib2 support $imlib2" |
04511d53 | 1032 | echo "freetype support $freetype2" |
68892110 | 1033 | fi |
f80f7964 | 1034 | echo "Sun medialib support" $sunmlib |
9c3d33d6 | 1035 | echo "pthreads support" $pthreads |
bc634f6f ZK |
1036 | echo "AMR-NB float support" $amr_nb |
1037 | echo "AMR-NB fixed support" $amr_nb_fixed | |
d663a1fd | 1038 | echo "AMR-WB float support" $amr_wb |
b2e3c528 MN |
1039 | if test "$gpl" = "no" ; then |
1040 | echo "License: LGPL" | |
1041 | else | |
1042 | echo "License: GPL" | |
1043 | fi | |
de6d9b64 | 1044 | |
980fc7b8 | 1045 | echo "Creating config.mak and config.h" |
de6d9b64 | 1046 | |
980fc7b8 | 1047 | echo "# Automatically generated by configure - do not modify" > config.mak |
045ed63f | 1048 | echo "/* Automatically generated by configure - do not modify */" > $TMPH |
de6d9b64 | 1049 | |
980fc7b8 | 1050 | echo "prefix=$prefix" >> config.mak |
951bf3e6 | 1051 | echo "bindir=$bindir" >> config.mak |
23a65308 | 1052 | echo "mandir=$mandir" >> config.mak |
4a908fbc | 1053 | echo "MAKE=$make" >> config.mak |
980fc7b8 FB |
1054 | echo "CC=$cc" >> config.mak |
1055 | echo "AR=$ar" >> config.mak | |
be7109c1 | 1056 | echo "RANLIB=$ranlib" >> config.mak |
65d1bea2 | 1057 | if test "$dostrip" = "yes" ; then |
0f3cb305 | 1058 | echo "STRIP=$strip" >> config.mak |
65d1bea2 MB |
1059 | echo "INSTALLSTRIP=-s" >> config.mak |
1060 | else | |
1061 | echo "STRIP=echo ignoring strip" >> config.mak | |
1062 | echo "INSTALLSTRIP=" >> config.mak | |
1063 | fi | |
75388c74 MN |
1064 | |
1065 | # SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic. Used when building | |
1066 | # shared modules on OS/X (vhook/Makefile). | |
1067 | SHCFLAGS=$CFLAGS | |
1068 | if test "$needmdynamicnopic" = yes; then | |
1069 | CFLAGS="$CFLAGS -mdynamic-no-pic" | |
1070 | fi | |
1071 | ||
a9b3f630 | 1072 | echo "OPTFLAGS=$CFLAGS" >> config.mak |
75388c74 | 1073 | echo "SHCFLAGS=$SHCFLAGS">>config.mak |
0f3cb305 | 1074 | echo "LDFLAGS=$LDFLAGS" >> config.mak |
4baca069 | 1075 | echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak |
e1707f52 | 1076 | echo "SHFLAGS=$SHFLAGS" >> config.mak |
f3ec2d46 SG |
1077 | echo "LIBPREF=$LIBPREF" >> config.mak |
1078 | echo "LIBSUF=$LIBSUF" >> config.mak | |
1079 | echo "SLIBPREF=$SLIBPREF" >> config.mak | |
1080 | echo "SLIBSUF=$SLIBSUF" >> config.mak | |
951bf3e6 | 1081 | echo "EXESUF=$EXESUF" >> config.mak |
6852ac95 | 1082 | echo "TARGET_OS=$TARGET_OS" >> config.mak |
57514323 | 1083 | if test "$cpu" = "x86" ; then |
980fc7b8 | 1084 | echo "TARGET_ARCH_X86=yes" >> config.mak |
045ed63f | 1085 | echo "#define ARCH_X86 1" >> $TMPH |
053dea12 AJ |
1086 | elif test "$cpu" = "x86_64" ; then |
1087 | echo "TARGET_ARCH_X86_64=yes" >> config.mak | |
1088 | echo "#define ARCH_X86_64 1" >> $TMPH | |
0f3cb305 | 1089 | elif test "$cpu" = "armv4l" ; then |
6ed7422a | 1090 | echo "TARGET_ARCH_ARMV4L=yes" >> config.mak |
045ed63f | 1091 | echo "#define ARCH_ARMV4L 1" >> $TMPH |
0f3cb305 | 1092 | elif test "$cpu" = "alpha" ; then |
91d1f1a4 | 1093 | echo "TARGET_ARCH_ALPHA=yes" >> config.mak |
045ed63f | 1094 | echo "#define ARCH_ALPHA 1" >> $TMPH |
35fedfc3 PG |
1095 | elif test "$cpu" = "sparc64" ; then |
1096 | echo "TARGET_ARCH_SPARC64=yes" >> config.mak | |
1097 | echo "#define ARCH_SPARC64 1" >> $TMPH | |
bb476ff3 JM |
1098 | echo "TARGET_ARCH_SPARC=yes" >> config.mak |
1099 | echo "#define ARCH_SPARC 1" >> $TMPH | |
1100 | elif test "$cpu" = "sparc" ; then | |
1101 | echo "TARGET_ARCH_SPARC=yes" >> config.mak | |
1102 | echo "#define ARCH_SPARC 1" >> $TMPH | |
0f3cb305 FB |
1103 | elif test "$cpu" = "powerpc" ; then |
1104 | echo "TARGET_ARCH_POWERPC=yes" >> config.mak | |
1105 | echo "#define ARCH_POWERPC 1" >> $TMPH | |
9007f514 RD |
1106 | if test $POWERPCMODE = "32bits"; then |
1107 | echo "#define POWERPC_MODE_32BITS 1" >> $TMPH | |
1108 | else | |
1109 | echo "#define POWERPC_MODE_64BITS 1" >> $TMPH | |
1110 | fi | |
e45a2872 RD |
1111 | if test "$powerpc_perf" = "yes"; then |
1112 | echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH | |
1113 | fi | |
d46aba26 LS |
1114 | elif test "$cpu" = "mips" ; then |
1115 | echo "TARGET_ARCH_MIPS=yes" >> config.mak | |
1116 | echo "#define ARCH_MIPS 1" >> $TMPH | |
bdb2e37c AB |
1117 | elif test "$cpu" = "sh4" ; then |
1118 | echo "TARGET_ARCH_SH4=yes" >> config.mak | |
1119 | echo "#define ARCH_SH4 1" >> $TMPH | |
1120 | fi | |
a4adb608 | 1121 | echo "#define TUNECPU $TUNECPU" >> $TMPH |
0f3cb305 FB |
1122 | if test "$bigendian" = "yes" ; then |
1123 | echo "WORDS_BIGENDIAN=yes" >> config.mak | |
1124 | echo "#define WORDS_BIGENDIAN 1" >> $TMPH | |
91d1f1a4 | 1125 | fi |
d2a9bddd MN |
1126 | if test "$inttypes" != "yes" ; then |
1127 | echo "#define EMULATE_INTTYPES 1" >> $TMPH | |
7f965c1c | 1128 | fi |
b5c950c4 | 1129 | if test "$emu_fast_int" = "yes" ; then |
19d053c5 | 1130 | echo "#define EMULATE_FAST_INT 1" >> $TMPH |
b5c950c4 | 1131 | fi |
57514323 | 1132 | if test "$mmx" = "yes" ; then |
980fc7b8 | 1133 | echo "TARGET_MMX=yes" >> config.mak |
045ed63f | 1134 | echo "#define HAVE_MMX 1" >> $TMPH |
e82c5a8c | 1135 | echo "#define __CPU__ 586" >> $TMPH |
de6d9b64 | 1136 | fi |
52b41d7f FB |
1137 | if test "$builtin_vector" = "yes" ; then |
1138 | echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak | |
1139 | echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH | |
1140 | fi | |
d46aba26 LS |
1141 | if test "$mmi" = "yes" ; then |
1142 | echo "TARGET_MMI=yes" >> config.mak | |
1143 | echo "#define HAVE_MMI 1" >> $TMPH | |
1144 | fi | |
ab6c65f6 BF |
1145 | if test "$altivec" = "yes" ; then |
1146 | echo "TARGET_ALTIVEC=yes" >> config.mak | |
1147 | echo "#define HAVE_ALTIVEC 1" >> $TMPH | |
db40a39a MN |
1148 | echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH |
1149 | echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH | |
a9a07762 MN |
1150 | if test "$_altivec_h" = "yes" ; then |
1151 | echo "#define HAVE_ALTIVEC_H 1" >> $TMPH | |
1152 | else | |
e67e14d5 | 1153 | echo "#undef HAVE_ALTIVEC_H" >> $TMPH |
a9a07762 | 1154 | fi |
ab6c65f6 | 1155 | fi |
57514323 | 1156 | if test "$gprof" = "yes" ; then |
980fc7b8 | 1157 | echo "TARGET_GPROF=yes" >> config.mak |
045ed63f | 1158 | echo "#define HAVE_GPROF 1" >> $TMPH |
de6d9b64 | 1159 | fi |
5e4639e2 GM |
1160 | if test "$localtime_r" = "yes" ; then |
1161 | echo "#define HAVE_LOCALTIME_R 1" >> $TMPH | |
5e4639e2 | 1162 | fi |
68892110 PG |
1163 | if test "$imlib2" = "yes" ; then |
1164 | echo "HAVE_IMLIB2=yes" >> config.mak | |
1165 | fi | |
04511d53 PG |
1166 | if test "$freetype2" = "yes" ; then |
1167 | echo "HAVE_FREETYPE2=yes" >> config.mak | |
1168 | fi | |
f80f7964 RS |
1169 | if test "$sunmlib" = "yes" ; then |
1170 | echo "HAVE_MLIB=yes" >> config.mak | |
1171 | echo "#define HAVE_MLIB 1" >> $TMPH | |
1172 | extralibs="$extralibs -lmlib" | |
1173 | fi | |
9c3d33d6 MN |
1174 | if test "$pthreads" = "yes" ; then |
1175 | echo "HAVE_PTHREADS=yes" >> config.mak | |
1176 | echo "#define HAVE_PTHREADS 1" >> $TMPH | |
0abd6916 | 1177 | if test $targetos != FreeBSD; then |
12043e1d SS |
1178 | extralibs="$extralibs -lpthread" |
1179 | fi | |
9c3d33d6 | 1180 | fi |
a86b921c FB |
1181 | if test "$sdl" = "yes" ; then |
1182 | echo "CONFIG_SDL=yes" >> config.mak | |
1183 | echo "SDL_LIBS=`sdl-config --libs`" >> config.mak | |
1184 | echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak | |
1185 | fi | |
146ea952 NB |
1186 | if test "$texi2html" = "yes"; then |
1187 | echo "BUILD_DOC=yes" >> config.mak | |
1188 | fi | |
95e2ce4a MN |
1189 | if test "$have_lrintf" = "yes" ; then |
1190 | echo "#define HAVE_LRINTF 1" >> $TMPH | |
1191 | fi | |
68892110 PG |
1192 | if test "$vhook" = "yes" ; then |
1193 | echo "BUILD_VHOOK=yes" >> config.mak | |
1194 | echo "#define HAVE_VHOOK 1" >> $TMPH | |
9c938e77 | 1195 | extralibs="$extralibs $ldl" |
68892110 | 1196 | fi |
57514323 | 1197 | if test "$lshared" = "yes" ; then |
0319c531 | 1198 | echo "BUILD_SHARED=yes" >> config.mak |
5cbcf02c | 1199 | echo "PIC=-fPIC" >> config.mak |
0319c531 | 1200 | fi |
ef0bc4c9 | 1201 | echo "EXTRALIBS=$extralibs" >> config.mak |
258207b7 FB |
1202 | version=`grep '#define FFMPEG_VERSION ' $source_path/libavcodec/avcodec.h | |
1203 | cut -d '"' -f 2` | |
1204 | echo "VERSION=$version" >>config.mak | |
d771bcae | 1205 | # if you do not want to use encoders, disable that. |
045ed63f | 1206 | echo "#define CONFIG_ENCODERS 1" >> $TMPH |
d771bcae FB |
1207 | echo "CONFIG_ENCODERS=yes" >> config.mak |
1208 | ||
1209 | # if you do not want to use decoders, disable that. | |
045ed63f | 1210 | echo "#define CONFIG_DECODERS 1" >> $TMPH |
d771bcae FB |
1211 | echo "CONFIG_DECODERS=yes" >> config.mak |
1212 | ||
5cbcf02c FB |
1213 | # AC3 |
1214 | if test "$a52" = "yes" ; then | |
1215 | echo "#define CONFIG_AC3 1" >> $TMPH | |
1216 | echo "CONFIG_AC3=yes" >> config.mak | |
d771bcae | 1217 | |
5cbcf02c FB |
1218 | if test "$a52bin" = "yes" ; then |
1219 | echo "#define CONFIG_A52BIN 1" >> $TMPH | |
1220 | echo "CONFIG_A52BIN=yes" >> config.mak | |
1221 | fi | |
1222 | fi | |
1223 | ||
23c99253 MN |
1224 | # DTS |
1225 | if test "$dts" = "yes" ; then | |
1226 | echo "#define CONFIG_DTS 1" >> $TMPH | |
1227 | echo "CONFIG_DTS=yes" >> config.mak | |
1228 | fi | |
1229 | ||
bba9b16c MN |
1230 | # PP |
1231 | if test "$pp" = "yes" ; then | |
1232 | echo "#define CONFIG_PP 1" >> $TMPH | |
1233 | echo "CONFIG_PP=yes" >> config.mak | |
1234 | ||
1235 | if test "$shared_pp" = "yes" ; then | |
1236 | echo "#define SHARED_PP 1" >> $TMPH | |
1237 | echo "SHARED_PP=yes" >> config.mak | |
1238 | fi | |
1239 | fi | |
1240 | ||
1eb2212e FB |
1241 | # mpeg audio high precision mode |
1242 | if test "$mpegaudio_hp" = "yes" ; then | |
1243 | echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH | |
1244 | fi | |
1245 | ||
5cbcf02c FB |
1246 | if test "$v4l" = "yes" ; then |
1247 | echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH | |
1248 | echo "CONFIG_VIDEO4LINUX=yes" >> config.mak | |
1249 | fi | |
1250 | ||
8aa3ee32 MK |
1251 | if test "$dv1394" = "yes" ; then |
1252 | echo "#define CONFIG_DV1394 1" >> $TMPH | |
1253 | echo "CONFIG_DV1394=yes" >> config.mak | |
1254 | fi | |
1255 | ||
adbc0510 PG |
1256 | if test "$dlopen" = "yes" ; then |
1257 | echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH | |
1258 | fi | |
1259 | ||
1260 | if test "$dlfcn" = "yes" ; then | |
1261 | echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH | |
1262 | fi | |
1263 | ||
5cbcf02c FB |
1264 | if test "$audio_oss" = "yes" ; then |
1265 | echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH | |
1266 | echo "CONFIG_AUDIO_OSS=yes" >> config.mak | |
57514323 ZK |
1267 | fi |
1268 | ||
dfdfa47c FR |
1269 | if test "$audio_beos" = "yes" ; then |
1270 | echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH | |
1271 | echo "CONFIG_AUDIO_BEOS=yes" >> config.mak | |
1272 | fi | |
1273 | ||
5cbcf02c FB |
1274 | if test "$network" = "yes" ; then |
1275 | echo "#define CONFIG_NETWORK 1" >> $TMPH | |
1276 | echo "CONFIG_NETWORK=yes" >> config.mak | |
6ed7422a | 1277 | fi |
daf8e955 | 1278 | |
0147f198 FR |
1279 | if test "$zlib" = "yes" ; then |
1280 | echo "#define CONFIG_ZLIB 1" >> $TMPH | |
1281 | echo "CONFIG_ZLIB=yes" >> config.mak | |
1282 | fi | |
1283 | ||
57514323 | 1284 | if test "$mp3lame" = "yes" ; then |
045ed63f | 1285 | echo "#define CONFIG_MP3LAME 1" >> $TMPH |
a6741398 J |
1286 | echo "CONFIG_MP3LAME=yes" >> config.mak |
1287 | fi | |
1288 | ||
81e0d0b4 MH |
1289 | if test "$vorbis" = "yes" ; then |
1290 | echo "#define CONFIG_VORBIS 1" >> $TMPH | |
1291 | echo "CONFIG_VORBIS=yes" >> config.mak | |
1292 | fi | |
1293 | ||
0fc50e58 ZK |
1294 | if test "$faad" = "yes" ; then |
1295 | echo "#define CONFIG_FAAD 1" >> $TMPH | |
1296 | echo "CONFIG_FAAD=yes" >> config.mak | |
1297 | fi | |
1298 | ||
1299 | if test "$faadbin" = "yes" ; then | |
1300 | echo "#define CONFIG_FAADBIN 1" >> $TMPH | |
445ad18d | 1301 | echo "CONFIG_FAADBIN=yes" >> config.mak |
0fc50e58 ZK |
1302 | fi |
1303 | ||
29d48296 MN |
1304 | if test "$faac" = "yes" ; then |
1305 | echo "#define CONFIG_FAAC 1" >> $TMPH | |
1306 | echo "CONFIG_FAAC=yes" >> config.mak | |
1307 | fi | |
1308 | ||
1ddadfa9 AT |
1309 | if test "$xvid" = "yes" ; then |
1310 | echo "#define CONFIG_XVID 1" >> $TMPH | |
1311 | echo "CONFIG_XVID=yes" >> config.mak | |
1312 | fi | |
1313 | ||
732d9245 BE |
1314 | if test "$mingw32" = "yes" ; then |
1315 | echo "#define CONFIG_WIN32 1" >> $TMPH | |
1316 | echo "CONFIG_WIN32=yes" >> config.mak | |
16806499 MN |
1317 | echo "HAVE_W32THREADS=yes" >> config.mak |
1318 | echo "#define HAVE_W32THREADS 1" >> $TMPH | |
7eea5766 | 1319 | echo "#ifndef __MINGW32__" >> $TMPH |
732d9245 | 1320 | echo "#define __MINGW32__ 1" >> $TMPH |
7eea5766 | 1321 | echo "#endif" >> $TMPH |
3f027ca7 FB |
1322 | fi |
1323 | ||
f3ec2d46 SG |
1324 | if test "$os2" = "yes" ; then |
1325 | echo "#define CONFIG_OS2 1" >> $TMPH | |
1326 | echo "CONFIG_OS2=yes" >> config.mak | |
1327 | fi | |
1328 | ||
6e023978 RS |
1329 | if test "$TARGET_OS" = "SunOS" ; then |
1330 | echo "#define CONFIG_SUNOS 1" >> $TMPH | |
1331 | fi | |
1332 | ||
90cee0c3 MN |
1333 | if test "$darwin" = "yes"; then |
1334 | echo "#define CONFIG_DARWIN 1" >> $TMPH | |
1335 | echo "CONFIG_DARWIN=yes" >> config.mak | |
1336 | fi | |
1337 | ||
57514323 | 1338 | if test "$_malloc_h" = "yes" ; then |
045ed63f | 1339 | echo "#define HAVE_MALLOC_H 1" >> $TMPH |
3d204385 | 1340 | else |
045ed63f | 1341 | echo "#undef HAVE_MALLOC_H" >> $TMPH |
3d204385 NK |
1342 | fi |
1343 | ||
57514323 | 1344 | if test "$_memalign" = "yes" ; then |
045ed63f ZK |
1345 | echo "#define HAVE_MEMALIGN 1" >> $TMPH |
1346 | else | |
1347 | echo "#undef HAVE_MEMALIGN" >> $TMPH | |
1348 | fi | |
1349 | ||
da9b170c MN |
1350 | if test "$memalignhack" = "yes" ; then |
1351 | echo "#define MEMALIGN_HACK 1" >> $TMPH | |
1352 | fi | |
1353 | ||
1354 | ||
26b35efb FR |
1355 | if test "$netserver" = "yes" ; then |
1356 | echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH | |
1357 | echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak | |
1358 | fi | |
1359 | ||
4baca069 PG |
1360 | if test "$need_inet_aton" = "yes" ; then |
1361 | echo "NEED_INET_ATON=yes" >> config.mak | |
1362 | fi | |
1363 | ||
57514323 | 1364 | if test "$simpleidct" = "yes" ; then |
045ed63f ZK |
1365 | echo "#define SIMPLE_IDCT 1" >> $TMPH |
1366 | fi | |
1367 | ||
8154d2e0 FB |
1368 | if test "$ffserver" = "yes" ; then |
1369 | echo "#define CONFIG_FFSERVER 1" >> $TMPH | |
1370 | echo "CONFIG_FFSERVER=yes" >> config.mak | |
1371 | fi | |
1372 | ||
a86b921c FB |
1373 | if test "$ffplay" = "yes" ; then |
1374 | echo "CONFIG_FFPLAY=yes" >> config.mak | |
1375 | fi | |
1376 | ||
1d0d55da MN |
1377 | if test "$risky" = "yes" ; then |
1378 | echo "#define CONFIG_RISKY 1" >> $TMPH | |
1379 | echo "CONFIG_RISKY=yes" >> config.mak | |
1380 | fi | |
1381 | ||
b2e3c528 MN |
1382 | if test "$gpl" = "yes" ; then |
1383 | echo "#define CONFIG_GPL 1" >> $TMPH | |
1384 | echo "CONFIG_GPL=yes" >> config.mak | |
1385 | fi | |
1386 | ||
c13e1abd FH |
1387 | echo "#define restrict $_restrict" >> $TMPH |
1388 | ||
bb801c97 MN |
1389 | if test "$optimize" = "small"; then |
1390 | echo "#define always_inline" >> $TMPH | |
1391 | fi | |
1392 | ||
0f3cb305 FB |
1393 | # build tree in object directory if source path is different from current one |
1394 | if test "$source_path_used" = "yes" ; then | |
a382b927 | 1395 | DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \ |
5f6b58de MR |
1396 | libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook" |
1397 | FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile" | |
0f3cb305 FB |
1398 | for dir in $DIRS ; do |
1399 | mkdir -p $dir | |
1400 | done | |
1401 | for f in $FILES ; do | |
1402 | ln -sf $source_path/$f $f | |
1403 | done | |
1404 | fi | |
1405 | echo "SRC_PATH=$source_path" >> config.mak | |
1406 | ||
d663a1fd MN |
1407 | if test "$amr_wb" = "yes" ; then |
1408 | echo "#define AMR_WB 1" >> $TMPH | |
1409 | echo "AMR_WB=yes" >> config.mak | |
1410 | echo | |
1411 | echo "AMR WB FLOAT NOTICE ! Make sure you have downloaded TS26.204" | |
1412 | echo "V5.1.0 from " | |
1413 | echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip" | |
1414 | echo "and extracted the source to libavcodec/amrwb_float" | |
1415 | echo | |
1416 | fi | |
1417 | ||
891f64b3 | 1418 | if test "$amr_nb" = "yes" ; then |
1419 | echo "#define AMR_NB 1" >> $TMPH | |
1420 | echo "AMR_NB=yes" >> config.mak | |
1421 | echo | |
bc634f6f ZK |
1422 | if test "$amr_nb_fixed" = "yes" ; then |
1423 | echo "AMR_NB_FIXED=yes" >> config.mak | |
1424 | echo "#define AMR_NB_FIXED 1" >> $TMPH | |
1425 | echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 " | |
1426 | echo "REL-5 version 5.1.0 from " | |
184582de | 1427 | echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-5??.zip" |
891f64b3 | 1428 | echo "and extracted src to libavcodec/amr" |
bc634f6f ZK |
1429 | echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile." |
1430 | echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO" | |
1431 | echo | |
1432 | else | |
1433 | echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104" | |
1434 | echo "REL-5 V5.1.0 from " | |
184582de | 1435 | echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-5??.zip" |
bc634f6f | 1436 | echo "and extracted the source to libavcodec/amr_float" |
821e46f4 | 1437 | echo "and if u try this on an alpha, u may need to change Word32 to int in amr/typedef.h" |
891f64b3 | 1438 | echo |
1439 | fi | |
1440 | ||
bc634f6f ZK |
1441 | fi |
1442 | ||
a7c02e25 | 1443 | diff $TMPH config.h >/dev/null 2>&1 |
045ed63f ZK |
1444 | if test $? -ne 0 ; then |
1445 | mv -f $TMPH config.h | |
3d204385 | 1446 | else |
045ed63f | 1447 | echo "config.h is unchanged" |
3d204385 NK |
1448 | fi |
1449 | ||
f3ec2d46 | 1450 | rm -f $TMPO $TMPC $TMPE $TMPS $TMPH |