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"
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"
233 # From mplayer configure. We need TARGET_OS available
234 # to the Makefile, so it can distinguish between flavors
235 # of AltiVec on PowerPC
236 TARGET_OS=`( uname -s ) 2>&1`
238 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
246 [cC][yY][gG][wW][iI][nN]*)
250 TARGET_OS="$TARGET_OS-UNKNOWN"
255 # XXX: we assume an absolute path is given when launching configure,
256 # except in './configure' case.
257 source_path="`echo $0 | sed -e 's#/configure##'`"
258 source_path_used="yes"
259 if test -z "$source_path" -o "$source_path" = "." ; then
261 source_path_used="no"
266 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
268 --mandir=*) mandir=`echo $opt | cut -d '=' -f 2`
270 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
272 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
274 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
276 --make=*) make=`echo $opt | cut -d '=' -f 2`
278 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
280 --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
282 --extra-libs=*) extralibs=${opt#--extra-libs=}
284 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
286 --tune=*) tune=`echo $opt | cut -d '=' -f 2`
288 --powerpc-perf-enable) powerpc_perf="yes"
290 --disable-mmx) mmx="no"
292 --disable-altivec) altivec="no"
294 --enable-gprof) gprof="yes"
296 --disable-v4l) v4l="no"
298 --disable-audio-oss) audio_oss="no"
300 --disable-audio-beos) audio_beos="no"
302 --disable-dv1394) dv1394="no"
304 --disable-network) network="no"
306 --disable-zlib) zlib="no"
308 --disable-a52) a52="no"
310 --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
312 --disable-pp) pp="no"
314 --enable-shared-pp) shared_pp="yes"
316 --enable-mp3lame) mp3lame="yes"
318 --enable-vorbis) vorbis="yes"
320 --enable-faad) faad="yes"
322 --enable-faadbin) faadbin="yes"
324 --disable-vhook) vhook="no"
326 --disable-simple_idct) simpleidct="no"
328 --enable-mingw32) mingw32="yes"
330 --enable-shared) lshared="yes"
332 --disable-mpegaudio-hp) mpegaudio_hp="no"
334 --disable-ffserver) ffserver="no"
336 --disable-ffplay) ffplay="no"
338 --disable-risky) risky="no"
340 --enable-small) small="yes"
342 --enable-amr_nb) amr_nb="yes"
344 --enable-amr_nb-fixed) amr_nb_fixed="yes"
346 --enable-sunmlib) sunmlib="yes"
352 if test $mmx = "default"; then
353 if test $cpu = "x86"; then
360 # Can only do AltiVec on PowerPC
361 if test $altivec = "default"; then
362 if test $cpu = "powerpc"; then
369 # Add processor-specific flags
371 if test $tune != "generic"; then
373 601|ppc601|PowerPC601)
374 CFLAGS="$CFLAGS -mcpu=601"
375 if test $altivec = "yes"; then
376 echo "WARNING: tuning for PPC601 but altivec enabled !";
380 603*|ppc603*|PowerPC603*)
381 CFLAGS="$CFLAGS -mcpu=603"
382 if test $altivec = "yes"; then
383 echo "WARNING: tuning for PPC603 but altivec enabled !";
387 604*|ppc604*|PowerPC604*)
388 CFLAGS="$CFLAGS -mcpu=604"
389 if test $altivec = "yes"; then
390 echo "WARNING: tuning for PPC604 but altivec enabled !";
394 G3|g3|75*|ppc75*|PowerPC75*)
395 CFLAGS="$CFLAGS -mcpu=750 -mtune=750"
396 if test $altivec = "yes"; then
397 echo "WARNING: tuning for PPC75x but altivec enabled !";
401 G4|g4|745*|ppc745*|PowerPC745*)
402 CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450"
403 if test $altivec = "no"; then
404 echo "WARNING: tuning for PPC745x but altivec disabled !";
408 74*|ppc74*|PowerPC74*)
409 CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400"
410 if test $altivec = "no"; then
411 echo "WARNING: tuning for PPC74xx but altivec disabled !";
415 G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
416 CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc64 -force_cpusubtype_ALL "
417 if test $altivec = "no"; then
418 echo "WARNING: tuning for PPC970 but altivec disabled !";
423 echo "WARNING: unknown CPU "$tune", ignored"
428 # AltiVec flags: The FSF version of GCC differs from the Darwin version
429 if test $cpu = "powerpc"; then
430 if test $altivec = "yes"; then
431 if test "$darwin" = "yes"; then
432 CFLAGS="$CFLAGS -faltivec"
434 CFLAGS="$CFLAGS -maltivec -mabi=altivec"
439 # See if we have <altivec.h>
442 int main( void ) { return 0; }
446 if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
450 # See does our compiler support Motorola AltiVec C API
451 if test $altivec = "yes"; then
452 if test $_altivec_h = "yes"; then
456 vector signed int v1, v2, v3;
464 vector signed int v1, v2, v3;
470 $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no"
473 # Can only do mmi on mips
474 if test $mmi = "default"; then
475 if test $cpu = "mips"; then
482 # See does our compiler support mmi
483 if test $mmi = "yes"; then
486 __asm__ ("lq \$2, 0(\$2)");
490 $cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
493 # Checking for CFLAGS
494 if test -z "$CFLAGS"; then
498 if test "$mingw32" = "yes" ; then
505 cc="${cross_prefix}${cc}"
506 ar="${cross_prefix}${ar}"
507 ranlib="${cross_prefix}${ranlib}"
508 strip="${cross_prefix}${strip}"
510 if test -z "$cross_prefix" ; then
513 # big/little endian test
515 #include <inttypes.h>
516 int main(int argc, char ** argv){
517 volatile uint32_t i=0x01234567;
518 return (*((uint8_t*)(&i))) == 0x67;
522 if $cc -o $TMPE $TMPC 2>/dev/null ; then
523 $TMPE && bigendian="yes"
525 echo big/little test failed
530 # if cross compiling, cannot launch a program, so make a static guess
531 if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
538 # check availability of some header files
542 int main( void ) { return 0; }
547 if $cc -o $TMPE $TMPC 2> /dev/null ; then
550 # check for memalign - atmos
555 string = memalign(64, sizeof(char));
559 $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
565 int main( void ) { return *strptime("", "", 0); }
569 if $cc -o $TMPE $TMPC 2> /dev/null ; then
573 if test "$zlib" = "yes"; then
574 # check for zlib - mmu_man
578 if (zlibVersion() != ZLIB_VERSION)
579 puts("zlib version differs !!!");
584 $cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
585 # $TMPE 2> /dev/null > /dev/null || zlib="no"
586 # XXX: more tests needed - runtime test
588 if test "$zlib" = "yes"; then
589 extralibs="$extralibs -lz"
592 # test for lrintf in math.h
594 #define _ISOC9X_SOURCE 1
596 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
600 if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
602 $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
606 for restrict_keyword in restrict __restrict__ __restrict; do
607 echo "void foo(char * $restrict_keyword p);" > $TMPC
608 if $cc -c -o $TMPO $TMPC 2> /dev/null; then
609 _restrict=$restrict_keyword
614 # test gcc version to see if vector builtins can be used
615 # currently only used on i386 for MMX builtins
618 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
621 #error no vector builtins
627 if $cc -o $TMPO $TMPC 2> /dev/null ; then
631 # dlopen/dlfcn.h probing
635 int main( void ) { return (int) dlopen("foo", 0); }
640 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
645 if $cc -o $TMPE $TMPC 2> /dev/null ; then
652 int main( void ) { return (int) dlopen("foo", 0); }
655 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
659 if $cc -o $TMPE $TMPC 2> /dev/null ; then
664 if test "$vhook" = "default" ; then
668 ##########################################
672 #include <X11/Xlib.h>
674 int main( void ) { return (int) imlib_load_font("foo"); }
678 if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
682 ##########################################
686 #include <ft2build.h>
687 int main( void ) { return (int) FT_Init_FreeType(0); }
691 if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
692 if test "`which freetype-config`" != ""; then
693 if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then
699 ##########################################
704 #undef main /* We don't want SDL to override our main() */
705 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
710 if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` 2> /dev/null ; then
711 _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
712 if test "$_sdlversion" -lt 121 ; then
719 if test "$sdl" = "no" ; then
723 if test "$small" = "yes"; then
724 # CFLAGS=${CFLAGS//-O3/-Os}
728 if test x"$mandir" = x""; then
729 mandir="${prefix}/man"
732 if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
735 Usage: configure [options]
736 Options: [defaults in brackets after descriptions]
739 echo "Standard options:"
740 echo " --help print this message"
741 echo " --prefix=PREFIX install in PREFIX [$prefix]"
742 echo " --mandir=DIR man documentation in DIR [PREFIX/man]"
743 echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
744 echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
745 echo " --enable-faad enable faad support via libfaad [default=no]"
746 echo " --enable-faadbin build faad support with runtime linking [default=no]"
747 echo " --enable-mingw32 enable mingw32 native/cross windows compile"
748 echo " --disable-a52 disable GPL'ed A52 support [default=no]"
749 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
750 echo " --disable-pp disable GPL'ed post processing support [default=no]"
751 echo " --enable-shared-pp use libpostproc.so [default=no]"
752 echo " --enable-shared build shared libraries [default=no]"
753 echo " --enable-amr_nb enable amr_nb float audio codec"
754 echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
755 echo " --enable-sunmlib use Sun medialib [default=no]"
757 echo "Advanced options (experts only):"
758 echo " --source-path=PATH path of source code [$source_path]"
759 echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
760 echo " --cc=CC use C compiler CC [$cc]"
761 echo " --make=MAKE use specified make [$make]"
762 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
763 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
764 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
765 echo " --cpu=CPU force cpu to CPU [$cpu]"
766 echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)"
767 echo " --powerpc-perf-enable enable performance report on PPC (requires enabling PMC)"
768 echo " --disable-mmx disable mmx usage"
769 echo " --disable-altivec disable AltiVec usage"
770 echo " --disable-audio-oss disable OSS audio support [default=no]"
771 echo " --disable-audio-beos disable BeOS audio support [default=no]"
772 echo " --disable-v4l disable video4linux grabbing [default=no]"
773 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
774 echo " --disable-network disable network support [default=no]"
775 echo " --disable-zlib disable zlib [default=no]"
776 echo " --disable-simple_idct disable simple IDCT routines [default=no]"
777 echo " --disable-vhook disable video hooking support"
778 echo " --enable-gprof enable profiling with gprof [$gprof]"
779 echo " --disable-mpegaudio-hp faster (but less accurate)"
780 echo " mpegaudio decoding [default=no]"
781 echo " --disable-ffserver disable ffserver build"
782 echo " --disable-ffplay disable ffplay build"
783 echo " --disable-risky disables patent encumbered codecs"
784 echo " --enable-small optimize for size instead of speed"
786 echo "NOTE: The object files are build at the place where configure is launched"
790 echo "Install prefix $prefix"
791 echo "Source path $source_path"
792 echo "C compiler $cc"
794 echo "CPU $cpu ($tune)"
795 echo "Big Endian $bigendian"
796 if test $cpu = "x86"; then
797 echo "MMX enabled $mmx"
798 echo "Vector Builtins $builtin_vector"
800 if test $cpu = "mips"; then
801 echo "MMI enabled $mmi"
803 if test $cpu = "powerpc"; then
804 echo "AltiVec enabled $altivec"
806 echo "gprof enabled $gprof"
807 echo "zlib enabled $zlib"
808 echo "mp3lame enabled $mp3lame"
809 echo "vorbis enabled $vorbis"
810 echo "faad enabled $faad"
811 echo "faadbin enabled $faadbin"
812 echo "a52 support $a52"
813 echo "a52 dlopened $a52bin"
814 echo "pp support $pp"
815 echo "shared pp $shared_pp"
816 echo "Video hooking $vhook"
817 echo "SDL support $sdl"
818 if test $sdl_too_old = "yes"; then
819 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
821 echo "risky / patent encumbered codecs $risky"
822 echo "optimize for size $small"
824 if test "$vhook" = "yes" ; then
825 echo "Imlib2 support $imlib2"
826 echo "freetype support $freetype2"
828 echo "Sun medialib support" $sunmlib
829 echo "AMR-NB float support" $amr_nb
830 echo "AMR-NB fixed support" $amr_nb_fixed
832 echo "Creating config.mak and config.h"
834 echo "# Automatically generated by configure - do not modify" > config.mak
835 echo "/* Automatically generated by configure - do not modify */" > $TMPH
837 echo "prefix=$prefix" >> config.mak
838 echo "mandir=$mandir" >> config.mak
839 echo "MAKE=$make" >> config.mak
840 echo "CC=$cc" >> config.mak
841 echo "AR=$ar" >> config.mak
842 echo "RANLIB=$ranlib" >> config.mak
843 echo "STRIP=$strip" >> config.mak
844 echo "OPTFLAGS=$CFLAGS" >> config.mak
845 echo "LDFLAGS=$LDFLAGS" >> config.mak
846 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
847 echo "SHFLAGS=$SHFLAGS" >> config.mak
848 echo "LIBPREF=$LIBPREF" >> config.mak
849 echo "LIBSUF=$LIBSUF" >> config.mak
850 echo "SLIBPREF=$SLIBPREF" >> config.mak
851 echo "SLIBSUF=$SLIBSUF" >> config.mak
852 echo "TARGET_OS=$TARGET_OS" >> config.mak
853 if test "$cpu" = "x86" ; then
854 echo "TARGET_ARCH_X86=yes" >> config.mak
855 echo "#define ARCH_X86 1" >> $TMPH
856 elif test "$cpu" = "armv4l" ; then
857 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
858 echo "#define ARCH_ARMV4L 1" >> $TMPH
859 elif test "$cpu" = "alpha" ; then
860 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
861 echo "#define ARCH_ALPHA 1" >> $TMPH
862 elif test "$cpu" = "sparc64" ; then
863 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
864 echo "#define ARCH_SPARC64 1" >> $TMPH
865 elif test "$cpu" = "powerpc" ; then
866 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
867 echo "#define ARCH_POWERPC 1" >> $TMPH
868 if test "$powerpc_perf" = "yes"; then
869 echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
871 elif test "$cpu" = "mips" ; then
872 echo "TARGET_ARCH_MIPS=yes" >> config.mak
873 echo "#define ARCH_MIPS 1" >> $TMPH
874 elif test "$cpu" = "sh4" ; then
875 echo "TARGET_ARCH_SH4=yes" >> config.mak
876 echo "#define ARCH_SH4 1" >> $TMPH
878 echo "#define TUNECPU $TUNECPU" >> $TMPH
879 if test "$bigendian" = "yes" ; then
880 echo "WORDS_BIGENDIAN=yes" >> config.mak
881 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
883 if test "$mmx" = "yes" ; then
884 echo "TARGET_MMX=yes" >> config.mak
885 echo "#define HAVE_MMX 1" >> $TMPH
886 echo "#define __CPU__ 586" >> $TMPH
888 if test "$builtin_vector" = "yes" ; then
889 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
890 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
892 if test "$mmi" = "yes" ; then
893 echo "TARGET_MMI=yes" >> config.mak
894 echo "#define HAVE_MMI 1" >> $TMPH
896 if test "$altivec" = "yes" ; then
897 echo "TARGET_ALTIVEC=yes" >> config.mak
898 echo "#define HAVE_ALTIVEC 1" >> $TMPH
899 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
900 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
901 if test "$_altivec_h" = "yes" ; then
902 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
904 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
907 if test "$gprof" = "yes" ; then
908 echo "TARGET_GPROF=yes" >> config.mak
909 echo "#define HAVE_GPROF 1" >> $TMPH
911 if test "$strptime" = "yes" ; then
912 echo "#define HAVE_STRPTIME 1" >> $TMPH
914 echo "BUILD_STRPTIME=yes" >> config.mak
916 if test "$imlib2" = "yes" ; then
917 echo "HAVE_IMLIB2=yes" >> config.mak
919 if test "$freetype2" = "yes" ; then
920 echo "HAVE_FREETYPE2=yes" >> config.mak
922 if test "$sunmlib" = "yes" ; then
923 echo "HAVE_MLIB=yes" >> config.mak
924 echo "#define HAVE_MLIB 1" >> $TMPH
925 extralibs="$extralibs -lmlib"
927 if test "$sdl" = "yes" ; then
928 echo "CONFIG_SDL=yes" >> config.mak
929 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
930 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
932 if test "$have_lrintf" = "yes" ; then
933 echo "#define HAVE_LRINTF 1" >> $TMPH
935 if test "$vhook" = "yes" ; then
936 echo "BUILD_VHOOK=yes" >> config.mak
937 echo "#define HAVE_VHOOK 1" >> $TMPH
938 extralibs="$extralibs $ldl"
940 if test "$lshared" = "yes" ; then
941 echo "BUILD_SHARED=yes" >> config.mak
942 echo "PIC=-fPIC" >> config.mak
944 echo "EXTRALIBS=$extralibs" >> config.mak
945 echo "VERSION=`head $source_path/VERSION`" >>config.mak
947 # if you do not want to use encoders, disable that.
948 echo "#define CONFIG_ENCODERS 1" >> $TMPH
949 echo "CONFIG_ENCODERS=yes" >> config.mak
951 # if you do not want to use decoders, disable that.
952 echo "#define CONFIG_DECODERS 1" >> $TMPH
953 echo "CONFIG_DECODERS=yes" >> config.mak
956 if test "$a52" = "yes" ; then
957 echo "#define CONFIG_AC3 1" >> $TMPH
958 echo "CONFIG_AC3=yes" >> config.mak
960 if test "$a52bin" = "yes" ; then
961 echo "#define CONFIG_A52BIN 1" >> $TMPH
962 echo "CONFIG_A52BIN=yes" >> config.mak
967 if test "$pp" = "yes" ; then
968 echo "#define CONFIG_PP 1" >> $TMPH
969 echo "CONFIG_PP=yes" >> config.mak
971 if test "$shared_pp" = "yes" ; then
972 echo "#define SHARED_PP 1" >> $TMPH
973 echo "SHARED_PP=yes" >> config.mak
977 # mpeg audio high precision mode
978 if test "$mpegaudio_hp" = "yes" ; then
979 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
982 if test "$v4l" = "yes" ; then
983 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
984 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
987 if test "$dv1394" = "yes" ; then
988 echo "#define CONFIG_DV1394 1" >> $TMPH
989 echo "CONFIG_DV1394=yes" >> config.mak
992 if test "$dlopen" = "yes" ; then
993 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
996 if test "$dlfcn" = "yes" ; then
997 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
1000 if test "$audio_oss" = "yes" ; then
1001 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
1002 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
1005 if test "$audio_beos" = "yes" ; then
1006 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
1007 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
1010 if test "$network" = "yes" ; then
1011 echo "#define CONFIG_NETWORK 1" >> $TMPH
1012 echo "CONFIG_NETWORK=yes" >> config.mak
1015 if test "$zlib" = "yes" ; then
1016 echo "#define CONFIG_ZLIB 1" >> $TMPH
1017 echo "CONFIG_ZLIB=yes" >> config.mak
1020 if test "$mp3lame" = "yes" ; then
1021 echo "#define CONFIG_MP3LAME 1" >> $TMPH
1022 echo "CONFIG_MP3LAME=yes" >> config.mak
1025 if test "$vorbis" = "yes" ; then
1026 echo "#define CONFIG_VORBIS 1" >> $TMPH
1027 echo "CONFIG_VORBIS=yes" >> config.mak
1030 if test "$faad" = "yes" ; then
1031 echo "#define CONFIG_FAAD 1" >> $TMPH
1032 echo "CONFIG_FAAD=yes" >> config.mak
1035 if test "$faadbin" = "yes" ; then
1036 echo "#define CONFIG_FAADBIN 1" >> $TMPH
1037 echo "CONFIG_FAADBIN=yes" >> config.mak
1040 if test "$mingw32" = "yes" ; then
1041 echo "#define CONFIG_WIN32 1" >> $TMPH
1042 echo "CONFIG_WIN32=yes" >> config.mak
1043 echo "#ifndef __MINGW32__" >> $TMPH
1044 echo "#define __MINGW32__ 1" >> $TMPH
1045 echo "#endif" >> $TMPH
1046 echo "__MINGW32__=1" >> config.mak
1049 if test "$cygwin" = "yes" ; then
1050 # setup correct exesuffix
1051 echo "CONFIG_WIN32=yes" >> config.mak
1054 if test "$os2" = "yes" ; then
1055 echo "#define CONFIG_OS2 1" >> $TMPH
1056 echo "CONFIG_OS2=yes" >> config.mak
1059 if test "$TARGET_OS" = "SunOS" ; then
1060 echo "#define CONFIG_SUNOS 1" >> $TMPH
1063 if test "$darwin" = "yes"; then
1064 echo "#define CONFIG_DARWIN 1" >> $TMPH
1065 echo "CONFIG_DARWIN=yes" >> config.mak
1068 if test "$_malloc_h" = "yes" ; then
1069 echo "#define HAVE_MALLOC_H 1" >> $TMPH
1071 echo "#undef HAVE_MALLOC_H" >> $TMPH
1074 if test "$_memalign" = "yes" ; then
1075 echo "#define HAVE_MEMALIGN 1" >> $TMPH
1077 echo "#undef HAVE_MEMALIGN" >> $TMPH
1080 if test "$netserver" = "yes" ; then
1081 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1082 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1085 if test "$need_inet_aton" = "yes" ; then
1086 echo "NEED_INET_ATON=yes" >> config.mak
1089 if test "$simpleidct" = "yes" ; then
1090 echo "#define SIMPLE_IDCT 1" >> $TMPH
1093 if test "$ffserver" = "yes" ; then
1094 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1095 echo "CONFIG_FFSERVER=yes" >> config.mak
1098 if test "$ffplay" = "yes" ; then
1099 echo "CONFIG_FFPLAY=yes" >> config.mak
1102 if test "$risky" = "yes" ; then
1103 echo "#define CONFIG_RISKY 1" >> $TMPH
1104 echo "CONFIG_RISKY=yes" >> config.mak
1107 echo "#define restrict $_restrict" >> $TMPH
1109 # build tree in object directory if source path is different from current one
1110 if test "$source_path_used" = "yes" ; then
1111 DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
1112 libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
1113 FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
1114 for dir in $DIRS ; do
1117 for f in $FILES ; do
1118 ln -sf $source_path/$f $f
1121 echo "SRC_PATH=$source_path" >> config.mak
1123 if test "$amr_nb" = "yes" ; then
1124 echo "#define AMR_NB 1" >> $TMPH
1125 echo "AMR_NB=yes" >> config.mak
1127 if test "$amr_nb_fixed" = "yes" ; then
1128 echo "AMR_NB_FIXED=yes" >> config.mak
1129 echo "#define AMR_NB_FIXED 1" >> $TMPH
1130 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1131 echo "REL-5 version 5.1.0 from "
1132 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
1133 echo "and extracted src to libavcodec/amr"
1134 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1135 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1138 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1139 echo "REL-5 V5.1.0 from "
1140 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
1141 echo "and extracted the source to libavcodec/amr_float"
1147 diff $TMPH config.h >/dev/null 2>&1
1148 if test $? -ne 0 ; then
1149 mv -f $TMPH config.h
1151 echo "config.h is unchanged"
1154 rm -f $TMPO $TMPC $TMPE $TMPS $TMPH