GCC 3.3 compile fix
[libav.git] / configure
CommitLineData
de6d9b64 1#!/bin/sh
0f3cb305 2#
f57620d5
MR
3# FFmpeg configure script
4#
5# Copyright (c) 2000, 2001, 2002 Fabrice Bellard
6# Copyright (c) 2005-2006 Diego Biurrun
7# Copyright (c) 2005-2006 Mans Rullgard
0f3cb305 8#
cf9d24ad 9
cde2d79a 10# make sure we are running under a compatible shell
c21d6325
MR
11# try to make this part work with most shells
12
13try_exec(){
0dbe81bb 14 echo "Trying shell $1"
c21d6325
MR
15 type "$1" >/dev/null 2>&1 && exec "$@"
16}
17
5237ce67 18unset foo
0dbe81bb
MR
19(: ${foo%%bar}) 2>/dev/null
20E1="$?"
21
22(: ${foo?}) 2>/dev/null
23E2="$?"
24
25if test "$E1" != 0 || test "$E2" = 0; then
26 echo "Broken shell detected. Trying alternatives."
c21d6325
MR
27 export FF_CONF_EXEC
28 if test "0$FF_CONF_EXEC" -lt 1; then
29 FF_CONF_EXEC=1
30 try_exec bash "$0" "$@"
31 fi
32 if test "0$FF_CONF_EXEC" -lt 2; then
33 FF_CONF_EXEC=2
34 try_exec ksh "$0" "$@"
35 fi
36 if test "0$FF_CONF_EXEC" -lt 3; then
37 FF_CONF_EXEC=3
38 try_exec /usr/xpg4/bin/sh "$0" "$@"
cde2d79a
MR
39 fi
40 echo "No compatible shell script interpreter found."
c21d6325
MR
41 echo "This configure script requires a POSIX compatible shell"
42 echo "such as bash or ksh."
43 if test "$BASH_VERSION" = '2.04.0(1)-release'; then
44 echo "This bash version ($BASH_VERSION) is broken on your platform."
45 echo "Upgrade to a later version if available."
46 fi
cde2d79a
MR
47 exit 1
48fi
49
74c53c2d
MR
50show_help(){
51 echo "Usage: configure [options]"
52 echo "Options: [defaults in brackets after descriptions]"
53 echo
54 echo "Standard options:"
55 echo " --help print this message"
2ba042a7 56 echo " --log[=FILE|yes|no] log tests and output to FILE [config.err]"
2266e085 57 echo " --prefix=PREFIX install in PREFIX [$PREFIX]"
74c53c2d 58 echo " --libdir=DIR install libs in DIR [PREFIX/lib]"
84c22efd 59 echo " --shlibdir=DIR install shared libs in DIR [PREFIX/lib]"
74c53c2d
MR
60 echo " --incdir=DIR install includes in DIR [PREFIX/include/ffmpeg]"
61 echo " --mandir=DIR install man page in DIR [PREFIX/man]"
62 echo " --enable-mp3lame enable MP3 encoding via libmp3lame [default=no]"
f956e129 63 echo " --enable-libnut enable NUT support via libnut [default=no]"
74c53c2d
MR
64 echo " --enable-libogg enable Ogg support via libogg [default=no]"
65 echo " --enable-vorbis enable Vorbis support via libvorbis [default=no]"
74c53c2d
MR
66 echo " --enable-faad enable FAAD support via libfaad [default=no]"
67 echo " --enable-faadbin build FAAD support with runtime linking [default=no]"
68 echo " --enable-faac enable FAAC support via libfaac [default=no]"
69 echo " --enable-libgsm enable GSM support via libgsm [default=no]"
70 echo " --enable-xvid enable XviD support via xvidcore [default=no]"
71 echo " --enable-x264 enable H.264 encoding via x264 [default=no]"
72 echo " --enable-mingw32 enable MinGW native/cross Windows compile"
73 echo " --enable-mingwce enable MinGW native/cross WinCE compile"
74 echo " --enable-a52 enable GPLed A52 support [default=no]"
75 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
76 echo " --enable-dts enable GPLed DTS support [default=no]"
77 echo " --enable-pp enable GPLed postprocessing support [default=no]"
78 echo " --enable-static build static libraries [default=yes]"
79 echo " --disable-static do not build static libraries [default=no]"
80 echo " --enable-shared build shared libraries [default=no]"
81 echo " --disable-shared do not build shared libraries [default=yes]"
82 echo " --enable-amr_nb enable amr_nb float audio codec"
83 echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
84 echo " --enable-amr_wb enable amr_wb float audio codec"
85 echo " --enable-amr_if2 enable amr_wb IF2 audio codec"
86 echo " --enable-sunmlib use Sun medialib [default=no]"
87 echo " --enable-pthreads use pthreads [default=no]"
88 echo " --enable-dc1394 enable IIDC-1394 grabbing using libdc1394"
89 echo " and libraw1394 [default=no]"
790c9ca7 90 echo " --enable-swscaler software scaler support [default=no]"
8ac17293 91 echo " --enable-avisynth allow reading AVISynth script files [default=no]"
74c53c2d
MR
92 echo " --enable-gpl allow use of GPL code, the resulting libav*"
93 echo " and ffmpeg will be under GPL [default=no]"
94 echo ""
95 echo "Advanced options (experts only):"
96 echo " --source-path=PATH path to source code [$source_path]"
97 echo " --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]"
fac252f9 98 echo " --cross-compile assume a cross-compiler is used"
74c53c2d
MR
99 echo " --cc=CC use C compiler CC [$cc]"
100 echo " --make=MAKE use specified make [$make]"
101 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
102 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
103 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
104 echo " --build-suffix=SUFFIX suffix for application specific build []"
cc6a90dd 105 echo " --arch=ARCH select architecture [$arch]"
38d0a8aa
GP
106 echo " --cpu=CPU selects the minimum cpu required (affects
107 instruction selection, may crash on older CPUs)"
74c53c2d
MR
108 echo " --powerpc-perf-enable enable performance report on PPC"
109 echo " (requires enabling PMC)"
110 echo " --disable-mmx disable MMX usage"
1839e854 111 echo " --disable-armv5te disable armv5te usage"
74c53c2d
MR
112 echo " --disable-iwmmxt disable iwmmxt usage"
113 echo " --disable-altivec disable AltiVec usage"
114 echo " --disable-audio-oss disable OSS audio support [default=no]"
115 echo " --disable-audio-beos disable BeOS audio support [default=no]"
116 echo " --disable-v4l disable video4linux grabbing [default=no]"
117 echo " --disable-v4l2 disable video4linux2 grabbing [default=no]"
118 echo " --disable-bktr disable bktr video grabbing [default=no]"
119 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
120 echo " --disable-network disable network support [default=no]"
0c7bb0e5 121 echo " --disable-ipv6 disable ipv6 support [default=no]"
74c53c2d 122 echo " --disable-zlib disable zlib [default=no]"
74c53c2d
MR
123 echo " --disable-vhook disable video hooking support"
124 echo " --enable-gprof enable profiling with gprof [$gprof]"
125 echo " --disable-debug disable debugging symbols"
126 echo " --disable-opts disable compiler optimizations"
78fcba8f 127 echo " --enable-extra-warnings enable more compiler warnings"
74c53c2d
MR
128 echo " --disable-mpegaudio-hp faster (but less accurate)"
129 echo " MPEG audio decoding [default=no]"
130 echo " --disable-protocols disable I/O protocols support [default=no]"
786b30af 131 echo " --disable-ffmpeg disable ffmpeg build"
74c53c2d
MR
132 echo " --disable-ffserver disable ffserver build"
133 echo " --disable-ffplay disable ffplay build"
134 echo " --enable-small optimize for size instead of speed"
135 echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers"
136 echo " --disable-strip disable stripping of executables and shared libraries"
137 echo " --disable-encoder=NAME disables encoder NAME"
138 echo " --enable-encoder=NAME enables encoder NAME"
139 echo " --disable-decoder=NAME disables decoder NAME"
140 echo " --enable-decoder=NAME enables decoder NAME"
141 echo " --disable-encoders disables all encoders"
142 echo " --disable-decoders disables all decoders"
ff70e601
MR
143 echo " --disable-muxer=NAME disables muxer NAME"
144 echo " --enable-muxer=NAME enables muxer NAME"
74c53c2d 145 echo " --disable-muxers disables all muxers"
ff70e601
MR
146 echo " --disable-demuxer=NAME disables demuxer NAME"
147 echo " --enable-demuxer=NAME enables demuxer NAME"
74c53c2d 148 echo " --disable-demuxers disables all demuxers"
af9e7d18
MR
149 echo " --enable-parser=NAME enables parser NAME"
150 echo " --disable-parser=NAME disables parser NAME"
151 echo " --disable-parsers disables all parsers"
74c53c2d
MR
152 echo ""
153 echo "NOTE: Object files are built at the place where configure is launched."
154 exit 1
155}
cf9d24ad 156
57bd82d4
MR
157log(){
158 echo "$@" >>$logfile
159}
160
720c69da 161log_file(){
c8e9f801
MR
162 log BEGIN $1
163 cat -n $1 >>$logfile
164 log END $1
165}
166
2ba042a7 167echolog(){
c8e9f801 168 log "$@"
57bd82d4 169 echo "$@"
2ba042a7
MR
170}
171
172die(){
173 echolog "$@"
174 cat <<EOF
175If you think configure made a mistake, make sure you are using the latest
176version from SVN. If the latest version fails, report the problem to the
177ffmpeg-devel@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
178EOF
720c69da 179 if enabled logging; then
2ba042a7
MR
180 cat <<EOF
181Include the log file "$logfile" produced by configure as this will help
182solving the problem.
183EOF
184 else
185cat <<EOF
186Rerun configure with logging enabled (do not use --log=no), and include the
187log this produces with your report.
188EOF
189 fi
57bd82d4
MR
190 rm -f $TMPC $TMPO $TMPE $TMPS $TMPH
191 exit 1
192}
193
904e48f1 194# "tr '[a-z]' '[A-Z]'" is a workaround for Solaris tr not grokking "tr a-z A-Z"
44161118
MR
195toupper(){
196 echo "$@" | tr '[a-z]' '[A-Z]'
197}
198
a8d04fba
MR
199set_all(){
200 value=$1
201 shift
202 for var in $*; do
203 eval $var=$value
204 done
205}
206
207enable(){
208 set_all yes $*
209}
210
211disable(){
212 set_all no $*
213}
214
57bd82d4 215enabled(){
44161118
MR
216 eval test "x\$$1" = "xyes"
217}
218
219enabled_all(){
220 for opt; do
221 enabled $opt || return 1
222 done
223}
224
225enabled_any(){
226 for opt; do
227 enabled $opt && return 0
228 done
229}
230
231print_config(){
232 pfx=$1
233 header=$2
234 makefile=$3
235 shift 3
236 for cfg; do
237 if enabled $cfg; then
238 ucname="${pfx}`toupper $cfg`"
239 echo "#define ${ucname} 1" >> $header
240 echo "${ucname}=yes" >> $makefile
241 fi
242 done
57bd82d4
MR
243}
244
245flags_saved(){
246 (: ${SAVE_CFLAGS?}) 2>/dev/null
247}
248
dcd479c0 249save_flags(){
57bd82d4 250 flags_saved && return
dcd479c0
MR
251 SAVE_CFLAGS="$CFLAGS"
252 SAVE_LDFLAGS="$LDFLAGS"
253 SAVE_extralibs="$extralibs"
254}
255
256restore_flags(){
257 CFLAGS="$SAVE_CFLAGS"
258 LDFLAGS="$SAVE_LDFLAGS"
259 extralibs="$SAVE_extralibs"
260 unset SAVE_CFLAGS
261 unset SAVE_LDFLAGS
262 unset SAVE_extralibs
263}
264
265temp_cflags(){
266 save_flags
267 CFLAGS="$CFLAGS $*"
268}
269
270temp_ldflags(){
271 save_flags
272 LDFLAGS="$LDFLAGS $*"
273}
274
275temp_extralibs(){
276 save_flags
277 extralibs="$extralibs $*"
278}
279
57bd82d4
MR
280append(){
281 var=$1
282 shift
283 flags_saved && eval "SAVE_$var=\"\$SAVE_$var $*\""
284 eval "$var=\"\$$var $*\""
285}
286
287add_cflags(){
288 append CFLAGS "$@"
289}
290
291add_ldflags(){
292 append LDFLAGS "$@"
293}
294
295add_extralibs(){
296 append extralibs "$@"
297}
298
b0cfb663 299check_cmd(){
b3cb5d51 300 log "$@"
9b4f605c 301 "$@" >>$logfile 2>&1
b0cfb663
MR
302}
303
dcd479c0 304check_cc(){
57bd82d4
MR
305 log check_cc "$@"
306 cat >$TMPC
720c69da 307 log_file $TMPC
b0cfb663 308 check_cmd $cc $CFLAGS "$@" -c -o $TMPO $TMPC
57bd82d4
MR
309}
310
311check_cpp(){
312 log check_cpp "$@"
dcd479c0 313 cat >$TMPC
720c69da 314 log_file $TMPC
b0cfb663 315 check_cmd $cc $CFLAGS "$@" -E -o $TMPO $TMPC
dcd479c0
MR
316}
317
318check_ld(){
57bd82d4 319 log check_ld "$@"
0607887f 320 check_cc || return
b0cfb663 321 check_cmd $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs
dcd479c0
MR
322}
323
324check_cflags(){
57bd82d4
MR
325 log check_cflags "$@"
326 check_cc "$@" <<EOF && add_cflags "$@"
dcd479c0
MR
327int x;
328EOF
329}
330
331check_ldflags(){
57bd82d4
MR
332 log check_ldflags "$@"
333 check_ld "$@" <<EOF && add_ldflags "$@"
334int main(){
335 return 0;
336}
dcd479c0
MR
337EOF
338}
339
340check_header(){
57bd82d4 341 log check_header "$@"
dcd479c0
MR
342 header=$1
343 shift
57bd82d4 344 check_cpp "$@" <<EOF
dcd479c0
MR
345#include <$header>
346int x;
347EOF
0701ca7f 348 err=$?
0dbe81bb 349 var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'`
0701ca7f
MR
350 test "$err" = 0 && enable $var || disable $var
351 return $err
dcd479c0
MR
352}
353
354check_func(){
57bd82d4 355 log check_func "$@"
dcd479c0
MR
356 func=$1
357 shift
358 check_ld "$@" <<EOF
359extern int $func();
360int main(){
361 $func();
362}
363EOF
0701ca7f
MR
364 err=$?
365 test "$err" = 0 && enable $func || disable $func
366 return $err
dcd479c0
MR
367}
368
57bd82d4
MR
369check_lib(){
370 log check_lib "$@"
371 header="$1"
372 func="$2"
373 shift 2
374 temp_extralibs "$@"
375 check_header $header && check_func $func && add_extralibs "$@"
376 err=$?
377 restore_flags
378 return $err
379}
380
dcd479c0 381check_exec(){
bd4700b1 382 check_ld "$@" && { test "$cross_compile" = yes || $TMPE >>$logfile 2>&1; }
57bd82d4
MR
383}
384
385require(){
386 name="$1"
387 header="$2"
388 func="$3"
389 shift 3
390 check_lib $header $func "$@" || die "ERROR: $name not found"
dcd479c0
MR
391}
392
c88f5d72
MR
393CONFIG_LIST='
394 encoders
395 decoders
396 parsers
397 muxers
398 demuxers
399 a52
400 a52bin
401 amr
402 amr_nb
403 amr_nb_fixed
404 amr_wb
405 audio_beos
406 audio_oss
407 avisynth
408 beos_netserver
409 bktr
410 dc1394
411 dts
412 dv1394
413 faac
414 faad
415 faadbin
416 ffmpeg
417 ffplay
418 ffserver
419 gpl
420 ipv6
421 libgsm
422 libnut
423 libogg
424 libvorbis
425 memalign_hack
426 mp3lame
427 mpegaudio_hp
428 network
429 pp
430 protocols
431 swscaler
432 vhook
433 video4linux
434 video4linux2
860391a5 435 wince
c88f5d72
MR
436 x264
437 xvid
438 zlib
439'
440
441HAVE_LIST='
442 altivec_h
b265431e 443 beosthreads
c88f5d72
MR
444 byteswap_h
445 dcbzl
18b67ae5 446 dlfcn_h
c88f5d72
MR
447 dlopen
448 freetype2
449 gprof
450 imlib2
2e1913b1 451 inet_aton
c88f5d72
MR
452 localtime_r
453 lrintf
454 malloc_h
455 memalign
456 mlib
9c914398 457 os2
b265431e
MR
458 os2threads
459 pthreads
c88f5d72
MR
460 sdl
461 sdl_video_size
b265431e
MR
462 threads
463 w32threads
c88f5d72 464'
44161118 465
0f3cb305 466# set temporary file name
57514323 467if test ! -z "$TMPDIR" ; then
0f3cb305 468 TMPDIR1="${TMPDIR}"
57514323 469elif test ! -z "$TEMPDIR" ; then
0f3cb305 470 TMPDIR1="${TEMPDIR}"
3d204385 471else
0f3cb305 472 TMPDIR1="/tmp"
3d204385
NK
473fi
474
0f3cb305
FB
475TMPC="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
476TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
f3ec2d46 477TMPE="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}"
0f3cb305
FB
478TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
479TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
480
de6d9b64 481# default parameters
720c69da 482logging="yes"
2ba042a7 483logfile="config.err"
2266e085
DB
484PREFIX="/usr/local"
485libdir='${PREFIX}/lib'
84c22efd 486shlibdir="$libdir"
2266e085
DB
487incdir='${PREFIX}/include/ffmpeg'
488mandir='${PREFIX}/man'
489bindir='${PREFIX}/bin'
0f3cb305 490cross_prefix=""
fac252f9 491cross_compile="no"
de6d9b64
FB
492cc="gcc"
493ar="ar"
be7109c1 494ranlib="ranlib"
4a908fbc 495make="make"
0f3cb305 496strip="strip"
cc6a90dd 497arch=`uname -m`
38d0a8aa 498cpu="generic"
e45a2872 499powerpc_perf="no"
0f3cb305 500mmx="default"
e7768fc5 501cmov="no"
94e4c3a3 502cmov_is_fast="no"
1839e854 503armv5te="default"
eba9ae3c 504iwmmxt="default"
ab6c65f6 505altivec="default"
87ea51e0 506dcbzl="no"
d46aba26 507mmi="default"
cc6a90dd 508case "$arch" in
ef0bc4c9 509 i386|i486|i586|i686|i86pc|BePC)
419b8784 510 arch="x86_32"
de6d9b64 511 ;;
7bf9648e 512 x86_64|amd64)
a63e5f1c 513 arch="x86_32"
32255f6c 514 canon_arch="`$cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`"
7bf9648e
JM
515 if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then
516 if [ -z "`echo $CFLAGS | grep -- -m32`" ]; then
cc6a90dd 517 arch="x86_64"
7bf9648e 518 fi
053dea12
AJ
519 fi
520 ;;
6dc7b6b3
DB
521 # armv4l is a subset of armv[567]*l
522 arm|armv[4567]*l)
cc6a90dd 523 arch="armv4l"
6ed7422a 524 ;;
91d1f1a4 525 alpha)
cc6a90dd 526 arch="alpha"
91d1f1a4 527 ;;
2645e80f 528 "Power Macintosh"|ppc|ppc64|powerpc)
cc6a90dd 529 arch="powerpc"
90cee0c3 530 ;;
b028a866 531 mips|mipsel|IP*)
cc6a90dd 532 arch="mips"
d46aba26 533 ;;
bb476ff3 534 sun4u|sparc64)
cc6a90dd 535 arch="sparc64"
a7beab73 536 ;;
bb476ff3 537 sparc)
cc6a90dd 538 arch="sparc"
bb476ff3 539 ;;
bdb2e37c 540 sh4)
cc6a90dd 541 arch="sh4"
bdb2e37c 542 ;;
67860b26 543 parisc|parisc64)
cc6a90dd 544 arch="parisc"
67860b26
SH
545 ;;
546 s390|s390x)
cc6a90dd 547 arch="s390"
67860b26
SH
548 ;;
549 m68k)
cc6a90dd 550 arch="m68k"
67860b26
SH
551 ;;
552 ia64)
cc6a90dd 553 arch="ia64"
67860b26 554 ;;
81a9b052 555 bfin)
cc6a90dd 556 arch="bfin"
81a9b052 557 ;;
de6d9b64 558 *)
cc6a90dd 559 arch="unknown"
de6d9b64
FB
560 ;;
561esac
562gprof="no"
9d2a0f1c
MR
563video4linux="yes"
564video4linux2="yes"
6beefa40 565bktr="no"
5cbcf02c 566audio_oss="yes"
dfdfa47c 567audio_beos="no"
8aa3ee32 568dv1394="yes"
f02be79d 569dc1394="no"
5cbcf02c 570network="yes"
0c7bb0e5 571ipv6="yes"
0147f198 572zlib="yes"
bb4c2140 573libgsm="no"
a6741398 574mp3lame="no"
f956e129 575libnut="no"
9146ca37 576libogg="no"
be74741c 577libvorbis="no"
0fc50e58
ZK
578faad="no"
579faadbin="no"
29d48296 580faac="no"
1ddadfa9 581xvid="no"
6662ec29 582x264="no"
ba9261e5 583a52="no"
57514323 584a52bin="no"
23c99253 585dts="no"
ba9261e5 586pp="no"
732d9245 587mingw32="no"
860391a5 588wince="no"
f3ec2d46 589os2="no"
320d060a 590lstatic="yes"
83286d2a 591lshared="no"
cddf3f45
GM
592optimize="yes"
593debug="yes"
78fcba8f 594extrawarnings="no"
65d1bea2 595dostrip="yes"
da186ae2 596installstrip="-s"
ef0bc4c9 597extralibs="-lm"
0f3cb305 598bigendian="no"
a8721c09 599vhook="default"
8ac17293 600avisynth="no"
18b67ae5 601dlfcn_h="no"
adbc0510 602dlopen="no"
1eb2212e 603mpegaudio_hp="yes"
baa3a937 604SHFLAGS='-shared -Wl,-soname,$@'
cab3ef82 605VHOOKSHFLAGS='$(SHFLAGS)'
8e72b130 606beos_netserver="no"
04f46ced 607protocols="yes"
786b30af 608ffmpeg="yes"
8154d2e0 609ffserver="yes"
a86b921c 610ffplay="yes"
80581e98 611LIBOBJFLAGS=""
e89b8b0a 612FFLDFLAGS=-Wl,--warn-common
e240ee67 613LDLATEFLAGS='-Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
c536cb09 614FFSERVERLDFLAGS=-Wl,-E
f39e56a8 615LDCONFIG="ldconfig"
f3ec2d46
SG
616LIBPREF="lib"
617LIBSUF=".a"
4bdd05e7 618LIB='$(LIBPREF)$(NAME)$(LIBSUF)'
f3ec2d46
SG
619SLIBPREF="lib"
620SLIBSUF=".so"
4bdd05e7 621SLIBNAME='$(SLIBPREF)$(NAME)$(SLIBSUF)'
b29bddab
DB
622SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
623SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
951bf3e6 624EXESUF=""
eb94aca9 625BUILDSUF=""
891f64b3 626amr_nb="no"
d663a1fd 627amr_wb="no"
bc634f6f 628amr_nb_fixed="no"
2a515c08 629amr_if2="no"
bde24d6e 630mlib="no"
9c3d33d6 631pthreads="no"
790c9ca7 632swscaler="no"
b2e3c528 633gpl="no"
9ddbcae6 634memalign_hack="no"
4454dc1b 635asmalign_pot="unknown"
d4596ae3 636LIB_INSTALL_EXTRA_CMD='$(RANLIB) "$(libdir)/$(LIB)"'
ef0bc4c9
FR
637
638# OS specific
639targetos=`uname -s`
640case $targetos in
641BeOS)
2266e085 642PREFIX="/boot/home/config"
ef0bc4c9 643# helps building libavcodec
30a3e5d4 644add_cflags "-DPIC -fomit-frame-pointer"
31ba0b4d 645# 3 gcc releases known for BeOS, each with ugly bugs
b2924696 646gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
31ba0b4d
FR
647case "$gcc_version" in
6482.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
649mmx="no"
650;;
651*20010315*) echo "BeBits gcc"
30a3e5d4 652add_cflags "-fno-expensive-optimizations"
31ba0b4d
FR
653;;
654esac
e1707f52 655SHFLAGS=-nostart
29799f8b 656# disable Linux things
e1707f52 657audio_oss="no"
9d2a0f1c
MR
658video4linux="no"
659video4linux2="no"
8aa3ee32 660dv1394="no"
29799f8b 661# enable BeOS things
dfdfa47c 662audio_beos="yes"
b265431e 663beosthreads="yes"
ef0bc4c9
FR
664# no need for libm, but the inet stuff
665# Check for BONE
666if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
667extralibs="-lbind -lsocket"
668else
8e72b130 669beos_netserver="yes"
26b35efb 670extralibs="-lnet"
ef0bc4c9 671fi ;;
4baca069 672SunOS)
9d2a0f1c
MR
673video4linux="no"
674video4linux2="no"
4baca069 675audio_oss="no"
8aa3ee32 676dv1394="no"
4baca069 677make="gmake"
e89b8b0a 678FFLDFLAGS=""
c536cb09 679FFSERVERLDFLAGS=""
813457e5 680SHFLAGS="-shared -Wl,-h,\$@"
30a3e5d4 681add_extralibs "-lsocket -lnsl"
4baca069 682;;
b7aa4a59 683NetBSD)
9d2a0f1c
MR
684video4linux="no"
685video4linux2="no"
6beefa40 686bktr="yes"
b7aa4a59
SS
687audio_oss="yes"
688dv1394="no"
689make="gmake"
30a3e5d4 690add_extralibs "-lossaudio"
b7aa4a59 691;;
8c802695 692OpenBSD)
9d2a0f1c
MR
693video4linux="no"
694video4linux2="no"
6beefa40 695bktr="yes"
8c802695
JM
696audio_oss="yes"
697dv1394="no"
8d0ba041 698need_memalign="no"
8c802695 699make="gmake"
80581e98 700LIBOBJFLAGS="\$(PIC)"
a1309f8f 701LDCONFIG="ldconfig -m \$(shlibdir)"
8d0ba041
MR
702SHFLAGS='-shared'
703SLIBNAME='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBVERSION)'
704SLIBNAME_WITH_VERSION='$(SLIBNAME)'
705SLIBNAME_WITH_MAJOR='$(SLIBNAME)'
30a3e5d4 706add_extralibs "-lossaudio"
8c802695 707;;
9c938e77 708FreeBSD)
9d2a0f1c
MR
709video4linux="no"
710video4linux2="no"
6beefa40 711bktr="yes"
9c938e77 712audio_oss="yes"
8aa3ee32 713dv1394="no"
9c938e77 714make="gmake"
5d323602 715need_memalign="no"
30a3e5d4 716add_cflags "-pthread"
9c938e77 717;;
38f0d3ce 718GNU/kFreeBSD)
9d2a0f1c
MR
719video4linux="no"
720video4linux2="no"
38f0d3ce
DB
721bktr="yes"
722audio_oss="yes"
723dv1394="no"
30a3e5d4 724add_cflags "-pthread"
38f0d3ce 725;;
4a908fbc 726BSD/OS)
9d2a0f1c
MR
727video4linux="no"
728video4linux2="no"
6beefa40 729bktr="yes"
6063bce7 730audio_oss="yes"
8aa3ee32 731dv1394="no"
4a908fbc
AB
732extralibs="-lpoll -lgnugetopt -lm"
733make="gmake"
1db68540
SS
734strip="strip -d"
735installstrip=""
4a908fbc 736;;
90cee0c3 737Darwin)
a43bd1d7 738cc="cc"
9d2a0f1c
MR
739video4linux="no"
740video4linux2="no"
90cee0c3 741audio_oss="no"
8aa3ee32 742dv1394="no"
5d323602 743need_memalign="no"
a1309f8f 744SHFLAGS="-dynamiclib -Wl,-single_module -Wl,-install_name,\$(shlibdir)/\$(SLIBNAME),-current_version,\$(SPPVERSION),-compatibility_version,\$(SPPVERSION)"
408382a4 745VHOOKSHFLAGS='-dynamiclib -Wl,-single_module -flat_namespace -undefined suppress -Wl,-install_name,$(shlibdir)/vhook/$@'
90cee0c3 746extralibs=""
47930f09 747strip="strip -x"
da186ae2 748installstrip=""
e89b8b0a 749FFLDFLAGS="-Wl,-dynamic,-search_paths_first"
4e159595 750SLIBSUF=".dylib"
d0c2abb1 751SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)'
f3b60109 752SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME).$(LIBMAJOR)$(SLIBSUF)'
c536cb09 753FFSERVERLDFLAGS=-Wl,-bind_at_load
d4596ae3 754LIB_INSTALL_EXTRA_CMD='$(RANLIB) "$(libdir)/$(LIB)"'
90cee0c3 755;;
732d9245 756MINGW32*)
951bf3e6 757# Note: the rest of the mingw32 config is done afterwards as mingw32
29799f8b 758# can be forced on the command line for Linux cross compilation.
732d9245
BE
759mingw32="yes"
760;;
3f027ca7 761CYGWIN*)
b2828252 762targetos=CYGWIN
6bc0e1cf 763shlibdir="$bindir"
9d2a0f1c
MR
764video4linux="no"
765video4linux2="no"
3f027ca7 766audio_oss="yes"
8aa3ee32 767dv1394="no"
07a1b05e 768VHOOKSHFLAGS='-shared -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libavutil'
fbb9d104 769VHOOKLIBS='-lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS)'
3f027ca7 770extralibs=""
487c2fad 771EXESUF=".exe"
4581fdff
VP
772SLIBPREF="cyg"
773SLIBSUF=".dll"
774SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
775SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)'
776SHFLAGS='-shared -Wl,--out-implib=lib$(NAME).dll.a'
3f027ca7 777;;
b55e4ef4 778Linux)
e240ee67 779LDLATEFLAGS="-Wl,--as-needed $LDLATEFLAGS"
b55e4ef4 780;;
99614dd4 781IRIX*)
b2828252 782targetos=IRIX
99614dd4 783ranlib="echo ignoring ranlib"
9d2a0f1c
MR
784video4linux="no"
785video4linux2="no"
99614dd4
MB
786audio_oss="no"
787make="gmake"
788;;
f3ec2d46
SG
789OS/2)
790TMPE=$TMPE".exe"
3ca4b654 791ar="emxomfar -p128"
69db4e10
SG
792ranlib="echo ignoring ranlib"
793strip="echo ignoring strip"
30a3e5d4 794add_cflags "-Zomf"
e89b8b0a 795FFLDFLAGS="-Zomf -Zstack 16384 -s"
3ca4b654 796SHFLAGS="-Zdll -Zomf"
c536cb09 797FFSERVERLDFLAGS=""
f3ec2d46
SG
798LIBPREF=""
799LIBSUF=".lib"
800SLIBPREF=""
801SLIBSUF=".dll"
951bf3e6 802EXESUF=".exe"
f3ec2d46 803extralibs=""
c99dd233 804pkg_requires=""
9d2a0f1c
MR
805video4linux="no"
806video4linux2="no"
f3ec2d46 807audio_oss="no"
8aa3ee32 808dv1394="no"
f3ec2d46 809ffserver="no"
3ca4b654 810vhook="no"
f3ec2d46 811os2="yes"
b265431e 812os2threads="yes"
f3ec2d46 813;;
b2828252
DB
814*)
815targetos="${targetos}-UNKNOWN"
816;;
ef0bc4c9 817esac
de6d9b64 818
0f3cb305 819# find source path
997baf01 820source_path="`dirname \"$0\"`"
0f3cb305
FB
821source_path_used="yes"
822if test -z "$source_path" -o "$source_path" = "." ; then
997baf01 823 source_path="`pwd`"
0f3cb305 824 source_path_used="no"
e7a4dafb
MR
825else
826 source_path="`cd \"$source_path\"; pwd`"
997baf01
MR
827 echo "$source_path" | grep -q '[[:blank:]]' &&
828 die "Out of tree builds are impossible with whitespace in source path."
de6d9b64
FB
829fi
830
7d6ed4aa
MR
831if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
832 show_help
833fi
834
f255e0ab
MB
835FFMPEG_CONFIGURATION=" "
836for opt do
837 FFMPEG_CONFIGURATION="$FFMPEG_CONFIGURATION""$opt "
838done
839
f3902026
AJ
840ENCODER_LIST=`sed -n 's/^[^#]*ENC.*, *\(.*\)).*/\1_encoder/p' "$source_path/libavcodec/allcodecs.c"`
841DECODER_LIST=`sed -n 's/^[^#]*DEC.*, *\(.*\)).*/\1_decoder/p' "$source_path/libavcodec/allcodecs.c"`
842PARSER_LIST=`sed -n 's/^[^#]*PARSER.*, *\(.*\)).*/\1_parser/p' "$source_path/libavcodec/allcodecs.c"`
5b9b3b68
AJ
843MUXER_LIST=`sed -n 's/^[^#]*_MUX.*, *\(.*\)).*/\1_muxer/p' "$source_path/libavformat/allformats.c"`
844DEMUXER_LIST=`sed -n 's/^[^#]*DEMUX.*, *\(.*\)).*/\1_demuxer/p' "$source_path/libavformat/allformats.c"`
009cf97d 845
a8d04fba
MR
846enable $ENCODER_LIST $DECODER_LIST $PARSER_LIST $MUXER_LIST $DEMUXER_LIST
847
de6d9b64 848for opt do
fce53524 849 optval="${opt#*=}"
de6d9b64 850 case "$opt" in
2ba042a7
MR
851 --log)
852 ;;
fce53524 853 --log=*) logging="$optval"
57bd82d4 854 ;;
e48dc873 855 --prefix=*) PREFIX="$optval"
de6d9b64 856 ;;
e48dc873 857 --libdir=*) libdir="$optval"
cc973ecb 858 ;;
84c22efd
DB
859 --shlibdir=*) shlibdir="$optval"
860 ;;
fce53524 861 --incdir=*) incdir="$optval"
1d67a1d4 862 ;;
fce53524 863 --mandir=*) mandir="$optval"
23a65308 864 ;;
fce53524 865 --source-path=*) source_path="$optval"
0f3cb305 866 ;;
fce53524 867 --cross-prefix=*) cross_prefix="$optval"
0f3cb305 868 ;;
fac252f9
MR
869 --cross-compile) cross_compile=yes
870 ;;
fce53524 871 --cc=*) cc="$optval"
de6d9b64 872 ;;
fce53524 873 --make=*) make="$optval"
4a908fbc 874 ;;
30a3e5d4 875 --extra-cflags=*) add_cflags "$optval"
0f3cb305 876 ;;
28d8e661 877 --extra-ldflags=*) add_ldflags "$optval"
0f3cb305 878 ;;
28d8e661 879 --extra-libs=*) add_extralibs "$optval"
0f3cb305 880 ;;
fce53524 881 --build-suffix=*) BUILDSUF="$optval"
eb94aca9 882 ;;
cc6a90dd 883 --arch=*) arch="$optval"
de6d9b64 884 ;;
38d0a8aa 885 --cpu=*) cpu="$optval"
a4adb608 886 ;;
e45a2872
RD
887 --powerpc-perf-enable) powerpc_perf="yes"
888 ;;
de6d9b64
FB
889 --disable-mmx) mmx="no"
890 ;;
1839e854
SS
891 --disable-armv5te) armv5te="no"
892 ;;
eba9ae3c
GB
893 --disable-iwmmxt) iwmmxt="no"
894 ;;
ab6c65f6
BF
895 --disable-altivec) altivec="no"
896 ;;
de6d9b64
FB
897 --enable-gprof) gprof="yes"
898 ;;
9d2a0f1c 899 --disable-v4l) video4linux="no"
5cbcf02c 900 ;;
9d2a0f1c 901 --disable-v4l2) video4linux2="no"
0a7b514f 902 ;;
6beefa40
MN
903 --disable-bktr) bktr="no"
904 ;;
5cbcf02c
FB
905 --disable-audio-oss) audio_oss="no"
906 ;;
dfdfa47c
FR
907 --disable-audio-beos) audio_beos="no"
908 ;;
8aa3ee32
MK
909 --disable-dv1394) dv1394="no"
910 ;;
ffc0ef96 911 --disable-network) network="no"; ffserver="no"
5cbcf02c 912 ;;
0c7bb0e5
LB
913 --disable-ipv6) ipv6="no";
914 ;;
0147f198
FR
915 --disable-zlib) zlib="no"
916 ;;
ba9261e5 917 --enable-a52) a52="yes"
6ed7422a 918 ;;
bfd2edeb 919 --enable-a52bin) a52bin="yes"
57514323 920 ;;
c99dd233 921 --enable-dts) dts="yes"
23c99253 922 ;;
ba9261e5 923 --enable-pp) pp="yes"
bba9b16c 924 ;;
bb4c2140
MN
925 --enable-libgsm) libgsm="yes"
926 ;;
c99dd233 927 --enable-mp3lame) mp3lame="yes"
a6741398 928 ;;
f956e129
OS
929 --enable-libnut) libnut="yes"
930 ;;
9146ca37 931 --enable-libogg) libogg="yes"
c99dd233 932 pkg_requires="$pkg_requires ogg >= 1.1"
5c5dea3f 933 ;;
be74741c 934 --enable-vorbis) libvorbis="yes"
c99dd233 935 pkg_requires="$pkg_requires vorbis vorbisenc"
81e0d0b4 936 ;;
445ad18d
ZK
937 --enable-faad) faad="yes"
938 ;;
939 --enable-faadbin) faadbin="yes"
940 ;;
c99dd233 941 --enable-faac) faac="yes"
29d48296 942 ;;
1ddadfa9
AT
943 --enable-xvid) xvid="yes"
944 ;;
c99dd233 945 --enable-x264) x264="yes"
6662ec29 946 ;;
8ac17293
SH
947 --enable-avisynth) avisynth="yes";
948 ;;
f02be79d 949 --enable-dc1394) dc1394="yes"
c99dd233 950 pkg_requires="$pkg_requires libraw1394"
f02be79d 951 ;;
68892110
PG
952 --disable-vhook) vhook="no"
953 ;;
732d9245
BE
954 --enable-mingw32) mingw32="yes"
955 ;;
860391a5 956 --enable-mingwce) wince="yes"
ac44871c 957 ;;
320d060a
DB
958 --enable-static) lstatic="yes"
959 ;;
960 --disable-static) lstatic="no"
961 ;;
83286d2a 962 --enable-shared) lshared="yes"
0319c531 963 ;;
320d060a
DB
964 --disable-shared) lshared="no"
965 ;;
cddf3f45
GM
966 --disable-debug) debug="no"
967 ;;
968 --disable-opts) optimize="no"
969 ;;
78fcba8f
MR
970 --enable-extra-warnings) extrawarnings="yes"
971 ;;
1eb2212e
FB
972 --disable-mpegaudio-hp) mpegaudio_hp="no"
973 ;;
04f46ced
GB
974 --disable-protocols) protocols="no"; network="no"; ffserver="no"
975 ;;
786b30af
DB
976 --disable-ffmpeg) ffmpeg="no"
977 ;;
8154d2e0
FB
978 --disable-ffserver) ffserver="no"
979 ;;
a86b921c
FB
980 --disable-ffplay) ffplay="no"
981 ;;
cddf3f45 982 --enable-small) optimize="small"
553a6284 983 ;;
60827a1a 984 --enable-amr_nb) amr="yes"; amr_nb="yes"; amr_nb_fixed="no"
891f64b3 985 ;;
60827a1a 986 --enable-amr_nb-fixed) amr="yes"; amr_nb_fixed="yes"; amr_nb="no"
bc634f6f 987 ;;
60827a1a 988 --enable-amr_wb) amr="yes"; amr_wb="yes"
115329f1 989 ;;
60827a1a 990 --enable-amr_if2) amr="yes"; amr_if2="yes"
2a515c08 991 ;;
bde24d6e 992 --enable-sunmlib) mlib="yes"
f80f7964 993 ;;
9c3d33d6
MN
994 --enable-pthreads) pthreads="yes"
995 ;;
790c9ca7
LA
996 --enable-swscaler) swscaler="yes"
997 ;;
b2e3c528
MN
998 --enable-gpl) gpl="yes"
999 ;;
9ddbcae6 1000 --enable-memalign-hack) memalign_hack="yes"
da9b170c 1001 ;;
65d1bea2
MB
1002 --disable-strip) dostrip="no"
1003 ;;
a8d04fba 1004 --enable-encoder=*) enable ${optval}_encoder
009cf97d 1005 ;;
a8d04fba 1006 --enable-decoder=*) enable ${optval}_decoder
f593b273 1007 ;;
a8d04fba 1008 --disable-encoder=*) disable ${optval}_encoder
f593b273 1009 ;;
a8d04fba 1010 --disable-decoder=*) disable ${optval}_decoder
009cf97d 1011 ;;
a8d04fba 1012 --disable-encoders) disable $ENCODER_LIST
009cf97d 1013 ;;
a8d04fba 1014 --disable-decoders) disable $DECODER_LIST
b4cad537 1015 ;;
a8d04fba 1016 --enable-muxer=*) enable ${optval}_muxer
a9e35095 1017 ;;
a8d04fba 1018 --disable-muxer=*) disable ${optval}_muxer
ff70e601 1019 ;;
a8d04fba 1020 --disable-muxers) disable $MUXER_LIST; ffserver="no"
ff70e601 1021 ;;
a8d04fba 1022 --enable-demuxer=*) enable ${optval}_demuxer
ff70e601 1023 ;;
a8d04fba 1024 --disable-demuxer=*) disable ${optval}_demuxer
ff70e601 1025 ;;
a8d04fba 1026 --disable-demuxers) disable $DEMUXER_LIST
a9e35095 1027 ;;
a8d04fba 1028 --enable-parser=*) enable ${optval}_parser
af9e7d18 1029 ;;
a8d04fba 1030 --disable-parser=*) disable ${optval}_parser
af9e7d18 1031 ;;
a8d04fba 1032 --disable-parsers) disable $PARSER_LIST
af9e7d18 1033 ;;
74c53c2d
MR
1034 --help) show_help
1035 ;;
b34c63f7
DB
1036 *)
1037 echo "Unknown option \"$opt\"."
1038 echo "See $0 --help for available options."
1039 exit 1
1040 ;;
de6d9b64
FB
1041 esac
1042done
1043
720c69da
MR
1044if test "$logging" != no; then
1045 test "$logging" = yes || logfile="$logging"
57bd82d4
MR
1046 echo "# $0 $@" >$logfile
1047 set >>$logfile
2ba042a7
MR
1048else
1049 logfile=/dev/null
57bd82d4 1050fi
e89b8b0a 1051
860391a5 1052if test "$mingw32" = "yes" -o "$wince" = "yes"; then
e67bcdd9
DB
1053 if test "$lshared" = "yes" && test "$lstatic" = "yes" ; then
1054 cat <<EOF
1055You can only build one library type at once on MinGW.
1056Specify --disable-static --enable-shared to only build
1057the shared libraries. To build only the static libraries
1058you do not need to pass additional options.
1059EOF
1060 exit 1
1061 fi
9d2a0f1c
MR
1062 video4linux="no"
1063 video4linux2="no"
e67bcdd9
DB
1064 bktr="no"
1065 audio_oss="no"
1066 dv1394="no"
1067 dc1394="no"
1068 ffserver="no"
1069 network="no"
b265431e
MR
1070 if enabled mingw32; then
1071 w32threads="yes"
1072 fi
860391a5 1073 if test "$wince" = "yes"; then
e67bcdd9
DB
1074 protocols="no"
1075 fi
e67bcdd9
DB
1076 SLIBPREF=""
1077 SLIBSUF=".dll"
1078 EXESUF=".exe"
d6a07a13
DB
1079 SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
1080 SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)'
dfeb80a5 1081 SLIB_EXTRA_CMD="-lib /machine:i386 /def:\$(@:${SLIBSUF}=.def)"
a77caa4d 1082 SHFLAGS="-shared -Wl,--output-def,\$(@:${SLIBSUF}=.def),--out-implib,lib\$(SLIBNAME:\$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc"
e67bcdd9
DB
1083fi
1084
28d8e661
DB
1085# Combine FFLDFLAGS and the LDFLAGS environment variable.
1086LDFLAGS="$FFLDFLAGS $LDFLAGS"
e89b8b0a 1087
fac252f9 1088test -n "$cross_prefix" && cross_compile=yes
1ea46bed
MR
1089cc="${cross_prefix}${cc}"
1090ar="${cross_prefix}${ar}"
1091ranlib="${cross_prefix}${ranlib}"
1092strip="${cross_prefix}${strip}"
1093
320d060a
DB
1094# we need to build at least one lib type
1095if test "$lstatic" = "no" && test "$lshared" = "no" ; then
1096 cat <<EOF
1097At least one library type must be built.
1098Specify --enable-static to build the static libraries or --enable-shared to
1099build the shared libraries as well. To only build the shared libraries specify
1100--disable-static in addition to --enable-shared.
1101EOF
1102 exit 1;
1103fi
1104
be74741c 1105if test "$libvorbis" = "yes" ; then
9146ca37 1106 if test "$libogg" = "no"; then
29799f8b 1107 echo "libogg must be enabled to enable Vorbis."
5c5dea3f 1108 fail="yes"
5c5dea3f
NB
1109 fi
1110fi
1111
b2e3c528 1112if test "$gpl" != "yes"; then
ba64106a 1113 if test "$pp" != "no"; then
29799f8b 1114 echo "The Postprocessing code is under GPL and --enable-gpl is not specified."
b2e3c528
MN
1115 fail="yes"
1116 fi
1117
1118 if test "$a52" != "no" -o "$a52bin" != "no"; then
29799f8b 1119 echo "liba52 is under GPL and --enable-gpl is not specified."
b2e3c528
MN
1120 fail="yes"
1121 fi
23c99253 1122
1ddadfa9 1123 if test "$xvid" != "no"; then
29799f8b 1124 echo "libxvidcore is under GPL and --enable-gpl is not specified."
1ddadfa9
AT
1125 fail="yes"
1126 fi
1127
6662ec29 1128 if test "$x264" != "no"; then
29799f8b 1129 echo "x264 is under GPL and --enable-gpl is not specified."
6662ec29
MN
1130 fail="yes"
1131 fi
1132
23c99253 1133 if test "$dts" != "no"; then
29799f8b 1134 echo "libdts is under GPL and --enable-gpl is not specified."
23c99253
MN
1135 fail="yes"
1136 fi
115329f1 1137
b2e3c528 1138 if test "$faad" != "no" -o "$faadbin" != "no"; then
dcd479c0
MR
1139 if check_header faad.h; then
1140 check_cc << EOF
b2e3c528
MN
1141 #include <faad.h>
1142 #ifndef FAAD2_VERSION
1143 ok faad1
1144 #endif
1145 int main( void ) { return 0; }
1146EOF
dcd479c0 1147 if test $? = 0 ; then
29799f8b 1148 echo "FAAD2 is under GPL and --enable-gpl is not specified."
b2e3c528
MN
1149 fail="yes"
1150 fi
1151 else
1152 faad="no"
1153 faadbin="no"
29799f8b 1154 echo "FAAD test failed."
b2e3c528
MN
1155 fi
1156 fi
115329f1 1157
790c9ca7
LA
1158 if test "$swscaler" != "no"; then
1159 echo "The software scaler is under GPL and --enable-gpl is not specified."
1160 fail="yes"
1161 fi
ebb810d9 1162fi
b2e3c528 1163
ebb810d9
RP
1164if test "$fail" = "yes"; then
1165 exit 1
b2e3c528
MN
1166fi
1167
29799f8b 1168# compute MMX state
0f3cb305 1169if test $mmx = "default"; then
419b8784 1170 if test $arch = "x86_32" -o $arch = "x86_64"; then
0f3cb305
FB
1171 mmx="yes"
1172 else
1173 mmx="no"
1174 fi
1175fi
1176
5d323602
MR
1177test -z "$need_memalign" && need_memalign="$mmx"
1178
cf9d24ad 1179#Darwin CC versions
75388c74 1180needmdynamicnopic="no"
cf9d24ad 1181if test $targetos = Darwin; then
b2924696 1182 if test -n "`$cc -v 2>&1 | grep xlc`"; then
30a3e5d4 1183 add_cflags "-qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
cf9d24ad 1184 else
bb270c08
DB
1185 gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
1186 case "$gcc_version" in
1187 *2.95*)
30a3e5d4 1188 add_cflags "-no-cpp-precomp -pipe"
bb270c08
DB
1189 ;;
1190 *[34].*)
30a3e5d4 1191 add_cflags "-no-cpp-precomp -pipe -force_cpusubtype_ALL -Wno-sign-compare"
bb270c08
DB
1192 if test "$lshared" = no; then
1193 needmdynamicnopic="yes"
1194 fi
1195 ;;
1196 *)
30a3e5d4 1197 add_cflags "-no-cpp-precomp -pipe"
bb270c08
DB
1198 if test "$lshared" = no; then
1199 needmdynamicnopic="yes"
1200 fi
1201 ;;
1202 esac
cf9d24ad 1203 fi
2a1a6b64
MN
1204fi
1205
1206if test $optimize != "no"; then
1207 add_cflags "-fomit-frame-pointer"
cf9d24ad
DC
1208fi
1209
ab6c65f6
BF
1210# Can only do AltiVec on PowerPC
1211if test $altivec = "default"; then
cc6a90dd 1212 if test $arch = "powerpc"; then
ab6c65f6
BF
1213 altivec="yes"
1214 else
1215 altivec="no"
1216 fi
1217fi
1218
a4adb608 1219# Add processor-specific flags
9007f514 1220POWERPCMODE="32bits"
38d0a8aa
GP
1221if test $cpu != "generic"; then
1222 case $cpu in
bb270c08 1223 601|ppc601|PowerPC601)
1c5d830c 1224 add_cflags "-mcpu=601"
bb270c08
DB
1225 if test $altivec = "yes"; then
1226 echo "WARNING: Tuning for PPC601 but AltiVec enabled!";
1227 fi
bb270c08
DB
1228 ;;
1229 603*|ppc603*|PowerPC603*)
1c5d830c 1230 add_cflags "-mcpu=603"
bb270c08
DB
1231 if test $altivec = "yes"; then
1232 echo "WARNING: Tuning for PPC603 but AltiVec enabled!";
1233 fi
bb270c08
DB
1234 ;;
1235 604*|ppc604*|PowerPC604*)
1c5d830c 1236 add_cflags "-mcpu=604"
bb270c08
DB
1237 if test $altivec = "yes"; then
1238 echo "WARNING: Tuning for PPC604 but AltiVec enabled!";
1239 fi
bb270c08
DB
1240 ;;
1241 G3|g3|75*|ppc75*|PowerPC75*)
1c5d830c 1242 add_cflags "-mcpu=750 -mpowerpc-gfxopt"
bb270c08
DB
1243 if test $altivec = "yes"; then
1244 echo "WARNING: Tuning for PPC75x but AltiVec enabled!";
1245 fi
bb270c08
DB
1246 ;;
1247 G4|g4|745*|ppc745*|PowerPC745*)
1c5d830c 1248 add_cflags "-mcpu=7450 -mpowerpc-gfxopt"
bb270c08
DB
1249 if test $altivec = "no"; then
1250 echo "WARNING: Tuning for PPC745x but AltiVec disabled!";
1251 fi
bb270c08
DB
1252 ;;
1253 74*|ppc74*|PowerPC74*)
1c5d830c 1254 add_cflags "-mcpu=7400 -mpowerpc-gfxopt"
bb270c08
DB
1255 if test $altivec = "no"; then
1256 echo "WARNING: Tuning for PPC74xx but AltiVec disabled!";
1257 fi
bb270c08
DB
1258 ;;
1259 G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
1c5d830c 1260 add_cflags "-mcpu=970 -mpowerpc-gfxopt -mpowerpc64"
bb270c08
DB
1261 if test $altivec = "no"; then
1262 echo "WARNING: Tuning for PPC970 but AltiVec disabled!";
1263 fi
9007f514 1264 POWERPCMODE="64bits"
bb270c08 1265 ;;
e7768fc5
GP
1266 # targets that do NOT support conditional mov (cmov)
1267 i[345]86|pentium|pentium-mmx|k6|k6-[23]|winchip-c6|winchip2|c3)
38d0a8aa 1268 add_cflags "-march=$cpu"
e7768fc5
GP
1269 cmov="no"
1270 ;;
1271 # targets that do support conditional mov (cmov)
94e4c3a3 1272 i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx)
e7768fc5 1273 add_cflags "-march=$cpu"
4c8d81fa 1274 cmov="yes"
94e4c3a3
GP
1275 cmov_is_fast="yes"
1276 ;;
1277 # targets that do support conditional mov but on which it's slow
1278 pentium4|prescott|nocona)
1279 add_cflags "-march=$cpu"
1280 cmov="yes"
1281 cmov_is_fast="no"
bb270c08 1282 ;;
d7b34d08 1283 sparc64)
1c5d830c 1284 add_cflags "-mcpu=v9"
d7b34d08 1285 ;;
bb270c08 1286 *)
38d0a8aa 1287 echo "WARNING: Unknown CPU \"$cpu\", ignored."
bb270c08 1288 ;;
a4adb608
MN
1289 esac
1290fi
1291
be0d52ab
MR
1292# make sure we can execute files in $TMPDIR
1293cat >$TMPE 2>>$logfile <<EOF
1294#! /bin/sh
1295EOF
1296chmod +x $TMPE >>$logfile 2>&1
1297if ! $TMPE >>$logfile 2>&1; then
1298 cat <<EOF
1299Unable to create and execute files in $TMPDIR1. Set the TMPDIR environment
68300911
DB
1300variable to another directory and make sure that $TMPDIR1 is not mounted
1301noexec.
be0d52ab
MR
1302EOF
1303 die "Sanity test failed."
1304fi
0244f743 1305rm $TMPE
be0d52ab 1306
1a268acc
MR
1307# compiler sanity check
1308check_exec <<EOF
1309int main(){
1310 return 0;
1311}
1312EOF
1313if test "$?" != 0; then
1314 echo "$cc is unable to create an executable file."
1315 if test -z "$cross_prefix" -a "$cross_compile" = no; then
1316 echo "If $cc is a cross-compiler, use the --cross-compile option."
c7ae6345 1317 echo "Only do this if you know what cross compiling means."
1a268acc
MR
1318 fi
1319 die "C compiler test failed."
1320fi
1321
87ea51e0
LB
1322# check for assembler specific support
1323
cc6a90dd 1324if test $arch = "powerpc"; then
87ea51e0
LB
1325check_cc <<EOF && dcbzl=yes
1326int main(void) {
1327 register long zero = 0;
1328 char data[1024];
1329 asm volatile("dcbzl %0, %1" : : "b" (data), "r" (zero));
1330return 0;
1331}
1332EOF
1333fi
1334
57bd82d4
MR
1335# check for SIMD availability
1336
115329f1 1337# AltiVec flags: The FSF version of GCC differs from the Apple version
cc6a90dd 1338if test $arch = "powerpc"; then
b6e52719 1339 if test $altivec = "yes"; then
b2924696 1340 if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
30a3e5d4 1341 add_cflags "-faltivec"
b6e52719 1342 else
30a3e5d4 1343 add_cflags "-maltivec -mabi=altivec"
b6e52719
MD
1344 fi
1345 fi
1346fi
1347
0701ca7f 1348check_header altivec.h
a9a07762 1349
29799f8b 1350# check if our compiler supports Motorola AltiVec C API
ab6c65f6 1351if test $altivec = "yes"; then
6e7a01e4 1352 if test $altivec_h = "yes"; then
f25fc9b1
MR
1353 inc_altivec_h="#include <altivec.h>"
1354 else
1355 inc_altivec_h=
1356 fi
1357 check_cc <<EOF || altivec=no
dcd479c0 1358$inc_altivec_h
a9a07762
MN
1359int main(void) {
1360 vector signed int v1, v2, v3;
1361 v1 = vec_add(v2,v3);
1362 return 0;
1363}
1364EOF
1365fi
ab6c65f6 1366
854fdb51 1367# check armv5te instructions support
cc6a90dd 1368if test $armv5te = "default" -a $arch = "armv4l"; then
854fdb51
MR
1369 armv5te=no
1370 check_cc <<EOF && armv5te=yes
1371 int main(void) {
1372 __asm__ __volatile__ ("qadd r0, r0, r0");
1373 }
1374EOF
1375fi
1376
1377# check iwmmxt support
cc6a90dd 1378if test $iwmmxt = "default" -a $arch = "armv4l"; then
854fdb51
MR
1379 iwmmxt=no
1380 check_cc <<EOF && iwmmxt=yes
1381 int main(void) {
1382 __asm__ __volatile__ ("wunpckelub wr6, wr4");
1383 }
1384EOF
1385fi
1386
29799f8b 1387# mmi only available on mips
d46aba26 1388if test $mmi = "default"; then
cc6a90dd 1389 if test $arch = "mips"; then
d46aba26
LS
1390 mmi="yes"
1391 else
1392 mmi="no"
1393 fi
1394fi
1395
29799f8b 1396# check if our compiler supports mmi
57bd82d4 1397enabled mmi && check_cc <<EOF || mmi="no"
d46aba26
LS
1398int main(void) {
1399 __asm__ ("lq \$2, 0(\$2)");
1400 return 0;
1401}
1402EOF
57bd82d4 1403
57bd82d4
MR
1404# ---
1405# big/little-endian test
fac252f9 1406if test "$cross_compile" = "no"; then
57bd82d4 1407 check_ld <<EOF || die "endian test failed" && $TMPE && bigendian="yes"
a3999908
MN
1408#include <inttypes.h>
1409int main(int argc, char ** argv){
bb270c08
DB
1410 volatile uint32_t i=0x01234567;
1411 return (*((uint8_t*)(&i))) == 0x67;
a3999908
MN
1412}
1413EOF
487a54d7 1414else
f25fc9b1 1415 # programs cannot be launched if cross compiling, so make a static guess
cc6a90dd 1416 if test "$arch" = "powerpc" -o "$arch" = "mips" ; then
f25fc9b1
MR
1417 bigendian="yes"
1418 fi
487a54d7
FB
1419fi
1420
a3999908 1421# ---
3d204385
NK
1422# check availability of some header files
1423
0701ca7f
MR
1424check_header malloc.h
1425check_func memalign
3d204385 1426
5d323602
MR
1427if test "$memalign" = "no" -a "$need_memalign" = "yes" -a \
1428 "$memalign_hack" != "yes"; then
57bd82d4 1429 die "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
8bf5d58f
MN
1430fi
1431
0701ca7f 1432check_header byteswap.h
47d23bbf 1433
0701ca7f
MR
1434check_func inet_aton
1435check_func localtime_r
57bd82d4 1436enabled zlib && check_lib zlib.h zlibVersion -lz || zlib="no"
57bd82d4
MR
1437
1438# check for some common methods of building with pthread support
1439# do this before the optional library checks as some of them require pthreads
1440if enabled pthreads; then
9e7fd101
MR
1441 if check_func pthread_create; then
1442 :
1443 elif check_func pthread_create -pthread; then
1444 add_cflags -pthread
1445 add_ldflags -pthread
1446 elif check_func pthread_create -pthreads; then
1447 add_cflags -pthreads
1448 add_ldflags -pthreads
1449 elif ! check_lib pthread.h pthread_create -lpthread; then
1450 die "ERROR: can't find pthreads library"
1451 fi
57bd82d4
MR
1452fi
1453
1454# these are off by default, so fail if requested and not available
4cbed916 1455enabled dts && require libdts dts.h dts_init -ldts -lm
57bd82d4 1456enabled libgsm && require libgsm gsm.h gsm_create -lgsm
4cbed916 1457enabled mp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm
be74741c 1458enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbis -lvorbisenc -logg
aedf11f8 1459enabled libogg && require libogg ogg/ogg.h ogg_sync_init -logg
4d8aa1c3 1460enabled libnut && require libnut libnut.h nut_demuxer_init -lnut
57bd82d4
MR
1461enabled xvid && require XviD xvid.h xvid_global -lxvidcore
1462enabled x264 && require x264 x264.h x264_encoder_open -lx264
1463enabled dc1394 && require libdc1394 libdc1394/dc1394_control.h dc1394_create_handle -ldc1394_control -lraw1394
bde24d6e 1464enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
e0f80bd7 1465
3b9bee88
MR
1466# Ugh, faac uses stdcall calling convention on win32 so we can't use
1467# the generic test functions
1468if enabled faac; then
1469 save_flags
1470 temp_extralibs -lfaac
1471 check_ld <<EOF && add_extralibs -lfaac || die "ERROR: libfaac not found"
1472#include <stdint.h>
1473#include <faac.h>
1474int main(){
1475 char *id, *cpr;
1476 faacEncGetVersion(&id, &cpr);
1477 return 0;
1478}
1479EOF
1480 restore_flags
1481fi
1482
87f1c97e
MR
1483# Ugh, recent faad2 versions have renamed all functions and #define the
1484# old names in faad.h. Generic tests won't work.
1485if enabled faad; then
1486 save_flags
1487 temp_extralibs -lfaad
1488 check_ld <<EOF && add_extralibs -lfaad || die "ERROR: libfaad not found"
1489#include <faad.h>
1490int main(){
1491 faacDecOpen();
1492 return 0;
1493}
1494EOF
1495 restore_flags
1496fi
1497
8ac17293
SH
1498# Ugh, avisynth uses WINAPI calls. Generic tests won't work.
1499if enabled avisynth; then
1500 save_flags
1501 temp_extralibs -lvfw32
1502 check_ld <<EOF && add_extralibs -lvfw32 || die "ERROR: vfw32 not found"
1503#include <windows.h>
1504#include <vfw.h>
1505int main(){
1506 AVIFileInit();
1507 return 0;
1508}
1509EOF
1510 restore_flags
1511fi
1512
1513
95e2ce4a 1514# test for lrintf in math.h
fc2b267f 1515check_exec <<EOF && lrintf=yes || lrintf=no
95e2ce4a
MN
1516#define _ISOC9X_SOURCE 1
1517#include <math.h>
1518int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
1519EOF
1520
c13e1abd
FH
1521_restrict=
1522for restrict_keyword in restrict __restrict__ __restrict; do
57bd82d4 1523 check_cc <<EOF && _restrict=$restrict_keyword && break
dcd479c0
MR
1524void foo(char * $restrict_keyword p);
1525EOF
c13e1abd
FH
1526done
1527
a8721c09
FB
1528# dlopen/dlfcn.h probing
1529
0701ca7f 1530check_header dlfcn.h
a8721c09 1531
dcd479c0 1532if check_func dlopen; then
dcd479c0 1533 ldl=
0701ca7f
MR
1534elif check_func dlopen -ldl; then
1535 ldl=-ldl
a8721c09
FB
1536fi
1537
f25fc9b1
MR
1538if test "$vhook" = "default"; then
1539 vhook="$dlopen"
a8721c09
FB
1540fi
1541
22df6d18 1542if enabled_any vhook a52bin faadbin; then
57bd82d4 1543 add_extralibs $ldl
bfd2edeb
MN
1544fi
1545
fbb9d104
VP
1546if test "$targetos" = "CYGWIN" -a "$lstatic" = "yes" ; then
1547 vhook="no"
1548 echo
1549 echo "At the moment vhooks don't work on Cygwin static builds."
1550 echo "Patches welcome."
1551 echo
1552fi
1553
8d923001
MR
1554if enabled vhook; then
1555 check_ldflags -rdynamic
1556 check_ldflags -export-dynamic
1557fi
bfd2edeb 1558
9464f2b8
DB
1559if enabled audio_beos; then
1560 add_extralibs "-lmedia -lbe"
1561fi
1562
a86b921c 1563##########################################
29799f8b 1564# imlib check
a86b921c 1565
dcd479c0
MR
1566temp_extralibs -lImlib2
1567check_ld <<EOF && imlib2=yes || imlib2=no
a8721c09
FB
1568#include <X11/Xlib.h>
1569#include <Imlib2.h>
1570int main( void ) { return (int) imlib_load_font("foo"); }
1571EOF
dcd479c0 1572restore_flags
52b41d7f 1573
a86b921c 1574##########################################
29799f8b 1575# FreeType check
a86b921c 1576
04511d53 1577freetype2=no
e2a5fd20 1578if test "x$targetos" != "xBeOS"; then
e2a3cd59 1579 if (freetype-config --version) >/dev/null 2>&1 ; then
dcd479c0
MR
1580 temp_cflags `freetype-config --cflags`
1581 temp_extralibs `freetype-config --libs`
1582 check_ld <<EOF && freetype2=yes
1583#include <ft2build.h>
1584int main( void ) { return (int) FT_Init_FreeType(0); }
1585EOF
1586 restore_flags
dee076fc 1587 fi
04511d53
PG
1588fi
1589
a86b921c 1590##########################################
29799f8b 1591# SDL check
a86b921c 1592
a86b921c
FB
1593sdl_too_old=no
1594sdl=no
6a1a892f
FD
1595SDL_CONFIG="${cross_prefix}sdl-config"
1596if ("${SDL_CONFIG}" --version) >/dev/null 2>&1 ; then
dcd479c0
MR
1597 temp_cflags `"${SDL_CONFIG}" --cflags`
1598 temp_extralibs `"${SDL_CONFIG}" --libs`
1599 check_ld <<EOF
1600#include <SDL.h>
1601#undef main /* We don't want SDL to override our main() */
1602int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
1603EOF
dcd479c0
MR
1604 if test $? = 0; then
1605 _sdlversion=`"${SDL_CONFIG}" --version | sed 's/[^0-9]//g'`
29f3b38a 1606 if test "$_sdlversion" -lt 121 ; then
dcd479c0
MR
1607 sdl_too_old=yes
1608 else
1609 sdl=yes
29f3b38a
MR
1610 check_cc <<EOF && sdl_video_size=yes || sdl_video_size=no
1611#include <SDL.h>
1612int main(void){
1613 const SDL_VideoInfo *vi = SDL_GetVideoInfo();
1614 int w = vi->current_w;
1615 return 0;
1616}
1617EOF
dcd479c0
MR
1618 fi
1619 fi
29f3b38a 1620 restore_flags
c3f6b472 1621fi
a86b921c 1622
57bd82d4
MR
1623enabled sdl || ffplay=no
1624
146ea952 1625##########################################
29799f8b 1626# texi2html check
146ea952
NB
1627
1628texi2html=no
e2a3cd59 1629if (texi2html -version) >/dev/null 2>&1; then
146ea952
NB
1630texi2html=yes
1631fi
1632
7a91333f 1633##########################################
29799f8b 1634# IPv6 check
7a91333f 1635
0c7bb0e5 1636enabled network && enabled ipv6 && check_ld <<EOF && ipv6=yes || ipv6=no
7a91333f
HZ
1637#include <sys/types.h>
1638#include <sys/socket.h>
1639#include <netinet/in.h>
1640#include <netdb.h>
1641int main( void ) {
1642 struct sockaddr_storage saddr;
1643 struct ipv6_mreq mreq6;
1644 getaddrinfo(0,0,0,0);
1645 getnameinfo(0,0,0,0,0,0,0);
12fe88b4 1646 IN6_IS_ADDR_MULTICAST((const struct in6_addr *)0);
7a91333f
HZ
1647}
1648EOF
1649
47f38850 1650# check for video4linux2 --- V4L2_PIX_FMT_YUV420
9d2a0f1c 1651enabled video4linux2 && check_cc <<EOF || video4linux2="no"
84fe9963 1652#include <sys/time.h>
f743a062
LA
1653#include <asm/types.h>
1654#include <linux/videodev2.h>
47f38850 1655int dummy = V4L2_PIX_FMT_YUV420;
490c189b 1656struct v4l2_buffer dummy1;
47f38850 1657EOF
47f38850 1658
57bd82d4
MR
1659enabled debug && add_cflags -g
1660
1661# add some useful compiler flags if supported
1662check_cflags -Wdeclaration-after-statement
dcd479c0
MR
1663check_cflags -Wall
1664check_cflags -Wno-switch
c07bd6a9
MN
1665check_cflags -Wdisabled-optimization
1666check_cflags -Wpointer-arith
1667check_cflags -Wredundant-decls
78fcba8f 1668enabled extrawarnings && check_cflags -Winline
cf9d24ad 1669
57bd82d4 1670# add some linker flags
e240ee67 1671check_ldflags $LDLATEFLAGS
94a3401e 1672
57bd82d4
MR
1673# not all compilers support -Os
1674test "$optimize" = "small" && check_cflags -Os
cddf3f45 1675
57bd82d4 1676if enabled optimize; then
b2924696 1677 if test -n "`$cc -v 2>&1 | grep xlc`"; then
30a3e5d4
NP
1678 add_cflags "-O5"
1679 add_ldflags "-O5"
cf9d24ad 1680 else
30a3e5d4 1681 add_cflags "-O3"
cf9d24ad 1682 fi
cddf3f45
GM
1683fi
1684
80581e98
MN
1685# PIC flags for shared library objects where they are needed
1686if test "$lshared" = "yes" ; then
f25fc9b1
MR
1687 # LIBOBJFLAGS may have already been set in the OS configuration
1688 if test -z "$LIBOBJFLAGS" ; then
cc6a90dd 1689 case "$arch" in
813457e5
MR
1690 x86_64|ia64|alpha|sparc*) LIBOBJFLAGS="\$(PIC)" ;;
1691 esac
80581e98 1692 fi
80581e98
MN
1693fi
1694
1db54e20 1695if test "$gprof" = "yes" ; then
30a3e5d4
NP
1696 add_cflags "-p"
1697 add_ldflags "-p"
1db54e20
DB
1698fi
1699
18451f7d
MR
1700VHOOKCFLAGS="-fPIC $CFLAGS"
1701test "$needmdynamicnopic" = yes && add_cflags -mdynamic-no-pic
1702
4454dc1b
JD
1703# find if .align arg is power-of-two or not
1704if test $asmalign_pot = "unknown"; then
1705 asmalign_pot="no"
1706 echo 'asm (".align 3");' | check_cc && asmalign_pot="yes"
1707fi
1708
2266e085 1709echo "install prefix $PREFIX"
29799f8b 1710echo "source path $source_path"
de6d9b64 1711echo "C compiler $cc"
4a908fbc 1712echo "make $make"
38d0a8aa 1713echo "ARCH $arch ($cpu)"
eb94aca9 1714if test "$BUILDSUF" != ""; then
f25fc9b1 1715 echo "build suffix $BUILDSUF"
eb94aca9 1716fi
29799f8b 1717echo "big-endian $bigendian"
419b8784 1718if test $arch = "x86_32" -o $arch = "x86_64"; then
f25fc9b1 1719 echo "MMX enabled $mmx"
e7768fc5 1720 echo "CMOV enabled $cmov"
94e4c3a3 1721 echo "CMOV is fast $cmov_is_fast"
e41e8342 1722fi
cc6a90dd 1723if test $arch = "armv4l"; then
1839e854 1724 echo "ARMv5TE enabled $armv5te"
f25fc9b1 1725 echo "IWMMXT enabled $iwmmxt"
eba9ae3c 1726fi
cc6a90dd 1727if test $arch = "mips"; then
f25fc9b1 1728 echo "MMI enabled $mmi"
e41e8342 1729fi
cc6a90dd 1730if test $arch = "powerpc"; then
f25fc9b1 1731 echo "AltiVec enabled $altivec"
87ea51e0 1732 echo "dcbzl available $dcbzl"
e41e8342 1733fi
de6d9b64 1734echo "gprof enabled $gprof"
0147f198 1735echo "zlib enabled $zlib"
bb4c2140 1736echo "libgsm enabled $libgsm"
a6741398 1737echo "mp3lame enabled $mp3lame"
f956e129 1738echo "libnut enabled $libnut"
9146ca37 1739echo "libogg enabled $libogg"
be74741c 1740echo "Vorbis enabled $libvorbis"
29799f8b 1741echo "FAAD enabled $faad"
445ad18d 1742echo "faadbin enabled $faadbin"
29799f8b
DB
1743echo "FAAC enabled $faac"
1744echo "XviD enabled $xvid"
6662ec29 1745echo "x264 enabled $x264"
5cbcf02c 1746echo "a52 support $a52"
57514323 1747echo "a52 dlopened $a52bin"
29799f8b 1748echo "DTS support $dts"
bba9b16c 1749echo "pp support $pp"
790c9ca7 1750echo "Software Scaler enabled $swscaler"
8ac17293 1751echo "AVISynth enabled $avisynth"
cddf3f45 1752echo "debug symbols $debug"
65d1bea2 1753echo "strip symbols $dostrip"
cddf3f45 1754echo "optimize $optimize"
320d060a 1755echo "static $lstatic"
1ddf5ba1 1756echo "shared $lshared"
29799f8b 1757echo "video hooking $vhook"
a86b921c
FB
1758echo "SDL support $sdl"
1759if test $sdl_too_old = "yes"; then
f25fc9b1 1760 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support."
a86b921c 1761fi
68892110 1762
f25fc9b1
MR
1763if test "$vhook" = "yes"; then
1764 echo "Imlib2 support $imlib2"
1765 echo "FreeType support $freetype2"
68892110 1766fi
bde24d6e 1767echo "Sun medialib support" $mlib
9c3d33d6 1768echo "pthreads support" $pthreads
bc634f6f
ZK
1769echo "AMR-NB float support" $amr_nb
1770echo "AMR-NB fixed support" $amr_nb_fixed
d663a1fd 1771echo "AMR-WB float support" $amr_wb
2a515c08 1772echo "AMR-WB IF2 support" $amr_if2
7a91333f
HZ
1773echo "network support $network"
1774if test "$network" = "yes" ; then
f25fc9b1 1775 echo "IPv6 support $ipv6"
7a91333f 1776fi
4454dc1b 1777echo ".align is power-of-two" $asmalign_pot
b2e3c528 1778if test "$gpl" = "no" ; then
f25fc9b1 1779 echo "License: LGPL"
b2e3c528 1780else
f25fc9b1 1781 echo "License: GPL"
b2e3c528 1782fi
de6d9b64 1783
29799f8b 1784echo "Creating config.mak and config.h..."
de6d9b64 1785
29799f8b
DB
1786echo "# Automatically generated by configure - do not modify!" > config.mak
1787echo "/* Automatically generated by configure - do not modify! */" > $TMPH
f255e0ab 1788echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH
de6d9b64 1789
2266e085
DB
1790echo "PREFIX=$PREFIX" >> config.mak
1791echo "prefix=\$(DESTDIR)\${PREFIX}" >> config.mak
9a695e98 1792echo "libdir=\$(DESTDIR)$libdir" >> config.mak
84c22efd 1793echo "shlibdir=\$(DESTDIR)$shlibdir" >> config.mak
1d67a1d4 1794echo "incdir=\$(DESTDIR)$incdir" >> config.mak
9a695e98
DB
1795echo "bindir=\$(DESTDIR)$bindir" >> config.mak
1796echo "mandir=\$(DESTDIR)$mandir" >> config.mak
4a908fbc 1797echo "MAKE=$make" >> config.mak
980fc7b8
FB
1798echo "CC=$cc" >> config.mak
1799echo "AR=$ar" >> config.mak
be7109c1 1800echo "RANLIB=$ranlib" >> config.mak
65d1bea2 1801if test "$dostrip" = "yes" ; then
f25fc9b1
MR
1802 echo "STRIP=$strip" >> config.mak
1803 echo "INSTALLSTRIP=$installstrip" >> config.mak
65d1bea2 1804else
f25fc9b1
MR
1805 echo "STRIP=echo ignoring strip" >> config.mak
1806 echo "INSTALLSTRIP=" >> config.mak
65d1bea2 1807fi
75388c74 1808
a9b3f630 1809echo "OPTFLAGS=$CFLAGS" >> config.mak
408382a4 1810echo "VHOOKCFLAGS=$VHOOKCFLAGS">>config.mak
0f3cb305 1811echo "LDFLAGS=$LDFLAGS" >> config.mak
f39e56a8 1812echo "LDCONFIG=$LDCONFIG" >> config.mak
c536cb09 1813echo "FFSERVERLDFLAGS=$FFSERVERLDFLAGS" >> config.mak
e1707f52 1814echo "SHFLAGS=$SHFLAGS" >> config.mak
408382a4 1815echo "VHOOKSHFLAGS=$VHOOKSHFLAGS" >> config.mak
fbb9d104 1816echo "VHOOKLIBS=$VHOOKLIBS" >> config.mak
80581e98 1817echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak
b12f8273 1818echo "BUILD_STATIC=$lstatic" >> config.mak
eb94aca9 1819echo "BUILDSUF=$BUILDSUF" >> config.mak
f3ec2d46 1820echo "LIBPREF=$LIBPREF" >> config.mak
eb94aca9 1821echo "LIBSUF=\${BUILDSUF}$LIBSUF" >> config.mak
320d060a
DB
1822if test "$lstatic" = "yes" ; then
1823 echo "LIB=$LIB" >> config.mak
1a44a8b6
AS
1824else # Some Make complain if this variable does not exist.
1825 echo "LIB=" >> config.mak
320d060a 1826fi
f3ec2d46 1827echo "SLIBPREF=$SLIBPREF" >> config.mak
eb94aca9
CY
1828echo "SLIBSUF=\${BUILDSUF}$SLIBSUF" >> config.mak
1829echo "EXESUF=\${BUILDSUF}$EXESUF" >> config.mak
b2828252 1830echo "TARGET_OS=$targetos" >> config.mak
4dc62701
MR
1831
1832ucarch=`toupper $arch`
1833echo "TARGET_ARCH_${ucarch}=yes" >> config.mak
1834echo "#define ARCH_${ucarch} 1" >> $TMPH
1835
1836# special cases
1837case "$arch" in
1838 x86_32|x86_64)
1839 echo "TARGET_ARCH_X86=yes" >> config.mak
1840 echo "#define ARCH_X86 1" >> $TMPH
1841 ;;
1842 powerpc)
1843 if test "$POWERPCMODE" = "64bits"; then
1844 echo "#define POWERPC_MODE_64BITS 1" >> $TMPH
1845 fi
1846 if test "$powerpc_perf" = "yes"; then
1847 echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
1848 fi
1849 ;;
1850 sparc64)
1851 echo "TARGET_ARCH_SPARC=yes" >> config.mak
1852 echo "#define ARCH_SPARC 1" >> $TMPH
1853 ;;
1854esac
1855
0f3cb305
FB
1856if test "$bigendian" = "yes" ; then
1857 echo "WORDS_BIGENDIAN=yes" >> config.mak
1858 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
91d1f1a4 1859fi
57514323 1860if test "$mmx" = "yes" ; then
980fc7b8 1861 echo "TARGET_MMX=yes" >> config.mak
045ed63f 1862 echo "#define HAVE_MMX 1" >> $TMPH
e82c5a8c 1863 echo "#define __CPU__ 586" >> $TMPH
de6d9b64 1864fi
e7768fc5
GP
1865if test "$cmov" = "yes" ; then
1866 echo "TARGET_CMOV=yes" >> config.mak
1867 echo "#define HAVE_CMOV 1" >> $TMPH
1868fi
94e4c3a3
GP
1869if test "$cmov_is_fast" = "yes" ; then
1870 echo "TARGET_CMOV_IS_FAST=yes" >> config.mak
1871 echo "#define CMOV_IS_FAST 1" >> $TMPH
1872fi
1839e854
SS
1873if test "$armv5te" = "yes" ; then
1874 echo "TARGET_ARMV5TE=yes" >> config.mak
1875 echo "#define HAVE_ARMV5TE 1" >> $TMPH
1876fi
eba9ae3c
GB
1877if test "$iwmmxt" = "yes" ; then
1878 echo "TARGET_IWMMXT=yes" >> config.mak
1879 echo "#define HAVE_IWMMXT 1" >> $TMPH
1880fi
d46aba26
LS
1881if test "$mmi" = "yes" ; then
1882 echo "TARGET_MMI=yes" >> config.mak
1883 echo "#define HAVE_MMI 1" >> $TMPH
1884fi
87ea51e0 1885
ab6c65f6
BF
1886if test "$altivec" = "yes" ; then
1887 echo "TARGET_ALTIVEC=yes" >> config.mak
1888 echo "#define HAVE_ALTIVEC 1" >> $TMPH
f80f7964 1889fi
44161118 1890
a86b921c 1891if test "$sdl" = "yes" ; then
6a1a892f
FD
1892 echo "SDL_LIBS=`"${SDL_CONFIG}" --libs`" >> config.mak
1893 echo "SDL_CFLAGS=`"${SDL_CONFIG}" --cflags`" >> config.mak
a86b921c 1894fi
146ea952
NB
1895if test "$texi2html" = "yes"; then
1896 echo "BUILD_DOC=yes" >> config.mak
1897fi
5a872801 1898
790c9ca7 1899sws_version=`grep '#define LIBSWSCALE_VERSION ' "$source_path/libswscale/swscale.h" | sed 's/[^0-9\.]//g'`
6d9a2421 1900pp_version=`grep '#define LIBPOSTPROC_VERSION ' "$source_path/libpostproc/postprocess.h" | sed 's/[^0-9\.]//g'`
5a872801
LB
1901lavc_version=`grep '#define LIBAVCODEC_VERSION ' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9\.]//g'`
1902lavf_version=`grep '#define LIBAVFORMAT_VERSION ' "$source_path/libavformat/avformat.h" | sed 's/[^0-9\.]//g'`
1903lavu_version=`grep '#define LIBAVUTIL_VERSION ' "$source_path/libavutil/avutil.h" | sed 's/[^0-9\.]//g'`
1904
1905
1906
57514323 1907if test "$lshared" = "yes" ; then
0319c531 1908 echo "BUILD_SHARED=yes" >> config.mak
97006039 1909 echo "PIC=-fPIC -DPIC" >> config.mak
39503a27 1910 echo "SPPMAJOR=${lavc_version%%.*}" >> config.mak
5a872801 1911 echo "SPPVERSION=$lavc_version" >> config.mak
39503a27 1912 echo "LAVCMAJOR=${lavc_version%%.*}" >> config.mak
5a872801 1913 echo "LAVCVERSION=$lavc_version" >> config.mak
39503a27 1914 echo "LAVFMAJOR=${lavf_version%%.*}" >> config.mak
5a872801 1915 echo "LAVFVERSION=$lavf_version" >> config.mak
39503a27 1916 echo "LAVUMAJOR=${lavu_version%%.*}" >> config.mak
5a872801 1917 echo "LAVUVERSION=$lavu_version" >> config.mak
790c9ca7
LA
1918 echo "SWSMAJOR=${sws_version%%.*}" >> config.mak
1919 echo "SWSVERSION=$sws_version" >> config.mak
4bdd05e7 1920 echo "SLIBNAME=${SLIBNAME}" >> config.mak
f3b60109
DB
1921 echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak
1922 echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak
5cb854e1 1923 echo "SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}" >> config.mak
0319c531 1924fi
d7e27559 1925echo "LIB_INSTALL_EXTRA_CMD=${LIB_INSTALL_EXTRA_CMD}" >> config.mak
ef0bc4c9 1926echo "EXTRALIBS=$extralibs" >> config.mak
d2845d68 1927
44161118
MR
1928enabled_any $ENCODER_LIST && enable encoders
1929enabled_any $DECODER_LIST && enable decoders
1930enabled_any $MUXER_LIST && enable muxers
1931enabled_any $DEMUXER_LIST && enable demuxers
f956e129 1932
b265431e
MR
1933enabled_any pthreads beosthreads os2threads w32threads && enable threads
1934
44161118
MR
1935print_config HAVE_ $TMPH config.mak $HAVE_LIST
1936print_config CONFIG_ $TMPH config.mak $CONFIG_LIST
8ac17293 1937
b2828252 1938if test "$targetos" = "Darwin"; then
90cee0c3 1939 echo "#define CONFIG_DARWIN 1" >> $TMPH
90cee0c3
MN
1940fi
1941
c13e1abd
FH
1942echo "#define restrict $_restrict" >> $TMPH
1943
bb801c97
MN
1944if test "$optimize" = "small"; then
1945 echo "#define always_inline" >> $TMPH
e5f28e8f 1946 echo "#define CONFIG_SMALL 1" >> $TMPH
bb801c97
MN
1947fi
1948
997baf01
MR
1949echo "SRC_PATH=\"$source_path\"" >> config.mak
1950echo "SRC_PATH_BARE=$source_path" >> config.mak
1951echo "BUILD_ROOT=\"$PWD\"" >> config.mak
0f3cb305 1952
2a515c08
TM
1953if test "$amr_if2" = "yes" ; then
1954 echo "AMR_CFLAGS=-DIF2=1" >> config.mak
1955fi
1956
8156056e 1957# Apparently it's not possible to portably echo a backslash.
4454dc1b 1958if test "$asmalign_pot" = "yes" ; then
8156056e 1959 printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> $TMPH
4454dc1b 1960else
8156056e 1961 printf '#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\\n\\t"\n' >> $TMPH
4454dc1b
JD
1962fi
1963
bc634f6f 1964
55006fc0 1965for codec in $DECODER_LIST $ENCODER_LIST $PARSER_LIST $DEMUXER_LIST $MUXER_LIST; do
44161118 1966 ucname="`toupper $codec`"
a8d04fba
MR
1967 config_name="CONFIG_$ucname"
1968 enabled_name="ENABLE_$ucname"
1969 if enabled $codec; then
1970 echo "#define $config_name 1" >> $TMPH
1971 echo "#define $enabled_name 1" >> $TMPH
1972 echo "$config_name=yes" >> config.mak
1973 else
1974 echo "#define $enabled_name 0" >> $TMPH
1975 fi
009cf97d
MN
1976done
1977
9cb2cf10 1978# Do not overwrite config.h if unchanged to avoid superfluous rebuilds.
c683a5d1 1979if ! cmp -s $TMPH config.h; then
9cb2cf10
DB
1980 mv -f $TMPH config.h
1981else
1982 echo "config.h is unchanged"
1983fi
3d204385 1984
f3ec2d46 1985rm -f $TMPO $TMPC $TMPE $TMPS $TMPH
def4272a 1986
165af439
MR
1987# build tree in object directory if source path is different from current one
1988if test "$source_path_used" = "yes" ; then
1989 DIRS="\
1990 doc \
1991 libavformat \
1992 libavcodec \
1993 libavcodec/alpha \
1994 libavcodec/armv4l \
1995 libavcodec/bfin \
1996 libavcodec/i386 \
1997 libavcodec/sparc \
1998 libavcodec/mlib \
1999 libavcodec/ppc \
2000 libavcodec/liba52 \
2001 libpostproc \
2002 libavutil \
2003 libswscale \
2004 tests \
2005 vhook \
2006 "
2007 FILES="\
2008 Makefile \
2009 common.mak \
2010 libavformat/Makefile \
2011 libavcodec/Makefile \
2012 libpostproc/Makefile \
2013 libavutil/Makefile \
2014 libswscale/Makefile \
2015 tests/Makefile \
2016 vhook/Makefile \
2017 doc/Makefile \
2018 doc/texi2pod.pl \
2019 "
2020 for dir in $DIRS ; do
2021 mkdir -p $dir
2022 done
2023 for f in $FILES ; do
2024 ln -sf "$source_path/$f" $f
2025 done
2026fi
def4272a 2027
29799f8b 2028# build pkg-config files libav*.pc and libpostproc.pc
31abdc45 2029# libavutil.pc
2030cat <<EOF >libavutil.pc
2266e085 2031prefix=$PREFIX
a94e666c 2032exec_prefix=\${prefix}
31abdc45 2033libdir=\${exec_prefix}/lib
a94e666c 2034includedir=\${prefix}/include
31abdc45 2035
2036Name: libavutil
2037Description: FFmpeg utility library
2038Version: $lavu_version
115329f1 2039Requires:
31abdc45 2040Conflicts:
2041Libs: -L\${libdir} -lavutil
2042Cflags: -I\${includedir} -I\${includedir}/ffmpeg
2043EOF
2044
2045cat <<EOF >libavutil-uninstalled.pc
2046prefix=
2047exec_prefix=
2048libdir=\${pcfiledir}/libavutil
2049includedir=\${pcfiledir}/libavutil
2050
2051Name: libavutil
2052Description: FFmpeg utility library
2053Version: $lavu_version
115329f1 2054Requires:
31abdc45 2055Conflicts:
2056Libs: \${libdir}/${LIBPREF}avutil${LIBSUF}
2057Cflags: -I\${includedir}
2058EOF
def4272a
AJ
2059
2060# libavcodec.pc
2061cat <<EOF >libavcodec.pc
2266e085 2062prefix=$PREFIX
a94e666c 2063exec_prefix=\${prefix}
def4272a 2064libdir=\${exec_prefix}/lib
a94e666c 2065includedir=\${prefix}/include
def4272a
AJ
2066
2067Name: libavcodec
2068Description: FFmpeg codec library
31abdc45 2069Version: $lavc_version
c99dd233 2070Requires: $pkg_requires libavutil = $lavu_version
def4272a
AJ
2071Conflicts:
2072Libs: -L\${libdir} -lavcodec $extralibs
2073Cflags: -I\${includedir} -I\${includedir}/ffmpeg
2074EOF
2075
2076cat <<EOF >libavcodec-uninstalled.pc
2077prefix=
2078exec_prefix=
2079libdir=\${pcfiledir}/libavcodec
2080includedir=\${pcfiledir}/libavcodec
2081
2082Name: libavcodec
2083Description: FFmpeg codec library
31abdc45 2084Version: $lavc_version
c99dd233 2085Requires: $pkg_requires libavutil = $lavu_version
def4272a
AJ
2086Conflicts:
2087Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} $extralibs
2088Cflags: -I\${includedir}
2089EOF
2090
2091# libavformat.pc
2092cat <<EOF >libavformat.pc
2266e085 2093prefix=$PREFIX
a94e666c 2094exec_prefix=\${prefix}
def4272a 2095libdir=\${exec_prefix}/lib
a94e666c 2096includedir=\${prefix}/include
def4272a
AJ
2097
2098Name: libavformat
2099Description: FFmpeg container format library
31abdc45 2100Version: $lavf_version
c99dd233 2101Requires: $pkg_requires libavcodec = $lavc_version
def4272a
AJ
2102Conflicts:
2103Libs: -L\${libdir} -lavformat $extralibs
2104Cflags: -I\${includedir} -I\${includedir}/ffmpeg
2105EOF
2106
2107cat <<EOF >libavformat-uninstalled.pc
2108prefix=
2109exec_prefix=
2110libdir=\${pcfiledir}/libavformat
2111includedir=\${pcfiledir}/libavformat
2112
2113Name: libavformat
2114Description: FFmpeg container format library
31abdc45 2115Version: $lavf_version
c99dd233 2116Requires: $pkg_requires libavcodec = $lavc_version
def4272a
AJ
2117Conflicts:
2118Libs: \${libdir}/${LIBPREF}avformat${LIBSUF} $extralibs
2119Cflags: -I\${includedir}
2120EOF
2121
2122
2123# libpostproc.pc
2124cat <<EOF >libpostproc.pc
2266e085 2125prefix=$PREFIX
a94e666c 2126exec_prefix=\${prefix}
def4272a 2127libdir=\${exec_prefix}/lib
a94e666c 2128includedir=\${prefix}/include
def4272a
AJ
2129
2130Name: libpostproc
2131Description: FFmpeg post processing library
31abdc45 2132Version: $lavc_version
115329f1 2133Requires:
def4272a
AJ
2134Conflicts:
2135Libs: -L\${libdir} -lpostproc
2136Cflags: -I\${includedir} -I\${includedir}/postproc
2137EOF
2138
2139cat <<EOF >libpostproc-uninstalled.pc
2140prefix=
2141exec_prefix=
6d9a2421
DB
2142libdir=\${pcfiledir}/libpostproc
2143includedir=\${pcfiledir}/libpostproc
def4272a
AJ
2144
2145Name: libpostproc
2146Description: FFmpeg post processing library
31abdc45 2147Version: $lavc_version
115329f1 2148Requires:
def4272a
AJ
2149Conflicts:
2150Libs: \${libdir}/${LIBPREF}postproc${LIBSUF}
2151Cflags: -I\${includedir}
2152EOF
790c9ca7 2153
6c0d0413 2154if test "$swscaler" != "no"; then
2155 sws_pc_libs="-L\${libdir} -lswscale"
2156 sws_pc_uninstalled_libs="\${libdir}/${LIBPREF}swscale${LIBSUF}"
2157 sws_pc_requires="$pkg_requires libavutil = $lavu_version"
2158else
2159 sws_pc_libs=""
2160 sws_pc_uninstalled_libs=""
2161 sws_pc_requires="$pkg_requires libavcodec = $lavc_version"
2162fi
790c9ca7
LA
2163# libswscale.pc
2164cat <<EOF >libswscale.pc
2165prefix=$PREFIX
2166exec_prefix=\${prefix}
2167libdir=\${exec_prefix}/lib
2168includedir=\${prefix}/include
2169
2170Name: libswscale
2171Description: FFmpeg image rescaling library
2172Version: $sws_version
6c0d0413 2173Requires: $sws_pc_requires
790c9ca7 2174Conflicts:
6c0d0413 2175Libs: $sws_pc_libs
790c9ca7
LA
2176Cflags: -I\${includedir} -I\${includedir}/swscale
2177EOF
2178
2179cat <<EOF >libswscale-uninstalled.pc
2180prefix=
2181exec_prefix=
2182libdir=\${pcfiledir}/libswscale
2183includedir=\${pcfiledir}/libswscale
2184
2185Name: libswscale
2186Description: FFmpeg image rescaling library
2187Version: $sws_version
6c0d0413 2188Requires: $sws_pc_requires
790c9ca7 2189Conflicts:
6c0d0413 2190Libs: $sws_pc_uninstalled_libs
790c9ca7
LA
2191Cflags: -I\${includedir}
2192EOF