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"
36 i386|i486|i586|i686|i86pc|BePC)
39 # armv4l is a subset of armv5tel
46 "Power Macintosh"|ppc)
93 LDFLAGS=-Wl,--warn-common
109 prefix="/boot/home/config"
110 # helps building libavcodec
111 CFLAGS="-O3 -DPIC -fomit-frame-pointer"
112 # 3 gcc releases known for BeOS, each with ugly bugs
113 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
114 case "$gcc_version" in
115 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
118 *20010315*) echo "BeBits gcc"
119 CFLAGS="$CFLAGS -fno-expensive-optimizations"
123 # disable linux things
129 # no need for libm, but the inet stuff
131 if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
132 extralibs="-lbind -lsocket"
146 extralibs="$extralibs -lsocket -lnsl"
153 LDFLAGS="$LDFLAGS -export-dynamic"
159 extralibs="-lpoll -lgnugetopt -lm"
168 SHFLAGS="-dynamiclib"
173 FFSLDFLAGS=-Wl,-bind_at_load
174 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
175 case "$gcc_version" in
177 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer"
180 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL"
183 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic"
205 test -f /usr/include/inttypes.h || \
206 test -f /usr/local/include/inttypes.h || \
207 echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
208 "/usr/include/inttypes.h !!!"
211 LDFLAGS="$LDFLAGS -rdynamic"
216 ranlib="echo ignoring ranlib"
217 strip="echo ignoring strip"
219 LDFLAGS="-Zomf -Zstack 16384 -s"
237 # From mplayer configure. We need TARGET_OS available
238 # to the Makefile, so it can distinguish between flavors
239 # of AltiVec on PowerPC
240 TARGET_OS=`( uname -s ) 2>&1`
242 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
250 [cC][yY][gG][wW][iI][nN]*)
254 TARGET_OS="$TARGET_OS-UNKNOWN"
259 # XXX: we assume an absolute path is given when launching configure,
260 # except in './configure' case.
261 source_path="`echo $0 | sed -e 's#/configure##'`"
262 source_path_used="yes"
263 if test -z "$source_path" -o "$source_path" = "." ; then
265 source_path_used="no"
270 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
272 --mandir=*) mandir=`echo $opt | cut -d '=' -f 2`
274 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
276 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
278 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
280 --make=*) make=`echo $opt | cut -d '=' -f 2`
282 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
284 --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
286 --extra-libs=*) extralibs=${opt#--extra-libs=}
288 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
290 --tune=*) tune=`echo $opt | cut -d '=' -f 2`
292 --powerpc-perf-enable) powerpc_perf="yes"
294 --disable-mmx) mmx="no"
296 --disable-altivec) altivec="no"
298 --enable-gprof) gprof="yes"
300 --disable-v4l) v4l="no"
302 --disable-audio-oss) audio_oss="no"
304 --disable-audio-beos) audio_beos="no"
306 --disable-dv1394) dv1394="no"
308 --disable-network) network="no"
310 --disable-zlib) zlib="no"
312 --disable-a52) a52="no"
314 --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
316 --disable-pp) pp="no"
318 --enable-shared-pp) shared_pp="yes"
320 --enable-mp3lame) mp3lame="yes"
322 --enable-vorbis) vorbis="yes"
324 --enable-faad) faad="yes"
326 --enable-faadbin) faadbin="yes"
328 --disable-vhook) vhook="no"
330 --disable-simple_idct) simpleidct="no"
332 --enable-mingw32) mingw32="yes"
334 --enable-shared) lshared="yes"
336 --disable-mpegaudio-hp) mpegaudio_hp="no"
338 --disable-ffserver) ffserver="no"
340 --disable-ffplay) ffplay="no"
342 --disable-risky) risky="no"
344 --enable-small) small="yes"
346 --enable-amr_nb) amr_nb="yes"
348 --enable-amr_nb-fixed) amr_nb_fixed="yes"
350 --enable-sunmlib) sunmlib="yes"
356 if test $mmx = "default"; then
357 if test $cpu = "x86"; then
364 # Can only do AltiVec on PowerPC
365 if test $altivec = "default"; then
366 if test $cpu = "powerpc"; then
373 # Add processor-specific flags
375 if test $tune != "generic"; then
377 601|ppc601|PowerPC601)
378 CFLAGS="$CFLAGS -mcpu=601"
379 if test $altivec = "yes"; then
380 echo "WARNING: tuning for PPC601 but altivec enabled !";
384 603*|ppc603*|PowerPC603*)
385 CFLAGS="$CFLAGS -mcpu=603"
386 if test $altivec = "yes"; then
387 echo "WARNING: tuning for PPC603 but altivec enabled !";
391 604*|ppc604*|PowerPC604*)
392 CFLAGS="$CFLAGS -mcpu=604"
393 if test $altivec = "yes"; then
394 echo "WARNING: tuning for PPC604 but altivec enabled !";
398 G3|g3|75*|ppc75*|PowerPC75*)
399 CFLAGS="$CFLAGS -mcpu=750 -mtune=750"
400 if test $altivec = "yes"; then
401 echo "WARNING: tuning for PPC75x but altivec enabled !";
405 G4|g4|745*|ppc745*|PowerPC745*)
406 CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450"
407 if test $altivec = "no"; then
408 echo "WARNING: tuning for PPC745x but altivec disabled !";
412 74*|ppc74*|PowerPC74*)
413 CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400"
414 if test $altivec = "no"; then
415 echo "WARNING: tuning for PPC74xx but altivec disabled !";
419 G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
420 CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc64 -force_cpusubtype_ALL "
421 if test $altivec = "no"; then
422 echo "WARNING: tuning for PPC970 but altivec disabled !";
427 echo "WARNING: unknown CPU "$tune", ignored"
432 # AltiVec flags: The FSF version of GCC differs from the Darwin version
433 if test $cpu = "powerpc"; then
434 if test $altivec = "yes"; then
435 if test "$darwin" = "yes"; then
436 CFLAGS="$CFLAGS -faltivec"
438 CFLAGS="$CFLAGS -maltivec -mabi=altivec"
443 # See if we have <altivec.h>
446 int main( void ) { return 0; }
450 if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
454 # See does our compiler support Motorola AltiVec C API
455 if test $altivec = "yes"; then
456 if test $_altivec_h = "yes"; then
460 vector signed int v1, v2, v3;
468 vector signed int v1, v2, v3;
474 $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no"
477 # Can only do mmi on mips
478 if test $mmi = "default"; then
479 if test $cpu = "mips"; then
486 # See does our compiler support mmi
487 if test $mmi = "yes"; then
490 __asm__ ("lq \$2, 0(\$2)");
494 $cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
497 # Checking for CFLAGS
498 if test -z "$CFLAGS"; then
502 if test "$mingw32" = "yes" ; then
509 cc="${cross_prefix}${cc}"
510 ar="${cross_prefix}${ar}"
511 ranlib="${cross_prefix}${ranlib}"
512 strip="${cross_prefix}${strip}"
514 if test -z "$cross_prefix" ; then
517 # big/little endian test
519 #include <inttypes.h>
520 int main(int argc, char ** argv){
521 volatile uint32_t i=0x01234567;
522 return (*((uint8_t*)(&i))) == 0x67;
526 if $cc -o $TMPE $TMPC 2>/dev/null ; then
527 $TMPE && bigendian="yes"
529 echo big/little test failed
534 # if cross compiling, cannot launch a program, so make a static guess
535 if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
542 # check availability of some header files
546 int main( void ) { return 0; }
551 if $cc -o $TMPE $TMPC 2> /dev/null ; then
554 # check for memalign - atmos
559 string = memalign(64, sizeof(char));
563 $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
569 int main( void ) { return *strptime("", "", 0); }
573 if $cc -o $TMPE $TMPC 2> /dev/null ; then
577 if test "$zlib" = "yes"; then
578 # check for zlib - mmu_man
582 if (zlibVersion() != ZLIB_VERSION)
583 puts("zlib version differs !!!");
588 $cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
589 # $TMPE 2> /dev/null > /dev/null || zlib="no"
590 # XXX: more tests needed - runtime test
592 if test "$zlib" = "yes"; then
593 extralibs="$extralibs -lz"
596 # test for lrintf in math.h
598 #define _ISOC9X_SOURCE 1
600 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
604 if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
606 $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
610 for restrict_keyword in restrict __restrict__ __restrict; do
611 echo "void foo(char * $restrict_keyword p);" > $TMPC
612 if $cc -c -o $TMPO $TMPC 2> /dev/null; then
613 _restrict=$restrict_keyword
618 # test gcc version to see if vector builtins can be used
619 # currently only used on i386 for MMX builtins
622 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
625 #error no vector builtins
631 if $cc -o $TMPO $TMPC 2> /dev/null ; then
635 # dlopen/dlfcn.h probing
639 int main( void ) { return (int) dlopen("foo", 0); }
644 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
649 if $cc -o $TMPE $TMPC 2> /dev/null ; then
656 int main( void ) { return (int) dlopen("foo", 0); }
659 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
663 if $cc -o $TMPE $TMPC 2> /dev/null ; then
668 if test "$vhook" = "default" ; then
672 ##########################################
676 #include <X11/Xlib.h>
678 int main( void ) { return (int) imlib_load_font("foo"); }
682 if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
686 ##########################################
690 #include <ft2build.h>
691 int main( void ) { return (int) FT_Init_FreeType(0); }
695 if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
696 if test "`which freetype-config`" != ""; then
697 if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then
703 ##########################################
708 #undef main /* We don't want SDL to override our main() */
709 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
714 if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` 2> /dev/null ; then
715 _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
716 if test "$_sdlversion" -lt 121 ; then
723 if test "$sdl" = "no" ; then
727 if test "$small" = "yes"; then
728 # CFLAGS=${CFLAGS//-O3/-Os}
732 if test x"$mandir" = x""; then
733 mandir="${prefix}/man"
736 if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
739 Usage: configure [options]
740 Options: [defaults in brackets after descriptions]
743 echo "Standard options:"
744 echo " --help print this message"
745 echo " --prefix=PREFIX install in PREFIX [$prefix]"
746 echo " --mandir=DIR man documentation in DIR [PREFIX/man]"
747 echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
748 echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
749 echo " --enable-faad enable faad support via libfaad [default=no]"
750 echo " --enable-faadbin build faad support with runtime linking [default=no]"
751 echo " --enable-mingw32 enable mingw32 native/cross windows compile"
752 echo " --disable-a52 disable GPL'ed A52 support [default=no]"
753 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
754 echo " --disable-pp disable GPL'ed post processing support [default=no]"
755 echo " --enable-shared-pp use libpostproc.so [default=no]"
756 echo " --enable-shared build shared libraries [default=no]"
757 echo " --enable-amr_nb enable amr_nb float audio codec"
758 echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
759 echo " --enable-sunmlib use Sun medialib [default=no]"
761 echo "Advanced options (experts only):"
762 echo " --source-path=PATH path of source code [$source_path]"
763 echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
764 echo " --cc=CC use C compiler CC [$cc]"
765 echo " --make=MAKE use specified make [$make]"
766 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
767 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
768 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
769 echo " --cpu=CPU force cpu to CPU [$cpu]"
770 echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)"
771 echo " --powerpc-perf-enable enable performance report on PPC (requires enabling PMC)"
772 echo " --disable-mmx disable mmx usage"
773 echo " --disable-altivec disable AltiVec usage"
774 echo " --disable-audio-oss disable OSS audio support [default=no]"
775 echo " --disable-audio-beos disable BeOS audio support [default=no]"
776 echo " --disable-v4l disable video4linux grabbing [default=no]"
777 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
778 echo " --disable-network disable network support [default=no]"
779 echo " --disable-zlib disable zlib [default=no]"
780 echo " --disable-simple_idct disable simple IDCT routines [default=no]"
781 echo " --disable-vhook disable video hooking support"
782 echo " --enable-gprof enable profiling with gprof [$gprof]"
783 echo " --disable-mpegaudio-hp faster (but less accurate)"
784 echo " mpegaudio decoding [default=no]"
785 echo " --disable-ffserver disable ffserver build"
786 echo " --disable-ffplay disable ffplay build"
787 echo " --disable-risky disables patent encumbered codecs"
788 echo " --enable-small optimize for size instead of speed"
790 echo "NOTE: The object files are build at the place where configure is launched"
794 echo "Install prefix $prefix"
795 echo "Source path $source_path"
796 echo "C compiler $cc"
798 echo "CPU $cpu ($tune)"
799 echo "Big Endian $bigendian"
800 if test $cpu = "x86"; then
801 echo "MMX enabled $mmx"
802 echo "Vector Builtins $builtin_vector"
804 if test $cpu = "mips"; then
805 echo "MMI enabled $mmi"
807 if test $cpu = "powerpc"; then
808 echo "AltiVec enabled $altivec"
810 echo "gprof enabled $gprof"
811 echo "zlib enabled $zlib"
812 echo "mp3lame enabled $mp3lame"
813 echo "vorbis enabled $vorbis"
814 echo "faad enabled $faad"
815 echo "faadbin enabled $faadbin"
816 echo "a52 support $a52"
817 echo "a52 dlopened $a52bin"
818 echo "pp support $pp"
819 echo "shared pp $shared_pp"
820 echo "Video hooking $vhook"
821 echo "SDL support $sdl"
822 if test $sdl_too_old = "yes"; then
823 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
825 echo "risky / patent encumbered codecs $risky"
826 echo "optimize for size $small"
828 if test "$vhook" = "yes" ; then
829 echo "Imlib2 support $imlib2"
830 echo "freetype support $freetype2"
832 echo "Sun medialib support" $sunmlib
833 echo "AMR-NB float support" $amr_nb
834 echo "AMR-NB fixed support" $amr_nb_fixed
836 echo "Creating config.mak and config.h"
838 echo "# Automatically generated by configure - do not modify" > config.mak
839 echo "/* Automatically generated by configure - do not modify */" > $TMPH
841 echo "prefix=$prefix" >> config.mak
842 echo "mandir=$mandir" >> config.mak
843 echo "MAKE=$make" >> config.mak
844 echo "CC=$cc" >> config.mak
845 echo "AR=$ar" >> config.mak
846 echo "RANLIB=$ranlib" >> config.mak
847 echo "STRIP=$strip" >> config.mak
848 echo "OPTFLAGS=$CFLAGS" >> config.mak
849 echo "LDFLAGS=$LDFLAGS" >> config.mak
850 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
851 echo "SHFLAGS=$SHFLAGS" >> config.mak
852 echo "LIBPREF=$LIBPREF" >> config.mak
853 echo "LIBSUF=$LIBSUF" >> config.mak
854 echo "SLIBPREF=$SLIBPREF" >> config.mak
855 echo "SLIBSUF=$SLIBSUF" >> config.mak
856 echo "TARGET_OS=$TARGET_OS" >> config.mak
857 if test "$cpu" = "x86" ; then
858 echo "TARGET_ARCH_X86=yes" >> config.mak
859 echo "#define ARCH_X86 1" >> $TMPH
860 elif test "$cpu" = "armv4l" ; then
861 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
862 echo "#define ARCH_ARMV4L 1" >> $TMPH
863 elif test "$cpu" = "alpha" ; then
864 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
865 echo "#define ARCH_ALPHA 1" >> $TMPH
866 elif test "$cpu" = "sparc64" ; then
867 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
868 echo "#define ARCH_SPARC64 1" >> $TMPH
869 elif test "$cpu" = "powerpc" ; then
870 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
871 echo "#define ARCH_POWERPC 1" >> $TMPH
872 if test "$powerpc_perf" = "yes"; then
873 echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
875 elif test "$cpu" = "mips" ; then
876 echo "TARGET_ARCH_MIPS=yes" >> config.mak
877 echo "#define ARCH_MIPS 1" >> $TMPH
878 elif test "$cpu" = "sh4" ; then
879 echo "TARGET_ARCH_SH4=yes" >> config.mak
880 echo "#define ARCH_SH4 1" >> $TMPH
882 echo "#define TUNECPU $TUNECPU" >> $TMPH
883 if test "$bigendian" = "yes" ; then
884 echo "WORDS_BIGENDIAN=yes" >> config.mak
885 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
887 if test "$mmx" = "yes" ; then
888 echo "TARGET_MMX=yes" >> config.mak
889 echo "#define HAVE_MMX 1" >> $TMPH
890 echo "#define __CPU__ 586" >> $TMPH
892 if test "$mingw32" = "yes" ; then
893 echo "TARGET_MINGW32=yes" >> config.mak
895 if test "$builtin_vector" = "yes" ; then
896 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
897 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
899 if test "$mmi" = "yes" ; then
900 echo "TARGET_MMI=yes" >> config.mak
901 echo "#define HAVE_MMI 1" >> $TMPH
903 if test "$altivec" = "yes" ; then
904 echo "TARGET_ALTIVEC=yes" >> config.mak
905 echo "#define HAVE_ALTIVEC 1" >> $TMPH
906 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
907 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
908 if test "$_altivec_h" = "yes" ; then
909 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
911 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
914 if test "$gprof" = "yes" ; then
915 echo "TARGET_GPROF=yes" >> config.mak
916 echo "#define HAVE_GPROF 1" >> $TMPH
918 if test "$strptime" = "yes" ; then
919 echo "#define HAVE_STRPTIME 1" >> $TMPH
921 echo "BUILD_STRPTIME=yes" >> config.mak
923 if test "$imlib2" = "yes" ; then
924 echo "HAVE_IMLIB2=yes" >> config.mak
926 if test "$freetype2" = "yes" ; then
927 echo "HAVE_FREETYPE2=yes" >> config.mak
929 if test "$sunmlib" = "yes" ; then
930 echo "HAVE_MLIB=yes" >> config.mak
931 echo "#define HAVE_MLIB 1" >> $TMPH
932 extralibs="$extralibs -lmlib"
934 if test "$sdl" = "yes" ; then
935 echo "CONFIG_SDL=yes" >> config.mak
936 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
937 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
939 if test "$have_lrintf" = "yes" ; then
940 echo "#define HAVE_LRINTF 1" >> $TMPH
942 if test "$vhook" = "yes" ; then
943 echo "BUILD_VHOOK=yes" >> config.mak
944 echo "#define HAVE_VHOOK 1" >> $TMPH
945 extralibs="$extralibs $ldl"
947 if test "$lshared" = "yes" ; then
948 echo "BUILD_SHARED=yes" >> config.mak
949 echo "PIC=-fPIC" >> config.mak
951 echo "EXTRALIBS=$extralibs" >> config.mak
952 echo "VERSION=`head $source_path/VERSION`" >>config.mak
954 # if you do not want to use encoders, disable that.
955 echo "#define CONFIG_ENCODERS 1" >> $TMPH
956 echo "CONFIG_ENCODERS=yes" >> config.mak
958 # if you do not want to use decoders, disable that.
959 echo "#define CONFIG_DECODERS 1" >> $TMPH
960 echo "CONFIG_DECODERS=yes" >> config.mak
963 if test "$a52" = "yes" ; then
964 echo "#define CONFIG_AC3 1" >> $TMPH
965 echo "CONFIG_AC3=yes" >> config.mak
967 if test "$a52bin" = "yes" ; then
968 echo "#define CONFIG_A52BIN 1" >> $TMPH
969 echo "CONFIG_A52BIN=yes" >> config.mak
974 if test "$pp" = "yes" ; then
975 echo "#define CONFIG_PP 1" >> $TMPH
976 echo "CONFIG_PP=yes" >> config.mak
978 if test "$shared_pp" = "yes" ; then
979 echo "#define SHARED_PP 1" >> $TMPH
980 echo "SHARED_PP=yes" >> config.mak
984 # mpeg audio high precision mode
985 if test "$mpegaudio_hp" = "yes" ; then
986 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
989 if test "$v4l" = "yes" ; then
990 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
991 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
994 if test "$dv1394" = "yes" ; then
995 echo "#define CONFIG_DV1394 1" >> $TMPH
996 echo "CONFIG_DV1394=yes" >> config.mak
999 if test "$dlopen" = "yes" ; then
1000 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
1003 if test "$dlfcn" = "yes" ; then
1004 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
1007 if test "$audio_oss" = "yes" ; then
1008 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
1009 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
1012 if test "$audio_beos" = "yes" ; then
1013 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
1014 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
1017 if test "$network" = "yes" ; then
1018 echo "#define CONFIG_NETWORK 1" >> $TMPH
1019 echo "CONFIG_NETWORK=yes" >> config.mak
1022 if test "$zlib" = "yes" ; then
1023 echo "#define CONFIG_ZLIB 1" >> $TMPH
1024 echo "CONFIG_ZLIB=yes" >> config.mak
1027 if test "$mp3lame" = "yes" ; then
1028 echo "#define CONFIG_MP3LAME 1" >> $TMPH
1029 echo "CONFIG_MP3LAME=yes" >> config.mak
1032 if test "$vorbis" = "yes" ; then
1033 echo "#define CONFIG_VORBIS 1" >> $TMPH
1034 echo "CONFIG_VORBIS=yes" >> config.mak
1037 if test "$faad" = "yes" ; then
1038 echo "#define CONFIG_FAAD 1" >> $TMPH
1039 echo "CONFIG_FAAD=yes" >> config.mak
1042 if test "$faadbin" = "yes" ; then
1043 echo "#define CONFIG_FAADBIN 1" >> $TMPH
1044 echo "CONFIG_FAADBIN=yes" >> config.mak
1047 if test "$mingw32" = "yes" ; then
1048 echo "#define CONFIG_WIN32 1" >> $TMPH
1049 echo "CONFIG_WIN32=yes" >> config.mak
1050 echo "#ifndef __MINGW32__" >> $TMPH
1051 echo "#define __MINGW32__ 1" >> $TMPH
1052 echo "#endif" >> $TMPH
1053 echo "__MINGW32__=1" >> config.mak
1056 if test "$cygwin" = "yes" ; then
1057 # setup correct exesuffix
1058 echo "CONFIG_WIN32=yes" >> config.mak
1061 if test "$os2" = "yes" ; then
1062 echo "#define CONFIG_OS2 1" >> $TMPH
1063 echo "CONFIG_OS2=yes" >> config.mak
1066 if test "$TARGET_OS" = "SunOS" ; then
1067 echo "#define CONFIG_SUNOS 1" >> $TMPH
1070 if test "$darwin" = "yes"; then
1071 echo "#define CONFIG_DARWIN 1" >> $TMPH
1072 echo "CONFIG_DARWIN=yes" >> config.mak
1075 if test "$_malloc_h" = "yes" ; then
1076 echo "#define HAVE_MALLOC_H 1" >> $TMPH
1078 echo "#undef HAVE_MALLOC_H" >> $TMPH
1081 if test "$_memalign" = "yes" ; then
1082 echo "#define HAVE_MEMALIGN 1" >> $TMPH
1084 echo "#undef HAVE_MEMALIGN" >> $TMPH
1087 if test "$netserver" = "yes" ; then
1088 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1089 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1092 if test "$need_inet_aton" = "yes" ; then
1093 echo "NEED_INET_ATON=yes" >> config.mak
1096 if test "$simpleidct" = "yes" ; then
1097 echo "#define SIMPLE_IDCT 1" >> $TMPH
1100 if test "$ffserver" = "yes" ; then
1101 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1102 echo "CONFIG_FFSERVER=yes" >> config.mak
1105 if test "$ffplay" = "yes" ; then
1106 echo "CONFIG_FFPLAY=yes" >> config.mak
1109 if test "$risky" = "yes" ; then
1110 echo "#define CONFIG_RISKY 1" >> $TMPH
1111 echo "CONFIG_RISKY=yes" >> config.mak
1114 echo "#define restrict $_restrict" >> $TMPH
1116 # build tree in object directory if source path is different from current one
1117 if test "$source_path_used" = "yes" ; then
1118 DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
1119 libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
1120 FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
1121 for dir in $DIRS ; do
1124 for f in $FILES ; do
1125 ln -sf $source_path/$f $f
1128 echo "SRC_PATH=$source_path" >> config.mak
1130 if test "$amr_nb" = "yes" ; then
1131 echo "#define AMR_NB 1" >> $TMPH
1132 echo "AMR_NB=yes" >> config.mak
1134 if test "$amr_nb_fixed" = "yes" ; then
1135 echo "AMR_NB_FIXED=yes" >> config.mak
1136 echo "#define AMR_NB_FIXED 1" >> $TMPH
1137 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1138 echo "REL-5 version 5.1.0 from "
1139 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
1140 echo "and extracted src to libavcodec/amr"
1141 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1142 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1145 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1146 echo "REL-5 V5.1.0 from "
1147 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
1148 echo "and extracted the source to libavcodec/amr_float"
1154 diff $TMPH config.h >/dev/null 2>&1
1155 if test $? -ne 0 ; then
1156 mv -f $TMPH config.h
1158 echo "config.h is unchanged"
1161 rm -f $TMPO $TMPC $TMPE $TMPS $TMPH