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