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