3 # ffmpeg configure script (c) 2000, 2001, 2002 Fabrice Bellard
6 # make sure we are running under a compatible shell
8 (: ${foo%%bar}) 2>/dev/null && ! (: ${foo?}) 2>/dev/null
9 if test "$?" != 0; then
10 if test "x$FFMPEG_CONFIGURE_EXEC" = x; then
11 FFMPEG_CONFIGURE_EXEC=1
12 export FFMPEG_CONFIGURE_EXEC
15 exec /usr/xpg4/bin/sh "$0" "$@"
17 echo "No compatible shell script interpreter found."
22 echo "Usage: configure [options]"
23 echo "Options: [defaults in brackets after descriptions]"
25 echo "Standard options:"
26 echo " --help print this message"
27 echo " --log[=FILE|yes|no] log tests and output to FILE [config.err]"
28 echo " --prefix=PREFIX install in PREFIX [$PREFIX]"
29 echo " --libdir=DIR install libs in DIR [PREFIX/lib]"
30 echo " --shlibdir=DIR install shared libs in DIR [PREFIX/lib]"
31 echo " --incdir=DIR install includes in DIR [PREFIX/include/ffmpeg]"
32 echo " --mandir=DIR install man page in DIR [PREFIX/man]"
33 echo " --enable-mp3lame enable MP3 encoding via libmp3lame [default=no]"
34 echo " --enable-libnut enable NUT support via libnut [default=no]"
35 echo " --enable-libogg enable Ogg support via libogg [default=no]"
36 echo " --enable-vorbis enable Vorbis support via libvorbis [default=no]"
37 echo " --enable-faad enable FAAD support via libfaad [default=no]"
38 echo " --enable-faadbin build FAAD support with runtime linking [default=no]"
39 echo " --enable-faac enable FAAC support via libfaac [default=no]"
40 echo " --enable-libgsm enable GSM support via libgsm [default=no]"
41 echo " --enable-xvid enable XviD support via xvidcore [default=no]"
42 echo " --enable-x264 enable H.264 encoding via x264 [default=no]"
43 echo " --enable-mingw32 enable MinGW native/cross Windows compile"
44 echo " --enable-mingwce enable MinGW native/cross WinCE compile"
45 echo " --enable-a52 enable GPLed A52 support [default=no]"
46 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
47 echo " --enable-dts enable GPLed DTS support [default=no]"
48 echo " --enable-pp enable GPLed postprocessing support [default=no]"
49 echo " --enable-static build static libraries [default=yes]"
50 echo " --disable-static do not build static libraries [default=no]"
51 echo " --enable-shared build shared libraries [default=no]"
52 echo " --disable-shared do not build shared libraries [default=yes]"
53 echo " --enable-amr_nb enable amr_nb float audio codec"
54 echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
55 echo " --enable-amr_wb enable amr_wb float audio codec"
56 echo " --enable-amr_if2 enable amr_wb IF2 audio codec"
57 echo " --enable-sunmlib use Sun medialib [default=no]"
58 echo " --enable-pthreads use pthreads [default=no]"
59 echo " --enable-dc1394 enable IIDC-1394 grabbing using libdc1394"
60 echo " and libraw1394 [default=no]"
61 echo " --enable-swscaler software scaler support [default=no]"
62 echo " --enable-avisynth allow reading AVISynth script files [default=no]"
63 echo " --enable-gpl allow use of GPL code, the resulting libav*"
64 echo " and ffmpeg will be under GPL [default=no]"
66 echo "Advanced options (experts only):"
67 echo " --source-path=PATH path to source code [$source_path]"
68 echo " --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]"
69 echo " --cross-compile assume a cross-compiler is used"
70 echo " --cc=CC use C compiler CC [$cc]"
71 echo " --make=MAKE use specified make [$make]"
72 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
73 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
74 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
75 echo " --build-suffix=SUFFIX suffix for application specific build []"
76 echo " --arch=ARCH select architecture [$arch]"
77 echo " --cpu=CPU selects the minimum cpu required (affects
78 instruction selection, may crash on older CPUs)"
79 echo " --powerpc-perf-enable enable performance report on PPC"
80 echo " (requires enabling PMC)"
81 echo " --disable-mmx disable MMX usage"
82 echo " --disable-armv5te disable armv5te usage"
83 echo " --disable-iwmmxt disable iwmmxt usage"
84 echo " --disable-altivec disable AltiVec usage"
85 echo " --disable-audio-oss disable OSS audio support [default=no]"
86 echo " --disable-audio-beos disable BeOS audio support [default=no]"
87 echo " --disable-v4l disable video4linux grabbing [default=no]"
88 echo " --disable-v4l2 disable video4linux2 grabbing [default=no]"
89 echo " --disable-bktr disable bktr video grabbing [default=no]"
90 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
91 echo " --disable-network disable network support [default=no]"
92 echo " --disable-ipv6 disable ipv6 support [default=no]"
93 echo " --disable-zlib disable zlib [default=no]"
94 echo " --disable-vhook disable video hooking support"
95 echo " --enable-gprof enable profiling with gprof [$gprof]"
96 echo " --disable-debug disable debugging symbols"
97 echo " --disable-opts disable compiler optimizations"
98 echo " --enable-extra-warnings enable more compiler warnings"
99 echo " --disable-mpegaudio-hp faster (but less accurate)"
100 echo " MPEG audio decoding [default=no]"
101 echo " --disable-protocols disable I/O protocols support [default=no]"
102 echo " --disable-ffmpeg disable ffmpeg build"
103 echo " --disable-ffserver disable ffserver build"
104 echo " --disable-ffplay disable ffplay build"
105 echo " --enable-small optimize for size instead of speed"
106 echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers"
107 echo " --disable-strip disable stripping of executables and shared libraries"
108 echo " --disable-encoder=NAME disables encoder NAME"
109 echo " --enable-encoder=NAME enables encoder NAME"
110 echo " --disable-decoder=NAME disables decoder NAME"
111 echo " --enable-decoder=NAME enables decoder NAME"
112 echo " --disable-encoders disables all encoders"
113 echo " --disable-decoders disables all decoders"
114 echo " --disable-muxer=NAME disables muxer NAME"
115 echo " --enable-muxer=NAME enables muxer NAME"
116 echo " --disable-muxers disables all muxers"
117 echo " --disable-demuxer=NAME disables demuxer NAME"
118 echo " --enable-demuxer=NAME enables demuxer NAME"
119 echo " --disable-demuxers disables all demuxers"
120 echo " --enable-parser=NAME enables parser NAME"
121 echo " --disable-parser=NAME disables parser NAME"
122 echo " --disable-parsers disables all parsers"
124 echo "NOTE: Object files are built at the place where configure is launched."
146 If you think configure made a mistake, make sure you are using the latest
147 version from SVN. If the latest version fails, report the problem to the
148 ffmpeg-devel@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
150 if enabled logging; then
152 Include the log file "$logfile" produced by configure as this will help
157 Rerun configure with logging enabled (do not use --log=no), and include the
158 log this produces with your report.
161 rm -f $TMPC $TMPO $TMPE $TMPS $TMPH
182 eval test "\$$1" = "yes"
186 (: ${SAVE_CFLAGS?}) 2>/dev/null
190 flags_saved && return
191 SAVE_CFLAGS="$CFLAGS"
192 SAVE_LDFLAGS="$LDFLAGS"
193 SAVE_extralibs="$extralibs"
197 CFLAGS="$SAVE_CFLAGS"
198 LDFLAGS="$SAVE_LDFLAGS"
199 extralibs="$SAVE_extralibs"
212 LDFLAGS="$LDFLAGS $*"
217 extralibs="$extralibs $*"
223 flags_saved && eval "SAVE_$var=\"\$SAVE_$var $*\""
224 eval "$var=\"\$$var $*\""
236 append extralibs "$@"
248 check_cmd $cc $CFLAGS "$@" -c -o $TMPO $TMPC
255 check_cmd $cc $CFLAGS "$@" -E -o $TMPO $TMPC
261 check_cmd $cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs
265 log check_cflags "$@"
266 check_cc "$@" <<EOF && add_cflags "$@"
272 log check_ldflags "$@"
273 check_ld "$@" <<EOF && add_ldflags "$@"
281 log check_header "$@"
308 check_header $header && check_func $func && add_extralibs "$@"
315 check_ld "$@" && { test "$cross_compile" = yes || $TMPE >>$logfile 2>&1; }
323 check_lib $header $func "$@" || die "ERROR: $name not found"
326 # set temporary file name
327 if test ! -z "$TMPDIR" ; then
329 elif test ! -z "$TEMPDIR" ; then
335 TMPC="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
336 TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
337 TMPE="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}"
338 TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
339 TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
345 libdir='${PREFIX}/lib'
347 incdir='${PREFIX}/include/ffmpeg'
348 mandir='${PREFIX}/man'
349 bindir='${PREFIX}/bin'
369 i386|i486|i586|i686|i86pc|BePC)
374 canon_arch="`$cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`"
375 if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then
376 if [ -z "`echo $CFLAGS | grep -- -m32`" ]; then
381 # armv4l is a subset of armv[567]*l
388 "Power Macintosh"|ppc|ppc64|powerpc)
466 SHFLAGS='-shared -Wl,-soname,$@'
467 VHOOKSHFLAGS='$(SHFLAGS)'
475 FFLDFLAGS=-Wl,--warn-common
476 LDLATEFLAGS='-Wl,-rpath-link,\$(BUILD_ROOT)/libavcodec -Wl,-rpath-link,\$(BUILD_ROOT)/libavformat -Wl,-rpath-link,\$(BUILD_ROOT)/libavutil'
477 FFSERVERLDFLAGS=-Wl,-E
481 LIB='$(LIBPREF)$(NAME)$(LIBSUF)'
484 SLIBNAME='$(SLIBPREF)$(NAME)$(SLIBSUF)'
485 SLIBNAME_WITH_VERSION='$(SLIBNAME).$(LIBVERSION)'
486 SLIBNAME_WITH_MAJOR='$(SLIBNAME).$(LIBMAJOR)'
498 asmalign_pot="unknown"
499 LIB_INSTALL_EXTRA_CMD='$(RANLIB) "$(libdir)/$(LIB)"'
505 PREFIX="/boot/home/config"
506 # helps building libavcodec
507 add_cflags "-DPIC -fomit-frame-pointer"
508 # 3 gcc releases known for BeOS, each with ugly bugs
509 gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
510 case "$gcc_version" in
511 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
514 *20010315*) echo "BeBits gcc"
515 add_cflags "-fno-expensive-optimizations"
519 # disable Linux things
526 # no need for libm, but the inet stuff
528 if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
529 extralibs="-lbind -lsocket"
543 SHFLAGS="-shared -Wl,-h,\$@"
545 add_extralibs "-lsocket -lnsl"
554 add_extralibs "-lossaudio"
563 LIBOBJFLAGS="\$(PIC)"
564 LDCONFIG="ldconfig -m \$(shlibdir)"
565 add_extralibs "-lossaudio"
574 add_cflags "-pthread"
582 add_cflags "-pthread"
590 extralibs="-lpoll -lgnugetopt -lm"
601 SHFLAGS="-dynamiclib -Wl,-single_module -Wl,-install_name,\$(shlibdir)/\$(SLIBNAME),-current_version,\$(SPPVERSION),-compatibility_version,\$(SPPVERSION)"
602 VHOOKSHFLAGS='-dynamiclib -Wl,-single_module -flat_namespace -undefined suppress -Wl,-install_name,$(shlibdir)/vhook/$@'
606 FFLDFLAGS="-Wl,-dynamic,-search_paths_first"
608 SLIBNAME_WITH_FULLVERSION='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)'
609 SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME).$(LIBMAJOR)$(SLIBSUF)'
610 FFSERVERLDFLAGS=-Wl,-bind_at_load
611 LIB_INSTALL_EXTRA_CMD='$(RANLIB) "$(libdir)/$(LIB)"'
614 # Note: the rest of the mingw32 config is done afterwards as mingw32
615 # can be forced on the command line for Linux cross compilation.
620 shlibdir='${PREFIX}/bin'
625 VHOOKSHFLAGS='-shared -L$(BUILD_ROOT)/libavformat -L$(BUILD_ROOT)/libavcodec -L$(BUILD_ROOT)/libavutil'
626 VHOOKLIBS='-lavformat$(BUILDSUF) -lavcodec$(BUILDSUF) -lavutil$(BUILDSUF) $(EXTRALIBS)'
631 SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
632 SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)'
633 SHFLAGS='-shared -Wl,--out-implib=lib$(NAME).dll.a'
636 LDLATEFLAGS="-Wl,--as-needed $LDLATEFLAGS"
640 ranlib="echo ignoring ranlib"
649 ranlib="echo ignoring ranlib"
650 strip="echo ignoring strip"
652 FFLDFLAGS="-Zomf -Zstack 16384 -s"
653 SHFLAGS="-Zdll -Zomf"
672 targetos="${targetos}-UNKNOWN"
677 source_path="`dirname \"$0\"`"
678 source_path_used="yes"
679 if test -z "$source_path" -o "$source_path" = "." ; then
681 source_path_used="no"
683 source_path="`cd \"$source_path\"; pwd`"
684 echo "$source_path" | grep -q '[[:blank:]]' &&
685 die "Out of tree builds are impossible with whitespace in source path."
688 if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
692 FFMPEG_CONFIGURATION=" "
694 FFMPEG_CONFIGURATION="$FFMPEG_CONFIGURATION""$opt "
697 ENCODER_LIST=`grep 'register_avcodec(&[a-z0-9_]*_encoder)' "$source_path/libavcodec/allcodecs.c" | sed 's/.*&\(.*\)).*/\1/'`
698 DECODER_LIST=`grep 'register_avcodec(&[a-z0-9_]*_decoder)' "$source_path/libavcodec/allcodecs.c" | sed 's/.*&\(.*\)).*/\1/'`
699 PARSER_LIST=`grep 'av_register_codec_parser(&[a-z]' "$source_path/libavcodec/allcodecs.c" | sed 's/.*&\(.*\)).*/\1/'`
700 MUXER_LIST=`grep 'av_register_output_format(&[a-z]' "$source_path/libavformat/allformats.c" | sed 's/.*&\(.*\)).*/\1/'`
701 DEMUXER_LIST=`grep 'av_register_input_format(&[a-z]' "$source_path/libavformat/allformats.c" | sed 's/.*&\(.*\)).*/\1/'`
703 enable $ENCODER_LIST $DECODER_LIST $PARSER_LIST $MUXER_LIST $DEMUXER_LIST
710 --log=*) logging="$optval"
712 --prefix=*) PREFIX="$optval"; force_prefix=yes
714 --libdir=*) libdir="$optval"; force_libdir=yes
716 --shlibdir=*) shlibdir="$optval"
718 --incdir=*) incdir="$optval"
720 --mandir=*) mandir="$optval"
722 --source-path=*) source_path="$optval"
724 --cross-prefix=*) cross_prefix="$optval"
726 --cross-compile) cross_compile=yes
730 --make=*) make="$optval"
732 --extra-cflags=*) add_cflags "$optval"
734 --extra-ldflags=*) add_ldflags "$optval"
736 --extra-libs=*) add_extralibs "$optval"
738 --build-suffix=*) BUILDSUF="$optval"
740 --arch=*) arch="$optval"
742 --cpu=*) cpu="$optval"
744 --powerpc-perf-enable) powerpc_perf="yes"
746 --disable-mmx) mmx="no"
748 --disable-armv5te) armv5te="no"
750 --disable-iwmmxt) iwmmxt="no"
752 --disable-altivec) altivec="no"
754 --enable-gprof) gprof="yes"
756 --disable-v4l) v4l="no"
758 --disable-v4l2) v4l2="no"
760 --disable-bktr) bktr="no"
762 --disable-audio-oss) audio_oss="no"
764 --disable-audio-beos) audio_beos="no"
766 --disable-dv1394) dv1394="no"
768 --disable-network) network="no"; ffserver="no"
770 --disable-ipv6) ipv6="no";
772 --disable-zlib) zlib="no"
774 --enable-a52) a52="yes"
776 --enable-a52bin) a52bin="yes"
778 --enable-dts) dts="yes"
780 --enable-pp) pp="yes"
782 --enable-libgsm) libgsm="yes"
784 --enable-mp3lame) mp3lame="yes"
786 --enable-libnut) libnut="yes"
788 --enable-libogg) libogg="yes"
789 pkg_requires="$pkg_requires ogg >= 1.1"
791 --enable-vorbis) libvorbis="yes"
792 pkg_requires="$pkg_requires vorbis vorbisenc"
794 --enable-faad) faad="yes"
796 --enable-faadbin) faadbin="yes"
798 --enable-faac) faac="yes"
800 --enable-xvid) xvid="yes"
802 --enable-x264) x264="yes"
804 --enable-avisynth) avisynth="yes";
806 --enable-dc1394) dc1394="yes"
807 pkg_requires="$pkg_requires libraw1394"
809 --disable-vhook) vhook="no"
811 --enable-mingw32) mingw32="yes"
813 --enable-mingwce) mingwce="yes"
815 --enable-static) lstatic="yes"
817 --disable-static) lstatic="no"
819 --enable-shared) lshared="yes"
821 --disable-shared) lshared="no"
823 --disable-debug) debug="no"
825 --disable-opts) optimize="no"
827 --enable-extra-warnings) extrawarnings="yes"
829 --disable-mpegaudio-hp) mpegaudio_hp="no"
831 --disable-protocols) protocols="no"; network="no"; ffserver="no"
833 --disable-ffmpeg) ffmpeg="no"
835 --disable-ffserver) ffserver="no"
837 --disable-ffplay) ffplay="no"
839 --enable-small) optimize="small"
841 --enable-amr_nb) amr="yes"; amr_nb="yes"; amr_nb_fixed="no"
843 --enable-amr_nb-fixed) amr="yes"; amr_nb_fixed="yes"; amr_nb="no"
845 --enable-amr_wb) amr="yes"; amr_wb="yes"
847 --enable-amr_if2) amr="yes"; amr_if2="yes"
849 --enable-sunmlib) mlib="yes"
851 --enable-pthreads) pthreads="yes"
853 --enable-swscaler) swscaler="yes"
855 --enable-gpl) gpl="yes"
857 --enable-memalign-hack) memalignhack="yes"
859 --disable-strip) dostrip="no"
861 --enable-encoder=*) enable ${optval}_encoder
863 --enable-decoder=*) enable ${optval}_decoder
865 --disable-encoder=*) disable ${optval}_encoder
867 --disable-decoder=*) disable ${optval}_decoder
869 --disable-encoders) disable $ENCODER_LIST
871 --disable-decoders) disable $DECODER_LIST
873 --enable-muxer=*) enable ${optval}_muxer
875 --disable-muxer=*) disable ${optval}_muxer
877 --disable-muxers) disable $MUXER_LIST; ffserver="no"
879 --enable-demuxer=*) enable ${optval}_demuxer
881 --disable-demuxer=*) disable ${optval}_demuxer
883 --disable-demuxers) disable $DEMUXER_LIST
885 --enable-parser=*) enable ${optval}_parser
887 --disable-parser=*) disable ${optval}_parser
889 --disable-parsers) disable $PARSER_LIST
894 echo "Unknown option \"$opt\"."
895 echo "See $0 --help for available options."
901 if test "$logging" != no; then
902 test "$logging" = yes || logfile="$logging"
903 echo "# $0 $@" >$logfile
909 if test "$mingw32" = "yes" -o "$mingwce" = "yes"; then
910 if test "$lshared" = "yes" && test "$lstatic" = "yes" ; then
912 You can only build one library type at once on MinGW.
913 Specify --disable-static --enable-shared to only build
914 the shared libraries. To build only the static libraries
915 you do not need to pass additional options.
927 if test "$mingwce" = "yes"; then
933 SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
934 SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)'
935 SLIB_EXTRA_CMD="-lib /machine:i386 /def:\$(@:${SLIBSUF}=.def)"
936 SHFLAGS="-shared -Wl,--output-def,\$(@:${SLIBSUF}=.def),--out-implib,lib\$(SLIBNAME:\$(SLIBSUF)=.dll.a)"
937 if test "$force_prefix" != yes; then PREFIX="$PROGRAMFILES/FFmpeg"; fi
938 if test "$force_libdir" != yes; then bindir='${PREFIX}'; fi
942 # Combine FFLDFLAGS and the LDFLAGS environment variable.
943 LDFLAGS="$FFLDFLAGS $LDFLAGS"
945 test -n "$cross_prefix" && cross_compile=yes
946 cc="${cross_prefix}${cc}"
947 ar="${cross_prefix}${ar}"
948 ranlib="${cross_prefix}${ranlib}"
949 strip="${cross_prefix}${strip}"
951 # we need to build at least one lib type
952 if test "$lstatic" = "no" && test "$lshared" = "no" ; then
954 At least one library type must be built.
955 Specify --enable-static to build the static libraries or --enable-shared to
956 build the shared libraries as well. To only build the shared libraries specify
957 --disable-static in addition to --enable-shared.
962 if test "$libvorbis" = "yes" ; then
963 if test "$libogg" = "no"; then
964 echo "libogg must be enabled to enable Vorbis."
969 if test "$gpl" != "yes"; then
970 if test "$pp" != "no"; then
971 echo "The Postprocessing code is under GPL and --enable-gpl is not specified."
975 if test "$a52" != "no" -o "$a52bin" != "no"; then
976 echo "liba52 is under GPL and --enable-gpl is not specified."
980 if test "$xvid" != "no"; then
981 echo "libxvidcore is under GPL and --enable-gpl is not specified."
985 if test "$x264" != "no"; then
986 echo "x264 is under GPL and --enable-gpl is not specified."
990 if test "$dts" != "no"; then
991 echo "libdts is under GPL and --enable-gpl is not specified."
995 if test "$faad" != "no" -o "$faadbin" != "no"; then
996 if check_header faad.h; then
999 #ifndef FAAD2_VERSION
1002 int main( void ) { return 0; }
1004 if test $? = 0 ; then
1005 echo "FAAD2 is under GPL and --enable-gpl is not specified."
1011 echo "FAAD test failed."
1015 if test "$swscaler" != "no"; then
1016 echo "The software scaler is under GPL and --enable-gpl is not specified."
1021 if test "$fail" = "yes"; then
1026 if test $mmx = "default"; then
1027 if test $arch = "x86_32" -o $arch = "x86_64"; then
1035 needmdynamicnopic="no"
1036 if test $targetos = Darwin; then
1037 if test -n "`$cc -v 2>&1 | grep xlc`"; then
1038 add_cflags "-qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
1040 gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
1041 case "$gcc_version" in
1043 add_cflags "-no-cpp-precomp -pipe"
1046 add_cflags "-no-cpp-precomp -pipe -force_cpusubtype_ALL -Wno-sign-compare"
1047 if test "$lshared" = no; then
1048 needmdynamicnopic="yes"
1052 add_cflags "-no-cpp-precomp -pipe"
1053 if test "$lshared" = no; then
1054 needmdynamicnopic="yes"
1061 if test $optimize != "no"; then
1062 add_cflags "-fomit-frame-pointer"
1065 # Can only do AltiVec on PowerPC
1066 if test $altivec = "default"; then
1067 if test $arch = "powerpc"; then
1074 # Add processor-specific flags
1076 POWERPCMODE="32bits"
1077 if test $cpu != "generic"; then
1079 601|ppc601|PowerPC601)
1080 add_cflags "-mcpu=601"
1081 if test $altivec = "yes"; then
1082 echo "WARNING: Tuning for PPC601 but AltiVec enabled!";
1086 603*|ppc603*|PowerPC603*)
1087 add_cflags "-mcpu=603"
1088 if test $altivec = "yes"; then
1089 echo "WARNING: Tuning for PPC603 but AltiVec enabled!";
1093 604*|ppc604*|PowerPC604*)
1094 add_cflags "-mcpu=604"
1095 if test $altivec = "yes"; then
1096 echo "WARNING: Tuning for PPC604 but AltiVec enabled!";
1100 G3|g3|75*|ppc75*|PowerPC75*)
1101 add_cflags "-mcpu=750 -mpowerpc-gfxopt"
1102 if test $altivec = "yes"; then
1103 echo "WARNING: Tuning for PPC75x but AltiVec enabled!";
1107 G4|g4|745*|ppc745*|PowerPC745*)
1108 add_cflags "-mcpu=7450 -mpowerpc-gfxopt"
1109 if test $altivec = "no"; then
1110 echo "WARNING: Tuning for PPC745x but AltiVec disabled!";
1114 74*|ppc74*|PowerPC74*)
1115 add_cflags "-mcpu=7400 -mpowerpc-gfxopt"
1116 if test $altivec = "no"; then
1117 echo "WARNING: Tuning for PPC74xx but AltiVec disabled!";
1121 G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
1122 add_cflags "-mcpu=970 -mpowerpc-gfxopt -mpowerpc64"
1123 if test $altivec = "no"; then
1124 echo "WARNING: Tuning for PPC970 but AltiVec disabled!";
1127 POWERPCMODE="64bits"
1129 # targets that do NOT support conditional mov (cmov)
1130 i[345]86|pentium|pentium-mmx|k6|k6-[23]|winchip-c6|winchip2|c3)
1131 add_cflags "-march=$cpu"
1134 # targets that do support conditional mov (cmov)
1135 i686|pentiumpro|pentium[23]|pentium-m|athlon|athlon-tbird|athlon-4|athlon-[mx]p|athlon64|k8|opteron|athlon-fx)
1136 add_cflags "-march=$cpu"
1140 # targets that do support conditional mov but on which it's slow
1141 pentium4|prescott|nocona)
1142 add_cflags "-march=$cpu"
1147 add_cflags "-mcpu=v9"
1150 echo "WARNING: Unknown CPU \"$cpu\", ignored."
1155 # make sure we can execute files in $TMPDIR
1156 cat >$TMPE 2>>$logfile <<EOF
1159 chmod +x $TMPE >>$logfile 2>&1
1160 if ! $TMPE >>$logfile 2>&1; then
1162 Unable to create and execute files in $TMPDIR1. Set the TMPDIR environment
1163 variable to another directory and make sure that $TMPDIR1 is not mounted
1166 die "Sanity test failed."
1170 # compiler sanity check
1176 if test "$?" != 0; then
1177 echo "$cc is unable to create an executable file."
1178 if test -z "$cross_prefix" -a "$cross_compile" = no; then
1179 echo "If $cc is a cross-compiler, use the --cross-compile option."
1180 echo "Only do this if you know what cross compiling means."
1182 die "C compiler test failed."
1185 # check for assembler specific support
1187 if test $arch = "powerpc"; then
1188 check_cc <<EOF && dcbzl=yes
1190 register long zero = 0;
1192 asm volatile("dcbzl %0, %1" : : "b" (data), "r" (zero));
1198 # check for SIMD availability
1200 # AltiVec flags: The FSF version of GCC differs from the Apple version
1201 if test $arch = "powerpc"; then
1202 if test $altivec = "yes"; then
1203 if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
1204 add_cflags "-faltivec"
1206 add_cflags "-maltivec -mabi=altivec"
1211 check_header altivec.h && _altivec_h=yes || _altivec_h=no
1213 # check if our compiler supports Motorola AltiVec C API
1214 if test $altivec = "yes"; then
1215 if test $_altivec_h = "yes"; then
1216 inc_altivec_h="#include <altivec.h>"
1220 check_cc <<EOF || altivec=no
1223 vector signed int v1, v2, v3;
1224 v1 = vec_add(v2,v3);
1230 # check armv5te instructions support
1231 if test $armv5te = "default" -a $arch = "armv4l"; then
1233 check_cc <<EOF && armv5te=yes
1235 __asm__ __volatile__ ("qadd r0, r0, r0");
1240 # check iwmmxt support
1241 if test $iwmmxt = "default" -a $arch = "armv4l"; then
1243 check_cc <<EOF && iwmmxt=yes
1245 __asm__ __volatile__ ("wunpckelub wr6, wr4");
1250 # mmi only available on mips
1251 if test $mmi = "default"; then
1252 if test $arch = "mips"; then
1259 # check if our compiler supports mmi
1260 enabled mmi && check_cc <<EOF || mmi="no"
1262 __asm__ ("lq \$2, 0(\$2)");
1268 # big/little-endian test
1269 if test "$cross_compile" = "no"; then
1270 check_ld <<EOF || die "endian test failed" && $TMPE && bigendian="yes"
1271 #include <inttypes.h>
1272 int main(int argc, char ** argv){
1273 volatile uint32_t i=0x01234567;
1274 return (*((uint8_t*)(&i))) == 0x67;
1278 # programs cannot be launched if cross compiling, so make a static guess
1279 if test "$arch" = "powerpc" -o "$arch" = "mips" ; then
1286 check_header inttypes.h || inttypes=no
1290 check_cc <<EOF || emu_fast_int=yes
1291 #include <inttypes.h>
1292 int main(int argc, char ** argv){
1293 volatile uint_fast64_t i=0x01234567;
1299 # check availability of some header files
1303 if check_header malloc.h; then
1306 check_func memalign || memalign="no"
1309 if test "$memalign" = "no" -a "$mmx" = "yes" -a \
1310 "$memalignhack" != "yes" -a "$targetos" != "Darwin" -a \
1311 "$targetos" != "FreeBSD" ; then
1312 die "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
1315 check_header byteswap.h && byteswap_h=yes || byteswap_h=no
1317 check_func localtime_r && localtime_r=yes || localtime_r=no
1318 enabled zlib && check_lib zlib.h zlibVersion -lz || zlib="no"
1320 # check for some common methods of building with pthread support
1321 # do this before the optional library checks as some of them require pthreads
1322 if enabled pthreads; then
1323 { check_cflags -pthread && check_ldflags -pthread; } ||
1324 { check_cflags -pthreads && check_ldflags -pthreads; } ||
1325 check_lib pthread.h pthread_create -lpthread ||
1326 check_func pthread_create ||
1327 die "ERROR: can't find pthreads library"
1330 # these are off by default, so fail if requested and not available
1331 enabled dts && require libdts dts.h dts_init -ldts -lm
1332 enabled libgsm && require libgsm gsm.h gsm_create -lgsm
1333 enabled mp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm
1334 enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbis -lvorbisenc -logg
1335 enabled libogg && require libogg ogg/ogg.h ogg_sync_init -logg
1336 enabled libnut && require libnut nut.h nut_demuxer_init -lnut
1337 enabled xvid && require XviD xvid.h xvid_global -lxvidcore
1338 enabled x264 && require x264 x264.h x264_encoder_open -lx264
1339 enabled dc1394 && require libdc1394 libdc1394/dc1394_control.h dc1394_create_handle -ldc1394_control -lraw1394
1340 enabled mlib && require mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
1342 # Ugh, faac uses stdcall calling convention on win32 so we can't use
1343 # the generic test functions
1344 if enabled faac; then
1346 temp_extralibs -lfaac
1347 check_ld <<EOF && add_extralibs -lfaac || die "ERROR: libfaac not found"
1352 faacEncGetVersion(&id, &cpr);
1359 # Ugh, recent faad2 versions have renamed all functions and #define the
1360 # old names in faad.h. Generic tests won't work.
1361 if enabled faad; then
1363 temp_extralibs -lfaad
1364 check_ld <<EOF && add_extralibs -lfaad || die "ERROR: libfaad not found"
1374 # Ugh, avisynth uses WINAPI calls. Generic tests won't work.
1375 if enabled avisynth; then
1377 temp_extralibs -lvfw32
1378 check_ld <<EOF && add_extralibs -lvfw32 || die "ERROR: vfw32 not found"
1379 #include <windows.h>
1390 # test for lrintf in math.h
1391 check_exec <<EOF && have_lrintf=yes || have_lrintf=no
1392 #define _ISOC9X_SOURCE 1
1394 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
1398 for restrict_keyword in restrict __restrict__ __restrict; do
1399 check_cc <<EOF && _restrict=$restrict_keyword && break
1400 void foo(char * $restrict_keyword p);
1404 # dlopen/dlfcn.h probing
1406 check_header dlfcn.h && dlfcn=yes
1409 if check_func dlopen; then
1415 if check_func dlopen; then
1420 if test "$vhook" = "default"; then
1424 if test "$vhook" = "yes" -o "$a52bin" = "yes" -o "$faadbin" = "yes"; then
1428 if test "$targetos" = "CYGWIN" -a "$lstatic" = "yes" ; then
1431 echo "At the moment vhooks don't work on Cygwin static builds."
1432 echo "Patches welcome."
1436 if enabled vhook; then
1437 check_ldflags -rdynamic
1438 check_ldflags -export-dynamic
1441 ##########################################
1444 temp_extralibs -lImlib2
1445 check_ld <<EOF && imlib2=yes || imlib2=no
1446 #include <X11/Xlib.h>
1448 int main( void ) { return (int) imlib_load_font("foo"); }
1452 ##########################################
1456 if test "x$targetos" != "xBeOS"; then
1457 if (freetype-config --version) >/dev/null 2>&1 ; then
1458 temp_cflags `freetype-config --cflags`
1459 temp_extralibs `freetype-config --libs`
1460 check_ld <<EOF && freetype2=yes
1461 #include <ft2build.h>
1462 int main( void ) { return (int) FT_Init_FreeType(0); }
1468 ##########################################
1473 SDL_CONFIG="${cross_prefix}sdl-config"
1474 if ("${SDL_CONFIG}" --version) >/dev/null 2>&1 ; then
1475 temp_cflags `"${SDL_CONFIG}" --cflags`
1476 temp_extralibs `"${SDL_CONFIG}" --libs`
1479 #undef main /* We don't want SDL to override our main() */
1480 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
1482 if test $? = 0; then
1483 _sdlversion=`"${SDL_CONFIG}" --version | sed 's/[^0-9]//g'`
1484 if test "$_sdlversion" -lt 121 ; then
1488 check_cc <<EOF && sdl_video_size=yes || sdl_video_size=no
1491 const SDL_VideoInfo *vi = SDL_GetVideoInfo();
1492 int w = vi->current_w;
1501 enabled sdl || ffplay=no
1503 ##########################################
1507 if (texi2html -version) >/dev/null 2>&1; then
1511 ##########################################
1514 enabled network && enabled ipv6 && check_ld <<EOF && ipv6=yes || ipv6=no
1515 #include <sys/types.h>
1516 #include <sys/socket.h>
1517 #include <netinet/in.h>
1520 struct sockaddr_storage saddr;
1521 struct ipv6_mreq mreq6;
1522 getaddrinfo(0,0,0,0);
1523 getnameinfo(0,0,0,0,0,0,0);
1524 IN6_IS_ADDR_MULTICAST((const struct in6_addr *)0);
1528 # check for video4linux2 --- V4L2_PIX_FMT_YUV420
1529 enabled v4l2 && check_cc <<EOF || v4l2="no"
1530 #include <sys/time.h>
1531 #include <asm/types.h>
1532 #include <linux/videodev2.h>
1533 int dummy = V4L2_PIX_FMT_YUV420;
1534 struct v4l2_buffer dummy1;
1537 enabled debug && add_cflags -g
1539 # add some useful compiler flags if supported
1540 check_cflags -Wdeclaration-after-statement
1542 check_cflags -Wno-switch
1543 check_cflags -Wdisabled-optimization
1544 check_cflags -Wpointer-arith
1545 check_cflags -Wredundant-decls
1546 enabled extrawarnings && check_cflags -Winline
1548 # add some linker flags
1549 check_ldflags $LDLATEFLAGS
1551 # not all compilers support -Os
1552 test "$optimize" = "small" && check_cflags -Os
1554 if enabled optimize; then
1555 if test -n "`$cc -v 2>&1 | grep xlc`"; then
1563 # PIC flags for shared library objects where they are needed
1564 if test "$lshared" = "yes" ; then
1565 # LIBOBJFLAGS may have already been set in the OS configuration
1566 if test -z "$LIBOBJFLAGS" ; then
1568 x86_64|ia64|alpha|sparc*) LIBOBJFLAGS="\$(PIC)" ;;
1573 if test "$gprof" = "yes" ; then
1578 # find if .align arg is power-of-two or not
1579 if test $asmalign_pot = "unknown"; then
1581 echo 'asm (".align 3");' | check_cc && asmalign_pot="yes"
1584 echo "install prefix $PREFIX"
1585 echo "source path $source_path"
1586 echo "C compiler $cc"
1588 echo "ARCH $arch ($cpu)"
1589 if test "$BUILDSUF" != ""; then
1590 echo "build suffix $BUILDSUF"
1592 echo "big-endian $bigendian"
1593 echo "inttypes.h $inttypes"
1594 echo "broken inttypes.h $emu_fast_int"
1595 if test $arch = "x86_32" -o $arch = "x86_64"; then
1596 echo "MMX enabled $mmx"
1597 echo "CMOV enabled $cmov"
1598 echo "CMOV is fast $cmov_is_fast"
1600 if test $arch = "armv4l"; then
1601 echo "ARMv5TE enabled $armv5te"
1602 echo "IWMMXT enabled $iwmmxt"
1604 if test $arch = "mips"; then
1605 echo "MMI enabled $mmi"
1607 if test $arch = "powerpc"; then
1608 echo "AltiVec enabled $altivec"
1609 echo "dcbzl available $dcbzl"
1611 echo "gprof enabled $gprof"
1612 echo "zlib enabled $zlib"
1613 echo "libgsm enabled $libgsm"
1614 echo "mp3lame enabled $mp3lame"
1615 echo "libnut enabled $libnut"
1616 echo "libogg enabled $libogg"
1617 echo "Vorbis enabled $libvorbis"
1618 echo "FAAD enabled $faad"
1619 echo "faadbin enabled $faadbin"
1620 echo "FAAC enabled $faac"
1621 echo "XviD enabled $xvid"
1622 echo "x264 enabled $x264"
1623 echo "a52 support $a52"
1624 echo "a52 dlopened $a52bin"
1625 echo "DTS support $dts"
1626 echo "pp support $pp"
1627 echo "Software Scaler enabled $swscaler"
1628 echo "AVISynth enabled $avisynth"
1629 echo "debug symbols $debug"
1630 echo "strip symbols $dostrip"
1631 echo "optimize $optimize"
1632 echo "static $lstatic"
1633 echo "shared $lshared"
1634 echo "video hooking $vhook"
1635 echo "SDL support $sdl"
1636 if test $sdl_too_old = "yes"; then
1637 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support."
1640 if test "$vhook" = "yes"; then
1641 echo "Imlib2 support $imlib2"
1642 echo "FreeType support $freetype2"
1644 echo "Sun medialib support" $mlib
1645 echo "pthreads support" $pthreads
1646 echo "AMR-NB float support" $amr_nb
1647 echo "AMR-NB fixed support" $amr_nb_fixed
1648 echo "AMR-WB float support" $amr_wb
1649 echo "AMR-WB IF2 support" $amr_if2
1650 echo "network support $network"
1651 if test "$network" = "yes" ; then
1652 echo "IPv6 support $ipv6"
1654 echo ".align is power-of-two" $asmalign_pot
1655 if test "$gpl" = "no" ; then
1656 echo "License: LGPL"
1661 echo "Creating config.mak and config.h..."
1664 echo " $0 $FFMPEG_CONFIGURATION" >> config.log
1665 echo "# Automatically generated by configure - do not modify!" > config.mak
1666 echo "/* Automatically generated by configure - do not modify! */" > $TMPH
1667 echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH
1669 echo "PREFIX=$PREFIX" >> config.mak
1670 echo "prefix=\$(DESTDIR)\${PREFIX}" >> config.mak
1671 echo "libdir=\$(DESTDIR)$libdir" >> config.mak
1672 echo "shlibdir=\$(DESTDIR)$shlibdir" >> config.mak
1673 echo "incdir=\$(DESTDIR)$incdir" >> config.mak
1674 echo "bindir=\$(DESTDIR)$bindir" >> config.mak
1675 echo "mandir=\$(DESTDIR)$mandir" >> config.mak
1676 echo "MAKE=$make" >> config.mak
1677 echo "CC=$cc" >> config.mak
1678 echo "AR=$ar" >> config.mak
1679 echo "RANLIB=$ranlib" >> config.mak
1680 if test "$dostrip" = "yes" ; then
1681 echo "STRIP=$strip" >> config.mak
1682 echo "INSTALLSTRIP=$installstrip" >> config.mak
1684 echo "STRIP=echo ignoring strip" >> config.mak
1685 echo "INSTALLSTRIP=" >> config.mak
1688 VHOOKCFLAGS="-fPIC $CFLAGS"
1689 test "$needmdynamicnopic" = yes && add_cflags -mdynamic-no-pic
1691 echo "OPTFLAGS=$CFLAGS" >> config.mak
1692 echo "VHOOKCFLAGS=$VHOOKCFLAGS">>config.mak
1693 echo "LDFLAGS=$LDFLAGS" >> config.mak
1694 echo "LDCONFIG=$LDCONFIG" >> config.mak
1695 echo "FFSERVERLDFLAGS=$FFSERVERLDFLAGS" >> config.mak
1696 echo "SHFLAGS=$SHFLAGS" >> config.mak
1697 echo "VHOOKSHFLAGS=$VHOOKSHFLAGS" >> config.mak
1698 echo "VHOOKLIBS=$VHOOKLIBS" >> config.mak
1699 echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak
1700 echo "BUILD_STATIC=$lstatic" >> config.mak
1701 echo "BUILDSUF=$BUILDSUF" >> config.mak
1702 echo "LIBPREF=$LIBPREF" >> config.mak
1703 echo "LIBSUF=\${BUILDSUF}$LIBSUF" >> config.mak
1704 if test "$lstatic" = "yes" ; then
1705 echo "LIB=$LIB" >> config.mak
1706 else # Some Make complain if this variable does not exist.
1707 echo "LIB=" >> config.mak
1709 echo "SLIBPREF=$SLIBPREF" >> config.mak
1710 echo "SLIBSUF=\${BUILDSUF}$SLIBSUF" >> config.mak
1711 echo "EXESUF=\${BUILDSUF}$EXESUF" >> config.mak
1712 echo "TARGET_OS=$targetos" >> config.mak
1713 if test "$arch" = "x86_32" -o "$arch" = "x86_64" ; then
1714 echo "TARGET_ARCH_X86=yes" >> config.mak
1715 echo "#define ARCH_X86 1" >> $TMPH
1717 if test "$arch" = "x86_32" ; then
1718 echo "TARGET_ARCH_X86_32=yes" >> config.mak
1719 echo "#define ARCH_X86_32 1" >> $TMPH
1720 elif test "$arch" = "x86_64" ; then
1721 echo "TARGET_ARCH_X86_64=yes" >> config.mak
1722 echo "#define ARCH_X86_64 1" >> $TMPH
1723 elif test "$arch" = "armv4l" ; then
1724 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
1725 echo "#define ARCH_ARMV4L 1" >> $TMPH
1726 elif test "$arch" = "alpha" ; then
1727 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
1728 echo "#define ARCH_ALPHA 1" >> $TMPH
1729 elif test "$arch" = "sparc64" ; then
1730 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
1731 echo "#define ARCH_SPARC64 1" >> $TMPH
1732 echo "TARGET_ARCH_SPARC=yes" >> config.mak
1733 echo "#define ARCH_SPARC 1" >> $TMPH
1734 elif test "$arch" = "sparc" ; then
1735 echo "TARGET_ARCH_SPARC=yes" >> config.mak
1736 echo "#define ARCH_SPARC 1" >> $TMPH
1737 elif test "$arch" = "powerpc" ; then
1738 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
1739 echo "#define ARCH_POWERPC 1" >> $TMPH
1740 if test $POWERPCMODE = "32bits"; then
1741 echo "#define POWERPC_MODE_32BITS 1" >> $TMPH
1743 echo "#define POWERPC_MODE_64BITS 1" >> $TMPH
1745 if test "$powerpc_perf" = "yes"; then
1746 echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
1748 elif test "$arch" = "mips" ; then
1749 echo "TARGET_ARCH_MIPS=yes" >> config.mak
1750 echo "#define ARCH_MIPS 1" >> $TMPH
1751 elif test "$arch" = "sh4" ; then
1752 echo "TARGET_ARCH_SH4=yes" >> config.mak
1753 echo "#define ARCH_SH4 1" >> $TMPH
1754 elif test "$arch" = "parisc" ; then
1755 echo "TARGET_ARCH_PARISC=yes" >> config.mak
1756 echo "#define ARCH_PARISC 1" >> $TMPH
1757 elif test "$arch" = "s390" ; then
1758 echo "TARGET_ARCH_S390=yes" >> config.mak
1759 echo "#define ARCH_S390 1" >> $TMPH
1760 elif test "$arch" = "m68k" ; then
1761 echo "TARGET_ARCH_M68K=yes" >> config.mak
1762 echo "#define ARCH_M68K 1" >> $TMPH
1763 elif test "$arch" = "ia64" ; then
1764 echo "TARGET_ARCH_IA64=yes" >> config.mak
1765 echo "#define ARCH_IA64 1" >> $TMPH
1766 elif test "$arch" = "bfin" ; then
1767 echo "TARGET_ARCH_BFIN=yes" >> config.mak
1768 echo "#define ARCH_BFIN 1" >> $TMPH
1770 echo "#define TUNECPU $TUNECPU" >> $TMPH
1771 if test "$bigendian" = "yes" ; then
1772 echo "WORDS_BIGENDIAN=yes" >> config.mak
1773 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
1775 if test "$inttypes" != "yes" ; then
1776 echo "#define EMULATE_INTTYPES 1" >> $TMPH
1778 if test "$emu_fast_int" = "yes" ; then
1779 echo "#define EMULATE_FAST_INT 1" >> $TMPH
1781 if test "$mmx" = "yes" ; then
1782 echo "TARGET_MMX=yes" >> config.mak
1783 echo "#define HAVE_MMX 1" >> $TMPH
1784 echo "#define __CPU__ 586" >> $TMPH
1786 if test "$cmov" = "yes" ; then
1787 echo "TARGET_CMOV=yes" >> config.mak
1788 echo "#define HAVE_CMOV 1" >> $TMPH
1790 if test "$cmov_is_fast" = "yes" ; then
1791 echo "TARGET_CMOV_IS_FAST=yes" >> config.mak
1792 echo "#define CMOV_IS_FAST 1" >> $TMPH
1794 if test "$armv5te" = "yes" ; then
1795 echo "TARGET_ARMV5TE=yes" >> config.mak
1796 echo "#define HAVE_ARMV5TE 1" >> $TMPH
1798 if test "$iwmmxt" = "yes" ; then
1799 echo "TARGET_IWMMXT=yes" >> config.mak
1800 echo "#define HAVE_IWMMXT 1" >> $TMPH
1802 if test "$mmi" = "yes" ; then
1803 echo "TARGET_MMI=yes" >> config.mak
1804 echo "#define HAVE_MMI 1" >> $TMPH
1807 if test "$dcbzl" = "yes" ; then
1808 echo "#define HAVE_DCBZL 1" >> $TMPH
1810 echo "#undef HAVE_DCBZL" >> $TMPH
1813 if test "$altivec" = "yes" ; then
1814 echo "TARGET_ALTIVEC=yes" >> config.mak
1815 echo "#define HAVE_ALTIVEC 1" >> $TMPH
1816 if test "$_altivec_h" = "yes" ; then
1817 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
1819 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
1822 if test "$gprof" = "yes" ; then
1823 echo "#define HAVE_GPROF 1" >> $TMPH
1825 if test "$localtime_r" = "yes" ; then
1826 echo "#define HAVE_LOCALTIME_R 1" >> $TMPH
1828 if test "$imlib2" = "yes" ; then
1829 echo "HAVE_IMLIB2=yes" >> config.mak
1831 if test "$freetype2" = "yes" ; then
1832 echo "HAVE_FREETYPE2=yes" >> config.mak
1834 if test "$mlib" = "yes" ; then
1835 echo "HAVE_MLIB=yes" >> config.mak
1836 echo "#define HAVE_MLIB 1" >> $TMPH
1838 if test "$pthreads" = "yes" ; then
1839 echo "HAVE_PTHREADS=yes" >> config.mak
1840 echo "#define HAVE_PTHREADS 1" >> $TMPH
1841 echo "#define HAVE_THREADS 1" >> $TMPH
1843 if test "$sdl" = "yes" ; then
1844 echo "HAVE_SDL=yes" >> config.mak
1845 echo "SDL_LIBS=`"${SDL_CONFIG}" --libs`" >> config.mak
1846 echo "SDL_CFLAGS=`"${SDL_CONFIG}" --cflags`" >> config.mak
1847 if test "$sdl_video_size" = "yes"; then
1848 echo "#define HAVE_SDL_VIDEO_SIZE 1" >> $TMPH
1851 if test "$texi2html" = "yes"; then
1852 echo "BUILD_DOC=yes" >> config.mak
1854 if test "$have_lrintf" = "yes" ; then
1855 echo "#define HAVE_LRINTF 1" >> $TMPH
1857 if test "$vhook" = "yes" ; then
1858 echo "CONFIG_VHOOK=yes" >> config.mak
1859 echo "#define CONFIG_VHOOK 1" >> $TMPH
1862 sws_version=`grep '#define LIBSWSCALE_VERSION ' "$source_path/libswscale/swscale.h" | sed 's/[^0-9\.]//g'`
1863 pp_version=`grep '#define LIBPOSTPROC_VERSION ' "$source_path/libpostproc/postprocess.h" | sed 's/[^0-9\.]//g'`
1864 lavc_version=`grep '#define LIBAVCODEC_VERSION ' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9\.]//g'`
1865 lavf_version=`grep '#define LIBAVFORMAT_VERSION ' "$source_path/libavformat/avformat.h" | sed 's/[^0-9\.]//g'`
1866 lavu_version=`grep '#define LIBAVUTIL_VERSION ' "$source_path/libavutil/avutil.h" | sed 's/[^0-9\.]//g'`
1870 if test "$lshared" = "yes" ; then
1871 echo "#define BUILD_SHARED_AV 1" >> $TMPH
1872 echo "BUILD_SHARED=yes" >> config.mak
1873 echo "PIC=-fPIC -DPIC" >> config.mak
1874 echo "SPPMAJOR=${lavc_version%%.*}" >> config.mak
1875 echo "SPPVERSION=$lavc_version" >> config.mak
1876 echo "LAVCMAJOR=${lavc_version%%.*}" >> config.mak
1877 echo "LAVCVERSION=$lavc_version" >> config.mak
1878 echo "LAVFMAJOR=${lavf_version%%.*}" >> config.mak
1879 echo "LAVFVERSION=$lavf_version" >> config.mak
1880 echo "LAVUMAJOR=${lavu_version%%.*}" >> config.mak
1881 echo "LAVUVERSION=$lavu_version" >> config.mak
1882 echo "SWSMAJOR=${sws_version%%.*}" >> config.mak
1883 echo "SWSVERSION=$sws_version" >> config.mak
1884 echo "SLIBNAME=${SLIBNAME}" >> config.mak
1885 echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak
1886 echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak
1887 echo "SLIB_EXTRA_CMD=${SLIB_EXTRA_CMD}" >> config.mak
1889 echo "LIB_INSTALL_EXTRA_CMD=${LIB_INSTALL_EXTRA_CMD}" >> config.mak
1890 echo "EXTRALIBS=$extralibs" >> config.mak
1892 # If you do not want to use encoders, disable them.
1893 if echo "$ENCODER_LIST" | grep -q encoder; then
1894 echo "#define CONFIG_ENCODERS 1" >> $TMPH
1895 echo "CONFIG_ENCODERS=yes" >> config.mak
1898 # If you do not want to use decoders, disable them.
1899 if echo "$DECODER_LIST" | grep -q decoder; then
1900 echo "#define CONFIG_DECODERS 1" >> $TMPH
1901 echo "CONFIG_DECODERS=yes" >> config.mak
1905 if echo "$MUXER_LIST" | grep -q muxer; then
1906 echo "#define CONFIG_MUXERS 1" >> $TMPH
1907 echo "CONFIG_MUXERS=yes" >> config.mak
1911 if echo "$DEMUXER_LIST" | grep -q demuxer; then
1912 echo "#define CONFIG_DEMUXERS 1" >> $TMPH
1913 echo "CONFIG_DEMUXERS=yes" >> config.mak
1917 if test "$a52" = "yes" ; then
1918 echo "#define CONFIG_A52 1" >> $TMPH
1919 echo "CONFIG_A52=yes" >> config.mak
1921 if test "$a52bin" = "yes" ; then
1922 echo "#define CONFIG_A52BIN 1" >> $TMPH
1923 echo "CONFIG_A52BIN=yes" >> config.mak
1928 if test "$dts" = "yes" ; then
1929 echo "#define CONFIG_DTS 1" >> $TMPH
1930 echo "CONFIG_DTS=yes" >> config.mak
1934 if test "$pp" = "yes" ; then
1935 echo "#define CONFIG_PP 1" >> $TMPH
1936 echo "CONFIG_PP=yes" >> config.mak
1939 if test "$swscaler" = "yes" ; then
1940 echo "#define CONFIG_SWSCALER 1" >> $TMPH
1941 echo "CONFIG_SWSCALER=yes" >> config.mak
1944 # MPEG audio high precision mode
1945 if test "$mpegaudio_hp" = "yes" ; then
1946 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
1949 if test "$v4l" = "yes" ; then
1950 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
1951 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
1954 if test "$v4l2" = "yes" ; then
1955 echo "#define CONFIG_VIDEO4LINUX2 1" >> $TMPH
1956 echo "CONFIG_VIDEO4LINUX2=yes" >> config.mak
1959 if test "$bktr" = "yes" ; then
1960 echo "#define CONFIG_BKTR 1" >> $TMPH
1961 echo "CONFIG_BKTR=yes" >> config.mak
1964 if test "$dv1394" = "yes" ; then
1965 echo "#define CONFIG_DV1394 1" >> $TMPH
1966 echo "CONFIG_DV1394=yes" >> config.mak
1969 if test "$dc1394" = "yes" ; then
1970 echo "#define CONFIG_DC1394 1" >> $TMPH
1971 echo "CONFIG_DC1394=yes" >> config.mak
1974 if test "$dlopen" = "yes" ; then
1975 echo "#define HAVE_DLOPEN 1" >> $TMPH
1978 if test "$dlfcn" = "yes" ; then
1979 echo "#define HAVE_DLFCN 1" >> $TMPH
1982 if test "$audio_oss" = "yes" ; then
1983 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
1984 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
1987 if test "$audio_beos" = "yes" ; then
1988 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
1989 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
1992 if test "$network" = "yes" ; then
1993 echo "#define CONFIG_NETWORK 1" >> $TMPH
1994 echo "CONFIG_NETWORK=yes" >> config.mak
1997 if test "$ipv6" = "yes" ; then
1998 echo "#define CONFIG_IPV6 1" >> $TMPH
2001 if test "$zlib" = "yes" ; then
2002 echo "#define CONFIG_ZLIB 1" >> $TMPH
2003 echo "CONFIG_ZLIB=yes" >> config.mak
2006 if test "$libgsm" = "yes" ; then
2007 echo "#define CONFIG_LIBGSM 1" >> $TMPH
2008 echo "CONFIG_LIBGSM=yes" >> config.mak
2011 if test "$mp3lame" = "yes" ; then
2012 echo "#define CONFIG_MP3LAME 1" >> $TMPH
2013 echo "CONFIG_MP3LAME=yes" >> config.mak
2016 if test "$libnut" = "yes" ; then
2017 echo "#define CONFIG_LIBNUT 1" >> $TMPH
2018 echo "CONFIG_LIBNUT=yes" >> config.mak
2021 if test "$libogg" = "yes" ; then
2022 echo "#define CONFIG_LIBOGG 1" >> $TMPH
2023 echo "CONFIG_LIBOGG=yes" >> config.mak
2026 if test "$libvorbis" = "yes" ; then
2027 echo "#define CONFIG_LIBVORBIS 1" >> $TMPH
2028 echo "CONFIG_LIBVORBIS=yes" >> config.mak
2031 if test "$faad" = "yes" ; then
2032 echo "#define CONFIG_FAAD 1" >> $TMPH
2033 echo "CONFIG_FAAD=yes" >> config.mak
2036 if test "$faadbin" = "yes" ; then
2037 echo "#define CONFIG_FAADBIN 1" >> $TMPH
2038 echo "CONFIG_FAADBIN=yes" >> config.mak
2041 if test "$faac" = "yes" ; then
2042 echo "#define CONFIG_FAAC 1" >> $TMPH
2043 echo "CONFIG_FAAC=yes" >> config.mak
2046 if test "$xvid" = "yes" ; then
2047 echo "#define CONFIG_XVID 1" >> $TMPH
2048 echo "CONFIG_XVID=yes" >> config.mak
2051 if test "$x264" = "yes" ; then
2052 echo "#define CONFIG_X264 1" >> $TMPH
2053 echo "CONFIG_X264=yes" >> config.mak
2056 if test "$avisynth" = "yes" ; then
2057 echo "#define CONFIG_AVISYNTH 1" >> $TMPH
2058 echo "CONFIG_AVISYNTH=yes" >> config.mak
2061 if test "$mingw32" = "yes" ; then
2062 echo "CONFIG_MINGW=yes" >> config.mak
2063 echo "HAVE_W32THREADS=yes" >> config.mak
2064 echo "#define HAVE_W32THREADS 1" >> $TMPH
2065 echo "#define HAVE_THREADS 1" >> $TMPH
2066 echo "#ifndef __MINGW32__" >> $TMPH
2067 echo "#define __MINGW32__ 1" >> $TMPH
2068 echo "#endif" >> $TMPH
2071 if test "$mingwce" = "yes" ; then
2072 echo "CONFIG_MINGW=yes" >> config.mak
2073 echo "#define CONFIG_WINCE 1" >> $TMPH
2074 echo "CONFIG_WINCE=yes" >> config.mak
2075 echo "#ifndef __MINGW32__" >> $TMPH
2076 echo "#define __MINGW32__ 1" >> $TMPH
2077 echo "#endif" >> $TMPH
2080 if test "$os2" = "yes" ; then
2081 echo "#define CONFIG_OS2 1" >> $TMPH
2082 echo "CONFIG_OS2=yes" >> config.mak
2083 echo "HAVE_OS2THREADS=yes" >> config.mak
2084 echo "#define HAVE_OS2THREADS 1" >> $TMPH
2085 echo "#define HAVE_THREADS 1" >> $TMPH
2088 if test "$targetos" = "SunOS" ; then
2089 echo "#define CONFIG_SUNOS 1" >> $TMPH
2092 if test "$targetos" = "BeOS" ; then
2093 echo "HAVE_BEOSTHREADS=yes" >> config.mak
2094 echo "#define HAVE_BEOSTHREADS 1" >> $TMPH
2095 echo "#define HAVE_THREADS 1" >> $TMPH
2098 if test "$targetos" = "Darwin"; then
2099 echo "#define CONFIG_DARWIN 1" >> $TMPH
2100 echo "CONFIG_DARWIN=yes" >> config.mak
2103 if test "$malloc_h" = "yes" ; then
2104 echo "#define HAVE_MALLOC_H 1" >> $TMPH
2106 echo "#undef HAVE_MALLOC_H" >> $TMPH
2109 if test "$memalign" = "yes" ; then
2110 echo "#define HAVE_MEMALIGN 1" >> $TMPH
2112 echo "#undef HAVE_MEMALIGN" >> $TMPH
2115 if test "$memalignhack" = "yes" ; then
2116 echo "#define MEMALIGN_HACK 1" >> $TMPH
2119 if test "$byteswap_h" = "yes"; then
2120 echo "#define HAVE_BYTESWAP_H 1" >> $TMPH
2123 if test "$beos_netserver" = "yes" ; then
2124 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
2125 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
2128 if test "$need_inet_aton" = "yes" ; then
2129 echo "NEED_INET_ATON=yes" >> config.mak
2132 if test "$protocols" = "yes" ; then
2133 echo "#define CONFIG_PROTOCOLS 1" >> $TMPH
2134 echo "CONFIG_PROTOCOLS=yes" >> config.mak
2137 if test "$ffmpeg" = "yes" ; then
2138 echo "#define CONFIG_FFMPEG 1" >> $TMPH
2139 echo "CONFIG_FFMPEG=yes" >> config.mak
2142 if test "$ffserver" = "yes" ; then
2143 echo "#define CONFIG_FFSERVER 1" >> $TMPH
2144 echo "CONFIG_FFSERVER=yes" >> config.mak
2147 if test "$ffplay" = "yes" ; then
2148 echo "CONFIG_FFPLAY=yes" >> config.mak
2151 if test "$gpl" = "yes" ; then
2152 echo "#define CONFIG_GPL 1" >> $TMPH
2153 echo "CONFIG_GPL=yes" >> config.mak
2156 echo "#define restrict $_restrict" >> $TMPH
2158 if test "$optimize" = "small"; then
2159 echo "#define always_inline" >> $TMPH
2160 echo "#define CONFIG_SMALL 1" >> $TMPH
2163 # build tree in object directory if source path is different from current one
2164 if test "$source_path_used" = "yes" ; then
2186 libavformat/Makefile \
2187 libavcodec/Makefile \
2188 libpostproc/Makefile \
2189 libavutil/Makefile \
2190 libswscale/Makefile \
2196 for dir in $DIRS ; do
2199 for f in $FILES ; do
2200 ln -sf "$source_path/$f" $f
2203 echo "SRC_PATH=\"$source_path\"" >> config.mak
2204 echo "SRC_PATH_BARE=$source_path" >> config.mak
2205 echo "BUILD_ROOT=\"$PWD\"" >> config.mak
2207 if test "$amr" = "yes" ; then
2208 echo "#define CONFIG_AMR 1" >> $TMPH
2209 echo "CONFIG_AMR=yes" >> config.mak
2212 if test "$amr_wb" = "yes" ; then
2213 echo "#define CONFIG_AMR_WB 1" >> $TMPH
2214 echo "CONFIG_AMR_WB=yes" >> config.mak
2216 echo "AMR WB FLOAT NOTICE ! Make sure you have downloaded TS26.204"
2218 echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip"
2219 echo "and extracted the source to libavcodec/amrwb_float"
2222 if test "$amr_nb" = "yes" ; then
2223 echo "#define CONFIG_AMR_NB 1" >> $TMPH
2224 echo "CONFIG_AMR_NB=yes" >> config.mak
2226 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
2227 echo "REL-5 V5.1.0 from "
2228 echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.104/26104-510.zip"
2229 echo "and extracted the source to libavcodec/amr_float"
2230 echo "If you try this on alpha, you may need to change Word32 to int in amr/typedef.h"
2233 if test "$amr_nb_fixed" = "yes" ; then
2234 echo "#define CONFIG_AMR_NB_FIXED 1" >> $TMPH
2235 echo "CONFIG_AMR_NB_FIXED=yes" >> config.mak
2237 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
2238 echo "REL-5 version 5.1.0 from "
2239 echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.073/26073-510.zip"
2240 echo "and extracted src to libavcodec/amr"
2241 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
2242 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
2245 if test "$amr_if2" = "yes" ; then
2246 echo "AMR_CFLAGS=-DIF2=1" >> config.mak
2249 # Apparently it's not possible to portably echo a backslash.
2250 if test "$asmalign_pot" = "yes" ; then
2251 printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> $TMPH
2253 printf '#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\\n\\t"\n' >> $TMPH
2257 # "tr '[a-z]' '[A-Z]'" is a workaround for Solaris tr not grokking "tr a-z A-Z"
2258 for codec in $DECODER_LIST $ENCODER_LIST $PARSER_LIST $DEMUXER_LIST $MUXER_LIST; do
2259 ucname="`echo $codec | tr '[a-z]' '[A-Z]'`"
2260 config_name="CONFIG_$ucname"
2261 enabled_name="ENABLE_$ucname"
2262 if enabled $codec; then
2263 echo "#define $config_name 1" >> $TMPH
2264 echo "#define $enabled_name 1" >> $TMPH
2265 echo "$config_name=yes" >> config.mak
2267 echo "#define $enabled_name 0" >> $TMPH
2271 # Do not overwrite config.h if unchanged to avoid superfluous rebuilds.
2272 diff $TMPH config.h >/dev/null 2>&1
2273 if test "$?" != "0" ; then
2274 mv -f $TMPH config.h
2276 echo "config.h is unchanged"
2279 rm -f $TMPO $TMPC $TMPE $TMPS $TMPH
2282 # build pkg-config files libav*.pc and libpostproc.pc
2284 cat <<EOF >libavutil.pc
2286 exec_prefix=\${prefix}
2287 libdir=\${exec_prefix}/lib
2288 includedir=\${prefix}/include
2291 Description: FFmpeg utility library
2292 Version: $lavu_version
2295 Libs: -L\${libdir} -lavutil
2296 Cflags: -I\${includedir} -I\${includedir}/ffmpeg
2299 cat <<EOF >libavutil-uninstalled.pc
2302 libdir=\${pcfiledir}/libavutil
2303 includedir=\${pcfiledir}/libavutil
2306 Description: FFmpeg utility library
2307 Version: $lavu_version
2310 Libs: \${libdir}/${LIBPREF}avutil${LIBSUF}
2311 Cflags: -I\${includedir}
2315 cat <<EOF >libavcodec.pc
2317 exec_prefix=\${prefix}
2318 libdir=\${exec_prefix}/lib
2319 includedir=\${prefix}/include
2322 Description: FFmpeg codec library
2323 Version: $lavc_version
2324 Requires: $pkg_requires libavutil = $lavu_version
2326 Libs: -L\${libdir} -lavcodec $extralibs
2327 Cflags: -I\${includedir} -I\${includedir}/ffmpeg
2330 cat <<EOF >libavcodec-uninstalled.pc
2333 libdir=\${pcfiledir}/libavcodec
2334 includedir=\${pcfiledir}/libavcodec
2337 Description: FFmpeg codec library
2338 Version: $lavc_version
2339 Requires: $pkg_requires libavutil = $lavu_version
2341 Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} $extralibs
2342 Cflags: -I\${includedir}
2346 cat <<EOF >libavformat.pc
2348 exec_prefix=\${prefix}
2349 libdir=\${exec_prefix}/lib
2350 includedir=\${prefix}/include
2353 Description: FFmpeg container format library
2354 Version: $lavf_version
2355 Requires: $pkg_requires libavcodec = $lavc_version
2357 Libs: -L\${libdir} -lavformat $extralibs
2358 Cflags: -I\${includedir} -I\${includedir}/ffmpeg
2361 cat <<EOF >libavformat-uninstalled.pc
2364 libdir=\${pcfiledir}/libavformat
2365 includedir=\${pcfiledir}/libavformat
2368 Description: FFmpeg container format library
2369 Version: $lavf_version
2370 Requires: $pkg_requires libavcodec = $lavc_version
2372 Libs: \${libdir}/${LIBPREF}avformat${LIBSUF} $extralibs
2373 Cflags: -I\${includedir}
2378 cat <<EOF >libpostproc.pc
2380 exec_prefix=\${prefix}
2381 libdir=\${exec_prefix}/lib
2382 includedir=\${prefix}/include
2385 Description: FFmpeg post processing library
2386 Version: $lavc_version
2389 Libs: -L\${libdir} -lpostproc
2390 Cflags: -I\${includedir} -I\${includedir}/postproc
2393 cat <<EOF >libpostproc-uninstalled.pc
2396 libdir=\${pcfiledir}/libpostproc
2397 includedir=\${pcfiledir}/libpostproc
2400 Description: FFmpeg post processing library
2401 Version: $lavc_version
2404 Libs: \${libdir}/${LIBPREF}postproc${LIBSUF}
2405 Cflags: -I\${includedir}
2408 if test "$swscaler" != "no"; then
2409 sws_pc_libs="-L\${libdir} -lswscale"
2410 sws_pc_uninstalled_libs="\${libdir}/${LIBPREF}swscale${LIBSUF}"
2411 sws_pc_requires="$pkg_requires libavutil = $lavu_version"
2414 sws_pc_uninstalled_libs=""
2415 sws_pc_requires="$pkg_requires libavcodec = $lavc_version"
2418 cat <<EOF >libswscale.pc
2420 exec_prefix=\${prefix}
2421 libdir=\${exec_prefix}/lib
2422 includedir=\${prefix}/include
2425 Description: FFmpeg image rescaling library
2426 Version: $sws_version
2427 Requires: $sws_pc_requires
2430 Cflags: -I\${includedir} -I\${includedir}/swscale
2433 cat <<EOF >libswscale-uninstalled.pc
2436 libdir=\${pcfiledir}/libswscale
2437 includedir=\${pcfiledir}/libswscale
2440 Description: FFmpeg image rescaling library
2441 Version: $sws_version
2442 Requires: $sws_pc_requires
2444 Libs: $sws_pc_uninstalled_libs
2445 Cflags: -I\${includedir}