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"
35 i386|i486|i586|i686|i86pc|BePC)
38 # armv4l is a subset of armv5tel
45 "Power Macintosh"|ppc)
93 LDFLAGS=-Wl,--warn-common
108 prefix="/boot/home/config"
109 # helps building libavcodec
110 CFLAGS="-O3 -DPIC -fomit-frame-pointer"
111 # 3 gcc releases known for BeOS, each with ugly bugs
112 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
113 case "$gcc_version" in
114 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
117 *20010315*) echo "BeBits gcc"
118 CFLAGS="$CFLAGS -fno-expensive-optimizations"
122 # disable linux things
128 # no need for libm, but the inet stuff
130 if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
131 extralibs="-lbind -lsocket"
145 extralibs="$extralibs -lsocket -lnsl"
152 LDFLAGS="$LDFLAGS -export-dynamic"
158 extralibs="-lpoll -lgnugetopt -lm"
167 SHFLAGS="-dynamiclib"
172 FFSLDFLAGS=-Wl,-bind_at_load
173 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
174 case "$gcc_version" in
176 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer"
179 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic -force_cpusubtype_ALL"
182 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic"
200 test -f /usr/include/inttypes.h || \
201 test -f /usr/local/include/inttypes.h || \
202 echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
203 "/usr/include/inttypes.h !!!"
206 LDFLAGS="$LDFLAGS -rdynamic"
211 ranlib="echo ignoring ranlib"
212 strip="echo ignoring strip"
214 LDFLAGS="-Zomf -Zstack 16384 -s"
232 # From mplayer configure. We need TARGET_OS available
233 # to the Makefile, so it can distinguish between flavors
234 # of AltiVec on PowerPC
235 TARGET_OS=`( uname -s ) 2>&1`
237 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
245 [cC][yY][gG][wW][iI][nN]*)
249 TARGET_OS="$TARGET_OS-UNKNOWN"
254 # XXX: we assume an absolute path is given when launching configure,
255 # except in './configure' case.
256 source_path="`echo $0 | sed -e 's#/configure##'`"
257 source_path_used="yes"
258 if test -z "$source_path" -o "$source_path" = "." ; then
260 source_path_used="no"
265 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
267 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
269 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
271 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
273 --make=*) make=`echo $opt | cut -d '=' -f 2`
275 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
277 --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
279 --extra-libs=*) extralibs=${opt#--extra-libs=}
281 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
283 --tune=*) tune=`echo $opt | cut -d '=' -f 2`
285 --powerpc-perf-enable) powerpc_perf="yes"
287 --disable-mmx) mmx="no"
289 --disable-altivec) altivec="no"
291 --enable-gprof) gprof="yes"
293 --disable-v4l) v4l="no"
295 --disable-audio-oss) audio_oss="no"
297 --disable-audio-beos) audio_beos="no"
299 --disable-dv1394) dv1394="no"
301 --disable-network) network="no"
303 --disable-zlib) zlib="no"
305 --disable-a52) a52="no"
307 --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
309 --disable-pp) pp="no"
311 --enable-shared-pp) shared_pp="yes"
313 --enable-mp3lame) mp3lame="yes"
315 --enable-vorbis) vorbis="yes"
317 --enable-faad) faad="yes"
319 --enable-faadbin) faadbin="yes"
321 --disable-vhook) vhook="no"
323 --disable-simple_idct) simpleidct="no"
325 --enable-win32) win32="yes"
327 --enable-mingw32) mingw32="yes"
329 --enable-shared) lshared="yes"
331 --disable-mpegaudio-hp) mpegaudio_hp="no"
333 --disable-ffserver) ffserver="no"
335 --disable-ffplay) ffplay="no"
337 --disable-risky) risky="no"
339 --enable-small) small="yes"
341 --enable-amr_nb) amr_nb="yes"
343 --enable-amr_nb-fixed) amr_nb_fixed="yes"
349 if test $mmx = "default"; then
350 if test $cpu = "x86"; then
357 # Can only do AltiVec on PowerPC
358 if test $altivec = "default"; then
359 if test $cpu = "powerpc"; then
366 # Add processor-specific flags
368 if test $tune != "generic"; then
370 601|ppc601|PowerPC601)
371 CFLAGS="$CFLAGS -mcpu=601"
372 if test $altivec = "yes"; then
373 echo "WARNING: tuning for PPC601 but altivec enabled !";
377 603*|ppc603*|PowerPC603*)
378 CFLAGS="$CFLAGS -mcpu=603"
379 if test $altivec = "yes"; then
380 echo "WARNING: tuning for PPC603 but altivec enabled !";
384 604*|ppc604*|PowerPC604*)
385 CFLAGS="$CFLAGS -mcpu=604"
386 if test $altivec = "yes"; then
387 echo "WARNING: tuning for PPC604 but altivec enabled !";
391 G3|g3|75*|ppc75*|PowerPC75*)
392 CFLAGS="$CFLAGS -mcpu=750 -mtune=750"
393 if test $altivec = "yes"; then
394 echo "WARNING: tuning for PPC75x but altivec enabled !";
398 G4|g4|745*|ppc745*|PowerPC745*)
399 CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450"
400 if test $altivec = "no"; then
401 echo "WARNING: tuning for PPC745x but altivec disabled !";
405 74*|ppc74*|PowerPC74*)
406 CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400"
407 if test $altivec = "no"; then
408 echo "WARNING: tuning for PPC74xx but altivec disabled !";
412 G5|g5|970|ppc970|PowerPC970|power4*|Power4*)
413 CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc64 -force_cpusubtype_ALL "
414 if test $altivec = "no"; then
415 echo "WARNING: tuning for PPC970 but altivec disabled !";
420 echo "WARNING: unknown CPU "$tune", ignored"
425 # AltiVec flags: The FSF version of GCC differs from the Darwin version
426 if test $cpu = "powerpc"; then
427 if test $altivec = "yes"; then
428 if test "$darwin" = "yes"; then
429 CFLAGS="$CFLAGS -faltivec"
431 CFLAGS="$CFLAGS -maltivec -mabi=altivec"
436 # See if we have <altivec.h>
439 int main( void ) { return 0; }
443 if $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null ; then
447 # See does our compiler support Motorola AltiVec C API
448 if test $altivec = "yes"; then
449 if test $_altivec_h = "yes"; then
453 vector signed int v1, v2, v3;
461 vector signed int v1, v2, v3;
467 $cc $CFLAGS -o $TMPE $TMPC 2> /dev/null || altivec="no"
470 # Can only do mmi on mips
471 if test $mmi = "default"; then
472 if test $cpu = "mips"; then
479 # See does our compiler support mmi
480 if test $mmi = "yes"; then
483 __asm__ ("lq \$2, 0(\$2)");
487 $cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
490 # Checking for CFLAGS
491 if test -z "$CFLAGS"; then
495 if test "$win32" = "yes" ; then
496 cross_prefix="i386-mingw32msvc-"
503 if test "$mingw32" = "yes" ; then
511 cc="${cross_prefix}${cc}"
512 ar="${cross_prefix}${ar}"
513 ranlib="${cross_prefix}${ranlib}"
514 strip="${cross_prefix}${strip}"
516 if test -z "$cross_prefix" ; then
519 # big/little endian test
521 #include <inttypes.h>
522 int main(int argc, char ** argv){
523 volatile uint32_t i=0x01234567;
524 return (*((uint8_t*)(&i))) == 0x67;
528 if $cc -o $TMPE $TMPC 2>/dev/null ; then
529 $TMPE && bigendian="yes"
531 echo big/little test failed
536 # if cross compiling, cannot launch a program, so make a static guess
537 if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
544 # check availability of some header files
548 int main( void ) { return 0; }
553 if $cc -o $TMPE $TMPC 2> /dev/null ; then
556 # check for memalign - atmos
561 string = memalign(64, sizeof(char));
565 $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
571 int main( void ) { return *strptime("", "", 0); }
575 if $cc -o $TMPE $TMPC 2> /dev/null ; then
579 if test "$zlib" = "yes"; then
580 # check for zlib - mmu_man
584 if (zlibVersion() != ZLIB_VERSION)
585 puts("zlib version differs !!!");
590 $cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
591 # $TMPE 2> /dev/null > /dev/null || zlib="no"
592 # XXX: more tests needed - runtime test
594 if test "$zlib" = "yes"; then
595 extralibs="$extralibs -lz"
598 # test for lrintf in math.h
600 #define _ISOC9X_SOURCE 1
602 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
606 if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
608 $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
612 for restrict_keyword in restrict __restrict__ __restrict; do
613 echo "void foo(char * $restrict_keyword p);" > $TMPC
614 if $cc -c -o $TMPO $TMPC 2> /dev/null; then
615 _restrict=$restrict_keyword
620 # test gcc version to see if vector builtins can be used
621 # currently only used on i386 for MMX builtins
624 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
627 #error no vector builtins
633 if $cc -o $TMPO $TMPC 2> /dev/null ; then
637 # dlopen/dlfcn.h probing
641 int main( void ) { return (int) dlopen("foo", 0); }
646 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
651 if $cc -o $TMPE $TMPC 2> /dev/null ; then
658 int main( void ) { return (int) dlopen("foo", 0); }
661 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
665 if $cc -o $TMPE $TMPC 2> /dev/null ; then
670 if test "$vhook" = "default" ; then
674 ##########################################
678 #include <X11/Xlib.h>
680 int main( void ) { return (int) imlib_load_font("foo"); }
684 if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
688 ##########################################
692 #include <ft2build.h>
693 int main( void ) { return (int) FT_Init_FreeType(0); }
697 if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
698 if test "`which freetype-config`" != ""; then
699 if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then
705 ##########################################
710 #undef main /* We don't want SDL to override our main() */
711 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
716 if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` 2> /dev/null ; then
717 _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
718 if test "$_sdlversion" -lt 121 ; then
725 if test "$sdl" = "no" ; then
729 if test "$small" = "yes"; then
730 # CFLAGS=${CFLAGS//-O3/-Os}
734 if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
737 Usage: configure [options]
738 Options: [defaults in brackets after descriptions]
741 echo "Standard options:"
742 echo " --help print this message"
743 echo " --prefix=PREFIX install in PREFIX [$prefix]"
744 echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
745 echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
746 echo " --enable-faad enable faad support via libfaad [default=no]"
747 echo " --enable-faadbin build faad support with runtime linking [default=no]"
748 echo " --enable-win32 enable win32 cross compile"
749 echo " --enable-mingw32 enable mingw32 native windows compile"
750 echo " --disable-a52 disable GPL'ed A52 support [default=no]"
751 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
752 echo " --disable-pp disable GPL'ed post processing support [default=no]"
753 echo " --enable-shared-pp use libpostproc.so [default=no]"
754 echo " --enable-shared build shared libraries [default=no]"
755 echo " --enable-amr_nb enable amr_nb float audio codec"
756 echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
758 echo "Advanced options (experts only):"
759 echo " --source-path=PATH path of source code [$source_path]"
760 echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
761 echo " --cc=CC use C compiler CC [$cc]"
762 echo " --make=MAKE use specified make [$make]"
763 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
764 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
765 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
766 echo " --cpu=CPU force cpu to CPU [$cpu]"
767 echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)"
768 echo " --powerpc-perf-enable enable performance report on PPC (requires enabling PMC)"
769 echo " --disable-mmx disable mmx usage"
770 echo " --disable-altivec disable AltiVec usage"
771 echo " --disable-audio-oss disable OSS audio support [default=no]"
772 echo " --disable-audio-beos disable BeOS audio support [default=no]"
773 echo " --disable-v4l disable video4linux grabbing [default=no]"
774 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
775 echo " --disable-network disable network support [default=no]"
776 echo " --disable-zlib disable zlib [default=no]"
777 echo " --disable-simple_idct disable simple IDCT routines [default=no]"
778 echo " --disable-vhook disable video hooking support"
779 echo " --enable-gprof enable profiling with gprof [$gprof]"
780 echo " --disable-mpegaudio-hp faster (but less accurate)"
781 echo " mpegaudio decoding [default=no]"
782 echo " --disable-ffserver disable ffserver build"
783 echo " --disable-ffplay disable ffplay build"
784 echo " --disable-risky disables patent encumbered codecs"
785 echo " --enable-small optimize for size instead of speed"
787 echo "NOTE: The object files are build at the place where configure is launched"
791 echo "Install prefix $prefix"
792 echo "Source path $source_path"
793 echo "C compiler $cc"
795 echo "CPU $cpu ($tune)"
796 echo "Big Endian $bigendian"
797 if test $cpu = "x86"; then
798 echo "MMX enabled $mmx"
799 echo "Vector Builtins $builtin_vector"
801 if test $cpu = "mips"; then
802 echo "MMI enabled $mmi"
804 if test $cpu = "powerpc"; then
805 echo "AltiVec enabled $altivec"
807 echo "gprof enabled $gprof"
808 echo "zlib enabled $zlib"
809 echo "mp3lame enabled $mp3lame"
810 echo "vorbis enabled $vorbis"
811 echo "faad enabled $faad"
812 echo "faadbin enabled $faadbin"
813 echo "a52 support $a52"
814 echo "a52 dlopened $a52bin"
815 echo "pp support $pp"
816 echo "shared pp $shared_pp"
817 echo "Video hooking $vhook"
818 echo "SDL support $sdl"
819 if test $sdl_too_old = "yes"; then
820 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
822 echo "risky / patent encumbered codecs $risky"
823 echo "optimize for size $small"
825 if test "$vhook" = "yes" ; then
826 echo "Imlib2 support $imlib2"
827 echo "freetype support $freetype2"
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 "MAKE=$make" >> config.mak
839 echo "CC=$cc" >> config.mak
840 echo "AR=$ar" >> config.mak
841 echo "RANLIB=$ranlib" >> config.mak
842 echo "STRIP=$strip" >> config.mak
843 echo "OPTFLAGS=$CFLAGS" >> config.mak
844 echo "LDFLAGS=$LDFLAGS" >> config.mak
845 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
846 echo "SHFLAGS=$SHFLAGS" >> config.mak
847 echo "LIBPREF=$LIBPREF" >> config.mak
848 echo "LIBSUF=$LIBSUF" >> config.mak
849 echo "SLIBPREF=$SLIBPREF" >> config.mak
850 echo "SLIBSUF=$SLIBSUF" >> config.mak
851 echo "TARGET_OS=$TARGET_OS" >> config.mak
852 if test "$cpu" = "x86" ; then
853 echo "TARGET_ARCH_X86=yes" >> config.mak
854 echo "#define ARCH_X86 1" >> $TMPH
855 elif test "$cpu" = "armv4l" ; then
856 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
857 echo "#define ARCH_ARMV4L 1" >> $TMPH
858 elif test "$cpu" = "alpha" ; then
859 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
860 echo "#define ARCH_ALPHA 1" >> $TMPH
861 elif test "$cpu" = "sparc64" ; then
862 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
863 echo "#define ARCH_SPARC64 1" >> $TMPH
864 elif test "$cpu" = "powerpc" ; then
865 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
866 echo "#define ARCH_POWERPC 1" >> $TMPH
867 if test "$powerpc_perf" = "yes"; then
868 echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
870 elif test "$cpu" = "mips" ; then
871 echo "TARGET_ARCH_MIPS=yes" >> config.mak
872 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 "$sdl" = "yes" ; then
923 echo "CONFIG_SDL=yes" >> config.mak
924 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
925 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
927 if test "$have_lrintf" = "yes" ; then
928 echo "#define HAVE_LRINTF 1" >> $TMPH
930 if test "$vhook" = "yes" ; then
931 echo "BUILD_VHOOK=yes" >> config.mak
932 echo "#define HAVE_VHOOK 1" >> $TMPH
933 extralibs="$extralibs $ldl"
935 if test "$lshared" = "yes" ; then
936 echo "BUILD_SHARED=yes" >> config.mak
937 echo "PIC=-fPIC" >> config.mak
939 echo "EXTRALIBS=$extralibs" >> config.mak
940 echo "VERSION=`head $source_path/VERSION`" >>config.mak
942 # if you do not want to use encoders, disable that.
943 echo "#define CONFIG_ENCODERS 1" >> $TMPH
944 echo "CONFIG_ENCODERS=yes" >> config.mak
946 # if you do not want to use decoders, disable that.
947 echo "#define CONFIG_DECODERS 1" >> $TMPH
948 echo "CONFIG_DECODERS=yes" >> config.mak
951 if test "$a52" = "yes" ; then
952 echo "#define CONFIG_AC3 1" >> $TMPH
953 echo "CONFIG_AC3=yes" >> config.mak
955 if test "$a52bin" = "yes" ; then
956 echo "#define CONFIG_A52BIN 1" >> $TMPH
957 echo "CONFIG_A52BIN=yes" >> config.mak
962 if test "$pp" = "yes" ; then
963 echo "#define CONFIG_PP 1" >> $TMPH
964 echo "CONFIG_PP=yes" >> config.mak
966 if test "$shared_pp" = "yes" ; then
967 echo "#define SHARED_PP 1" >> $TMPH
968 echo "SHARED_PP=yes" >> config.mak
972 # mpeg audio high precision mode
973 if test "$mpegaudio_hp" = "yes" ; then
974 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
977 if test "$v4l" = "yes" ; then
978 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
979 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
982 if test "$dv1394" = "yes" ; then
983 echo "#define CONFIG_DV1394 1" >> $TMPH
984 echo "CONFIG_DV1394=yes" >> config.mak
987 if test "$dlopen" = "yes" ; then
988 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
991 if test "$dlfcn" = "yes" ; then
992 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
995 if test "$audio_oss" = "yes" ; then
996 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
997 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
1000 if test "$audio_beos" = "yes" ; then
1001 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
1002 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
1005 if test "$network" = "yes" ; then
1006 echo "#define CONFIG_NETWORK 1" >> $TMPH
1007 echo "CONFIG_NETWORK=yes" >> config.mak
1010 if test "$zlib" = "yes" ; then
1011 echo "#define CONFIG_ZLIB 1" >> $TMPH
1012 echo "CONFIG_ZLIB=yes" >> config.mak
1015 if test "$mp3lame" = "yes" ; then
1016 echo "#define CONFIG_MP3LAME 1" >> $TMPH
1017 echo "CONFIG_MP3LAME=yes" >> config.mak
1020 if test "$vorbis" = "yes" ; then
1021 echo "#define CONFIG_VORBIS 1" >> $TMPH
1022 echo "CONFIG_VORBIS=yes" >> config.mak
1025 if test "$faad" = "yes" ; then
1026 echo "#define CONFIG_FAAD 1" >> $TMPH
1027 echo "CONFIG_FAAD=yes" >> config.mak
1030 if test "$faadbin" = "yes" ; then
1031 echo "#define CONFIG_FAADBIN 1" >> $TMPH
1032 echo "CONFIG_FAADBIN=yes" >> config.mak
1035 if test "$win32" = "yes" ; then
1036 echo "#define CONFIG_WIN32 1" >> $TMPH
1037 echo "CONFIG_WIN32=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 "#define __MINGW32__ 1" >> $TMPH
1044 echo "__MINGW32__=1" >> config.mak
1047 if test "$cygwin" = "yes" ; then
1048 # setup correct exesuffix
1049 echo "CONFIG_WIN32=yes" >> config.mak
1052 if test "$os2" = "yes" ; then
1053 echo "#define CONFIG_OS2 1" >> $TMPH
1054 echo "CONFIG_OS2=yes" >> config.mak
1057 if test "$TARGET_OS" = "SunOS" ; then
1058 echo "#define CONFIG_SUNOS 1" >> $TMPH
1061 if test "$darwin" = "yes"; then
1062 echo "#define CONFIG_DARWIN 1" >> $TMPH
1063 echo "CONFIG_DARWIN=yes" >> config.mak
1066 if test "$_malloc_h" = "yes" ; then
1067 echo "#define HAVE_MALLOC_H 1" >> $TMPH
1069 echo "#undef HAVE_MALLOC_H" >> $TMPH
1072 if test "$_memalign" = "yes" ; then
1073 echo "#define HAVE_MEMALIGN 1" >> $TMPH
1075 echo "#undef HAVE_MEMALIGN" >> $TMPH
1078 if test "$netserver" = "yes" ; then
1079 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1080 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1083 if test "$need_inet_aton" = "yes" ; then
1084 echo "NEED_INET_ATON=yes" >> config.mak
1087 if test "$simpleidct" = "yes" ; then
1088 echo "#define SIMPLE_IDCT 1" >> $TMPH
1091 if test "$ffserver" = "yes" ; then
1092 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1093 echo "CONFIG_FFSERVER=yes" >> config.mak
1096 if test "$ffplay" = "yes" ; then
1097 echo "CONFIG_FFPLAY=yes" >> config.mak
1100 if test "$risky" = "yes" ; then
1101 echo "#define CONFIG_RISKY 1" >> $TMPH
1102 echo "CONFIG_RISKY=yes" >> config.mak
1105 echo "#define restrict $_restrict" >> $TMPH
1107 # build tree in object directory if source path is different from current one
1108 if test "$source_path_used" = "yes" ; then
1109 DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
1110 libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
1111 FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
1112 for dir in $DIRS ; do
1115 for f in $FILES ; do
1116 ln -sf $source_path/$f $f
1119 echo "SRC_PATH=$source_path" >> config.mak
1121 if test "$amr_nb" = "yes" ; then
1122 echo "#define AMR_NB 1" >> $TMPH
1123 echo "AMR_NB=yes" >> config.mak
1125 if test "$amr_nb_fixed" = "yes" ; then
1126 echo "AMR_NB_FIXED=yes" >> config.mak
1127 echo "#define AMR_NB_FIXED 1" >> $TMPH
1128 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1129 echo "REL-5 version 5.1.0 from "
1130 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
1131 echo "and extracted src to libavcodec/amr"
1132 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1133 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1136 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1137 echo "REL-5 V5.1.0 from "
1138 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
1139 echo "and extracted the source to libavcodec/amr_float"
1145 diff $TMPH config.h >/dev/null 2>&1
1146 if test $? -ne 0 ; then
1147 mv -f $TMPH config.h
1149 echo "config.h is unchanged"
1152 rm -f $TMPO $TMPC $TMPE $TMPS $TMPH