3 # ffmpeg configure script (c) 2000, 2001, 2002 Fabrice Bellard
5 # set temporary file name
6 if test ! -z "$TMPDIR" ; then
8 elif test ! -z "$TEMPDIR" ; then
14 TMPC="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
15 TMPO="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
16 TMPE="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}"
17 TMPS="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
18 TMPH="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
37 i386|i486|i586|i686|i86pc|BePC)
40 # armv4l is a subset of armv5tel
47 "Power Macintosh"|ppc)
96 LDFLAGS=-Wl,--warn-common
112 prefix="/boot/home/config"
113 # helps building libavcodec
114 CFLAGS="-DPIC -fomit-frame-pointer"
115 # 3 gcc releases known for BeOS, each with ugly bugs
116 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
117 case "$gcc_version" in
118 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
121 *20010315*) echo "BeBits gcc"
122 CFLAGS="$CFLAGS -fno-expensive-optimizations"
126 # disable linux things
132 # no need for libm, but the inet stuff
134 if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
135 extralibs="-lbind -lsocket"
149 extralibs="$extralibs -lsocket -lnsl"
156 LDFLAGS="$LDFLAGS -export-dynamic"
162 extralibs="-lpoll -lgnugetopt -lm"
171 SHFLAGS="-dynamiclib"
176 FFSLDFLAGS=-Wl,-bind_at_load
177 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
178 case "$gcc_version" in
180 CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer"
183 CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL"
186 CFLAGS="-no-cpp-precomp -pipe -fomit-frame-pointer -mdynamic-no-pic"
191 # Note: the rest of the mingw32 config is done afterwards as mingw32
192 # can be forced on command line for linux cross compilation
201 test -f /usr/include/inttypes.h || \
202 test -f /usr/local/include/inttypes.h || \
203 echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
204 "/usr/include/inttypes.h !!!"
207 LDFLAGS="$LDFLAGS -rdynamic"
212 ranlib="echo ignoring ranlib"
213 strip="echo ignoring strip"
215 LDFLAGS="-Zomf -Zstack 16384 -s"
234 # From mplayer configure. We need TARGET_OS available
235 # to the Makefile, so it can distinguish between flavors
236 # of AltiVec on PowerPC
237 TARGET_OS=`( uname -s ) 2>&1`
239 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
247 [cC][yY][gG][wW][iI][nN]*)
251 TARGET_OS="$TARGET_OS-UNKNOWN"
256 # XXX: we assume an absolute path is given when launching configure,
257 # except in './configure' case.
258 source_path="`echo $0 | sed -e 's#/configure##'`"
259 source_path_used="yes"
260 if test -z "$source_path" -o "$source_path" = "." ; then
262 source_path_used="no"
267 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
269 --mandir=*) mandir=`echo $opt | cut -d '=' -f 2`
271 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
273 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
275 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
277 --make=*) make=`echo $opt | cut -d '=' -f 2`
279 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
281 --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
283 --extra-libs=*) extralibs=${opt#--extra-libs=}
285 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
287 --tune=*) tune=`echo $opt | cut -d '=' -f 2`
289 --powerpc-perf-enable) powerpc_perf="yes"
291 --disable-mmx) mmx="no"
293 --disable-altivec) altivec="no"
295 --enable-gprof) gprof="yes"
297 --disable-v4l) v4l="no"
299 --disable-audio-oss) audio_oss="no"
301 --disable-audio-beos) audio_beos="no"
303 --disable-dv1394) dv1394="no"
305 --disable-network) network="no"
307 --disable-zlib) zlib="no"
309 --enable-a52) a52="yes"
311 --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
313 --enable-pp) pp="yes"
315 --enable-shared-pp) shared_pp="yes"
317 --enable-mp3lame) mp3lame="yes"
319 --enable-vorbis) vorbis="yes"
321 --enable-faad) faad="yes"
323 --enable-faadbin) faadbin="yes"
325 --disable-vhook) vhook="no"
327 --disable-simple_idct) simpleidct="no"
329 --enable-mingw32) mingw32="yes"
331 --enable-shared) lshared="yes"
333 --disable-debug) debug="no"
335 --disable-opts) optimize="no"
337 --disable-mpegaudio-hp) mpegaudio_hp="no"
339 --disable-ffserver) ffserver="no"
341 --disable-ffplay) ffplay="no"
343 --disable-risky) risky="no"
345 --enable-small) optimize="small"
347 --enable-amr_nb) amr_nb="yes"
349 --enable-amr_nb-fixed) amr_nb_fixed="yes"
351 --enable-sunmlib) sunmlib="yes"
357 if test $mmx = "default"; then
358 if test $cpu = "x86"; then
365 # Can only do AltiVec on PowerPC
366 if test $altivec = "default"; then
367 if test $cpu = "powerpc"; then
374 # Add processor-specific flags
376 if test $tune != "generic"; then
378 601|ppc601|PowerPC601)
379 CFLAGS="$CFLAGS -mcpu=601"
380 if test $altivec = "yes"; then
381 echo "WARNING: tuning for PPC601 but altivec enabled !";
385 603*|ppc603*|PowerPC603*)
386 CFLAGS="$CFLAGS -mcpu=603"
387 if test $altivec = "yes"; then
388 echo "WARNING: tuning for PPC603 but altivec enabled !";
392 604*|ppc604*|PowerPC604*)
393 CFLAGS="$CFLAGS -mcpu=604"
394 if test $altivec = "yes"; then
395 echo "WARNING: tuning for PPC604 but altivec enabled !";
399 G3|g3|75*|ppc75*|PowerPC75*)
400 CFLAGS="$CFLAGS -mcpu=750 -mtune=750"
401 if test $altivec = "yes"; then
402 echo "WARNING: tuning for PPC75x but altivec enabled !";
406 G4|g4|745*|ppc745*|PowerPC745*)
407 CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450"
408 if test $altivec = "no"; then
409 echo "WARNING: tuning for PPC745x but altivec disabled !";
413 74*|ppc74*|PowerPC74*)
414 CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400"
415 if test $altivec = "no"; then
416 echo "WARNING: tuning for PPC74xx but altivec disabled !";
420 G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
421 CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc64 -force_cpusubtype_ALL "
422 if test $altivec = "no"; then
423 echo "WARNING: tuning for PPC970 but altivec disabled !";
428 echo "WARNING: unknown CPU "$tune", ignored"
433 # AltiVec flags: The FSF version of GCC differs from the Darwin version
434 if test $cpu = "powerpc"; then
435 if test $altivec = "yes"; then
436 if test "$darwin" = "yes"; then
437 CFLAGS="$CFLAGS -faltivec"
439 CFLAGS="$CFLAGS -maltivec -mabi=altivec"
444 # See if we have <altivec.h>
447 int main( void ) { return 0; }
451 if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
455 # See does our compiler support Motorola AltiVec C API
456 if test $altivec = "yes"; then
457 if test $_altivec_h = "yes"; then
461 vector signed int v1, v2, v3;
469 vector signed int v1, v2, v3;
475 $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no"
478 # Can only do mmi on mips
479 if test $mmi = "default"; then
480 if test $cpu = "mips"; then
487 # See does our compiler support mmi
488 if test $mmi = "yes"; then
491 __asm__ ("lq \$2, 0(\$2)");
495 $cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
498 if test "$mingw32" = "yes" ; then
509 prefix="/c/Program Files/FFmpeg"
513 cc="${cross_prefix}${cc}"
514 ar="${cross_prefix}${ar}"
515 ranlib="${cross_prefix}${ranlib}"
516 strip="${cross_prefix}${strip}"
518 if test -z "$cross_prefix" ; then
521 # big/little endian test
523 #include <inttypes.h>
524 int main(int argc, char ** argv){
525 volatile uint32_t i=0x01234567;
526 return (*((uint8_t*)(&i))) == 0x67;
530 if $cc -o $TMPE $TMPC 2>/dev/null ; then
531 $TMPE && bigendian="yes"
533 echo big/little test failed
538 # if cross compiling, cannot launch a program, so make a static guess
539 if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
546 # check availability of some header files
550 int main( void ) { return 0; }
555 if $cc -o $TMPE $TMPC 2> /dev/null ; then
558 # check for memalign - atmos
563 string = memalign(64, sizeof(char));
567 $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
572 int main( void ) { localtime_r(NULL, NULL); }
576 if $cc -o $TMPE $TMPC 2> /dev/null ; then
580 if test "$zlib" = "yes"; then
581 # check for zlib - mmu_man
585 if (zlibVersion() != ZLIB_VERSION)
586 puts("zlib version differs !!!");
591 $cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
592 # $TMPE 2> /dev/null > /dev/null || zlib="no"
593 # XXX: more tests needed - runtime test
595 if test "$zlib" = "yes"; then
596 extralibs="$extralibs -lz"
599 # test for lrintf in math.h
601 #define _ISOC9X_SOURCE 1
603 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
607 if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
609 $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
613 for restrict_keyword in restrict __restrict__ __restrict; do
614 echo "void foo(char * $restrict_keyword p);" > $TMPC
615 if $cc -c -o $TMPO $TMPC 2> /dev/null; then
616 _restrict=$restrict_keyword
621 # test gcc version to see if vector builtins can be used
622 # currently only used on i386 for MMX builtins
625 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
628 #error no vector builtins
634 if $cc -o $TMPO $TMPC 2> /dev/null ; then
638 # dlopen/dlfcn.h probing
642 int main( void ) { return (int) dlopen("foo", 0); }
647 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
652 if $cc -o $TMPE $TMPC 2> /dev/null ; then
659 int main( void ) { return (int) dlopen("foo", 0); }
662 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
666 if $cc -o $TMPE $TMPC 2> /dev/null ; then
671 if test "$vhook" = "default" ; then
675 ##########################################
679 #include <X11/Xlib.h>
681 int main( void ) { return (int) imlib_load_font("foo"); }
685 if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
689 ##########################################
693 #include <ft2build.h>
694 int main( void ) { return (int) FT_Init_FreeType(0); }
698 if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
699 if test "`which freetype-config`" != ""; then
700 if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then
706 ##########################################
711 #undef main /* We don't want SDL to override our main() */
712 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
717 if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` 2> /dev/null ; then
718 _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
719 if test "$_sdlversion" -lt 121 ; then
726 if test "$sdl" = "no" ; then
730 if test "$debug" = "yes"; then
734 if test "$optimize" = "small"; then
735 # CFLAGS=${CFLAGS//-O3/-Os}
739 if test "$optimize" = "yes"; then
743 if test x"$bindir" = x""; then
744 bindir="${prefix}/bin"
747 if test x"$mandir" = x""; then
748 mandir="${prefix}/man"
751 if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
754 Usage: configure [options]
755 Options: [defaults in brackets after descriptions]
758 echo "Standard options:"
759 echo " --help print this message"
760 echo " --prefix=PREFIX install in PREFIX [$prefix]"
761 echo " --mandir=DIR man documentation in DIR [PREFIX/man]"
762 echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
763 echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
764 echo " --enable-faad enable faad support via libfaad [default=no]"
765 echo " --enable-faadbin build faad support with runtime linking [default=no]"
766 echo " --enable-mingw32 enable mingw32 native/cross windows compile"
767 echo " --enable-a52 enable GPL'ed A52 support [default=no]"
768 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
769 echo " --enable-pp enable GPL'ed post processing support [default=no]"
770 echo " --enable-shared-pp use libpostproc.so [default=no]"
771 echo " --enable-shared build shared libraries [default=no]"
772 echo " --enable-amr_nb enable amr_nb float audio codec"
773 echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
774 echo " --enable-sunmlib use Sun medialib [default=no]"
776 echo "Advanced options (experts only):"
777 echo " --source-path=PATH path of source code [$source_path]"
778 echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
779 echo " --cc=CC use C compiler CC [$cc]"
780 echo " --make=MAKE use specified make [$make]"
781 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
782 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
783 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
784 echo " --cpu=CPU force cpu to CPU [$cpu]"
785 echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)"
786 echo " --powerpc-perf-enable enable performance report on PPC (requires enabling PMC)"
787 echo " --disable-mmx disable mmx usage"
788 echo " --disable-altivec disable AltiVec usage"
789 echo " --disable-audio-oss disable OSS audio support [default=no]"
790 echo " --disable-audio-beos disable BeOS audio support [default=no]"
791 echo " --disable-v4l disable video4linux grabbing [default=no]"
792 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
793 echo " --disable-network disable network support [default=no]"
794 echo " --disable-zlib disable zlib [default=no]"
795 echo " --disable-simple_idct disable simple IDCT routines [default=no]"
796 echo " --disable-vhook disable video hooking support"
797 echo " --enable-gprof enable profiling with gprof [$gprof]"
798 echo " --disable-debug disable debugging symbols"
799 echo " --disable-opts disable compiler optimizations"
800 echo " --disable-mpegaudio-hp faster (but less accurate)"
801 echo " mpegaudio decoding [default=no]"
802 echo " --disable-ffserver disable ffserver build"
803 echo " --disable-ffplay disable ffplay build"
804 echo " --disable-risky disables patent encumbered codecs"
805 echo " --enable-small optimize for size instead of speed"
807 echo "NOTE: The object files are build at the place where configure is launched"
811 echo "Install prefix $prefix"
812 echo "Source path $source_path"
813 echo "C compiler $cc"
815 echo "CPU $cpu ($tune)"
816 echo "Big Endian $bigendian"
817 if test $cpu = "x86"; then
818 echo "MMX enabled $mmx"
819 echo "Vector Builtins $builtin_vector"
821 if test $cpu = "mips"; then
822 echo "MMI enabled $mmi"
824 if test $cpu = "powerpc"; then
825 echo "AltiVec enabled $altivec"
827 echo "gprof enabled $gprof"
828 echo "zlib enabled $zlib"
829 echo "mp3lame enabled $mp3lame"
830 echo "vorbis enabled $vorbis"
831 echo "faad enabled $faad"
832 echo "faadbin enabled $faadbin"
833 echo "a52 support $a52"
834 echo "a52 dlopened $a52bin"
835 echo "pp support $pp"
836 echo "debug symbols $debug"
837 echo "optimize $optimize"
838 echo "shared pp $shared_pp"
839 echo "Video hooking $vhook"
840 echo "SDL support $sdl"
841 if test $sdl_too_old = "yes"; then
842 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
844 echo "risky / patent encumbered codecs $risky"
846 if test "$vhook" = "yes" ; then
847 echo "Imlib2 support $imlib2"
848 echo "freetype support $freetype2"
850 echo "Sun medialib support" $sunmlib
851 echo "AMR-NB float support" $amr_nb
852 echo "AMR-NB fixed support" $amr_nb_fixed
854 echo "Creating config.mak and config.h"
856 echo "# Automatically generated by configure - do not modify" > config.mak
857 echo "/* Automatically generated by configure - do not modify */" > $TMPH
859 echo "prefix=$prefix" >> config.mak
860 echo "bindir=$bindir" >> config.mak
861 echo "mandir=$mandir" >> config.mak
862 echo "MAKE=$make" >> config.mak
863 echo "CC=$cc" >> config.mak
864 echo "AR=$ar" >> config.mak
865 echo "RANLIB=$ranlib" >> config.mak
866 echo "STRIP=$strip" >> config.mak
867 echo "OPTFLAGS=$CFLAGS" >> config.mak
868 echo "LDFLAGS=$LDFLAGS" >> config.mak
869 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
870 echo "SHFLAGS=$SHFLAGS" >> config.mak
871 echo "LIBPREF=$LIBPREF" >> config.mak
872 echo "LIBSUF=$LIBSUF" >> config.mak
873 echo "SLIBPREF=$SLIBPREF" >> config.mak
874 echo "SLIBSUF=$SLIBSUF" >> config.mak
875 echo "EXESUF=$EXESUF" >> config.mak
876 echo "TARGET_OS=$TARGET_OS" >> config.mak
877 if test "$cpu" = "x86" ; then
878 echo "TARGET_ARCH_X86=yes" >> config.mak
879 echo "#define ARCH_X86 1" >> $TMPH
880 elif test "$cpu" = "armv4l" ; then
881 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
882 echo "#define ARCH_ARMV4L 1" >> $TMPH
883 elif test "$cpu" = "alpha" ; then
884 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
885 echo "#define ARCH_ALPHA 1" >> $TMPH
886 elif test "$cpu" = "sparc64" ; then
887 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
888 echo "#define ARCH_SPARC64 1" >> $TMPH
889 elif test "$cpu" = "powerpc" ; then
890 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
891 echo "#define ARCH_POWERPC 1" >> $TMPH
892 if test "$powerpc_perf" = "yes"; then
893 echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
895 elif test "$cpu" = "mips" ; then
896 echo "TARGET_ARCH_MIPS=yes" >> config.mak
897 echo "#define ARCH_MIPS 1" >> $TMPH
898 elif test "$cpu" = "sh4" ; then
899 echo "TARGET_ARCH_SH4=yes" >> config.mak
900 echo "#define ARCH_SH4 1" >> $TMPH
902 echo "#define TUNECPU $TUNECPU" >> $TMPH
903 if test "$bigendian" = "yes" ; then
904 echo "WORDS_BIGENDIAN=yes" >> config.mak
905 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
907 if test "$mmx" = "yes" ; then
908 echo "TARGET_MMX=yes" >> config.mak
909 echo "#define HAVE_MMX 1" >> $TMPH
910 echo "#define __CPU__ 586" >> $TMPH
912 if test "$builtin_vector" = "yes" ; then
913 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
914 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
916 if test "$mmi" = "yes" ; then
917 echo "TARGET_MMI=yes" >> config.mak
918 echo "#define HAVE_MMI 1" >> $TMPH
920 if test "$altivec" = "yes" ; then
921 echo "TARGET_ALTIVEC=yes" >> config.mak
922 echo "#define HAVE_ALTIVEC 1" >> $TMPH
923 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
924 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
925 if test "$_altivec_h" = "yes" ; then
926 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
928 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
931 if test "$gprof" = "yes" ; then
932 echo "TARGET_GPROF=yes" >> config.mak
933 echo "#define HAVE_GPROF 1" >> $TMPH
935 if test "$localtime_r" = "yes" ; then
936 echo "#define HAVE_LOCALTIME_R 1" >> $TMPH
938 if test "$imlib2" = "yes" ; then
939 echo "HAVE_IMLIB2=yes" >> config.mak
941 if test "$freetype2" = "yes" ; then
942 echo "HAVE_FREETYPE2=yes" >> config.mak
944 if test "$sunmlib" = "yes" ; then
945 echo "HAVE_MLIB=yes" >> config.mak
946 echo "#define HAVE_MLIB 1" >> $TMPH
947 extralibs="$extralibs -lmlib"
949 if test "$sdl" = "yes" ; then
950 echo "CONFIG_SDL=yes" >> config.mak
951 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
952 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
954 if test "$have_lrintf" = "yes" ; then
955 echo "#define HAVE_LRINTF 1" >> $TMPH
957 if test "$vhook" = "yes" ; then
958 echo "BUILD_VHOOK=yes" >> config.mak
959 echo "#define HAVE_VHOOK 1" >> $TMPH
960 extralibs="$extralibs $ldl"
962 if test "$lshared" = "yes" ; then
963 echo "BUILD_SHARED=yes" >> config.mak
964 echo "PIC=-fPIC" >> config.mak
966 echo "EXTRALIBS=$extralibs" >> config.mak
967 version=`grep '#define FFMPEG_VERSION ' $source_path/libavcodec/avcodec.h |
969 echo "VERSION=$version" >>config.mak
970 # if you do not want to use encoders, disable that.
971 echo "#define CONFIG_ENCODERS 1" >> $TMPH
972 echo "CONFIG_ENCODERS=yes" >> config.mak
974 # if you do not want to use decoders, disable that.
975 echo "#define CONFIG_DECODERS 1" >> $TMPH
976 echo "CONFIG_DECODERS=yes" >> config.mak
979 if test "$a52" = "yes" ; then
980 echo "#define CONFIG_AC3 1" >> $TMPH
981 echo "CONFIG_AC3=yes" >> config.mak
983 if test "$a52bin" = "yes" ; then
984 echo "#define CONFIG_A52BIN 1" >> $TMPH
985 echo "CONFIG_A52BIN=yes" >> config.mak
990 if test "$pp" = "yes" ; then
991 echo "#define CONFIG_PP 1" >> $TMPH
992 echo "CONFIG_PP=yes" >> config.mak
994 if test "$shared_pp" = "yes" ; then
995 echo "#define SHARED_PP 1" >> $TMPH
996 echo "SHARED_PP=yes" >> config.mak
1000 # mpeg audio high precision mode
1001 if test "$mpegaudio_hp" = "yes" ; then
1002 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
1005 if test "$v4l" = "yes" ; then
1006 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
1007 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
1010 if test "$dv1394" = "yes" ; then
1011 echo "#define CONFIG_DV1394 1" >> $TMPH
1012 echo "CONFIG_DV1394=yes" >> config.mak
1015 if test "$dlopen" = "yes" ; then
1016 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
1019 if test "$dlfcn" = "yes" ; then
1020 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
1023 if test "$audio_oss" = "yes" ; then
1024 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
1025 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
1028 if test "$audio_beos" = "yes" ; then
1029 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
1030 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
1033 if test "$network" = "yes" ; then
1034 echo "#define CONFIG_NETWORK 1" >> $TMPH
1035 echo "CONFIG_NETWORK=yes" >> config.mak
1038 if test "$zlib" = "yes" ; then
1039 echo "#define CONFIG_ZLIB 1" >> $TMPH
1040 echo "CONFIG_ZLIB=yes" >> config.mak
1043 if test "$mp3lame" = "yes" ; then
1044 echo "#define CONFIG_MP3LAME 1" >> $TMPH
1045 echo "CONFIG_MP3LAME=yes" >> config.mak
1048 if test "$vorbis" = "yes" ; then
1049 echo "#define CONFIG_VORBIS 1" >> $TMPH
1050 echo "CONFIG_VORBIS=yes" >> config.mak
1053 if test "$faad" = "yes" ; then
1054 echo "#define CONFIG_FAAD 1" >> $TMPH
1055 echo "CONFIG_FAAD=yes" >> config.mak
1058 if test "$faadbin" = "yes" ; then
1059 echo "#define CONFIG_FAADBIN 1" >> $TMPH
1060 echo "CONFIG_FAADBIN=yes" >> config.mak
1063 if test "$mingw32" = "yes" ; then
1064 echo "#define CONFIG_WIN32 1" >> $TMPH
1065 echo "CONFIG_WIN32=yes" >> config.mak
1066 echo "#ifndef __MINGW32__" >> $TMPH
1067 echo "#define __MINGW32__ 1" >> $TMPH
1068 echo "#endif" >> $TMPH
1071 if test "$os2" = "yes" ; then
1072 echo "#define CONFIG_OS2 1" >> $TMPH
1073 echo "CONFIG_OS2=yes" >> config.mak
1076 if test "$TARGET_OS" = "SunOS" ; then
1077 echo "#define CONFIG_SUNOS 1" >> $TMPH
1080 if test "$darwin" = "yes"; then
1081 echo "#define CONFIG_DARWIN 1" >> $TMPH
1082 echo "CONFIG_DARWIN=yes" >> config.mak
1085 if test "$_malloc_h" = "yes" ; then
1086 echo "#define HAVE_MALLOC_H 1" >> $TMPH
1088 echo "#undef HAVE_MALLOC_H" >> $TMPH
1091 if test "$_memalign" = "yes" ; then
1092 echo "#define HAVE_MEMALIGN 1" >> $TMPH
1094 echo "#undef HAVE_MEMALIGN" >> $TMPH
1097 if test "$netserver" = "yes" ; then
1098 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1099 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1102 if test "$need_inet_aton" = "yes" ; then
1103 echo "NEED_INET_ATON=yes" >> config.mak
1106 if test "$simpleidct" = "yes" ; then
1107 echo "#define SIMPLE_IDCT 1" >> $TMPH
1110 if test "$ffserver" = "yes" ; then
1111 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1112 echo "CONFIG_FFSERVER=yes" >> config.mak
1115 if test "$ffplay" = "yes" ; then
1116 echo "CONFIG_FFPLAY=yes" >> config.mak
1119 if test "$risky" = "yes" ; then
1120 echo "#define CONFIG_RISKY 1" >> $TMPH
1121 echo "CONFIG_RISKY=yes" >> config.mak
1124 echo "#define restrict $_restrict" >> $TMPH
1126 # build tree in object directory if source path is different from current one
1127 if test "$source_path_used" = "yes" ; then
1128 DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
1129 libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
1130 FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
1131 for dir in $DIRS ; do
1134 for f in $FILES ; do
1135 ln -sf $source_path/$f $f
1138 echo "SRC_PATH=$source_path" >> config.mak
1140 if test "$amr_nb" = "yes" ; then
1141 echo "#define AMR_NB 1" >> $TMPH
1142 echo "AMR_NB=yes" >> config.mak
1144 if test "$amr_nb_fixed" = "yes" ; then
1145 echo "AMR_NB_FIXED=yes" >> config.mak
1146 echo "#define AMR_NB_FIXED 1" >> $TMPH
1147 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1148 echo "REL-5 version 5.1.0 from "
1149 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
1150 echo "and extracted src to libavcodec/amr"
1151 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1152 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1155 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1156 echo "REL-5 V5.1.0 from "
1157 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
1158 echo "and extracted the source to libavcodec/amr_float"
1164 diff $TMPH config.h >/dev/null 2>&1
1165 if test $? -ne 0 ; then
1166 mv -f $TMPH config.h
1168 echo "config.h is unchanged"
1171 rm -f $TMPO $TMPC $TMPE $TMPS $TMPH