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-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-amr_if2 enable amr_wb IF2 audio codec"
39 echo " --enable-sunmlib use Sun medialib [default=no]"
40 echo " --enable-pthreads use pthreads [default=no]"
41 echo " --enable-dc1394 enable IIDC-1394 grabbing using libdc1394"
42 echo " and libraw1394 [default=no]"
43 echo " --enable-gpl allow use of GPL code, the resulting libav*"
44 echo " and ffmpeg will be under GPL [default=no]"
46 echo "Advanced options (experts only):"
47 echo " --source-path=PATH path to source code [$source_path]"
48 echo " --cross-prefix=PREFIX use PREFIX for compilation tools [$cross_prefix]"
49 echo " --cc=CC use C compiler CC [$cc]"
50 echo " --make=MAKE use specified make [$make]"
51 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
52 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
53 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
54 echo " --build-suffix=SUFFIX suffix for application specific build []"
55 echo " --cpu=CPU force cpu to CPU [$cpu]"
56 echo " --tune=CPU tune code for a particular CPU"
57 echo " (may fail or perform badly on other CPUs)"
58 echo " --powerpc-perf-enable enable performance report on PPC"
59 echo " (requires enabling PMC)"
60 echo " --disable-mmx disable MMX usage"
61 echo " --disable-iwmmxt disable iwmmxt usage"
62 echo " --disable-altivec disable AltiVec usage"
63 echo " --disable-audio-oss disable OSS audio support [default=no]"
64 echo " --disable-audio-beos disable BeOS audio support [default=no]"
65 echo " --disable-v4l disable video4linux grabbing [default=no]"
66 echo " --disable-bktr disable bktr video grabbing [default=no]"
67 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
68 echo " --disable-network disable network support [default=no]"
69 echo " --disable-zlib disable zlib [default=no]"
70 echo " --disable-simple_idct disable simple IDCT routines [default=no]"
71 echo " --disable-vhook disable video hooking support"
72 echo " --enable-gprof enable profiling with gprof [$gprof]"
73 echo " --disable-debug disable debugging symbols"
74 echo " --disable-opts disable compiler optimizations"
75 echo " --disable-mpegaudio-hp faster (but less accurate)"
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 " --enable-codec=CODEC enables CODEC"
83 echo " --disable-codec=CODEC disables CODEC"
84 echo " --disable-encoders disables all encoders"
85 echo " --disable-decoders disables all decoders"
86 echo " --disable-muxers disables all muxers"
87 echo " --disable-demuxers disables all demuxers"
89 echo "NOTE: Object files are built at the place where configure is launched."
93 # set temporary file name
94 if test ! -z "$TMPDIR" ; then
96 elif test ! -z "$TEMPDIR" ; then
102 TMPC="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
103 TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
104 TMPE="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}"
105 TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
106 TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
127 i386|i486|i586|i686|i86pc|BePC)
132 canon_arch="`cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`"
133 if [ x"$canon_arch" = x"x86_64" -o x"$canon_arch" = x"amd64" ]; then
134 if [ -z "`echo $CFLAGS | grep -- -m32`" ]; then
139 # armv4l is a subset of armv5tel
146 "Power Macintosh"|ppc)
223 LDFLAGS=-Wl,--warn-common
247 prefix="/boot/home/config"
248 # helps building libavcodec
249 CFLAGS="-DPIC -fomit-frame-pointer"
250 # 3 gcc releases known for BeOS, each with ugly bugs
251 gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
252 case "$gcc_version" in
253 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
256 *20010315*) echo "BeBits gcc"
257 CFLAGS="$CFLAGS -fno-expensive-optimizations"
261 # disable Linux things
267 # no need for libm, but the inet stuff
269 if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
270 extralibs="-lbind -lsocket"
284 extralibs="$extralibs -lsocket -lnsl"
292 LDFLAGS="$LDFLAGS -export-dynamic"
294 2.*) extralibs="$extralibs -lossaudio"
304 LIBOBJFLAGS="\$(PIC)"
305 LDFLAGS="$LDFLAGS -export-dynamic -pthread"
306 LDCONFIG="ldconfig -m \$(libdir)"
307 extralibs="$extralibs -lossaudio"
316 LDFLAGS="$LDFLAGS -export-dynamic -pthread"
323 extralibs="-lpoll -lgnugetopt -lm"
332 SHFLAGS="-dynamiclib -Wl,-single_module,-undefined,dynamic_lookup"
336 LDFLAGS="-Wl,-dynamic,-search_paths_first"
338 FFSLDFLAGS=-Wl,-bind_at_load
341 # Note: the rest of the mingw32 config is done afterwards as mingw32
342 # can be forced on the command line for Linux cross compilation.
355 LDFLAGS="$LDFLAGS -rdynamic"
358 ranlib="echo ignoring ranlib"
366 ranlib="echo ignoring ranlib"
367 strip="echo ignoring strip"
369 LDFLAGS="-Zomf -Zstack 16384 -s"
370 SHFLAGS="-Zdll -Zomf"
390 # From MPlayer configure. We need TARGET_OS available
391 # to the Makefile, so it can distinguish between flavors
392 # of AltiVec on PowerPC.
393 TARGET_OS=`( uname -s ) 2>&1`
395 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS)
403 [cC][yY][gG][wW][iI][nN]*)
407 TARGET_OS="$TARGET_OS-UNKNOWN"
412 source_path="`echo $0 | sed -e 's#/configure##'`"
413 source_path_used="yes"
414 if test -z "$source_path" -o "$source_path" = "." ; then
416 source_path_used="no"
418 source_path="`cd \"$source_path\"; pwd`"
421 FFMPEG_CONFIGURATION=" "
423 FFMPEG_CONFIGURATION="$FFMPEG_CONFIGURATION""$opt "
426 CODEC_LIST=`grep 'register_avcodec(&[a-z]' $source_path/libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'`
430 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`; force_prefix=yes
432 --libdir=*) libdir=`echo $opt | cut -d '=' -f 2`; force_libdir=yes
434 --mandir=*) mandir=`echo $opt | cut -d '=' -f 2`
436 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
438 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
440 --cc=*) cc=`echo $opt | cut -d '=' -f 2-`
442 --make=*) make=`echo $opt | cut -d '=' -f 2`
444 --extra-cflags=*) CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
446 --extra-ldflags=*) LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
448 --extra-libs=*) extralibs=${opt#--extra-libs=}
450 --build-suffix=*) BUILDSUF=${opt#--build-suffix=}
452 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
454 --tune=*) tune=`echo $opt | cut -d '=' -f 2`
456 --powerpc-perf-enable) powerpc_perf="yes"
458 --disable-mmx) mmx="no"
460 --disable-iwmmxt) iwmmxt="no"
462 --disable-altivec) altivec="no"
464 --enable-gprof) gprof="yes"
466 --disable-v4l) v4l="no"
468 --disable-bktr) bktr="no"
470 --disable-audio-oss) audio_oss="no"
472 --disable-audio-beos) audio_beos="no"
474 --disable-dv1394) dv1394="no"
476 --disable-network) network="no"; ffserver="no"
478 --disable-zlib) zlib="no"
480 --enable-a52) a52="yes"
482 --enable-a52bin) a52bin="yes"
484 --enable-dts) dts="yes" ; extralibs="$extralibs -ldts"
486 --enable-pp) pp="yes"
488 --enable-shared-pp) shared_pp="yes"
490 --enable-libgsm) libgsm="yes"
492 --enable-mp3lame) mp3lame="yes"
494 --enable-libogg) libogg="yes"
496 --enable-vorbis) vorbis="yes"
498 --enable-theora) theora="yes"
500 --enable-faad) faad="yes"
502 --enable-faadbin) faadbin="yes"
504 --enable-faac) faac="yes"
506 --enable-xvid) xvid="yes"
508 --enable-x264) x264="yes"; extralibs="$extralibs -lx264"
510 --enable-dc1394) dc1394="yes"
512 --disable-vhook) vhook="no"
514 --disable-simple_idct) simpleidct="no"
516 --enable-mingw32) mingw32="yes"
518 --enable-shared) lshared="yes"
520 --disable-debug) debug="no"
522 --disable-opts) optimize="no"
524 --disable-mpegaudio-hp) mpegaudio_hp="no"
526 --disable-ffserver) ffserver="no"
528 --disable-ffplay) ffplay="no"
530 --enable-small) optimize="small"
532 --enable-amr_nb) amr_nb="yes"
534 --enable-amr_nb-fixed) amr_nb_fixed="yes"
536 --enable-amr_wb) amr_wb="yes"
538 --enable-amr_if2) amr_if2="yes"
540 --enable-sunmlib) sunmlib="yes"
542 --enable-pthreads) pthreads="yes"
544 --enable-gpl) gpl="yes"
546 --enable-memalign-hack) memalignhack="yes"
548 --disable-strip) dostrip="no"
550 --enable-codec=*) CODEC_LIST="$CODEC_LIST ${opt#--enable-codec=}"
552 --disable-codec=*) CODEC_LIST="`echo $CODEC_LIST | sed -e \"s#${opt#--disable-codec=}##\"`"
554 --disable-encoders) CODEC_LIST="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*encoder//g'`"
556 --disable-decoders) CODEC_LIST="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*decoder//g'`"
558 --disable-muxers) muxers="no"
560 --disable-demuxers) demuxers="no"
563 echo "Unknown option \"$opt\"."
564 echo "See $0 --help for available options."
570 if test "$theora" = "yes" ; then
571 if test "$libogg" = "no"; then
572 echo "libogg must be enabled to enable Theora."
578 if test "$vorbis" = "yes" ; then
579 if test "$libogg" = "no"; then
580 echo "libogg must be enabled to enable Vorbis."
586 if test "$gpl" != "yes"; then
587 if test "$pp" != "no" -o "$shared_pp" != "no"; then
588 echo "The Postprocessing code is under GPL and --enable-gpl is not specified."
592 if test "$a52" != "no" -o "$a52bin" != "no"; then
593 echo "liba52 is under GPL and --enable-gpl is not specified."
597 if test "$xvid" != "no"; then
598 echo "libxvidcore is under GPL and --enable-gpl is not specified."
602 if test "$x264" != "no"; then
603 echo "x264 is under GPL and --enable-gpl is not specified."
607 if test "$dts" != "no"; then
608 echo "libdts is under GPL and --enable-gpl is not specified."
612 if test "$faad" != "no" -o "$faadbin" != "no"; then
615 int main( void ) { return 0; }
618 if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
621 #ifndef FAAD2_VERSION
624 int main( void ) { return 0; }
626 if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
627 echo "FAAD2 is under GPL and --enable-gpl is not specified."
633 echo "FAAD test failed."
638 if test "$fail" = "yes"; then
644 if test $mmx = "default"; then
645 if test $cpu = "x86" -o $cpu = "x86_64"; then
652 # check iwmmxt support
653 if test $iwmmxt = "default" -a $cpu = "armv4l"; then
656 __asm__ __volatile__ ("wunpckelub wr6, wr4");
661 if ${cross_prefix}${cc} -o $TMPO $TMPC 2> /dev/null ; then
667 needmdynamicnopic="no"
668 if test $targetos = Darwin; then
669 if test -n "`$cc -v 2>&1 | grep xlc`"; then
670 CFLAGS="$CFLAGS -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
672 gcc_version="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
673 case "$gcc_version" in
675 CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
678 CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
679 if test "$lshared" = no; then
680 needmdynamicnopic="yes"
684 CFLAGS="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
685 if test "$lshared" = no; then
686 needmdynamicnopic="yes"
693 # Can only do AltiVec on PowerPC
694 if test $altivec = "default"; then
695 if test $cpu = "powerpc"; then
702 # Add processor-specific flags
705 if test $tune != "generic"; then
707 601|ppc601|PowerPC601)
708 CFLAGS="$CFLAGS -mcpu=601"
709 if test $altivec = "yes"; then
710 echo "WARNING: Tuning for PPC601 but AltiVec enabled!";
714 603*|ppc603*|PowerPC603*)
715 CFLAGS="$CFLAGS -mcpu=603"
716 if test $altivec = "yes"; then
717 echo "WARNING: Tuning for PPC603 but AltiVec enabled!";
721 604*|ppc604*|PowerPC604*)
722 CFLAGS="$CFLAGS -mcpu=604"
723 if test $altivec = "yes"; then
724 echo "WARNING: Tuning for PPC604 but AltiVec enabled!";
728 G3|g3|75*|ppc75*|PowerPC75*)
729 CFLAGS="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt"
730 if test $altivec = "yes"; then
731 echo "WARNING: Tuning for PPC75x but AltiVec enabled!";
735 G4|g4|745*|ppc745*|PowerPC745*)
736 CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"
737 if test $altivec = "no"; then
738 echo "WARNING: Tuning for PPC745x but AltiVec disabled!";
742 74*|ppc74*|PowerPC74*)
743 CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"
744 if test $altivec = "no"; then
745 echo "WARNING: Tuning for PPC74xx but AltiVec disabled!";
749 G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
750 CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64"
751 if test $altivec = "no"; then
752 echo "WARNING: Tuning for PPC970 but AltiVec disabled!";
757 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)
758 CFLAGS="$CFLAGS -march=$tune"
761 echo "WARNING: Unknown CPU \"$tune\", ignored."
766 # AltiVec flags: The FSF version of GCC differs from the Apple version
767 if test $cpu = "powerpc"; then
768 if test $altivec = "yes"; then
769 if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
770 CFLAGS="$CFLAGS -faltivec"
772 CFLAGS="$CFLAGS -maltivec -mabi=altivec"
777 # check if we have <altivec.h>
780 int main( void ) { return 0; }
784 if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
788 # check if our compiler supports Motorola AltiVec C API
789 if test $altivec = "yes"; then
790 if test $_altivec_h = "yes"; then
794 vector signed int v1, v2, v3;
802 vector signed int v1, v2, v3;
808 $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no"
811 # mmi only available on mips
812 if test $mmi = "default"; then
813 if test $cpu = "mips"; then
820 # check if our compiler supports mmi
821 if test $mmi = "yes"; then
824 __asm__ ("lq \$2, 0(\$2)");
828 $cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
831 if test "$mingw32" = "yes" ; then
842 if test "$force_prefix" != yes; then prefix="/c/Program Files/FFmpeg"; fi
843 if test "$force_libdir" != yes; then bindir="$prefix"; fi
846 cc="${cross_prefix}${cc}"
847 ar="${cross_prefix}${ar}"
848 ranlib="${cross_prefix}${ranlib}"
849 strip="${cross_prefix}${strip}"
851 if test -z "$cross_prefix" ; then
854 # big/little-endian test
856 #include <inttypes.h>
857 int main(int argc, char ** argv){
858 volatile uint32_t i=0x01234567;
859 return (*((uint8_t*)(&i))) == 0x67;
863 if $cc -o $TMPE $TMPC 2>/dev/null ; then
864 $TMPE && bigendian="yes"
866 echo big/little test failed
871 # programs cannot be launched if cross compiling, so make a static guess
872 if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
881 #include <inttypes.h>
882 int main(int argc, char ** argv){
887 $cc -o $TMPE $TMPC 2>/dev/null || inttypes="no"
892 #include <inttypes.h>
893 int main(int argc, char ** argv){
894 volatile uint_fast64_t i=0x01234567;
899 $cc -o $TMPE $TMPC 2>/dev/null || emu_fast_int="yes"
902 # check availability of some header files
906 int main( void ) { return 0; }
911 if $cc -o $TMPE $TMPC 2> /dev/null ; then
914 # check for memalign - atmos
920 string = memalign(64, sizeof(char));
924 $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
927 if test "$_memalign" = "no" -a "$mmx" = "yes" -a "$memalignhack" != "yes"; then
928 echo "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
934 int main( void ) { localtime_r(NULL, NULL); }
938 if $cc -o $TMPE $TMPC 2> /dev/null ; then
942 if test "$zlib" = "yes"; then
943 # check for zlib - mmu_man
947 if (zlibVersion() != ZLIB_VERSION)
948 puts("zlib version differs !!!");
953 $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
954 # $TMPE 2> /dev/null > /dev/null || zlib="no"
955 # XXX: more tests needed - runtime test
957 if test "$zlib" = "yes"; then
958 extralibs="$extralibs -lz"
961 # test for lrintf in math.h
963 #define _ISOC9X_SOURCE 1
965 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
969 if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
971 # allanc@chickenandporn.com: cannot execute cross-compiled
972 # code on the host. Only execute if not cross-compiling.
973 if test -z "$cross_prefix" ; then
974 $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
979 for restrict_keyword in restrict __restrict__ __restrict; do
980 echo "void foo(char * $restrict_keyword p);" > $TMPC
981 if $cc -c -o $TMPO $TMPC 2> /dev/null; then
982 _restrict=$restrict_keyword
987 # test gcc version to see if vector builtins can be used
988 # currently only used on i386 for MMX builtins
990 #include <xmmintrin.h>
992 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
995 #error no vector builtins
1001 if $cc -msse -o $TMPO $TMPC 2> /dev/null ; then
1005 # dlopen/dlfcn.h probing
1009 int main( void ) { return (int) dlopen("foo", 0); }
1014 if $cc -o $TMPE $TMPC -ldl > /dev/null 2>&1 ; then
1019 if $cc -o $TMPE $TMPC > /dev/null 2>&1 ; then
1026 int main( void ) { return (int) dlopen("foo", 0); }
1029 if $cc -o $TMPE $TMPC -ldl > /dev/null 2>&1 ; then
1033 if $cc -o $TMPE $TMPC > /dev/null 2>&1 ; then
1038 if test "$vhook" = "default" ; then
1042 if test "$vhook" = "yes" -o "$a52bin" = "yes" -o "$faadbin" = "yes"; then
1043 extralibs="$extralibs $ldl"
1047 ##########################################
1051 #include <X11/Xlib.h>
1053 int main( void ) { return (int) imlib_load_font("foo"); }
1057 if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -lImlib2 -lm > /dev/null 2>&1 ; then
1061 ##########################################
1065 #include <ft2build.h>
1066 int main( void ) { return (int) FT_Init_FreeType(0); }
1070 if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
1071 if (freetype-config --version) >/dev/null 2>&1 ; then
1072 if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` > /dev/null 2>&1 ; then
1078 ##########################################
1083 #undef main /* We don't want SDL to override our main() */
1084 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
1089 if (sdl-config --version) >/dev/null 2>&1 ; then
1090 if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` > /dev/null 2>&1 ; then
1091 _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
1092 if test "$_sdlversion" -lt 121 ; then
1100 ##########################################
1104 if (texi2html -version) >/dev/null 2>&1; then
1108 if test "$network" = "yes" ; then
1109 ##########################################
1113 #include <sys/types.h>
1114 #include <sys/socket.h>
1115 #include <netinet/in.h>
1118 struct sockaddr_storage saddr;
1119 struct ipv6_mreq mreq6;
1120 getaddrinfo(0,0,0,0);
1121 getnameinfo(0,0,0,0,0,0,0);
1122 IN6_IS_ADDR_MULTICAST(0);
1127 if $cc -o $TMPE $TMPC > /dev/null 2>&1 ; then
1132 case "`$cc -v 2>&1 | grep version`" in
1134 CFLAGS="-Wall -Wno-switch $CFLAGS"
1140 if test "$sdl" = "no" ; then
1144 if test "$debug" = "yes"; then
1148 if test "$optimize" = "small"; then
1149 # CFLAGS=${CFLAGS//-O3/-Os}
1150 CFLAGS="$CFLAGS -Os"
1153 if test "$optimize" = "yes"; then
1154 if test -n "`$cc -v 2>&1 | grep xlc`"; then
1155 CFLAGS="$CFLAGS -O5"
1156 LDFLAGS="$LDFLAGS -O5"
1158 CFLAGS="-O3 $CFLAGS"
1162 # PIC flags for shared library objects where they are needed
1163 if test "$lshared" = "yes" ; then
1164 # LIBOBJFLAGS may have already been set in the OS configuration
1165 if test -z "$LIBOBJFLAGS" ; then
1166 if test "$cpu" = "x86_64" -o "$cpu" = "ia64" ; then
1167 LIBOBJFLAGS="\$(PIC)"
1172 if test x"$bindir" = x""; then
1173 bindir="${prefix}/bin"
1176 if test x"$libdir" = x""; then
1177 libdir="${prefix}/lib"
1180 if test x"$mandir" = x""; then
1181 mandir="${prefix}/man"
1184 echo "install prefix $prefix"
1185 echo "source path $source_path"
1186 echo "C compiler $cc"
1188 echo "CPU $cpu ($tune)"
1189 if test "$BUILDSUF" != ""; then
1190 echo "build suffix $BUILDSUF"
1192 echo "big-endian $bigendian"
1193 echo "inttypes.h $inttypes"
1194 echo "broken inttypes.h $emu_fast_int"
1195 if test $cpu = "x86" -o $cpu = "x86_64"; then
1196 echo "MMX enabled $mmx"
1197 echo "Vector Builtins $builtin_vector"
1199 if test $cpu = "armv4l"; then
1200 echo "IWMMXT enabled $iwmmxt"
1202 if test $cpu = "mips"; then
1203 echo "MMI enabled $mmi"
1205 if test $cpu = "powerpc"; then
1206 echo "AltiVec enabled $altivec"
1208 echo "gprof enabled $gprof"
1209 echo "zlib enabled $zlib"
1210 echo "libgsm enabled $libgsm"
1211 echo "mp3lame enabled $mp3lame"
1212 echo "libogg enabled $libogg"
1213 echo "Vorbis enabled $vorbis"
1214 echo "Theora enabled $theora"
1215 echo "FAAD enabled $faad"
1216 echo "faadbin enabled $faadbin"
1217 echo "FAAC enabled $faac"
1218 echo "XviD enabled $xvid"
1219 echo "x264 enabled $x264"
1220 echo "a52 support $a52"
1221 echo "a52 dlopened $a52bin"
1222 echo "DTS support $dts"
1223 echo "pp support $pp"
1224 echo "debug symbols $debug"
1225 echo "strip symbols $dostrip"
1226 echo "optimize $optimize"
1227 echo "shared pp $shared_pp"
1228 echo "video hooking $vhook"
1229 echo "SDL support $sdl"
1230 if test $sdl_too_old = "yes"; then
1231 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support."
1234 if test "$vhook" = "yes" ; then
1235 echo "Imlib2 support $imlib2"
1236 echo "FreeType support $freetype2"
1238 echo "Sun medialib support" $sunmlib
1239 echo "pthreads support" $pthreads
1240 echo "AMR-NB float support" $amr_nb
1241 echo "AMR-NB fixed support" $amr_nb_fixed
1242 echo "AMR-WB float support" $amr_wb
1243 echo "AMR-WB IF2 support" $amr_if2
1244 echo "network support $network"
1245 if test "$network" = "yes" ; then
1246 echo "IPv6 support $ipv6"
1248 if test "$gpl" = "no" ; then
1249 echo "License: LGPL"
1254 echo "Creating config.mak and config.h..."
1257 echo " $0 $FFMPEG_CONFIGURATION" >> config.log
1258 echo "# Automatically generated by configure - do not modify!" > config.mak
1259 echo "/* Automatically generated by configure - do not modify! */" > $TMPH
1260 echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH
1262 echo "prefix=$prefix" >> config.mak
1263 echo "libdir=$libdir" >> config.mak
1264 echo "bindir=$bindir" >> config.mak
1265 echo "mandir=$mandir" >> config.mak
1266 echo "MAKE=$make" >> config.mak
1267 echo "CC=$cc" >> config.mak
1268 echo "AR=$ar" >> config.mak
1269 echo "RANLIB=$ranlib" >> config.mak
1270 if test "$dostrip" = "yes" ; then
1271 echo "STRIP=$strip" >> config.mak
1272 echo "INSTALLSTRIP=-s" >> config.mak
1274 echo "STRIP=echo ignoring strip" >> config.mak
1275 echo "INSTALLSTRIP=" >> config.mak
1278 # SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic, used when building
1279 # shared modules on OS/X (vhook/Makefile).
1281 if test "$needmdynamicnopic" = yes; then
1282 CFLAGS="$CFLAGS -mdynamic-no-pic"
1285 echo "OPTFLAGS=$CFLAGS" >> config.mak
1286 echo "SHCFLAGS=$SHCFLAGS">>config.mak
1287 echo "LDFLAGS=$LDFLAGS" >> config.mak
1288 echo "LDCONFIG=$LDCONFIG" >> config.mak
1289 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
1290 echo "SHFLAGS=$SHFLAGS" >> config.mak
1291 echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak
1292 echo "BUILDSUF=$BUILDSUF" >> config.mak
1293 echo "LIBPREF=$LIBPREF" >> config.mak
1294 echo "LIBSUF=\${BUILDSUF}$LIBSUF" >> config.mak
1295 echo "SLIBPREF=$SLIBPREF" >> config.mak
1296 echo "SLIBSUF=\${BUILDSUF}$SLIBSUF" >> config.mak
1297 echo "EXESUF=\${BUILDSUF}$EXESUF" >> config.mak
1298 echo "TARGET_OS=$TARGET_OS" >> config.mak
1299 if test "$cpu" = "x86" ; then
1300 echo "TARGET_ARCH_X86=yes" >> config.mak
1301 echo "#define ARCH_X86 1" >> $TMPH
1302 elif test "$cpu" = "x86_64" ; then
1303 echo "TARGET_ARCH_X86_64=yes" >> config.mak
1304 echo "#define ARCH_X86_64 1" >> $TMPH
1305 elif test "$cpu" = "armv4l" ; then
1306 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
1307 echo "#define ARCH_ARMV4L 1" >> $TMPH
1308 elif test "$cpu" = "alpha" ; then
1309 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
1310 echo "#define ARCH_ALPHA 1" >> $TMPH
1311 elif test "$cpu" = "sparc64" ; then
1312 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
1313 echo "#define ARCH_SPARC64 1" >> $TMPH
1314 echo "TARGET_ARCH_SPARC=yes" >> config.mak
1315 echo "#define ARCH_SPARC 1" >> $TMPH
1316 elif test "$cpu" = "sparc" ; then
1317 echo "TARGET_ARCH_SPARC=yes" >> config.mak
1318 echo "#define ARCH_SPARC 1" >> $TMPH
1319 elif test "$cpu" = "powerpc" ; then
1320 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
1321 echo "#define ARCH_POWERPC 1" >> $TMPH
1322 if test $POWERPCMODE = "32bits"; then
1323 echo "#define POWERPC_MODE_32BITS 1" >> $TMPH
1325 echo "#define POWERPC_MODE_64BITS 1" >> $TMPH
1327 if test "$powerpc_perf" = "yes"; then
1328 echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
1330 elif test "$cpu" = "mips" ; then
1331 echo "TARGET_ARCH_MIPS=yes" >> config.mak
1332 echo "#define ARCH_MIPS 1" >> $TMPH
1333 elif test "$cpu" = "sh4" ; then
1334 echo "TARGET_ARCH_SH4=yes" >> config.mak
1335 echo "#define ARCH_SH4 1" >> $TMPH
1336 elif test "$cpu" = "parisc" ; then
1337 echo "TARGET_ARCH_PARISC=yes" >> config.mak
1338 echo "#define ARCH_PARISC 1" >> $TMPH
1339 elif test "$cpu" = "s390" ; then
1340 echo "TARGET_ARCH_S390=yes" >> config.mak
1341 echo "#define ARCH_S390 1" >> $TMPH
1342 elif test "$cpu" = "m68k" ; then
1343 echo "TARGET_ARCH_M68K=yes" >> config.mak
1344 echo "#define ARCH_M68K 1" >> $TMPH
1345 elif test "$cpu" = "ia64" ; then
1346 echo "TARGET_ARCH_IA64=yes" >> config.mak
1347 echo "#define ARCH_IA64 1" >> $TMPH
1349 echo "#define TUNECPU $TUNECPU" >> $TMPH
1350 if test "$bigendian" = "yes" ; then
1351 echo "WORDS_BIGENDIAN=yes" >> config.mak
1352 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
1354 if test "$inttypes" != "yes" ; then
1355 echo "#define EMULATE_INTTYPES 1" >> $TMPH
1357 if test "$emu_fast_int" = "yes" ; then
1358 echo "#define EMULATE_FAST_INT 1" >> $TMPH
1360 if test "$mmx" = "yes" ; then
1361 echo "TARGET_MMX=yes" >> config.mak
1362 echo "#define HAVE_MMX 1" >> $TMPH
1363 echo "#define __CPU__ 586" >> $TMPH
1365 if test "$builtin_vector" = "yes" ; then
1366 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
1367 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
1369 if test "$iwmmxt" = "yes" ; then
1370 echo "TARGET_IWMMXT=yes" >> config.mak
1371 echo "#define HAVE_IWMMXT 1" >> $TMPH
1373 if test "$mmi" = "yes" ; then
1374 echo "TARGET_MMI=yes" >> config.mak
1375 echo "#define HAVE_MMI 1" >> $TMPH
1377 if test "$altivec" = "yes" ; then
1378 echo "TARGET_ALTIVEC=yes" >> config.mak
1379 echo "#define HAVE_ALTIVEC 1" >> $TMPH
1380 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
1381 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
1382 if test "$_altivec_h" = "yes" ; then
1383 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
1385 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
1388 if test "$gprof" = "yes" ; then
1389 echo "TARGET_GPROF=yes" >> config.mak
1390 echo "#define HAVE_GPROF 1" >> $TMPH
1392 if test "$localtime_r" = "yes" ; then
1393 echo "#define HAVE_LOCALTIME_R 1" >> $TMPH
1395 if test "$imlib2" = "yes" ; then
1396 echo "HAVE_IMLIB2=yes" >> config.mak
1398 if test "$freetype2" = "yes" ; then
1399 echo "HAVE_FREETYPE2=yes" >> config.mak
1401 if test "$sunmlib" = "yes" ; then
1402 echo "HAVE_MLIB=yes" >> config.mak
1403 echo "#define HAVE_MLIB 1" >> $TMPH
1404 extralibs="$extralibs -lmlib"
1406 if test "$pthreads" = "yes" ; then
1407 echo "HAVE_PTHREADS=yes" >> config.mak
1408 echo "#define HAVE_PTHREADS 1" >> $TMPH
1409 echo "#define HAVE_THREADS 1" >> $TMPH
1410 if test $targetos != FreeBSD -a $targetos != OpenBSD ; then
1411 extralibs="$extralibs -lpthread"
1414 if test "$sdl" = "yes" ; then
1415 echo "CONFIG_SDL=yes" >> config.mak
1416 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
1417 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
1419 if test "$texi2html" = "yes"; then
1420 echo "BUILD_DOC=yes" >> config.mak
1422 if test "$have_lrintf" = "yes" ; then
1423 echo "#define HAVE_LRINTF 1" >> $TMPH
1425 if test "$vhook" = "yes" ; then
1426 echo "BUILD_VHOOK=yes" >> config.mak
1427 echo "#define HAVE_VHOOK 1" >> $TMPH
1429 if test "$lshared" = "yes" ; then
1430 echo "BUILD_SHARED=yes" >> config.mak
1431 echo "PIC=-fPIC -DPIC" >> config.mak
1432 echo "SPPMAJOR=0" >> config.mak
1433 echo "SPPVERSION=0.0.1" >> config.mak
1435 echo "EXTRALIBS=$extralibs" >> config.mak
1436 version=`grep '#define FFMPEG_VERSION ' "$source_path/libavcodec/avcodec.h" |
1438 echo "VERSION=$version" >>config.mak
1439 # If you do not want to use encoders, disable them.
1440 echo "#define CONFIG_ENCODERS 1" >> $TMPH
1441 echo "CONFIG_ENCODERS=yes" >> config.mak
1443 # If you do not want to use decoders, disable them.
1444 echo "#define CONFIG_DECODERS 1" >> $TMPH
1445 echo "CONFIG_DECODERS=yes" >> config.mak
1448 if test "$muxers" = "yes" ; then
1449 echo "#define CONFIG_MUXERS 1" >> $TMPH
1450 echo "CONFIG_MUXERS=yes" >> config.mak
1454 if test "$demuxers" = "yes" ; then
1455 echo "#define CONFIG_DEMUXERS 1" >> $TMPH
1456 echo "CONFIG_DEMUXERS=yes" >> config.mak
1460 if test "$a52" = "yes" ; then
1461 echo "#define CONFIG_AC3 1" >> $TMPH
1462 echo "CONFIG_AC3=yes" >> config.mak
1464 if test "$a52bin" = "yes" ; then
1465 echo "#define CONFIG_A52BIN 1" >> $TMPH
1466 echo "CONFIG_A52BIN=yes" >> config.mak
1471 if test "$dts" = "yes" ; then
1472 echo "#define CONFIG_DTS 1" >> $TMPH
1473 echo "CONFIG_DTS=yes" >> config.mak
1477 if test "$pp" = "yes" ; then
1478 echo "#define CONFIG_PP 1" >> $TMPH
1479 echo "CONFIG_PP=yes" >> config.mak
1481 if test "$shared_pp" = "yes" ; then
1482 echo "#define SHARED_PP 1" >> $TMPH
1483 echo "SHARED_PP=yes" >> config.mak
1487 # MPEG audio high precision mode
1488 if test "$mpegaudio_hp" = "yes" ; then
1489 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
1492 if test "$v4l" = "yes" ; then
1493 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
1494 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
1497 if test "$bktr" = "yes" ; then
1498 echo "#define CONFIG_BKTR 1" >> $TMPH
1499 echo "CONFIG_BKTR=yes" >> config.mak
1502 if test "$dv1394" = "yes" ; then
1503 echo "#define CONFIG_DV1394 1" >> $TMPH
1504 echo "CONFIG_DV1394=yes" >> config.mak
1507 if test "$dc1394" = "yes" ; then
1508 echo "#define CONFIG_DC1394 1" >> $TMPH
1509 echo "CONFIG_DC1394=yes" >> config.mak
1512 if test "$dlopen" = "yes" ; then
1513 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
1516 if test "$dlfcn" = "yes" ; then
1517 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
1520 if test "$audio_oss" = "yes" ; then
1521 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
1522 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
1525 if test "$audio_beos" = "yes" ; then
1526 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
1527 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
1530 if test "$network" = "yes" ; then
1531 echo "#define CONFIG_NETWORK 1" >> $TMPH
1532 echo "CONFIG_NETWORK=yes" >> config.mak
1535 if test "$ipv6" = "yes" ; then
1536 echo "#define CONFIG_IPV6 1" >> $TMPH
1539 if test "$zlib" = "yes" ; then
1540 echo "#define CONFIG_ZLIB 1" >> $TMPH
1541 echo "CONFIG_ZLIB=yes" >> config.mak
1544 if test "$libgsm" = "yes" ; then
1545 echo "#define CONFIG_LIBGSM 1" >> $TMPH
1546 echo "CONFIG_LIBGSM=yes" >> config.mak
1549 if test "$mp3lame" = "yes" ; then
1550 echo "#define CONFIG_MP3LAME 1" >> $TMPH
1551 echo "CONFIG_MP3LAME=yes" >> config.mak
1554 if test "$libogg" = "yes" ; then
1555 echo "#define CONFIG_LIBOGG 1" >> $TMPH
1556 echo "CONFIG_LIBOGG=yes" >> config.mak
1559 if test "$vorbis" = "yes" ; then
1560 echo "#define CONFIG_LIBVORBIS 1" >> $TMPH
1561 echo "CONFIG_LIBVORBIS=yes" >> config.mak
1564 if test "$theora" = "yes" ; then
1565 echo "#define CONFIG_LIBTHEORA 1" >> $TMPH
1566 echo "CONFIG_LIBTHEORA=yes" >> config.mak
1569 if test "$faad" = "yes" ; then
1570 echo "#define CONFIG_FAAD 1" >> $TMPH
1571 echo "CONFIG_FAAD=yes" >> config.mak
1574 if test "$faadbin" = "yes" ; then
1575 echo "#define CONFIG_FAADBIN 1" >> $TMPH
1576 echo "CONFIG_FAADBIN=yes" >> config.mak
1579 if test "$faac" = "yes" ; then
1580 echo "#define CONFIG_FAAC 1" >> $TMPH
1581 echo "CONFIG_FAAC=yes" >> config.mak
1584 if test "$xvid" = "yes" ; then
1585 echo "#define CONFIG_XVID 1" >> $TMPH
1586 echo "CONFIG_XVID=yes" >> config.mak
1589 if test "$x264" = "yes" ; then
1590 echo "#define CONFIG_X264 1" >> $TMPH
1591 echo "CONFIG_X264=yes" >> config.mak
1594 if test "$mingw32" = "yes" ; then
1595 echo "#define CONFIG_WIN32 1" >> $TMPH
1596 echo "CONFIG_WIN32=yes" >> config.mak
1597 echo "HAVE_W32THREADS=yes" >> config.mak
1598 echo "#define HAVE_W32THREADS 1" >> $TMPH
1599 echo "#define HAVE_THREADS 1" >> $TMPH
1600 echo "#ifndef __MINGW32__" >> $TMPH
1601 echo "#define __MINGW32__ 1" >> $TMPH
1602 echo "#endif" >> $TMPH
1605 if test "$os2" = "yes" ; then
1606 echo "#define CONFIG_OS2 1" >> $TMPH
1607 echo "CONFIG_OS2=yes" >> config.mak
1610 if test "$TARGET_OS" = "SunOS" ; then
1611 echo "#define CONFIG_SUNOS 1" >> $TMPH
1614 if test "$TARGET_OS" = "BeOS" ; then
1615 echo "HAVE_BEOSTHREADS=yes" >> config.mak
1616 echo "#define HAVE_BEOSTHREADS 1" >> $TMPH
1617 echo "#define HAVE_THREADS 1" >> $TMPH
1620 if test "$darwin" = "yes"; then
1621 echo "#define CONFIG_DARWIN 1" >> $TMPH
1622 echo "CONFIG_DARWIN=yes" >> config.mak
1625 if test "$_malloc_h" = "yes" ; then
1626 echo "#define HAVE_MALLOC_H 1" >> $TMPH
1628 echo "#undef HAVE_MALLOC_H" >> $TMPH
1631 if test "$_memalign" = "yes" ; then
1632 echo "#define HAVE_MEMALIGN 1" >> $TMPH
1634 echo "#undef HAVE_MEMALIGN" >> $TMPH
1637 if test "$memalignhack" = "yes" ; then
1638 echo "#define MEMALIGN_HACK 1" >> $TMPH
1642 if test "$netserver" = "yes" ; then
1643 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1644 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1647 if test "$need_inet_aton" = "yes" ; then
1648 echo "NEED_INET_ATON=yes" >> config.mak
1651 if test "$simpleidct" = "yes" ; then
1652 echo "#define SIMPLE_IDCT 1" >> $TMPH
1655 if test "$ffserver" = "yes" ; then
1656 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1657 echo "CONFIG_FFSERVER=yes" >> config.mak
1660 if test "$ffplay" = "yes" ; then
1661 echo "CONFIG_FFPLAY=yes" >> config.mak
1664 if test "$gpl" = "yes" ; then
1665 echo "#define CONFIG_GPL 1" >> $TMPH
1666 echo "CONFIG_GPL=yes" >> config.mak
1669 echo "#define restrict $_restrict" >> $TMPH
1671 if test "$optimize" = "small"; then
1672 echo "#define always_inline" >> $TMPH
1675 # build tree in object directory if source path is different from current one
1676 if test "$source_path_used" = "yes" ; then
1688 libavcodec/libpostproc \
1695 libavformat/Makefile \
1696 libavcodec/Makefile \
1697 libavcodec/libpostproc/Makefile \
1698 libavutil/Makefile \
1704 for dir in $DIRS ; do
1707 for f in $FILES ; do
1708 ln -sf "$source_path/$f" $f
1710 echo "SRC_PATH=$source_path" >> config.mak
1712 echo "SRC_PATH='$source_path'" >> config.mak
1715 if test "$amr_wb" = "yes" ; then
1716 echo "#define AMR_WB 1" >> $TMPH
1717 echo "AMR_WB=yes" >> config.mak
1719 echo "AMR WB FLOAT NOTICE ! Make sure you have downloaded TS26.204"
1721 echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip"
1722 echo "and extracted the source to libavcodec/amrwb_float"
1726 if test "$amr_nb" = "yes" ; then
1727 echo "#define AMR_NB 1" >> $TMPH
1728 echo "AMR_NB=yes" >> config.mak
1730 if test "$amr_nb_fixed" = "yes" ; then
1731 echo "AMR_NB_FIXED=yes" >> config.mak
1732 echo "#define AMR_NB_FIXED 1" >> $TMPH
1733 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1734 echo "REL-5 version 5.1.0 from "
1735 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-5??.zip"
1736 echo "and extracted src to libavcodec/amr"
1737 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1738 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1741 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1742 echo "REL-5 V5.1.0 from "
1743 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-5??.zip"
1744 echo "and extracted the source to libavcodec/amr_float"
1745 echo "and if u try this on an alpha, u may need to change Word32 to int in amr/typedef.h"
1749 if test "$amr_if2" = "yes" ; then
1750 echo "AMR_CFLAGS=-DIF2=1" >> config.mak
1755 for codec in $CODEC_LIST ; do
1756 echo "#define CONFIG_`echo $codec | tr a-z A-Z` 1" >> $TMPH
1757 echo "CONFIG_`echo $codec | tr a-z A-Z`=yes" >> config.mak
1760 diff $TMPH config.h >/dev/null 2>&1
1761 if test $? -ne 0 ; then
1762 mv -f $TMPH config.h
1764 echo "config.h is unchanged"
1767 rm -f $TMPO $TMPC $TMPE $TMPS $TMPH
1770 # build pkg-config files libav*.pc and libpostproc.pc
1771 lavc_version=`grep '#define LIBAVCODEC_VERSION ' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9\.]//g'`
1772 lavf_version=`grep '#define LIBAVFORMAT_VERSION ' "$source_path/libavformat/avformat.h" | sed 's/[^0-9\.]//g'`
1773 lavu_version=`grep '#define LIBAVUTIL_VERSION ' "$source_path/libavutil/avutil.h" | sed 's/[^0-9\.]//g'`
1776 test "$libogg" = "yes" && requires="$requires ogg >= 1.1"
1777 test "$vorbis" = "yes" && requires="$requires vorbis"
1778 test "$theora" = "yes" && requires="$requires theora"
1779 test "$faad" = "yes" && test "$faadbin" = "no" && extralibs="$extralibs -lfaad"
1782 cat <<EOF >libavutil.pc
1784 exec_prefix=\${prefix}
1785 libdir=\${exec_prefix}/lib
1786 includedir=\${prefix}/include
1789 Description: FFmpeg utility library
1790 Version: $lavu_version
1793 Libs: -L\${libdir} -lavutil
1794 Cflags: -I\${includedir} -I\${includedir}/ffmpeg
1797 cat <<EOF >libavutil-uninstalled.pc
1800 libdir=\${pcfiledir}/libavutil
1801 includedir=\${pcfiledir}/libavutil
1804 Description: FFmpeg utility library
1805 Version: $lavu_version
1808 Libs: \${libdir}/${LIBPREF}avutil${LIBSUF}
1809 Cflags: -I\${includedir}
1813 cat <<EOF >libavcodec.pc
1815 exec_prefix=\${prefix}
1816 libdir=\${exec_prefix}/lib
1817 includedir=\${prefix}/include
1820 Description: FFmpeg codec library
1821 Version: $lavc_version
1822 Requires: $requires libavutil = $lavu_version
1824 Libs: -L\${libdir} -lavcodec $extralibs
1825 Cflags: -I\${includedir} -I\${includedir}/ffmpeg
1828 cat <<EOF >libavcodec-uninstalled.pc
1831 libdir=\${pcfiledir}/libavcodec
1832 includedir=\${pcfiledir}/libavcodec
1835 Description: FFmpeg codec library
1836 Version: $lavc_version
1837 Requires: $requires libavutil = $lavu_version
1839 Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} $extralibs
1840 Cflags: -I\${includedir}
1844 cat <<EOF >libavformat.pc
1846 exec_prefix=\${prefix}
1847 libdir=\${exec_prefix}/lib
1848 includedir=\${prefix}/include
1851 Description: FFmpeg container format library
1852 Version: $lavf_version
1853 Requires: $requires libavcodec = $lavc_version
1855 Libs: -L\${libdir} -lavformat $extralibs
1856 Cflags: -I\${includedir} -I\${includedir}/ffmpeg
1859 cat <<EOF >libavformat-uninstalled.pc
1862 libdir=\${pcfiledir}/libavformat
1863 includedir=\${pcfiledir}/libavformat
1866 Description: FFmpeg container format library
1867 Version: $lavf_version
1868 Requires: $requires libavcodec = $lavc_version
1870 Libs: \${libdir}/${LIBPREF}avformat${LIBSUF} $extralibs
1871 Cflags: -I\${includedir}
1876 cat <<EOF >libpostproc.pc
1878 exec_prefix=\${prefix}
1879 libdir=\${exec_prefix}/lib
1880 includedir=\${prefix}/include
1883 Description: FFmpeg post processing library
1884 Version: $lavc_version
1887 Libs: -L\${libdir} -lpostproc
1888 Cflags: -I\${includedir} -I\${includedir}/postproc
1891 cat <<EOF >libpostproc-uninstalled.pc
1894 libdir=\${pcfiledir}/libavcodec/libpostproc
1895 includedir=\${pcfiledir}/libavcodec/libpostproc
1898 Description: FFmpeg post processing library
1899 Version: $lavc_version
1902 Libs: \${libdir}/${LIBPREF}postproc${LIBSUF}
1903 Cflags: -I\${includedir}