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 install man page in DIR [PREFIX/man]"
18 echo " --enable-mp3lame enable MP3 encoding via libmp3lame [default=no]"
19 echo " --enable-libogg enable Ogg support via libogg [default=no]"
20 echo " --enable-vorbis enable Vorbis support via libvorbis [default=no]"
21 echo " --enable-theora enable Theora support via libtheora [default=no]"
22 echo " --enable-faad enable FAAD support via libfaad [default=no]"
23 echo " --enable-faadbin build FAAD support with runtime linking [default=no]"
24 echo " --enable-faac enable FAAC support via libfaac [default=no]"
25 echo " --enable-libgsm enable GSM support via libgsm [default=no]"
26 echo " --enable-xvid enable XviD support via xvidcore [default=no]"
27 echo " --enable-x264 enable H.264 encoding via x264 [default=no]"
28 echo " --enable-mingw32 enable MinGW native/cross Windows compile"
29 echo " --enable-a52 enable GPLed A52 support [default=no]"
30 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
31 echo " --enable-dts enable GPLed DTS support [default=no]"
32 echo " --enable-pp enable GPLed postprocessing support [default=no]"
33 echo " --enable-shared build shared libraries [default=no]"
34 echo " --enable-amr_nb enable amr_nb float audio codec"
35 echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
36 echo " --enable-amr_wb enable amr_wb float audio codec"
37 echo " --enable-amr_if2 enable amr_wb IF2 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"
41 echo " and libraw1394 [default=no]"
42 echo " --enable-gpl allow use of GPL code, the resulting libav*"
43 echo " and ffmpeg will be under GPL [default=no]"
45 echo "Advanced options (experts only):"
46 echo " --source-path=PATH path to source code [$source_path]"
47 echo " --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]"
48 echo " --cc=CC use C compiler CC [$cc]"
49 echo " --make=MAKE use specified make [$make]"
50 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
51 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
52 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
53 echo " --build-suffix=SUFFIX suffix for application specific build []"
54 echo " --cpu=CPU force cpu to CPU [$cpu]"
55 echo " --tune=CPU tune code for a particular CPU"
56 echo " (may fail or perform badly on other CPUs)"
57 echo " --powerpc-perf-enable enable performance report on PPC"
58 echo " (requires enabling PMC)"
59 echo " --disable-mmx disable MMX usage"
60 echo " --disable-iwmmxt disable iwmmxt usage"
61 echo " --disable-altivec disable AltiVec usage"
62 echo " --disable-audio-oss disable OSS audio support [default=no]"
63 echo " --disable-audio-beos disable BeOS audio support [default=no]"
64 echo " --disable-v4l disable video4linux grabbing [default=no]"
65 echo " --disable-bktr disable bktr video grabbing [default=no]"
66 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
67 echo " --disable-network disable network support [default=no]"
68 echo " --disable-zlib disable zlib [default=no]"
69 echo " --disable-lzo disable lzo [default=no]"
70 echo " --disable-simple_idct disable simple IDCT routines [default=no]"
71 echo " --disable-vhook disable video hooking support"
72 echo " --enable-gprof enable profiling with gprof [$gprof]"
73 echo " --disable-debug disable debugging symbols"
74 echo " --disable-opts disable compiler optimizations"
75 echo " --disable-mpegaudio-hp faster (but less accurate)"
76 echo " MPEG audio decoding [default=no]"
77 echo " --disable-ffserver disable ffserver build"
78 echo " --disable-ffplay disable ffplay build"
79 echo " --enable-small optimize for size instead of speed"
80 echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers"
81 echo " --disable-strip disable stripping of executables and shared libraries"
82 echo " --disable-encoder=NAME disables encoder NAME"
83 echo " --enable-encoder=NAME enables encoder NAME"
84 echo " --disable-decoder=NAME disables decoder NAME"
85 echo " --enable-decoder=NAME enables decoder NAME"
86 echo " --disable-encoders disables all encoders"
87 echo " --disable-decoders disables all decoders"
88 echo " --disable-muxers disables all muxers"
89 echo " --disable-demuxers disables all demuxers"
91 echo "NOTE: Object files are built at the place where configure is launched."
95 # set temporary file name
96 if test ! -z
"$TMPDIR" ; then
98 elif test ! -z
"$TEMPDIR" ; then
104 TMPC
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
105 TMPO
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
106 TMPE
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}"
107 TMPS
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
108 TMPH
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
129 i386|i486|i586|i686|i86pc|BePC
)
134 canon_arch
="`cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`"
135 if [ x
"$canon_arch" = x
"x86_64" -o x
"$canon_arch" = x
"amd64" ]; then
136 if [ -z
"`echo $CFLAGS | grep -- -m32`" ]; then
141 # armv4l is a subset of armv5tel
148 "Power Macintosh"|ppc|powerpc
)
220 SHFLAGS
='-shared -Wl,-soname,$@.$(LIBMAJOR)'
226 LDFLAGS
=-Wl
,--warn-common
231 LIB
='$(LIBPREF)$(NAME)$(LIBSUF)'
234 SLIBNAME
='$(SLIBPREF)$(NAME)$(SLIBSUF)'
235 SLIBNAME_WITH_VERSION
='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBVERSION)'
236 SLIBNAME_WITH_MAJOR
='$(SLIBPREF)$(NAME)$(SLIBSUF).$(LIBMAJOR)'
254 prefix
="/boot/home/config"
255 # helps building libavcodec
256 CFLAGS
="-DPIC -fomit-frame-pointer"
257 # 3 gcc releases known for BeOS, each with ugly bugs
258 gcc_version
="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
259 case "$gcc_version" in
260 2.9-beos-991026
*|
2.9-beos-000224
*) echo "R5/GG gcc"
263 *20010315*) echo "BeBits gcc"
264 CFLAGS
="$CFLAGS -fno-expensive-optimizations"
268 # disable Linux things
274 # no need for libm, but the inet stuff
276 if (echo $BEINCLUDES|
grep 'headers/be/bone' >/dev
/null
); then
277 extralibs
="-lbind -lsocket"
291 extralibs
="$extralibs -lsocket -lnsl"
299 LDFLAGS
="$LDFLAGS -export-dynamic"
301 2.
*) extralibs
="$extralibs -lossaudio"
311 LIBOBJFLAGS
="\$(PIC)"
312 LDFLAGS
="$LDFLAGS -export-dynamic -pthread"
313 LDCONFIG
="ldconfig -m \$(libdir)"
314 extralibs
="$extralibs -lossaudio"
323 LDFLAGS
="$LDFLAGS -export-dynamic -pthread"
330 extralibs
="-lpoll -lgnugetopt -lm"
341 SHFLAGS
="-dynamiclib -Wl,-single_module -Wl,-install_name,\$(libdir)/\$(SLIBNAME),-current_version,\$(SPPVERSION),-compatibility_version,\$(SPPVERSION)"
346 LDFLAGS
="-Wl,-dynamic,-search_paths_first"
348 SLIBNAME_WITH_FULLVERSION
='$(SLIBPREF)$(NAME).$(LIBVERSION)$(SLIBSUF)'
349 SLIBNAME_WITH_MAJOR
='$(SLIBPREF)$(NAME).$(LIBMAJOR)$(SLIBSUF)'
350 FFSLDFLAGS
=-Wl
,-bind_at_load
353 # Note: the rest of the mingw32 config is done afterwards as mingw32
354 # can be forced on the command line for Linux cross compilation.
367 LDFLAGS
="$LDFLAGS -rdynamic"
370 ranlib
="echo ignoring ranlib"
378 ranlib
="echo ignoring ranlib"
379 strip
="echo ignoring strip"
381 LDFLAGS
="-Zomf -Zstack 16384 -s"
382 SHFLAGS
="-Zdll -Zomf"
403 # From MPlayer configure. We need TARGET_OS available
404 # to the Makefile, so it can distinguish between flavors
405 # of AltiVec on PowerPC.
406 TARGET_OS
=`( uname -s ) 2>&1`
408 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS|MorphOS
)
416 [cC
][yY
][gG
][wW
][iI
][nN
]*)
420 TARGET_OS
="$TARGET_OS-UNKNOWN"
425 source_path
="`dirname $0`"
426 source_path_used
="yes"
427 if test -z
"$source_path" -o
"$source_path" = "." ; then
429 source_path_used
="no"
431 source_path
="`cd \"$source_path\"; pwd`"
434 FFMPEG_CONFIGURATION
=" "
436 FFMPEG_CONFIGURATION
="$FFMPEG_CONFIGURATION""$opt "
439 CODEC_LIST
=`grep 'register_avcodec(&[a-z]' $source_path/libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'`
443 --prefix
=*) prefix
=`echo $opt | cut -d '=' -f 2`; force_prefix
=yes
445 --libdir
=*) libdir
=`echo $opt | cut -d '=' -f 2`; force_libdir
=yes
447 --mandir
=*) mandir
=`echo $opt | cut -d '=' -f 2`
449 --source-path
=*) source_path
=`echo $opt | cut -d '=' -f 2`
451 --cross-prefix
=*) cross_prefix
=`echo $opt | cut -d '=' -f 2`
453 --cc
=*) cc
=`echo $opt | cut -d '=' -f 2-`
455 --make=*) make=`echo $opt | cut -d '=' -f 2`
457 --extra-cflags
=*) CFLAGS
="$CFLAGS ${opt#--extra-cflags=}"
459 --extra-ldflags
=*) LDFLAGS
="$LDFLAGS ${opt#--extra-ldflags=}"
461 --extra-libs
=*) extralibs
=${opt#--extra-libs=}
463 --build-suffix
=*) BUILDSUF
=${opt#--build-suffix=}
465 --cpu
=*) cpu
=`echo $opt | cut -d '=' -f 2`
467 --tune
=*) tune
=`echo $opt | cut -d '=' -f 2`
469 --powerpc-perf-enable
) powerpc_perf
="yes"
471 --disable-mmx
) mmx
="no"
473 --disable-iwmmxt
) iwmmxt
="no"
475 --disable-altivec
) altivec
="no"
477 --enable-gprof
) gprof
="yes"
479 --disable-v4l
) v4l
="no"
481 --disable-bktr
) bktr
="no"
483 --disable-audio-oss
) audio_oss
="no"
485 --disable-audio-beos
) audio_beos
="no"
487 --disable-dv1394
) dv1394
="no"
489 --disable-network
) network
="no"; ffserver
="no"
491 --disable-zlib
) zlib
="no"
493 --disable-lzo
) lzo
="no"
495 --enable-a52
) a52
="yes"
497 --enable-a52bin
) a52bin
="yes"
499 --enable-dts
) dts
="yes"
500 extralibs
="$extralibs -ldts"
502 --enable-pp
) pp
="yes"
504 --enable-libgsm
) libgsm
="yes"
505 extralibs
="$extralibs -lgsm"
507 --enable-mp3lame
) mp3lame
="yes"
508 extralibs
="$extralibs -lmp3lame"
510 --enable-libogg
) libogg
="yes"
511 extralibs
="$extralibs -logg"
512 pkg_requires
="$pkg_requires ogg >= 1.1"
514 --enable-vorbis
) vorbis
="yes"
515 extralibs
="$extralibs -lvorbis -lvorbisenc"
516 pkg_requires
="$pkg_requires vorbis vorbisenc"
518 --enable-theora
) theora
="yes"
519 extralibs
="$extralibs -ltheora"
520 pkg_requires
="$pkg_requires theora"
522 --enable-faad
) faad
="yes"
523 extralibs
="$extralibs -lfaad"
525 --enable-faadbin
) faadbin
="yes"
527 --enable-faac
) faac
="yes"
528 extralibs
="$extralibs -lfaac"
530 --enable-xvid
) xvid
="yes"
531 extralibs
="$extralibs -lxvidcore"
533 --enable-x264
) x264
="yes"
534 extralibs
="$extralibs -lx264"
536 --enable-dc1394
) dc1394
="yes"
537 extralibs
="$extralibs -ldc1394_control -lraw1394"
538 pkg_requires
="$pkg_requires libraw1394"
540 --disable-vhook
) vhook
="no"
542 --disable-simple_idct
) simpleidct
="no"
544 --enable-mingw32
) mingw32
="yes"
546 --enable-shared
) lshared
="yes"
548 --disable-debug
) debug
="no"
550 --disable-opts
) optimize
="no"
552 --disable-mpegaudio-hp
) mpegaudio_hp
="no"
554 --disable-ffserver
) ffserver
="no"
556 --disable-ffplay
) ffplay
="no"
558 --enable-small
) optimize
="small"
560 --enable-amr_nb
) amr_nb
="yes"
562 --enable-amr_nb-fixed
) amr_nb_fixed
="yes"
564 --enable-amr_wb
) amr_wb
="yes"
566 --enable-amr_if2
) amr_if2
="yes"
568 --enable-sunmlib
) sunmlib
="yes"
570 --enable-pthreads
) pthreads
="yes"
572 --enable-gpl
) gpl
="yes"
574 --enable-memalign-hack
) memalignhack
="yes"
576 --disable-strip
) dostrip
="no"
578 --enable-encoder
=*) CODEC_LIST
="$CODEC_LIST ${opt#--enable-encoder=}_encoder"
580 --enable-decoder
=*) CODEC_LIST
="$CODEC_LIST ${opt#--enable-decoder=}_decoder"
582 --disable-encoder
=*) CODEC_LIST
="`echo $CODEC_LIST | sed -e \"s#${opt#--disable-encoder=}_encoder##\"`"
584 --disable-decoder
=*) CODEC_LIST
="`echo $CODEC_LIST | sed -e \"s#${opt#--disable-decoder=}_decoder##\"`"
586 --disable-encoders
) CODEC_LIST
="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*encoder//g'`"
588 --disable-decoders
) CODEC_LIST
="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*decoder//g'`"
590 --disable-muxers
) muxers
="no"
592 --disable-demuxers
) demuxers
="no"
595 echo "Unknown option \"$opt\"."
596 echo "See $0 --help for available options."
602 if test "$theora" = "yes" ; then
603 if test "$libogg" = "no"; then
604 echo "libogg must be enabled to enable Theora."
610 if test "$vorbis" = "yes" ; then
611 if test "$libogg" = "no"; then
612 echo "libogg must be enabled to enable Vorbis."
618 if test "$gpl" != "yes"; then
619 if test "$pp" != "no"; then
620 echo "The Postprocessing code is under GPL and --enable-gpl is not specified."
624 if test "$a52" != "no" -o
"$a52bin" != "no"; then
625 echo "liba52 is under GPL and --enable-gpl is not specified."
629 if test "$xvid" != "no"; then
630 echo "libxvidcore is under GPL and --enable-gpl is not specified."
634 if test "$x264" != "no"; then
635 echo "x264 is under GPL and --enable-gpl is not specified."
639 if test "$dts" != "no"; then
640 echo "libdts is under GPL and --enable-gpl is not specified."
644 if test "$faad" != "no" -o
"$faadbin" != "no"; then
647 int main( void ) { return 0; }
650 if $cc $CFLAGS -o
$TMPE $TMPC 2> /dev
/null
; then
653 #ifndef FAAD2_VERSION
656 int main( void ) { return 0; }
658 if $cc $CFLAGS -o
$TMPE $TMPC 2> /dev
/null
; then
659 echo "FAAD2 is under GPL and --enable-gpl is not specified."
665 echo "FAAD test failed."
670 if test "$fail" = "yes"; then
676 if test $mmx = "default"; then
677 if test $cpu = "x86" -o
$cpu = "x86_64"; then
684 # check iwmmxt support
685 if test $iwmmxt = "default" -a
$cpu = "armv4l"; then
688 __asm__ __volatile__ ("wunpckelub wr6, wr4");
693 if ${cross_prefix}${cc} -o
$TMPO $TMPC 2> /dev
/null
; then
699 needmdynamicnopic
="no"
700 if test $targetos = Darwin
; then
701 if test -n
"`$cc -v 2>&1 | grep xlc`"; then
702 CFLAGS
="$CFLAGS -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
704 gcc_version
="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
705 case "$gcc_version" in
707 CFLAGS
="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
710 CFLAGS
="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
711 if test "$lshared" = no
; then
712 needmdynamicnopic
="yes"
716 CFLAGS
="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
717 if test "$lshared" = no
; then
718 needmdynamicnopic
="yes"
725 # Can only do AltiVec on PowerPC
726 if test $altivec = "default"; then
727 if test $cpu = "powerpc"; then
734 # Add processor-specific flags
737 if test $tune != "generic"; then
739 601|ppc601|PowerPC601
)
740 CFLAGS
="$CFLAGS -mcpu=601"
741 if test $altivec = "yes"; then
742 echo "WARNING: Tuning for PPC601 but AltiVec enabled!";
746 603*|ppc603
*|PowerPC603
*)
747 CFLAGS
="$CFLAGS -mcpu=603"
748 if test $altivec = "yes"; then
749 echo "WARNING: Tuning for PPC603 but AltiVec enabled!";
753 604*|ppc604
*|PowerPC604
*)
754 CFLAGS
="$CFLAGS -mcpu=604"
755 if test $altivec = "yes"; then
756 echo "WARNING: Tuning for PPC604 but AltiVec enabled!";
760 G3|g3|
75*|ppc75
*|PowerPC75
*)
761 CFLAGS
="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt"
762 if test $altivec = "yes"; then
763 echo "WARNING: Tuning for PPC75x but AltiVec enabled!";
767 G4|g4|
745*|ppc745
*|PowerPC745
*)
768 CFLAGS
="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"
769 if test $altivec = "no"; then
770 echo "WARNING: Tuning for PPC745x but AltiVec disabled!";
774 74*|ppc74
*|PowerPC74
*)
775 CFLAGS
="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"
776 if test $altivec = "no"; then
777 echo "WARNING: Tuning for PPC74xx but AltiVec disabled!";
781 G5|g5|
970|ppc970|PowerPC970|power4
*|Power4
*)
782 CFLAGS
="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64"
783 if test $altivec = "no"; then
784 echo "WARNING: Tuning for PPC970 but AltiVec disabled!";
789 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|athlon64|k8|opteron|athlon-fx
)
790 CFLAGS
="$CFLAGS -march=$tune"
793 echo "WARNING: Unknown CPU \"$tune\", ignored."
798 # AltiVec flags: The FSF version of GCC differs from the Apple version
799 if test $cpu = "powerpc"; then
800 if test $altivec = "yes"; then
801 if test -n
"`$cc -v 2>&1 | grep version | grep Apple`"; then
802 CFLAGS
="$CFLAGS -faltivec"
804 CFLAGS
="$CFLAGS -maltivec -mabi=altivec"
809 # check if we have <altivec.h>
812 int main( void ) { return 0; }
816 if $cc $CFLAGS -o
$TMPE $TMPC 2> /dev
/null
; then
820 # check if our compiler supports Motorola AltiVec C API
821 if test $altivec = "yes"; then
822 if test $_altivec_h = "yes"; then
826 vector signed int v1, v2, v3;
834 vector signed int v1, v2, v3;
840 $cc $CFLAGS -o
$TMPE $TMPC 2> /dev
/null || altivec
="no"
843 # mmi only available on mips
844 if test $mmi = "default"; then
845 if test $cpu = "mips"; then
852 # check if our compiler supports mmi
853 if test $mmi = "yes"; then
856 __asm__ ("lq \$2, 0(\$2)");
860 $cc -o
$TMPE $TMPC 2> /dev
/null || mmi
="no"
863 if test "$mingw32" = "yes" ; then
874 if test "$force_prefix" != yes; then prefix
="/c/Program Files/FFmpeg"; fi
875 if test "$force_libdir" != yes; then bindir
="$prefix"; fi
878 cc
="${cross_prefix}${cc}"
879 ar="${cross_prefix}${ar}"
880 ranlib
="${cross_prefix}${ranlib}"
881 strip
="${cross_prefix}${strip}"
883 if test -z
"$cross_prefix" ; then
886 # big/little-endian test
888 #include <inttypes.h>
889 int main(int argc, char ** argv){
890 volatile uint32_t i=0x01234567;
891 return (*((uint8_t*)(&i))) == 0x67;
895 if $cc -o
$TMPE $TMPC 2>/dev
/null
; then
896 $TMPE && bigendian
="yes"
898 echo big
/little
test failed
903 # programs cannot be launched if cross compiling, so make a static guess
904 if test "$cpu" = "powerpc" -o
"$cpu" = "mips" ; then
913 #include <inttypes.h>
914 int main(int argc, char ** argv){
919 $cc -o
$TMPE $TMPC 2>/dev
/null || inttypes
="no"
924 #include <inttypes.h>
925 int main(int argc, char ** argv){
926 volatile uint_fast64_t i=0x01234567;
931 $cc -o
$TMPE $TMPC 2>/dev
/null || emu_fast_int
="yes"
934 # check availability of some header files
938 int main( void ) { return 0; }
943 if $cc -o
$TMPE $TMPC 2> /dev
/null
; then
946 # check for memalign - atmos
952 string = memalign(64, sizeof(char));
956 $cc -o
$TMPE $TMPC 2> /dev
/null || _memalign
=no
959 if test "$_memalign" = "no" -a
"$mmx" = "yes" -a
"$memalignhack" != "yes"; then
960 echo "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
966 int main( void ) { localtime_r(NULL, NULL); }
970 if $cc -o
$TMPE $TMPC 2> /dev
/null
; then
974 if test "$zlib" = "yes"; then
975 # check for zlib - mmu_man
979 if (zlibVersion() != ZLIB_VERSION)
980 puts("zlib version differs !!!");
985 $cc $CFLAGS $LDFLAGS -o
$TMPE $TMPC -lz
2> /dev
/null || zlib
="no"
986 # $TMPE 2> /dev/null > /dev/null || zlib="no"
987 # XXX: more tests needed - runtime test
989 if test "$zlib" = "yes"; then
990 extralibs
="$extralibs -lz"
993 if test "$lzo" = "yes" -a
"$gpl" = "yes"; then
1002 $cc $CFLAGS $LDFLAGS -o
$TMPE $TMPC -llzo
2> /dev
/null || lzo
="no"
1006 if test "$lzo" = "yes"; then
1007 extralibs
="$extralibs -llzo"
1010 # test for lrintf in math.h
1012 #define _ISOC9X_SOURCE 1
1014 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
1018 if $cc $CFLAGS $LDFLAGS $extralibs -o
$TMPE $TMPC 2> /dev
/null
; then
1020 # allanc@chickenandporn.com: cannot execute cross-compiled
1021 # code on the host. Only execute if not cross-compiling.
1022 if test -z
"$cross_prefix" ; then
1023 $TMPE 2> /dev
/null
> /dev
/null || have_lrintf
="no"
1028 for restrict_keyword
in restrict __restrict__ __restrict
; do
1029 echo "void foo(char * $restrict_keyword p);" > $TMPC
1030 if $cc -c
-o
$TMPO $TMPC 2> /dev
/null
; then
1031 _restrict
=$restrict_keyword
1036 # test gcc version to see if vector builtins can be used
1037 # currently only used on i386 for MMX builtins
1039 #include <xmmintrin.h>
1041 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
1044 #error no vector builtins
1050 if $cc -msse
-o
$TMPO $TMPC 2> /dev
/null
; then
1054 # Probe for -Wdeclaration-after-statement
1055 if test "$cc" = "gcc"; then
1057 int main( void ) { return 0; }
1060 if $cc -Wdeclaration-after-statement
-Werror
-o
$TMPE $TMPC 2> /dev
/null
; then
1061 CFLAGS
="$CFLAGS -Wdeclaration-after-statement"
1065 # dlopen/dlfcn.h probing
1069 int main( void ) { return (int) dlopen("foo", 0); }
1074 if $cc $CFLAGS $LDFLAGS -o
$TMPE $TMPC -ldl
> /dev
/null
2>&1 ; then
1079 if $cc $CFLAGS $LDFLAGS -o
$TMPE $TMPC > /dev
/null
2>&1 ; then
1086 int main( void ) { return (int) dlopen("foo", 0); }
1089 if $cc $CFLAGS $LDFLAGS -o
$TMPE $TMPC -ldl
> /dev
/null
2>&1 ; then
1093 if $cc $CFLAGS $LDFLAGS -o
$TMPE $TMPC > /dev
/null
2>&1 ; then
1098 if test "$vhook" = "default" ; then
1102 if test "$vhook" = "yes" -o
"$a52bin" = "yes" -o
"$faadbin" = "yes"; then
1103 extralibs
="$extralibs $ldl"
1107 ##########################################
1111 #include <X11/Xlib.h>
1113 int main( void ) { return (int) imlib_load_font("foo"); }
1117 if $cc $CFLAGS $LDFLAGS -o
$TMPE $TMPC -lImlib2
-lm
> /dev
/null
2>&1 ; then
1121 ##########################################
1125 #include <ft2build.h>
1126 int main( void ) { return (int) FT_Init_FreeType(0); }
1130 if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
1131 if (freetype-config
--version
) >/dev
/null
2>&1 ; then
1132 if $cc -o
$TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` > /dev
/null
2>&1 ; then
1138 ##########################################
1143 #undef main /* We don't want SDL to override our main() */
1144 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
1149 if (sdl-config
--version
) >/dev
/null
2>&1 ; then
1150 if $cc -o
$TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` > /dev
/null
2>&1 ; then
1151 _sdlversion
=`sdl-config --version | sed 's/[^0-9]//g'`
1152 if test "$_sdlversion" -lt
121 ; then
1160 ##########################################
1164 if (texi2html
-version
) >/dev
/null
2>&1; then
1168 if test "$network" = "yes" ; then
1169 ##########################################
1173 #include <sys/types.h>
1174 #include <sys/socket.h>
1175 #include <netinet/in.h>
1178 struct sockaddr_storage saddr;
1179 struct ipv6_mreq mreq6;
1180 getaddrinfo(0,0,0,0);
1181 getnameinfo(0,0,0,0,0,0,0);
1182 IN6_IS_ADDR_MULTICAST(0);
1187 if $cc -o
$TMPE $TMPC > /dev
/null
2>&1 ; then
1192 case "`$cc -v 2>&1 | grep version`" in
1194 CFLAGS
="-Wall -Wno-switch $CFLAGS"
1200 if test "$sdl" = "no" ; then
1204 if test "$debug" = "yes"; then
1208 if test "$optimize" = "small"; then
1209 # CFLAGS=${CFLAGS//-O3/-Os}
1210 CFLAGS
="$CFLAGS -Os"
1213 if test "$optimize" = "yes"; then
1214 if test -n
"`$cc -v 2>&1 | grep xlc`"; then
1215 CFLAGS
="$CFLAGS -O5"
1216 LDFLAGS
="$LDFLAGS -O5"
1218 CFLAGS
="-O3 $CFLAGS"
1222 # PIC flags for shared library objects where they are needed
1223 if test "$lshared" = "yes" ; then
1224 # LIBOBJFLAGS may have already been set in the OS configuration
1225 if test -z
"$LIBOBJFLAGS" ; then
1226 if test "$cpu" = "x86_64" -o
"$cpu" = "ia64" -o
"$cpu" = "alpha" ; then
1227 LIBOBJFLAGS
="\$(PIC)"
1232 if test x
"$bindir" = x
""; then
1233 bindir
="${prefix}/bin"
1236 if test x
"$libdir" = x
""; then
1237 libdir
="${prefix}/lib"
1240 if test x
"$mandir" = x
""; then
1241 mandir
="${prefix}/man"
1244 echo "install prefix $prefix"
1245 echo "source path $source_path"
1246 echo "C compiler $cc"
1248 echo "CPU $cpu ($tune)"
1249 if test "$BUILDSUF" != ""; then
1250 echo "build suffix $BUILDSUF"
1252 echo "big-endian $bigendian"
1253 echo "inttypes.h $inttypes"
1254 echo "broken inttypes.h $emu_fast_int"
1255 if test $cpu = "x86" -o
$cpu = "x86_64"; then
1256 echo "MMX enabled $mmx"
1257 echo "Vector Builtins $builtin_vector"
1259 if test $cpu = "armv4l"; then
1260 echo "IWMMXT enabled $iwmmxt"
1262 if test $cpu = "mips"; then
1263 echo "MMI enabled $mmi"
1265 if test $cpu = "powerpc"; then
1266 echo "AltiVec enabled $altivec"
1268 echo "gprof enabled $gprof"
1269 echo "zlib enabled $zlib"
1270 echo "lzo enabled $lzo"
1271 echo "libgsm enabled $libgsm"
1272 echo "mp3lame enabled $mp3lame"
1273 echo "libogg enabled $libogg"
1274 echo "Vorbis enabled $vorbis"
1275 echo "Theora enabled $theora"
1276 echo "FAAD enabled $faad"
1277 echo "faadbin enabled $faadbin"
1278 echo "FAAC enabled $faac"
1279 echo "XviD enabled $xvid"
1280 echo "x264 enabled $x264"
1281 echo "a52 support $a52"
1282 echo "a52 dlopened $a52bin"
1283 echo "DTS support $dts"
1284 echo "pp support $pp"
1285 echo "debug symbols $debug"
1286 echo "strip symbols $dostrip"
1287 echo "optimize $optimize"
1288 echo "shared $shared"
1289 echo "video hooking $vhook"
1290 echo "SDL support $sdl"
1291 if test $sdl_too_old = "yes"; then
1292 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support."
1295 if test "$vhook" = "yes" ; then
1296 echo "Imlib2 support $imlib2"
1297 echo "FreeType support $freetype2"
1299 echo "Sun medialib support" $sunmlib
1300 echo "pthreads support" $pthreads
1301 echo "AMR-NB float support" $amr_nb
1302 echo "AMR-NB fixed support" $amr_nb_fixed
1303 echo "AMR-WB float support" $amr_wb
1304 echo "AMR-WB IF2 support" $amr_if2
1305 echo "network support $network"
1306 if test "$network" = "yes" ; then
1307 echo "IPv6 support $ipv6"
1309 if test "$gpl" = "no" ; then
1310 echo "License: LGPL"
1315 echo "Creating config.mak and config.h..."
1318 echo " $0 $FFMPEG_CONFIGURATION" >> config.log
1319 echo "# Automatically generated by configure - do not modify!" > config.mak
1320 echo "/* Automatically generated by configure - do not modify! */" > $TMPH
1321 echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH
1323 echo "prefix=\$(DESTDIR)$prefix" >> config.mak
1324 echo "libdir=\$(DESTDIR)$libdir" >> config.mak
1325 echo "bindir=\$(DESTDIR)$bindir" >> config.mak
1326 echo "mandir=\$(DESTDIR)$mandir" >> config.mak
1327 echo "MAKE=$make" >> config.mak
1328 echo "CC=$cc" >> config.mak
1329 echo "AR=$ar" >> config.mak
1330 echo "RANLIB=$ranlib" >> config.mak
1331 if test "$dostrip" = "yes" ; then
1332 echo "STRIP=$strip" >> config.mak
1333 echo "INSTALLSTRIP=$installstrip" >> config.mak
1335 echo "STRIP=echo ignoring strip" >> config.mak
1336 echo "INSTALLSTRIP=" >> config.mak
1339 # SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic, used when building
1340 # shared modules on OS/X (vhook/Makefile).
1342 if test "$needmdynamicnopic" = yes; then
1343 CFLAGS
="$CFLAGS -mdynamic-no-pic"
1346 echo "OPTFLAGS=$CFLAGS" >> config.mak
1347 echo "SHCFLAGS=$SHCFLAGS">>config.mak
1348 echo "LDFLAGS=$LDFLAGS" >> config.mak
1349 echo "LDCONFIG=$LDCONFIG" >> config.mak
1350 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
1351 echo "SHFLAGS=$SHFLAGS" >> config.mak
1352 echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak
1353 echo "BUILDSUF=$BUILDSUF" >> config.mak
1354 echo "LIBPREF=$LIBPREF" >> config.mak
1355 echo "LIBSUF=\${BUILDSUF}$LIBSUF" >> config.mak
1356 echo "LIB=$LIB" >> config.mak
1357 echo "SLIBPREF=$SLIBPREF" >> config.mak
1358 echo "SLIBSUF=\${BUILDSUF}$SLIBSUF" >> config.mak
1359 echo "EXESUF=\${BUILDSUF}$EXESUF" >> config.mak
1360 echo "TARGET_OS=$TARGET_OS" >> config.mak
1361 if test "$cpu" = "x86" ; then
1362 echo "TARGET_ARCH_X86=yes" >> config.mak
1363 echo "#define ARCH_X86 1" >> $TMPH
1364 elif test "$cpu" = "x86_64" ; then
1365 echo "TARGET_ARCH_X86_64=yes" >> config.mak
1366 echo "#define ARCH_X86_64 1" >> $TMPH
1367 elif test "$cpu" = "armv4l" ; then
1368 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
1369 echo "#define ARCH_ARMV4L 1" >> $TMPH
1370 elif test "$cpu" = "alpha" ; then
1371 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
1372 echo "#define ARCH_ALPHA 1" >> $TMPH
1373 elif test "$cpu" = "sparc64" ; then
1374 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
1375 echo "#define ARCH_SPARC64 1" >> $TMPH
1376 echo "TARGET_ARCH_SPARC=yes" >> config.mak
1377 echo "#define ARCH_SPARC 1" >> $TMPH
1378 elif test "$cpu" = "sparc" ; then
1379 echo "TARGET_ARCH_SPARC=yes" >> config.mak
1380 echo "#define ARCH_SPARC 1" >> $TMPH
1381 elif test "$cpu" = "powerpc" ; then
1382 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
1383 echo "#define ARCH_POWERPC 1" >> $TMPH
1384 if test $POWERPCMODE = "32bits"; then
1385 echo "#define POWERPC_MODE_32BITS 1" >> $TMPH
1387 echo "#define POWERPC_MODE_64BITS 1" >> $TMPH
1389 if test "$powerpc_perf" = "yes"; then
1390 echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
1392 elif test "$cpu" = "mips" ; then
1393 echo "TARGET_ARCH_MIPS=yes" >> config.mak
1394 echo "#define ARCH_MIPS 1" >> $TMPH
1395 elif test "$cpu" = "sh4" ; then
1396 echo "TARGET_ARCH_SH4=yes" >> config.mak
1397 echo "#define ARCH_SH4 1" >> $TMPH
1398 elif test "$cpu" = "parisc" ; then
1399 echo "TARGET_ARCH_PARISC=yes" >> config.mak
1400 echo "#define ARCH_PARISC 1" >> $TMPH
1401 elif test "$cpu" = "s390" ; then
1402 echo "TARGET_ARCH_S390=yes" >> config.mak
1403 echo "#define ARCH_S390 1" >> $TMPH
1404 elif test "$cpu" = "m68k" ; then
1405 echo "TARGET_ARCH_M68K=yes" >> config.mak
1406 echo "#define ARCH_M68K 1" >> $TMPH
1407 elif test "$cpu" = "ia64" ; then
1408 echo "TARGET_ARCH_IA64=yes" >> config.mak
1409 echo "#define ARCH_IA64 1" >> $TMPH
1411 echo "#define TUNECPU $TUNECPU" >> $TMPH
1412 if test "$bigendian" = "yes" ; then
1413 echo "WORDS_BIGENDIAN=yes" >> config.mak
1414 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
1416 if test "$inttypes" != "yes" ; then
1417 echo "#define EMULATE_INTTYPES 1" >> $TMPH
1419 if test "$emu_fast_int" = "yes" ; then
1420 echo "#define EMULATE_FAST_INT 1" >> $TMPH
1422 if test "$mmx" = "yes" ; then
1423 echo "TARGET_MMX=yes" >> config.mak
1424 echo "#define HAVE_MMX 1" >> $TMPH
1425 echo "#define __CPU__ 586" >> $TMPH
1427 if test "$builtin_vector" = "yes" ; then
1428 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
1429 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
1431 if test "$iwmmxt" = "yes" ; then
1432 echo "TARGET_IWMMXT=yes" >> config.mak
1433 echo "#define HAVE_IWMMXT 1" >> $TMPH
1435 if test "$mmi" = "yes" ; then
1436 echo "TARGET_MMI=yes" >> config.mak
1437 echo "#define HAVE_MMI 1" >> $TMPH
1439 if test "$altivec" = "yes" ; then
1440 echo "TARGET_ALTIVEC=yes" >> config.mak
1441 echo "#define HAVE_ALTIVEC 1" >> $TMPH
1442 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
1443 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
1444 if test "$_altivec_h" = "yes" ; then
1445 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
1447 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
1450 if test "$gprof" = "yes" ; then
1451 echo "TARGET_GPROF=yes" >> config.mak
1452 echo "#define HAVE_GPROF 1" >> $TMPH
1454 if test "$localtime_r" = "yes" ; then
1455 echo "#define HAVE_LOCALTIME_R 1" >> $TMPH
1457 if test "$imlib2" = "yes" ; then
1458 echo "HAVE_IMLIB2=yes" >> config.mak
1460 if test "$freetype2" = "yes" ; then
1461 echo "HAVE_FREETYPE2=yes" >> config.mak
1463 if test "$sunmlib" = "yes" ; then
1464 echo "HAVE_MLIB=yes" >> config.mak
1465 echo "#define HAVE_MLIB 1" >> $TMPH
1466 extralibs
="$extralibs -lmlib"
1468 if test "$pthreads" = "yes" ; then
1469 echo "HAVE_PTHREADS=yes" >> config.mak
1470 echo "#define HAVE_PTHREADS 1" >> $TMPH
1471 echo "#define HAVE_THREADS 1" >> $TMPH
1472 if test $targetos != FreeBSD
-a
$targetos != OpenBSD
; then
1473 extralibs
="$extralibs -lpthread"
1476 if test "$sdl" = "yes" ; then
1477 echo "CONFIG_SDL=yes" >> config.mak
1478 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
1479 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
1481 if test "$texi2html" = "yes"; then
1482 echo "BUILD_DOC=yes" >> config.mak
1484 if test "$have_lrintf" = "yes" ; then
1485 echo "#define HAVE_LRINTF 1" >> $TMPH
1487 if test "$vhook" = "yes" ; then
1488 echo "BUILD_VHOOK=yes" >> config.mak
1489 echo "#define HAVE_VHOOK 1" >> $TMPH
1492 pp_version
=`grep '#define LIBPOSTPROC_VERSION ' "$source_path/libavcodec/libpostproc/postprocess.h" | sed 's/[^0-9\.]//g'`
1493 lavc_version
=`grep '#define LIBAVCODEC_VERSION ' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9\.]//g'`
1494 lavf_version
=`grep '#define LIBAVFORMAT_VERSION ' "$source_path/libavformat/avformat.h" | sed 's/[^0-9\.]//g'`
1495 lavu_version
=`grep '#define LIBAVUTIL_VERSION ' "$source_path/libavutil/avutil.h" | sed 's/[^0-9\.]//g'`
1499 if test "$lshared" = "yes" ; then
1500 echo "BUILD_SHARED=yes" >> config.mak
1501 echo "PIC=-fPIC -DPIC" >> config.mak
1502 echo "SPPMAJOR=${lavc_version%%.*}" >> config.mak
1503 echo "SPPVERSION=$lavc_version" >> config.mak
1504 echo "LAVCMAJOR=${lavc_version%%.*}" >> config.mak
1505 echo "LAVCVERSION=$lavc_version" >> config.mak
1506 echo "LAVFMAJOR=${lavf_version%%.*}" >> config.mak
1507 echo "LAVFVERSION=$lavf_version" >> config.mak
1508 echo "LAVUMAJOR=${lavu_version%%.*}" >> config.mak
1509 echo "LAVUVERSION=$lavu_version" >> config.mak
1510 echo "SLIBNAME=${SLIBNAME}" >> config.mak
1511 echo "SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION}" >> config.mak
1512 echo "SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR}" >> config.mak
1514 echo "EXTRALIBS=$extralibs" >> config.mak
1515 version
=`grep '#define FFMPEG_VERSION ' "$source_path/libavcodec/avcodec.h" |
1517 echo "VERSION=$version" >>config.mak
1518 # If you do not want to use encoders, disable them.
1519 echo "#define CONFIG_ENCODERS 1" >> $TMPH
1520 echo "CONFIG_ENCODERS=yes" >> config.mak
1522 # If you do not want to use decoders, disable them.
1523 echo "#define CONFIG_DECODERS 1" >> $TMPH
1524 echo "CONFIG_DECODERS=yes" >> config.mak
1527 if test "$muxers" = "yes" ; then
1528 echo "#define CONFIG_MUXERS 1" >> $TMPH
1529 echo "CONFIG_MUXERS=yes" >> config.mak
1533 if test "$demuxers" = "yes" ; then
1534 echo "#define CONFIG_DEMUXERS 1" >> $TMPH
1535 echo "CONFIG_DEMUXERS=yes" >> config.mak
1539 if test "$a52" = "yes" ; then
1540 echo "#define CONFIG_AC3 1" >> $TMPH
1541 echo "CONFIG_AC3=yes" >> config.mak
1543 if test "$a52bin" = "yes" ; then
1544 echo "#define CONFIG_A52BIN 1" >> $TMPH
1545 echo "CONFIG_A52BIN=yes" >> config.mak
1550 if test "$dts" = "yes" ; then
1551 echo "#define CONFIG_DTS 1" >> $TMPH
1552 echo "CONFIG_DTS=yes" >> config.mak
1556 if test "$pp" = "yes" ; then
1557 echo "#define CONFIG_PP 1" >> $TMPH
1558 echo "CONFIG_PP=yes" >> config.mak
1561 # MPEG audio high precision mode
1562 if test "$mpegaudio_hp" = "yes" ; then
1563 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
1566 if test "$v4l" = "yes" ; then
1567 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
1568 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
1571 if test "$bktr" = "yes" ; then
1572 echo "#define CONFIG_BKTR 1" >> $TMPH
1573 echo "CONFIG_BKTR=yes" >> config.mak
1576 if test "$dv1394" = "yes" ; then
1577 echo "#define CONFIG_DV1394 1" >> $TMPH
1578 echo "CONFIG_DV1394=yes" >> config.mak
1581 if test "$dc1394" = "yes" ; then
1582 echo "#define CONFIG_DC1394 1" >> $TMPH
1583 echo "CONFIG_DC1394=yes" >> config.mak
1586 if test "$dlopen" = "yes" ; then
1587 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
1590 if test "$dlfcn" = "yes" ; then
1591 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
1594 if test "$audio_oss" = "yes" ; then
1595 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
1596 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
1599 if test "$audio_beos" = "yes" ; then
1600 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
1601 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
1604 if test "$network" = "yes" ; then
1605 echo "#define CONFIG_NETWORK 1" >> $TMPH
1606 echo "CONFIG_NETWORK=yes" >> config.mak
1609 if test "$ipv6" = "yes" ; then
1610 echo "#define CONFIG_IPV6 1" >> $TMPH
1613 if test "$zlib" = "yes" ; then
1614 echo "#define CONFIG_ZLIB 1" >> $TMPH
1615 echo "CONFIG_ZLIB=yes" >> config.mak
1618 if test "$lzo" = "yes" ; then
1619 echo "#define CONFIG_LZO 1" >> $TMPH
1620 echo "CONFIG_LZO=yes" >> config.mak
1623 if test "$libgsm" = "yes" ; then
1624 echo "#define CONFIG_LIBGSM 1" >> $TMPH
1625 echo "CONFIG_LIBGSM=yes" >> config.mak
1628 if test "$mp3lame" = "yes" ; then
1629 echo "#define CONFIG_MP3LAME 1" >> $TMPH
1630 echo "CONFIG_MP3LAME=yes" >> config.mak
1633 if test "$libogg" = "yes" ; then
1634 echo "#define CONFIG_LIBOGG 1" >> $TMPH
1635 echo "CONFIG_LIBOGG=yes" >> config.mak
1638 if test "$vorbis" = "yes" ; then
1639 echo "#define CONFIG_LIBVORBIS 1" >> $TMPH
1640 echo "CONFIG_LIBVORBIS=yes" >> config.mak
1643 if test "$theora" = "yes" ; then
1644 echo "#define CONFIG_LIBTHEORA 1" >> $TMPH
1645 echo "CONFIG_LIBTHEORA=yes" >> config.mak
1648 if test "$faad" = "yes" ; then
1649 echo "#define CONFIG_FAAD 1" >> $TMPH
1650 echo "CONFIG_FAAD=yes" >> config.mak
1653 if test "$faadbin" = "yes" ; then
1654 echo "#define CONFIG_FAADBIN 1" >> $TMPH
1655 echo "CONFIG_FAADBIN=yes" >> config.mak
1658 if test "$faac" = "yes" ; then
1659 echo "#define CONFIG_FAAC 1" >> $TMPH
1660 echo "CONFIG_FAAC=yes" >> config.mak
1663 if test "$xvid" = "yes" ; then
1664 echo "#define CONFIG_XVID 1" >> $TMPH
1665 echo "CONFIG_XVID=yes" >> config.mak
1668 if test "$x264" = "yes" ; then
1669 echo "#define CONFIG_X264 1" >> $TMPH
1670 echo "CONFIG_X264=yes" >> config.mak
1673 if test "$mingw32" = "yes" ; then
1674 echo "#define CONFIG_WIN32 1" >> $TMPH
1675 echo "CONFIG_WIN32=yes" >> config.mak
1676 echo "HAVE_W32THREADS=yes" >> config.mak
1677 echo "#define HAVE_W32THREADS 1" >> $TMPH
1678 echo "#define HAVE_THREADS 1" >> $TMPH
1679 echo "#ifndef __MINGW32__" >> $TMPH
1680 echo "#define __MINGW32__ 1" >> $TMPH
1681 echo "#endif" >> $TMPH
1684 if test "$os2" = "yes" ; then
1685 echo "#define CONFIG_OS2 1" >> $TMPH
1686 echo "CONFIG_OS2=yes" >> config.mak
1689 if test "$TARGET_OS" = "SunOS" ; then
1690 echo "#define CONFIG_SUNOS 1" >> $TMPH
1693 if test "$TARGET_OS" = "BeOS" ; then
1694 echo "HAVE_BEOSTHREADS=yes" >> config.mak
1695 echo "#define HAVE_BEOSTHREADS 1" >> $TMPH
1696 echo "#define HAVE_THREADS 1" >> $TMPH
1699 if test "$darwin" = "yes"; then
1700 echo "#define CONFIG_DARWIN 1" >> $TMPH
1701 echo "CONFIG_DARWIN=yes" >> config.mak
1704 if test "$_malloc_h" = "yes" ; then
1705 echo "#define HAVE_MALLOC_H 1" >> $TMPH
1707 echo "#undef HAVE_MALLOC_H" >> $TMPH
1710 if test "$_memalign" = "yes" ; then
1711 echo "#define HAVE_MEMALIGN 1" >> $TMPH
1713 echo "#undef HAVE_MEMALIGN" >> $TMPH
1716 if test "$memalignhack" = "yes" ; then
1717 echo "#define MEMALIGN_HACK 1" >> $TMPH
1721 if test "$netserver" = "yes" ; then
1722 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1723 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1726 if test "$need_inet_aton" = "yes" ; then
1727 echo "NEED_INET_ATON=yes" >> config.mak
1730 if test "$simpleidct" = "yes" ; then
1731 echo "#define SIMPLE_IDCT 1" >> $TMPH
1734 if test "$ffserver" = "yes" ; then
1735 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1736 echo "CONFIG_FFSERVER=yes" >> config.mak
1739 if test "$ffplay" = "yes" ; then
1740 echo "CONFIG_FFPLAY=yes" >> config.mak
1743 if test "$gpl" = "yes" ; then
1744 echo "#define CONFIG_GPL 1" >> $TMPH
1745 echo "CONFIG_GPL=yes" >> config.mak
1748 echo "#define restrict $_restrict" >> $TMPH
1750 if test "$optimize" = "small"; then
1751 echo "#define always_inline" >> $TMPH
1754 # build tree in object directory if source path is different from current one
1755 if test "$source_path_used" = "yes" ; then
1767 libavcodec/libpostproc \
1774 libavformat/Makefile \
1775 libavcodec/Makefile \
1776 libavcodec/libpostproc/Makefile \
1777 libavutil/Makefile \
1783 for dir
in $DIRS ; do
1786 for f
in $FILES ; do
1787 ln -sf
"$source_path/$f" $f
1789 echo "SRC_PATH=$source_path" >> config.mak
1791 echo "SRC_PATH='$source_path'" >> config.mak
1794 if test "$amr_wb" = "yes" ; then
1795 echo "#define AMR_WB 1" >> $TMPH
1796 echo "AMR_WB=yes" >> config.mak
1798 echo "AMR WB FLOAT NOTICE ! Make sure you have downloaded TS26.204"
1800 echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip"
1801 echo "and extracted the source to libavcodec/amrwb_float"
1805 if test "$amr_nb" = "yes" ; then
1806 echo "#define AMR_NB 1" >> $TMPH
1807 echo "AMR_NB=yes" >> config.mak
1809 if test "$amr_nb_fixed" = "yes" ; then
1810 echo "AMR_NB_FIXED=yes" >> config.mak
1811 echo "#define AMR_NB_FIXED 1" >> $TMPH
1812 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1813 echo "REL-5 version 5.1.0 from "
1814 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-5??.zip"
1815 echo "and extracted src to libavcodec/amr"
1816 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1817 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1820 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1821 echo "REL-5 V5.1.0 from "
1822 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-5??.zip"
1823 echo "and extracted the source to libavcodec/amr_float"
1824 echo "and if u try this on an alpha, u may need to change Word32 to int in amr/typedef.h"
1828 if test "$amr_if2" = "yes" ; then
1829 echo "AMR_CFLAGS=-DIF2=1" >> config.mak
1834 for codec
in $CODEC_LIST ; do
1835 echo "#define CONFIG_`echo $codec | tr a-z A-Z` 1" >> $TMPH
1836 echo "CONFIG_`echo $codec | tr a-z A-Z`=yes" >> config.mak
1839 diff $TMPH config.h
>/dev
/null
2>&1
1840 if test $?
-ne
0 ; then
1841 mv -f
$TMPH config.h
1843 echo "config.h is unchanged"
1846 rm -f
$TMPO $TMPC $TMPE $TMPS $TMPH
1849 # build pkg-config files libav*.pc and libpostproc.pc
1851 cat <<EOF >libavutil.pc
1853 exec_prefix=\${prefix}
1854 libdir=\${exec_prefix}/lib
1855 includedir=\${prefix}/include
1858 Description: FFmpeg utility library
1859 Version: $lavu_version
1862 Libs: -L\${libdir} -lavutil
1863 Cflags: -I\${includedir} -I\${includedir}/ffmpeg
1866 cat <<EOF >libavutil-uninstalled.pc
1869 libdir=\${pcfiledir}/libavutil
1870 includedir=\${pcfiledir}/libavutil
1873 Description: FFmpeg utility library
1874 Version: $lavu_version
1877 Libs: \${libdir}/${LIBPREF}avutil${LIBSUF}
1878 Cflags: -I\${includedir}
1882 cat <<EOF >libavcodec.pc
1884 exec_prefix=\${prefix}
1885 libdir=\${exec_prefix}/lib
1886 includedir=\${prefix}/include
1889 Description: FFmpeg codec library
1890 Version: $lavc_version
1891 Requires: $pkg_requires libavutil = $lavu_version
1893 Libs: -L\${libdir} -lavcodec $extralibs
1894 Cflags: -I\${includedir} -I\${includedir}/ffmpeg
1897 cat <<EOF >libavcodec-uninstalled.pc
1900 libdir=\${pcfiledir}/libavcodec
1901 includedir=\${pcfiledir}/libavcodec
1904 Description: FFmpeg codec library
1905 Version: $lavc_version
1906 Requires: $pkg_requires libavutil = $lavu_version
1908 Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} $extralibs
1909 Cflags: -I\${includedir}
1913 cat <<EOF >libavformat.pc
1915 exec_prefix=\${prefix}
1916 libdir=\${exec_prefix}/lib
1917 includedir=\${prefix}/include
1920 Description: FFmpeg container format library
1921 Version: $lavf_version
1922 Requires: $pkg_requires libavcodec = $lavc_version
1924 Libs: -L\${libdir} -lavformat $extralibs
1925 Cflags: -I\${includedir} -I\${includedir}/ffmpeg
1928 cat <<EOF >libavformat-uninstalled.pc
1931 libdir=\${pcfiledir}/libavformat
1932 includedir=\${pcfiledir}/libavformat
1935 Description: FFmpeg container format library
1936 Version: $lavf_version
1937 Requires: $pkg_requires libavcodec = $lavc_version
1939 Libs: \${libdir}/${LIBPREF}avformat${LIBSUF} $extralibs
1940 Cflags: -I\${includedir}
1945 cat <<EOF >libpostproc.pc
1947 exec_prefix=\${prefix}
1948 libdir=\${exec_prefix}/lib
1949 includedir=\${prefix}/include
1952 Description: FFmpeg post processing library
1953 Version: $lavc_version
1956 Libs: -L\${libdir} -lpostproc
1957 Cflags: -I\${includedir} -I\${includedir}/postproc
1960 cat <<EOF >libpostproc-uninstalled.pc
1963 libdir=\${pcfiledir}/libavcodec/libpostproc
1964 includedir=\${pcfiledir}/libavcodec/libpostproc
1967 Description: FFmpeg post processing library
1968 Version: $lavc_version
1971 Libs: \${libdir}/${LIBPREF}postproc${LIBSUF}
1972 Cflags: -I\${includedir}