3 # ffmpeg configure script (c) 2000, 2001, 2002 Fabrice Bellard
6 if test x
"$1" = x
"-h" -o x
"$1" = x
"--help" ; then
9 Usage: configure [options]
10 Options: [defaults in brackets after descriptions]
13 echo "Standard options:"
14 echo " --help print this message"
15 echo " --prefix=PREFIX install in PREFIX [$prefix]"
16 echo " --libdir=DIR install libs in DIR [PREFIX/lib]"
17 echo " --mandir=DIR man documentation in DIR [PREFIX/man]"
18 echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
19 echo " --enable-libogg enable ogg support via libogg [default=no]"
20 echo " --enable-vorbis enable vorbis support via libvorbis [default=no]"
21 echo " --enable-theora enable theora support via libtheora [default=no]"
22 echo " --enable-faad enable faad support via libfaad [default=no]"
23 echo " --enable-faadbin build faad support with runtime linking [default=no]"
24 echo " --enable-faac enable faac support via libfaac [default=no]"
25 echo " --enable-libgsm enable gsm support via libgsm [default=no]"
26 echo " --enable-xvid enable xvid support via xvidcore [default=no]"
27 echo " --enable-x264 enable H.264 encoding via x264 [default=no]"
28 echo " --enable-mingw32 enable mingw32 native/cross windows compile"
29 echo " --enable-a52 enable GPL'ed A52 support [default=no]"
30 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
31 echo " --enable-dts enable GPL'ed DTS support [default=no]"
32 echo " --enable-pp enable GPL'ed post processing support [default=no]"
33 echo " --enable-shared-pp use libpostproc.so [default=no]"
34 echo " --enable-shared build shared libraries [default=no]"
35 echo " --enable-amr_nb enable amr_nb float audio codec"
36 echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
37 echo " --enable-amr_wb enable amr_wb float audio codec"
38 echo " --enable-sunmlib use Sun medialib [default=no]"
39 echo " --enable-pthreads use pthreads [default=no]"
40 echo " --enable-dc1394 enable IIDC-1394 grabbing using libdc1394 and libraw1394 [default=no]"
41 echo " --enable-gpl allow use of gpl code, the resulting libav* and ffmpeg will be under gpl [default=no]"
43 echo "Advanced options (experts only):"
44 echo " --source-path=PATH path of source code [$source_path]"
45 echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
46 echo " --cc=CC use C compiler CC [$cc]"
47 echo " --make=MAKE use specified make [$make]"
48 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
49 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
50 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
51 echo " --build-suffix=SUFFIX suffix for application specific build []"
52 echo " --cpu=CPU force cpu to CPU [$cpu]"
53 echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)"
54 echo " --powerpc-perf-enable enable performance report on PPC (requires enabling PMC)"
55 echo " --disable-mmx disable mmx usage"
56 echo " --disable-altivec disable AltiVec usage"
57 echo " --disable-audio-oss disable OSS audio support [default=no]"
58 echo " --disable-audio-beos disable BeOS audio support [default=no]"
59 echo " --disable-v4l disable video4linux grabbing [default=no]"
60 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
61 echo " --disable-network disable network support [default=no]"
62 echo " --disable-zlib disable zlib [default=no]"
63 echo " --disable-simple_idct disable simple IDCT routines [default=no]"
64 echo " --disable-vhook disable video hooking support"
65 echo " --enable-gprof enable profiling with gprof [$gprof]"
66 echo " --disable-debug disable debugging symbols"
67 echo " --disable-opts disable compiler optimizations"
68 echo " --disable-mpegaudio-hp faster (but less accurate)"
69 echo " mpegaudio decoding [default=no]"
70 echo " --disable-ffserver disable ffserver build"
71 echo " --disable-ffplay disable ffplay build"
72 echo " --enable-small optimize for size instead of speed"
73 echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers"
74 echo " --disable-strip disable stripping of executables and shared libraries"
75 echo " --enable-codec=codec enables codec"
76 echo " --disable-codec=codec disables codec"
77 echo " --disable-encoders disables all encoders"
79 echo "NOTE: The object files are build at the place where configure is launched"
83 # set temporary file name
84 if test ! -z
"$TMPDIR" ; then
86 elif test ! -z
"$TEMPDIR" ; then
92 TMPC
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
93 TMPO
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
94 TMPE
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}"
95 TMPS
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
96 TMPH
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
116 i386|i486|i586|i686|i86pc|BePC
)
121 canon_arch
="`cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`"
122 if [ x
"$canon_arch" = x
"x86_64" -o x
"$canon_arch" = x
"amd64" ]; then
123 if [ -z
"`echo $CFLAGS | grep -- -m32`" ]; then
128 # armv4l is a subset of armv5tel
135 "Power Macintosh"|ppc
)
198 LDFLAGS
=-Wl
,--warn-common
220 prefix
="/boot/home/config"
221 # helps building libavcodec
222 CFLAGS
="-DPIC -fomit-frame-pointer"
223 # 3 gcc releases known for BeOS, each with ugly bugs
224 gcc_version
="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
225 case "$gcc_version" in
226 2.9-beos-991026
*|
2.9-beos-000224
*) echo "R5/GG gcc"
229 *20010315*) echo "BeBits gcc"
230 CFLAGS
="$CFLAGS -fno-expensive-optimizations"
234 # disable linux things
240 # no need for libm, but the inet stuff
242 if (echo $BEINCLUDES|
grep 'headers/be/bone' >/dev
/null
); then
243 extralibs
="-lbind -lsocket"
257 extralibs
="$extralibs -lsocket -lnsl"
264 LDFLAGS
="$LDFLAGS -export-dynamic"
266 2.
*) extralibs
="-lossaudio"
275 CFLAGS
="$CFLAGS \$(PIC)"
276 LDFLAGS
="$LDFLAGS -export-dynamic -pthread"
277 LDCONFIG
="ldconfig -m \$(libdir)"
278 extralibs
="$extralibs -lossaudio"
286 LDFLAGS
="$LDFLAGS -export-dynamic -pthread"
292 extralibs
="-lpoll -lgnugetopt -lm"
301 SHFLAGS
="-dynamiclib"
305 LDFLAGS
="-Wl,-d,-search_paths_first"
306 FFSLDFLAGS
=-Wl
,-bind_at_load
309 # Note: the rest of the mingw32 config is done afterwards as mingw32
310 # can be forced on command line for linux cross compilation
323 LDFLAGS
="$LDFLAGS -rdynamic"
326 ranlib
="echo ignoring ranlib"
334 ranlib
="echo ignoring ranlib"
335 strip
="echo ignoring strip"
337 LDFLAGS
="-Zomf -Zstack 16384 -s"
338 SHFLAGS
="-Zdll -Zomf"
358 # From mplayer configure. We need TARGET_OS available
359 # to the Makefile, so it can distinguish between flavors
360 # of AltiVec on PowerPC
361 TARGET_OS
=`( uname -s ) 2>&1`
363 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS
)
371 [cC
][yY
][gG
][wW
][iI
][nN
]*)
375 TARGET_OS
="$TARGET_OS-UNKNOWN"
380 source_path
="`echo $0 | sed -e 's#/configure##'`"
381 source_path_used
="yes"
382 if test -z
"$source_path" -o
"$source_path" = "." ; then
384 source_path_used
="no"
386 source_path
="`cd \"$source_path\"; pwd`"
389 FFMPEG_CONFIGURATION
=" "
391 FFMPEG_CONFIGURATION
="$FFMPEG_CONFIGURATION""$opt "
394 CODEC_LIST
=`grep 'register_avcodec(&[a-z]' $source_path/libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'`
398 --prefix
=*) prefix
=`echo $opt | cut -d '=' -f 2`
400 --libdir
=*) libdir
=`echo $opt | cut -d '=' -f 2`
402 --mandir
=*) mandir
=`echo $opt | cut -d '=' -f 2`
404 --source-path
=*) source_path
=`echo $opt | cut -d '=' -f 2`
406 --cross-prefix
=*) cross_prefix
=`echo $opt | cut -d '=' -f 2`
408 --cc
=*) cc
=`echo $opt | cut -d '=' -f 2`
410 --make=*) make=`echo $opt | cut -d '=' -f 2`
412 --extra-cflags
=*) CFLAGS
="$CFLAGS ${opt#--extra-cflags=}"
414 --extra-ldflags
=*) LDFLAGS
="$LDFLAGS ${opt#--extra-ldflags=}"
416 --extra-libs
=*) extralibs
=${opt#--extra-libs=}
418 --build-suffix
=*) BUILDSUF
=${opt#--build-suffix=}
420 --cpu
=*) cpu
=`echo $opt | cut -d '=' -f 2`
422 --tune
=*) tune
=`echo $opt | cut -d '=' -f 2`
424 --powerpc-perf-enable
) powerpc_perf
="yes"
426 --disable-mmx
) mmx
="no"
428 --disable-altivec
) altivec
="no"
430 --enable-gprof
) gprof
="yes"
432 --disable-v4l
) v4l
="no"
434 --disable-audio-oss
) audio_oss
="no"
436 --disable-audio-beos
) audio_beos
="no"
438 --disable-dv1394
) dv1394
="no"
440 --disable-network
) network
="no"; ffserver
="no"
442 --disable-zlib
) zlib
="no"
444 --enable-a52
) a52
="yes"
446 --enable-a52bin
) a52bin
="yes" ; extralibs
="$ldl $extralibs"
448 --enable-dts
) dts
="yes" ; extralibs
="$extralibs -ldts"
450 --enable-pp
) pp
="yes"
452 --enable-shared-pp
) shared_pp
="yes"
454 --enable-libgsm
) libgsm
="yes"
456 --enable-mp3lame
) mp3lame
="yes"
458 --enable-libogg
) libogg
="yes"
460 --enable-vorbis
) vorbis
="yes"
462 --enable-theora
) theora
="yes"
464 --enable-faad
) faad
="yes"
466 --enable-faadbin
) faadbin
="yes"
468 --enable-faac
) faac
="yes"
470 --enable-xvid
) xvid
="yes"
472 --enable-x264
) x264
="yes"; extralibs
="$extralibs -lx264"
474 --enable-dc1394
) dc1394
="yes"
476 --disable-vhook
) vhook
="no"
478 --disable-simple_idct
) simpleidct
="no"
480 --enable-mingw32
) mingw32
="yes"
482 --enable-shared
) lshared
="yes"
484 --disable-debug
) debug
="no"
486 --disable-opts
) optimize
="no"
488 --disable-mpegaudio-hp
) mpegaudio_hp
="no"
490 --disable-ffserver
) ffserver
="no"
492 --disable-ffplay
) ffplay
="no"
494 --enable-small
) optimize
="small"
496 --enable-amr_nb
) amr_nb
="yes"
498 --enable-amr_nb-fixed
) amr_nb_fixed
="yes"
500 --enable-amr_wb
) amr_wb
="yes"
502 --enable-amr_if2
) amr_if2
="yes"
504 --enable-sunmlib
) sunmlib
="yes"
506 --enable-pthreads
) pthreads
="yes"
508 --enable-gpl
) gpl
="yes"
510 --enable-memalign-hack
) memalignhack
="yes"
512 --disable-strip
) dostrip
="no"
514 --enable-codec
=*) CODEC_LIST
="$CODEC_LIST ${opt#--enable-codec=}"
516 --disable-codec
=*) CODEC_LIST
="`echo $CODEC_LIST | sed -e \"s#${opt#--disable-codec=}##\"`"
518 --disable-encoders
) CODEC_LIST
="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*encoder//g'`"
523 if test "$theora" = "yes" ; then
524 if test "$libogg" = "no"; then
525 echo "libogg must be enabled to enable Theora"
531 if test "$vorbis" = "yes" ; then
532 if test "$libogg" = "no"; then
533 echo "libogg must be enabled to enable Vorbis"
539 if test "$gpl" != "yes"; then
540 if test "$pp" != "no" -o
"$shared_pp" != "no"; then
541 echo "The Postprocessing code is under GPL and --enable-gpl is not specified"
545 if test "$a52" != "no" -o
"$a52bin" != "no"; then
546 echo "liba52 is under GPL and --enable-gpl is not specified"
550 if test "$xvid" != "no"; then
551 echo "libxvidcore is under GPL and --enable-gpl is not specified"
555 if test "$x264" != "no"; then
556 echo "x264 is under GPL and --enable-gpl is not specified"
560 if test "$dts" != "no"; then
561 echo "libdts is under GPL and --enable-gpl is not specified"
565 if test "$faad" != "no" -o
"$faadbin" != "no"; then
568 int main( void ) { return 0; }
571 if $cc $CFLAGS -o
$TMPE $TMPC 2> /dev
/null
; then
574 #ifndef FAAD2_VERSION
577 int main( void ) { return 0; }
579 if $cc $CFLAGS -o
$TMPE $TMPC 2> /dev
/null
; then
580 echo "faad2 is under GPL and --enable-gpl is not specified"
586 echo "faad test failed"
591 if test "$fail" = "yes"; then
597 if test $mmx = "default"; then
598 if test $cpu = "x86" -o
$cpu = "x86_64"; then
606 needmdynamicnopic
="no"
607 if test $targetos = Darwin
; then
608 if test -n
"`$cc -v 2>&1 | grep xlc`"; then
609 CFLAGS
="$CFLAGS -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
611 gcc_version
="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
612 case "$gcc_version" in
614 CFLAGS
="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
617 CFLAGS
="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
618 if test "$lshared" = no
; then
619 needmdynamicnopic
="yes"
623 CFLAGS
="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
624 if test "$lshared" = no
; then
625 needmdynamicnopic
="yes"
632 # Can only do AltiVec on PowerPC
633 if test $altivec = "default"; then
634 if test $cpu = "powerpc"; then
641 # Add processor-specific flags
644 if test $tune != "generic"; then
646 601|ppc601|PowerPC601
)
647 CFLAGS
="$CFLAGS -mcpu=601"
648 if test $altivec = "yes"; then
649 echo "WARNING: tuning for PPC601 but altivec enabled !";
653 603*|ppc603
*|PowerPC603
*)
654 CFLAGS
="$CFLAGS -mcpu=603"
655 if test $altivec = "yes"; then
656 echo "WARNING: tuning for PPC603 but altivec enabled !";
660 604*|ppc604
*|PowerPC604
*)
661 CFLAGS
="$CFLAGS -mcpu=604"
662 if test $altivec = "yes"; then
663 echo "WARNING: tuning for PPC604 but altivec enabled !";
667 G3|g3|
75*|ppc75
*|PowerPC75
*)
668 CFLAGS
="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt"
669 if test $altivec = "yes"; then
670 echo "WARNING: tuning for PPC75x but altivec enabled !";
674 G4|g4|
745*|ppc745
*|PowerPC745
*)
675 CFLAGS
="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"
676 if test $altivec = "no"; then
677 echo "WARNING: tuning for PPC745x but altivec disabled !";
681 74*|ppc74
*|PowerPC74
*)
682 CFLAGS
="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"
683 if test $altivec = "no"; then
684 echo "WARNING: tuning for PPC74xx but altivec disabled !";
688 G5|g5|
970|ppc970|PowerPC970|power4
*|Power4
*)
689 CFLAGS
="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64"
690 if test $altivec = "no"; then
691 echo "WARNING: tuning for PPC970 but altivec disabled !";
696 i
[3456]86|pentium|pentiumpro|pentium-mmx|pentium
[234]|prescott|k6|k6-
[23]|athlon|athlon-tbird|athlon-4|athlon-
[mx
]p|winchip-c6|winchip2|c3|nocona
)
697 CFLAGS
="$CFLAGS -march=$tune"
700 echo "WARNING: unknown CPU \"$tune\", ignored"
705 # AltiVec flags: The FSF version of GCC differs from the Apple version
706 if test $cpu = "powerpc"; then
707 if test $altivec = "yes"; then
708 if test -n
"`$cc -v 2>&1 | grep version | grep Apple`"; then
709 CFLAGS
="$CFLAGS -faltivec"
711 CFLAGS
="$CFLAGS -maltivec -mabi=altivec"
716 # See if we have <altivec.h>
719 int main( void ) { return 0; }
723 if $cc $CFLAGS -o
$TMPE $TMPC 2> /dev
/null
; then
727 # See does our compiler support Motorola AltiVec C API
728 if test $altivec = "yes"; then
729 if test $_altivec_h = "yes"; then
733 vector signed int v1, v2, v3;
741 vector signed int v1, v2, v3;
747 $cc $CFLAGS -o
$TMPE $TMPC 2> /dev
/null || altivec
="no"
750 # Can only do mmi on mips
751 if test $mmi = "default"; then
752 if test $cpu = "mips"; then
759 # See does our compiler support mmi
760 if test $mmi = "yes"; then
763 __asm__ ("lq \$2, 0(\$2)");
767 $cc -o
$TMPE $TMPC 2> /dev
/null || mmi
="no"
770 if test "$mingw32" = "yes" ; then
782 prefix
="/c/Program Files/FFmpeg"
786 cc
="${cross_prefix}${cc}"
787 ar="${cross_prefix}${ar}"
788 ranlib
="${cross_prefix}${ranlib}"
789 strip
="${cross_prefix}${strip}"
791 if test -z
"$cross_prefix" ; then
794 # big/little endian test
796 #include <inttypes.h>
797 int main(int argc, char ** argv){
798 volatile uint32_t i=0x01234567;
799 return (*((uint8_t*)(&i))) == 0x67;
803 if $cc -o
$TMPE $TMPC 2>/dev
/null
; then
804 $TMPE && bigendian
="yes"
806 echo big
/little
test failed
811 # if cross compiling, cannot launch a program, so make a static guess
812 if test "$cpu" = "powerpc" -o
"$cpu" = "mips" ; then
821 #include <inttypes.h>
822 int main(int argc, char ** argv){
827 $cc -o
$TMPE $TMPC 2>/dev
/null || inttypes
="no"
832 #include <inttypes.h>
833 int main(int argc, char ** argv){
834 volatile uint_fast64_t i=0x01234567;
839 $cc -o
$TMPE $TMPC 2>/dev
/null || emu_fast_int
="yes"
842 # check availability of some header files
846 int main( void ) { return 0; }
851 if $cc -o
$TMPE $TMPC 2> /dev
/null
; then
854 # check for memalign - atmos
860 string = memalign(64, sizeof(char));
864 $cc -o
$TMPE $TMPC 2> /dev
/null || _memalign
=no
867 if test "$_memalign" = "no" -a
"$mmx" = "yes" -a
"$memalignhack" != "yes"; then
868 echo "error, no memalign() but sse enabled, either disable it or use --enable-memalign-hack"
874 int main( void ) { localtime_r(NULL, NULL); }
878 if $cc -o
$TMPE $TMPC 2> /dev
/null
; then
882 if test "$zlib" = "yes"; then
883 # check for zlib - mmu_man
887 if (zlibVersion() != ZLIB_VERSION)
888 puts("zlib version differs !!!");
893 $cc $CFLAGS $LDFLAGS -o
$TMPE $TMPC -lz
2> /dev
/null || zlib
="no"
894 # $TMPE 2> /dev/null > /dev/null || zlib="no"
895 # XXX: more tests needed - runtime test
897 if test "$zlib" = "yes"; then
898 extralibs
="$extralibs -lz"
901 # test for lrintf in math.h
903 #define _ISOC9X_SOURCE 1
905 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
909 if $cc $extralibs -o
$TMPE $TMPC 2> /dev
/null
; then
911 # allanc@chickenandporn.com: cannot execute cross-compiled
912 # code on the host. Only execute if not cross-compiling.
913 if test -z
"$cross_prefix" ; then
914 $TMPE 2> /dev
/null
> /dev
/null || have_lrintf
="no"
919 for restrict_keyword
in restrict __restrict__ __restrict
; do
920 echo "void foo(char * $restrict_keyword p);" > $TMPC
921 if $cc -c
-o
$TMPO $TMPC 2> /dev
/null
; then
922 _restrict
=$restrict_keyword
927 # test gcc version to see if vector builtins can be used
928 # currently only used on i386 for MMX builtins
930 #include <xmmintrin.h>
932 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
935 #error no vector builtins
941 if $cc -msse
-o
$TMPO $TMPC 2> /dev
/null
; then
945 # dlopen/dlfcn.h probing
949 int main( void ) { return (int) dlopen("foo", 0); }
954 if $cc -o
$TMPE $TMPC -ldl
> /dev
/null
2>&1 ; then
959 if $cc -o
$TMPE $TMPC > /dev
/null
2>&1 ; then
966 int main( void ) { return (int) dlopen("foo", 0); }
969 if $cc -o
$TMPE $TMPC -ldl
> /dev
/null
2>&1 ; then
973 if $cc -o
$TMPE $TMPC > /dev
/null
2>&1 ; then
978 if test "$vhook" = "default" ; then
982 ##########################################
986 #include <X11/Xlib.h>
988 int main( void ) { return (int) imlib_load_font("foo"); }
992 if $cc -o
$TMPE $TMPC -lImlib2
-lm
> /dev
/null
2>&1 ; then
996 ##########################################
1000 #include <ft2build.h>
1001 int main( void ) { return (int) FT_Init_FreeType(0); }
1005 if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
1006 if (freetype-config
--version
) >/dev
/null
2>&1 ; then
1007 if $cc -o
$TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` > /dev
/null
2>&1 ; then
1013 ##########################################
1018 #undef main /* We don't want SDL to override our main() */
1019 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
1024 if (sdl-config
--version
) >/dev
/null
2>&1 ; then
1025 if $cc -o
$TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` > /dev
/null
2>&1 ; then
1026 _sdlversion
=`sdl-config --version | sed 's/[^0-9]//g'`
1027 if test "$_sdlversion" -lt
121 ; then
1035 ##########################################
1039 if (texi2html
-version
) >/dev
/null
2>&1; then
1043 if test "$network" = "yes" ; then
1044 ##########################################
1048 #include <sys/types.h>
1049 #include <sys/socket.h>
1050 #include <netinet/in.h>
1053 struct sockaddr_storage saddr;
1054 struct ipv6_mreq mreq6;
1055 getaddrinfo(0,0,0,0);
1056 getnameinfo(0,0,0,0,0,0,0);
1057 IN6_IS_ADDR_MULTICAST(0);
1062 if $cc -o
$TMPE $TMPC > /dev
/null
2>&1 ; then
1067 case "`$cc -v 2>&1 | grep version`" in
1069 CFLAGS
="-Wall -Wno-switch $CFLAGS"
1075 if test "$sdl" = "no" ; then
1079 if test "$debug" = "yes"; then
1083 if test "$optimize" = "small"; then
1084 # CFLAGS=${CFLAGS//-O3/-Os}
1085 CFLAGS
="$CFLAGS -Os"
1088 if test "$optimize" = "yes"; then
1089 if test -n
"`$cc -v 2>&1 | grep xlc`"; then
1090 CFLAGS
="$CFLAGS -O5"
1091 LDFLAGS
="$LDFLAGS -O5"
1093 CFLAGS
="-O3 $CFLAGS"
1097 if test x
"$bindir" = x
""; then
1098 bindir
="${prefix}/bin"
1101 if test x
"$libdir" = x
""; then
1102 libdir
="${prefix}/lib"
1105 if test x
"$mandir" = x
""; then
1106 mandir
="${prefix}/man"
1109 echo "Install prefix $prefix"
1110 echo "Source path $source_path"
1111 echo "C compiler $cc"
1113 echo "CPU $cpu ($tune)"
1114 if test "$BUILDSUF" != ""; then
1115 echo "Build suffix $BUILDSUF"
1117 echo "Big Endian $bigendian"
1118 echo "inttypes.h $inttypes"
1119 echo "broken inttypes.h $emu_fast_int"
1120 if test $cpu = "x86" -o
$cpu = "x86_64"; then
1121 echo "MMX enabled $mmx"
1122 echo "Vector Builtins $builtin_vector"
1124 if test $cpu = "mips"; then
1125 echo "MMI enabled $mmi"
1127 if test $cpu = "powerpc"; then
1128 echo "AltiVec enabled $altivec"
1130 echo "gprof enabled $gprof"
1131 echo "zlib enabled $zlib"
1132 echo "libgsm enabled $libgsm"
1133 echo "mp3lame enabled $mp3lame"
1134 echo "libogg enabled $libogg"
1135 echo "vorbis enabled $vorbis"
1136 echo "theora enabled $theora"
1137 echo "faad enabled $faad"
1138 echo "faadbin enabled $faadbin"
1139 echo "faac enabled $faac"
1140 echo "xvid enabled $xvid"
1141 echo "x264 enabled $x264"
1142 echo "a52 support $a52"
1143 echo "a52 dlopened $a52bin"
1144 echo "dts support $dts"
1145 echo "pp support $pp"
1146 echo "debug symbols $debug"
1147 echo "strip symbols $dostrip"
1148 echo "optimize $optimize"
1149 echo "shared pp $shared_pp"
1150 echo "Video hooking $vhook"
1151 echo "SDL support $sdl"
1152 if test $sdl_too_old = "yes"; then
1153 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
1156 if test "$vhook" = "yes" ; then
1157 echo "Imlib2 support $imlib2"
1158 echo "freetype support $freetype2"
1160 echo "Sun medialib support" $sunmlib
1161 echo "pthreads support" $pthreads
1162 echo "AMR-NB float support" $amr_nb
1163 echo "AMR-NB fixed support" $amr_nb_fixed
1164 echo "AMR-WB float support" $amr_wb
1165 echo "AMR-WB IF2 support" $amr_if2
1166 echo "network support $network"
1167 if test "$network" = "yes" ; then
1168 echo "IPv6 support $ipv6"
1170 if test "$gpl" = "no" ; then
1171 echo "License: LGPL"
1176 echo "Creating config.mak and config.h"
1179 echo " $0 $FFMPEG_CONFIGURATION" >> config.log
1180 echo "# Automatically generated by configure - do not modify" > config.mak
1181 echo "/* Automatically generated by configure - do not modify */" > $TMPH
1182 echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH
1184 echo "prefix=$prefix" >> config.mak
1185 echo "libdir=$libdir" >> config.mak
1186 echo "bindir=$bindir" >> config.mak
1187 echo "mandir=$mandir" >> config.mak
1188 echo "MAKE=$make" >> config.mak
1189 echo "CC=$cc" >> config.mak
1190 echo "AR=$ar" >> config.mak
1191 echo "RANLIB=$ranlib" >> config.mak
1192 if test "$dostrip" = "yes" ; then
1193 echo "STRIP=$strip" >> config.mak
1194 echo "INSTALLSTRIP=-s" >> config.mak
1196 echo "STRIP=echo ignoring strip" >> config.mak
1197 echo "INSTALLSTRIP=" >> config.mak
1200 # SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic. Used when building
1201 # shared modules on OS/X (vhook/Makefile).
1203 if test "$needmdynamicnopic" = yes; then
1204 CFLAGS
="$CFLAGS -mdynamic-no-pic"
1207 echo "OPTFLAGS=$CFLAGS" >> config.mak
1208 echo "SHCFLAGS=$SHCFLAGS">>config.mak
1209 echo "LDFLAGS=$LDFLAGS" >> config.mak
1210 echo "LDCONFIG=$LDCONFIG" >> config.mak
1211 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
1212 echo "SHFLAGS=$SHFLAGS" >> config.mak
1213 echo "BUILDSUF=$BUILDSUF" >> config.mak
1214 echo "LIBPREF=$LIBPREF" >> config.mak
1215 echo "LIBSUF=\${BUILDSUF}$LIBSUF" >> config.mak
1216 echo "SLIBPREF=$SLIBPREF" >> config.mak
1217 echo "SLIBSUF=\${BUILDSUF}$SLIBSUF" >> config.mak
1218 echo "EXESUF=\${BUILDSUF}$EXESUF" >> config.mak
1219 echo "TARGET_OS=$TARGET_OS" >> config.mak
1220 if test "$cpu" = "x86" ; then
1221 echo "TARGET_ARCH_X86=yes" >> config.mak
1222 echo "#define ARCH_X86 1" >> $TMPH
1223 elif test "$cpu" = "x86_64" ; then
1224 echo "TARGET_ARCH_X86_64=yes" >> config.mak
1225 echo "#define ARCH_X86_64 1" >> $TMPH
1226 elif test "$cpu" = "armv4l" ; then
1227 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
1228 echo "#define ARCH_ARMV4L 1" >> $TMPH
1229 elif test "$cpu" = "alpha" ; then
1230 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
1231 echo "#define ARCH_ALPHA 1" >> $TMPH
1232 elif test "$cpu" = "sparc64" ; then
1233 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
1234 echo "#define ARCH_SPARC64 1" >> $TMPH
1235 echo "TARGET_ARCH_SPARC=yes" >> config.mak
1236 echo "#define ARCH_SPARC 1" >> $TMPH
1237 elif test "$cpu" = "sparc" ; then
1238 echo "TARGET_ARCH_SPARC=yes" >> config.mak
1239 echo "#define ARCH_SPARC 1" >> $TMPH
1240 elif test "$cpu" = "powerpc" ; then
1241 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
1242 echo "#define ARCH_POWERPC 1" >> $TMPH
1243 if test $POWERPCMODE = "32bits"; then
1244 echo "#define POWERPC_MODE_32BITS 1" >> $TMPH
1246 echo "#define POWERPC_MODE_64BITS 1" >> $TMPH
1248 if test "$powerpc_perf" = "yes"; then
1249 echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
1251 elif test "$cpu" = "mips" ; then
1252 echo "TARGET_ARCH_MIPS=yes" >> config.mak
1253 echo "#define ARCH_MIPS 1" >> $TMPH
1254 elif test "$cpu" = "sh4" ; then
1255 echo "TARGET_ARCH_SH4=yes" >> config.mak
1256 echo "#define ARCH_SH4 1" >> $TMPH
1258 echo "#define TUNECPU $TUNECPU" >> $TMPH
1259 if test "$bigendian" = "yes" ; then
1260 echo "WORDS_BIGENDIAN=yes" >> config.mak
1261 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
1263 if test "$inttypes" != "yes" ; then
1264 echo "#define EMULATE_INTTYPES 1" >> $TMPH
1266 if test "$emu_fast_int" = "yes" ; then
1267 echo "#define EMULATE_FAST_INT 1" >> $TMPH
1269 if test "$mmx" = "yes" ; then
1270 echo "TARGET_MMX=yes" >> config.mak
1271 echo "#define HAVE_MMX 1" >> $TMPH
1272 echo "#define __CPU__ 586" >> $TMPH
1274 if test "$builtin_vector" = "yes" ; then
1275 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
1276 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
1278 if test "$mmi" = "yes" ; then
1279 echo "TARGET_MMI=yes" >> config.mak
1280 echo "#define HAVE_MMI 1" >> $TMPH
1282 if test "$altivec" = "yes" ; then
1283 echo "TARGET_ALTIVEC=yes" >> config.mak
1284 echo "#define HAVE_ALTIVEC 1" >> $TMPH
1285 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
1286 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
1287 if test "$_altivec_h" = "yes" ; then
1288 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
1290 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
1293 if test "$gprof" = "yes" ; then
1294 echo "TARGET_GPROF=yes" >> config.mak
1295 echo "#define HAVE_GPROF 1" >> $TMPH
1297 if test "$localtime_r" = "yes" ; then
1298 echo "#define HAVE_LOCALTIME_R 1" >> $TMPH
1300 if test "$imlib2" = "yes" ; then
1301 echo "HAVE_IMLIB2=yes" >> config.mak
1303 if test "$freetype2" = "yes" ; then
1304 echo "HAVE_FREETYPE2=yes" >> config.mak
1306 if test "$sunmlib" = "yes" ; then
1307 echo "HAVE_MLIB=yes" >> config.mak
1308 echo "#define HAVE_MLIB 1" >> $TMPH
1309 extralibs
="$extralibs -lmlib"
1311 if test "$pthreads" = "yes" ; then
1312 echo "HAVE_PTHREADS=yes" >> config.mak
1313 echo "#define HAVE_PTHREADS 1" >> $TMPH
1314 echo "#define HAVE_THREADS 1" >> $TMPH
1315 if test $targetos != FreeBSD
-a
$targetos != OpenBSD
; then
1316 extralibs
="$extralibs -lpthread"
1319 if test "$sdl" = "yes" ; then
1320 echo "CONFIG_SDL=yes" >> config.mak
1321 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
1322 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
1324 if test "$texi2html" = "yes"; then
1325 echo "BUILD_DOC=yes" >> config.mak
1327 if test "$have_lrintf" = "yes" ; then
1328 echo "#define HAVE_LRINTF 1" >> $TMPH
1330 if test "$vhook" = "yes" ; then
1331 echo "BUILD_VHOOK=yes" >> config.mak
1332 echo "#define HAVE_VHOOK 1" >> $TMPH
1333 extralibs
="$extralibs $ldl"
1335 if test "$lshared" = "yes" ; then
1336 echo "BUILD_SHARED=yes" >> config.mak
1337 echo "PIC=-fPIC -DPIC" >> config.mak
1339 echo "EXTRALIBS=$extralibs" >> config.mak
1340 version
=`grep '#define FFMPEG_VERSION ' "$source_path/libavcodec/avcodec.h" |
1342 echo "VERSION=$version" >>config.mak
1343 # if you do not want to use encoders, disable that.
1344 echo "#define CONFIG_ENCODERS 1" >> $TMPH
1345 echo "CONFIG_ENCODERS=yes" >> config.mak
1347 # if you do not want to use decoders, disable that.
1348 echo "#define CONFIG_DECODERS 1" >> $TMPH
1349 echo "CONFIG_DECODERS=yes" >> config.mak
1352 if test "$a52" = "yes" ; then
1353 echo "#define CONFIG_AC3 1" >> $TMPH
1354 echo "CONFIG_AC3=yes" >> config.mak
1356 if test "$a52bin" = "yes" ; then
1357 echo "#define CONFIG_A52BIN 1" >> $TMPH
1358 echo "CONFIG_A52BIN=yes" >> config.mak
1363 if test "$dts" = "yes" ; then
1364 echo "#define CONFIG_DTS 1" >> $TMPH
1365 echo "CONFIG_DTS=yes" >> config.mak
1369 if test "$pp" = "yes" ; then
1370 echo "#define CONFIG_PP 1" >> $TMPH
1371 echo "CONFIG_PP=yes" >> config.mak
1373 if test "$shared_pp" = "yes" ; then
1374 echo "#define SHARED_PP 1" >> $TMPH
1375 echo "SHARED_PP=yes" >> config.mak
1379 # mpeg audio high precision mode
1380 if test "$mpegaudio_hp" = "yes" ; then
1381 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
1384 if test "$v4l" = "yes" ; then
1385 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
1386 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
1389 if test "$dv1394" = "yes" ; then
1390 echo "#define CONFIG_DV1394 1" >> $TMPH
1391 echo "CONFIG_DV1394=yes" >> config.mak
1394 if test "$dc1394" = "yes" ; then
1395 echo "#define CONFIG_DC1394 1" >> $TMPH
1396 echo "CONFIG_DC1394=yes" >> config.mak
1399 if test "$dlopen" = "yes" ; then
1400 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
1403 if test "$dlfcn" = "yes" ; then
1404 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
1407 if test "$audio_oss" = "yes" ; then
1408 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
1409 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
1412 if test "$audio_beos" = "yes" ; then
1413 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
1414 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
1417 if test "$network" = "yes" ; then
1418 echo "#define CONFIG_NETWORK 1" >> $TMPH
1419 echo "CONFIG_NETWORK=yes" >> config.mak
1422 if test "$ipv6" = "yes" ; then
1423 echo "#define CONFIG_IPV6 1" >> $TMPH
1426 if test "$zlib" = "yes" ; then
1427 echo "#define CONFIG_ZLIB 1" >> $TMPH
1428 echo "CONFIG_ZLIB=yes" >> config.mak
1431 if test "$libgsm" = "yes" ; then
1432 echo "#define CONFIG_LIBGSM 1" >> $TMPH
1433 echo "CONFIG_LIBGSM=yes" >> config.mak
1436 if test "$mp3lame" = "yes" ; then
1437 echo "#define CONFIG_MP3LAME 1" >> $TMPH
1438 echo "CONFIG_MP3LAME=yes" >> config.mak
1441 if test "$libogg" = "yes" ; then
1442 echo "#define CONFIG_LIBOGG 1" >> $TMPH
1443 echo "CONFIG_LIBOGG=yes" >> config.mak
1446 if test "$vorbis" = "yes" ; then
1447 echo "#define CONFIG_LIBVORBIS 1" >> $TMPH
1448 echo "CONFIG_LIBVORBIS=yes" >> config.mak
1451 if test "$theora" = "yes" ; then
1452 echo "#define CONFIG_LIBTHEORA 1" >> $TMPH
1453 echo "CONFIG_LIBTHEORA=yes" >> config.mak
1456 if test "$faad" = "yes" ; then
1457 echo "#define CONFIG_FAAD 1" >> $TMPH
1458 echo "CONFIG_FAAD=yes" >> config.mak
1461 if test "$faadbin" = "yes" ; then
1462 echo "#define CONFIG_FAADBIN 1" >> $TMPH
1463 echo "CONFIG_FAADBIN=yes" >> config.mak
1466 if test "$faac" = "yes" ; then
1467 echo "#define CONFIG_FAAC 1" >> $TMPH
1468 echo "CONFIG_FAAC=yes" >> config.mak
1471 if test "$xvid" = "yes" ; then
1472 echo "#define CONFIG_XVID 1" >> $TMPH
1473 echo "CONFIG_XVID=yes" >> config.mak
1476 if test "$x264" = "yes" ; then
1477 echo "#define CONFIG_X264 1" >> $TMPH
1478 echo "CONFIG_X264=yes" >> config.mak
1481 if test "$mingw32" = "yes" ; then
1482 echo "#define CONFIG_WIN32 1" >> $TMPH
1483 echo "CONFIG_WIN32=yes" >> config.mak
1484 echo "HAVE_W32THREADS=yes" >> config.mak
1485 echo "#define HAVE_W32THREADS 1" >> $TMPH
1486 echo "#define HAVE_THREADS 1" >> $TMPH
1487 echo "#ifndef __MINGW32__" >> $TMPH
1488 echo "#define __MINGW32__ 1" >> $TMPH
1489 echo "#endif" >> $TMPH
1492 if test "$os2" = "yes" ; then
1493 echo "#define CONFIG_OS2 1" >> $TMPH
1494 echo "CONFIG_OS2=yes" >> config.mak
1497 if test "$TARGET_OS" = "SunOS" ; then
1498 echo "#define CONFIG_SUNOS 1" >> $TMPH
1501 if test "$TARGET_OS" = "BeOS" ; then
1502 echo "HAVE_BEOSTHREADS=yes" >> config.mak
1503 echo "#define HAVE_BEOSTHREADS 1" >> $TMPH
1504 echo "#define HAVE_THREADS 1" >> $TMPH
1507 if test "$darwin" = "yes"; then
1508 echo "#define CONFIG_DARWIN 1" >> $TMPH
1509 echo "CONFIG_DARWIN=yes" >> config.mak
1512 if test "$_malloc_h" = "yes" ; then
1513 echo "#define HAVE_MALLOC_H 1" >> $TMPH
1515 echo "#undef HAVE_MALLOC_H" >> $TMPH
1518 if test "$_memalign" = "yes" ; then
1519 echo "#define HAVE_MEMALIGN 1" >> $TMPH
1521 echo "#undef HAVE_MEMALIGN" >> $TMPH
1524 if test "$memalignhack" = "yes" ; then
1525 echo "#define MEMALIGN_HACK 1" >> $TMPH
1529 if test "$netserver" = "yes" ; then
1530 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1531 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1534 if test "$need_inet_aton" = "yes" ; then
1535 echo "NEED_INET_ATON=yes" >> config.mak
1538 if test "$simpleidct" = "yes" ; then
1539 echo "#define SIMPLE_IDCT 1" >> $TMPH
1542 if test "$ffserver" = "yes" ; then
1543 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1544 echo "CONFIG_FFSERVER=yes" >> config.mak
1547 if test "$ffplay" = "yes" ; then
1548 echo "CONFIG_FFPLAY=yes" >> config.mak
1551 if test "$gpl" = "yes" ; then
1552 echo "#define CONFIG_GPL 1" >> $TMPH
1553 echo "CONFIG_GPL=yes" >> config.mak
1556 echo "#define restrict $_restrict" >> $TMPH
1558 if test "$optimize" = "small"; then
1559 echo "#define always_inline" >> $TMPH
1562 # build tree in object directory if source path is different from current one
1563 if test "$source_path_used" = "yes" ; then
1564 DIRS
="doc libavformat libavcodec libavcodec/alpha libavcodec/armv4l \
1565 libavcodec/i386 libavcodec/sparc libavcodec/mlib \
1566 libavcodec/ppc libavcodec/liba52 libavcodec/libpostproc tests vhook"
1567 FILES
="Makefile libavformat/Makefile libavcodec/Makefile \
1568 libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile \
1569 doc/Makefile doc/texi2pod.pl"
1570 for dir
in $DIRS ; do
1573 for f
in $FILES ; do
1574 ln -sf
"$source_path/$f" $f
1576 echo "SRC_PATH=$source_path" >> config.mak
1578 echo "SRC_PATH='$source_path'" >> config.mak
1581 if test "$amr_wb" = "yes" ; then
1582 echo "#define AMR_WB 1" >> $TMPH
1583 echo "AMR_WB=yes" >> config.mak
1585 echo "AMR WB FLOAT NOTICE ! Make sure you have downloaded TS26.204"
1587 echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip"
1588 echo "and extracted the source to libavcodec/amrwb_float"
1592 if test "$amr_nb" = "yes" ; then
1593 echo "#define AMR_NB 1" >> $TMPH
1594 echo "AMR_NB=yes" >> config.mak
1596 if test "$amr_nb_fixed" = "yes" ; then
1597 echo "AMR_NB_FIXED=yes" >> config.mak
1598 echo "#define AMR_NB_FIXED 1" >> $TMPH
1599 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1600 echo "REL-5 version 5.1.0 from "
1601 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-5??.zip"
1602 echo "and extracted src to libavcodec/amr"
1603 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1604 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1607 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1608 echo "REL-5 V5.1.0 from "
1609 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-5??.zip"
1610 echo "and extracted the source to libavcodec/amr_float"
1611 echo "and if u try this on an alpha, u may need to change Word32 to int in amr/typedef.h"
1615 if test "$amr_if2" = "yes" ; then
1616 echo "AMR_CFLAGS=-DIF2=1" >> config.mak
1621 for codec
in $CODEC_LIST ; do
1622 echo "#define CONFIG_`echo $codec | tr a-z A-Z` 1" >> $TMPH
1623 echo "CONFIG_`echo $codec | tr a-z A-Z`=yes" >> config.mak
1626 diff $TMPH config.h
>/dev
/null
2>&1
1627 if test $?
-ne
0 ; then
1628 mv -f
$TMPH config.h
1630 echo "config.h is unchanged"
1633 rm -f
$TMPO $TMPC $TMPE $TMPS $TMPH
1636 # build pkg-config files libavcodec.pc, libavformat.pc and libpostproc.pc
1638 lavc_build
=`grep '#define LIBAVCODEC_BUILD' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9]//g'`
1639 lavf_build
=`grep '#define LIBAVFORMAT_BUILD' "$source_path/libavformat/avformat.h" | sed 's/[^0-9]//g'`
1642 test "$libogg" = "yes" && requires
="$requires ogg >= 1.1"
1643 test "$vorbis" = "yes" && requires
="$requires vorbis"
1644 test "$theora" = "yes" && requires
="$requires theora"
1647 cat <<EOF >libavcodec.pc
1649 exec_prefix=\${prefix}
1650 libdir=\${exec_prefix}/lib
1651 includedir=\${prefix}/include
1654 Description: FFmpeg codec library
1655 Version: $version-$lavc_build
1658 Libs: -L\${libdir} -lavcodec $extralibs
1659 Cflags: -I\${includedir} -I\${includedir}/ffmpeg
1662 cat <<EOF >libavcodec-uninstalled.pc
1665 libdir=\${pcfiledir}/libavcodec
1666 includedir=\${pcfiledir}/libavcodec
1669 Description: FFmpeg codec library
1670 Version: $version-$lavc_build
1673 Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} $extralibs
1674 Cflags: -I\${includedir}
1678 cat <<EOF >libavformat.pc
1680 exec_prefix=\${prefix}
1681 libdir=\${exec_prefix}/lib
1682 includedir=\${prefix}/include
1685 Description: FFmpeg container format library
1686 Version: $version-$lavf_build
1687 Requires: $requires libavcodec = $version-$lavc_build
1689 Libs: -L\${libdir} -lavformat $extralibs
1690 Cflags: -I\${includedir} -I\${includedir}/ffmpeg
1693 cat <<EOF >libavformat-uninstalled.pc
1696 libdir=\${pcfiledir}/libavformat
1697 includedir=\${pcfiledir}/libavformat
1700 Description: FFmpeg container format library
1701 Version: $version-$lavf_build
1702 Requires: $requires libavcodec = $version-$lavc_build
1704 Libs: \${libdir}/${LIBPREF}avformat${LIBSUF} $extralibs
1705 Cflags: -I\${includedir}
1710 cat <<EOF >libpostproc.pc
1712 exec_prefix=\${prefix}
1713 libdir=\${exec_prefix}/lib
1714 includedir=\${prefix}/include
1717 Description: FFmpeg post processing library
1721 Libs: -L\${libdir} -lpostproc
1722 Cflags: -I\${includedir} -I\${includedir}/postproc
1725 cat <<EOF >libpostproc-uninstalled.pc
1728 libdir=\${pcfiledir}/libavcodec/libpostproc
1729 includedir=\${pcfiledir}/libavcodec/libpostproc
1732 Description: FFmpeg post processing library
1736 Libs: \${libdir}/${LIBPREF}postproc${LIBSUF}
1737 Cflags: -I\${includedir}