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