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