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