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"
34 i386|i486|i586|i686|i86pc|BePC)
37 # armv4l is a subset of armv5tel
44 "Power Macintosh"|ppc)
89 LDFLAGS=-Wl,--warn-common
104 prefix="/boot/home/config"
105 # helps building libavcodec
106 CFLAGS="-O3 -DPIC -fomit-frame-pointer"
107 # 3 gcc releases known for BeOS, each with ugly bugs
108 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
109 case "$gcc_version" in
110 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
113 *20010315*) echo "BeBits gcc"
114 CFLAGS="$CFLAGS -fno-expensive-optimizations"
118 # disable linux things
124 # no need for libm, but the inet stuff
126 if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
127 extralibs="-lbind -lsocket"
141 extralibs="$extralibs -lsocket -lnsl"
148 LDFLAGS="$LDFLAGS -export-dynamic"
154 extralibs="-lpoll -lgnugetopt -lm"
163 SHFLAGS="-dynamiclib"
168 FFSLDFLAGS=-Wl,-bind_at_load
169 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f4-)"
170 case "$gcc_version" in
172 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer"
175 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic"
193 test -f /usr/include/inttypes.h || \
194 test -f /usr/local/include/inttypes.h || \
195 echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
196 "/usr/include/inttypes.h !!!"
199 LDFLAGS="$LDFLAGS -rdynamic"
204 ranlib="echo ignoring ranlib"
205 strip="echo ignoring strip"
207 LDFLAGS="-Zomf -Zstack 16384 -s"
225 # From mplayer configure. We need TARGET_OS available
226 # to the Makefile, so it can distinguish between flavors
227 # of AltiVec on PowerPC
228 TARGET_OS=`( uname -s ) 2>&1`
230 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
238 [cC][yY][gG][wW][iI][nN]*)
242 TARGET_OS="$TARGET_OS-UNKNOWN"
247 # XXX: we assume an absolute path is given when launching configure,
248 # except in './configure' case.
249 source_path="`echo $0 | sed -e 's#/configure##'`"
250 source_path_used="yes"
251 if test -z "$source_path" -o "$source_path" = "." ; then
253 source_path_used="no"
258 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
260 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
262 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
264 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
266 --make=*) make=`echo $opt | cut -d '=' -f 2`
268 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
270 --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
272 --extra-libs=*) extralibs=${opt#--extra-libs=}
274 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
276 --tune=*) tune=`echo $opt | cut -d '=' -f 2`
278 --disable-mmx) mmx="no"
280 --disable-altivec) altivec="no"
282 --enable-gprof) gprof="yes"
284 --disable-v4l) v4l="no"
286 --disable-audio-oss) audio_oss="no"
288 --disable-audio-beos) audio_beos="no"
290 --disable-dv1394) dv1394="no"
292 --disable-network) network="no"
294 --disable-zlib) zlib="no"
296 --disable-a52) a52="no"
298 --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
300 --disable-pp) pp="no"
302 --enable-shared-pp) shared_pp="yes"
304 --enable-mp3lame) mp3lame="yes"
306 --enable-vorbis) vorbis="yes"
308 --enable-faad) faad="yes"
310 --enable-faadbin) faadbin="yes"
312 --disable-vhook) vhook="no"
314 --disable-simple_idct) simpleidct="no"
316 --enable-win32) win32="yes"
318 --enable-mingw32) mingw32="yes"
320 --enable-shared) lshared="yes"
322 --disable-mpegaudio-hp) mpegaudio_hp="no"
324 --disable-ffserver) ffserver="no"
326 --disable-ffplay) ffplay="no"
328 --disable-risky) risky="no"
330 --enable-small) small="yes"
332 --enable-amr_nb) amr_nb="yes"
334 --enable-amr_nb-fixed) amr_nb_fixed="yes"
340 if test $mmx = "default"; then
341 if test $cpu = "x86"; then
348 # Can only do AltiVec on PowerPC
349 if test $altivec = "default"; then
350 if test $cpu = "powerpc"; then
357 # Add processor-specific flags
359 if test $tune != "generic"; then
361 601|ppc601|PowerPC601)
362 CFLAGS="$CFLAGS -mcpu=601"
363 if test $altivec = "yes"; then
364 echo "WARNING: tuning for PPC601 but altivec enabled !";
368 603*|ppc603*|PowerPC603*)
369 CFLAGS="$CFLAGS -mcpu=603"
370 if test $altivec = "yes"; then
371 echo "WARNING: tuning for PPC603 but altivec enabled !";
375 604*|ppc604*|PowerPC604*)
376 CFLAGS="$CFLAGS -mcpu=604"
377 if test $altivec = "yes"; then
378 echo "WARNING: tuning for PPC604 but altivec enabled !";
382 G3|75*|ppc75*|PowerPC75*)
383 CFLAGS="$CFLAGS -mcpu=750 -mtune=750"
384 if test $altivec = "yes"; then
385 echo "WARNING: tuning for PPC75x but altivec enabled !";
389 G4|745*|ppc745*|PowerPC745*)
390 CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450"
391 if test $altivec = "no"; then
392 echo "WARNING: tuning for PPC745x but altivec disabled !";
396 74*|ppc74*|PowerPC74*)
397 CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400"
398 if test $altivec = "no"; then
399 echo "WARNING: tuning for PPC74xx but altivec disabled !";
403 G5|970|ppc970|PowerPC970|power4*|Power4*)
404 CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc64 -force_cpusubtype_ALL "
405 if test $altivec = "no"; then
406 echo "WARNING: tuning for PPC970 but altivec disabled !";
411 echo "WARNING: unknown CPU "$tune", ignored"
416 # See if we have <altivec.h>
419 int main( void ) { return 0; }
423 if $cc -o $TMPE $TMPC 2> /dev/null ; then
427 # See does our compiler support Motorola AltiVec C API
428 if test $altivec = "yes"; then
429 if test $_altivec_h = "yes"; then
433 vector signed int v1, v2, v3;
441 vector signed int v1, v2, v3;
447 if test "$darwin" = "yes"; then
448 $cc -o $TMPE $TMPC -faltivec 2> /dev/null || altivec="no"
450 $cc -o $TMPE $TMPC -maltivec -mabi=altivec 2> /dev/null || altivec="no"
454 # Can only do mmi on mips
455 if test $mmi = "default"; then
456 if test $cpu = "mips"; then
463 # See does our compiler support mmi
464 if test $mmi = "yes"; then
467 __asm__ ("lq \$2, 0(\$2)");
471 $cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
474 # Checking for CFLAGS
475 if test -z "$CFLAGS"; then
479 if test "$win32" = "yes" ; then
480 cross_prefix="i386-mingw32msvc-"
487 if test "$mingw32" = "yes" ; then
495 cc="${cross_prefix}${cc}"
496 ar="${cross_prefix}${ar}"
497 ranlib="${cross_prefix}${ranlib}"
498 strip="${cross_prefix}${strip}"
500 if test -z "$cross_prefix" ; then
503 # big/little endian test
505 #include <inttypes.h>
506 int main(int argc, char ** argv){
507 volatile uint32_t i=0x01234567;
508 return (*((uint8_t*)(&i))) == 0x67;
512 if $cc -o $TMPE $TMPC 2>/dev/null ; then
513 $TMPE && bigendian="yes"
515 echo big/little test failed
520 # if cross compiling, cannot launch a program, so make a static guess
521 if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
528 # check availability of some header files
532 int main( void ) { return 0; }
537 if $cc -o $TMPE $TMPC 2> /dev/null ; then
540 # check for memalign - atmos
545 string = memalign(64, sizeof(char));
549 $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
555 int main( void ) { return *strptime("", "", 0); }
559 if $cc -o $TMPE $TMPC 2> /dev/null ; then
563 if test "$zlib" = "yes"; then
564 # check for zlib - mmu_man
568 if (zlibVersion() != ZLIB_VERSION)
569 puts("zlib version differs !!!");
574 $cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
575 # $TMPE 2> /dev/null > /dev/null || zlib="no"
576 # XXX: more tests needed - runtime test
578 if test "$zlib" = "yes"; then
579 extralibs="$extralibs -lz"
582 # test for lrintf in math.h
584 #define _ISOC9X_SOURCE 1
586 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
590 if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
592 $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
596 for restrict_keyword in restrict __restrict__ __restrict; do
597 echo "void foo(char * $restrict_keyword p);" > $TMPC
598 if $cc -c -o $TMPO $TMPC 2> /dev/null; then
599 _restrict=$restrict_keyword
604 # test gcc version to see if vector builtins can be used
605 # currently only used on i386 for MMX builtins
608 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
611 #error no vector builtins
617 if $cc -o $TMPO $TMPC 2> /dev/null ; then
621 # dlopen/dlfcn.h probing
625 int main( void ) { return (int) dlopen("foo", 0); }
630 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
635 if $cc -o $TMPE $TMPC 2> /dev/null ; then
642 int main( void ) { return (int) dlopen("foo", 0); }
645 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
649 if $cc -o $TMPE $TMPC 2> /dev/null ; then
654 if test "$vhook" = "default" ; then
658 ##########################################
662 #include <X11/Xlib.h>
664 int main( void ) { return (int) imlib_load_font("foo"); }
668 if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
672 ##########################################
676 #include <ft2build.h>
677 int main( void ) { return (int) FT_Init_FreeType(0); }
681 if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
682 if test "`which freetype-config`" != ""; then
683 if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then
689 ##########################################
694 #undef main /* We don't want SDL to override our main() */
695 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
700 if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` 2> /dev/null ; then
701 _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
702 if test "$_sdlversion" -lt 121 ; then
709 if test "$sdl" = "no" ; then
713 if test "$small" = "yes"; then
714 # CFLAGS=${CFLAGS//-O3/-Os}
718 if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
721 Usage: configure [options]
722 Options: [defaults in brackets after descriptions]
725 echo "Standard options:"
726 echo " --help print this message"
727 echo " --prefix=PREFIX install in PREFIX [$prefix]"
728 echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
729 echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
730 echo " --enable-faad enable faad support via libfaad [default=no]"
731 echo " --enable-faadbin build faad support with runtime linking [default=no]"
732 echo " --enable-win32 enable win32 cross compile"
733 echo " --enable-mingw32 enable mingw32 native windows compile"
734 echo " --disable-a52 disable GPL'ed A52 support [default=no]"
735 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
736 echo " --disable-pp disable GPL'ed post processing support [default=no]"
737 echo " --enable-shared-pp use libpostproc.so [default=no]"
738 echo " --enable-shared build shared libraries [default=no]"
739 echo " --enable-amr_nb enable amr_nb float audio codec"
740 echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
742 echo "Advanced options (experts only):"
743 echo " --source-path=PATH path of source code [$source_path]"
744 echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
745 echo " --cc=CC use C compiler CC [$cc]"
746 echo " --make=MAKE use specified make [$make]"
747 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
748 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
749 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
750 echo " --cpu=CPU force cpu to CPU [$cpu]"
751 echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)"
752 echo " --disable-mmx disable mmx usage"
753 echo " --disable-altivec disable AltiVec usage"
754 echo " --disable-audio-oss disable OSS audio support [default=no]"
755 echo " --disable-audio-beos disable BeOS audio support [default=no]"
756 echo " --disable-v4l disable video4linux grabbing [default=no]"
757 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
758 echo " --disable-network disable network support [default=no]"
759 echo " --disable-zlib disable zlib [default=no]"
760 echo " --disable-simple_idct disable simple IDCT routines [default=no]"
761 echo " --disable-vhook disable video hooking support"
762 echo " --enable-gprof enable profiling with gprof [$gprof]"
763 echo " --disable-mpegaudio-hp faster (but less accurate)"
764 echo " mpegaudio decoding [default=no]"
765 echo " --disable-ffserver disable ffserver build"
766 echo " --disable-ffplay disable ffplay build"
767 echo " --disable-risky disables patent encumbered codecs"
768 echo " --enable-small optimize for size instead of speed"
770 echo "NOTE: The object files are build at the place where configure is launched"
774 echo "Install prefix $prefix"
775 echo "Source path $source_path"
776 echo "C compiler $cc"
778 echo "CPU $cpu ($tune)"
779 echo "Big Endian $bigendian"
780 if test $cpu = "x86"; then
781 echo "MMX enabled $mmx"
782 echo "Vector Builtins $builtin_vector"
784 if test $cpu = "mips"; then
785 echo "MMI enabled $mmi"
787 if test $cpu = "powerpc"; then
788 echo "AltiVec enabled $altivec"
790 echo "gprof enabled $gprof"
791 echo "zlib enabled $zlib"
792 echo "mp3lame enabled $mp3lame"
793 echo "vorbis enabled $vorbis"
794 echo "faad enabled $faad"
795 echo "faadbin enabled $faadbin"
796 echo "a52 support $a52"
797 echo "a52 dlopened $a52bin"
798 echo "pp support $pp"
799 echo "shared pp $shared_pp"
800 echo "Video hooking $vhook"
801 echo "SDL support $sdl"
802 if test $sdl_too_old = "yes"; then
803 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
805 echo "risky / patent encumbered codecs $risky"
806 echo "optimize for size $small"
808 if test "$vhook" = "yes" ; then
809 echo "Imlib2 support $imlib2"
810 echo "freetype support $freetype2"
812 echo "AMR-NB float support" $amr_nb
813 echo "AMR-NB fixed support" $amr_nb_fixed
815 echo "Creating config.mak and config.h"
817 echo "# Automatically generated by configure - do not modify" > config.mak
818 echo "/* Automatically generated by configure - do not modify */" > $TMPH
820 echo "prefix=$prefix" >> config.mak
821 echo "MAKE=$make" >> config.mak
822 echo "CC=$cc" >> config.mak
823 echo "AR=$ar" >> config.mak
824 echo "RANLIB=$ranlib" >> config.mak
825 echo "STRIP=$strip" >> config.mak
826 echo "OPTFLAGS=$CFLAGS" >> config.mak
827 echo "LDFLAGS=$LDFLAGS" >> config.mak
828 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
829 echo "SHFLAGS=$SHFLAGS" >> config.mak
830 echo "LIBPREF=$LIBPREF" >> config.mak
831 echo "LIBSUF=$LIBSUF" >> config.mak
832 echo "SLIBPREF=$SLIBPREF" >> config.mak
833 echo "SLIBSUF=$SLIBSUF" >> config.mak
834 echo "TARGET_OS=$TARGET_OS" >> config.mak
835 if test "$cpu" = "x86" ; then
836 echo "TARGET_ARCH_X86=yes" >> config.mak
837 echo "#define ARCH_X86 1" >> $TMPH
838 elif test "$cpu" = "armv4l" ; then
839 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
840 echo "#define ARCH_ARMV4L 1" >> $TMPH
841 elif test "$cpu" = "alpha" ; then
842 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
843 echo "#define ARCH_ALPHA 1" >> $TMPH
844 elif test "$cpu" = "sparc64" ; then
845 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
846 echo "#define ARCH_SPARC64 1" >> $TMPH
847 elif test "$cpu" = "powerpc" ; then
848 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
849 echo "#define ARCH_POWERPC 1" >> $TMPH
850 echo "// Enable the next line to get PowerPC performance report" >> $TMPH
851 echo "// #define POWERPC_TBL_PERFORMANCE_REPORT 1" >> $TMPH
852 echo "// Enable the next line to use PMC registers instead of TBL" >> $TMPH
853 echo "// #define POWERPC_PERF_USE_PMC 1" >> $TMPH
854 elif test "$cpu" = "mips" ; then
855 echo "TARGET_ARCH_MIPS=yes" >> config.mak
856 echo "#define ARCH_MIPS 1" >> $TMPH
858 echo "#define TUNECPU $TUNECPU" >> $TMPH
859 if test "$bigendian" = "yes" ; then
860 echo "WORDS_BIGENDIAN=yes" >> config.mak
861 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
863 if test "$mmx" = "yes" ; then
864 echo "TARGET_MMX=yes" >> config.mak
865 echo "#define HAVE_MMX 1" >> $TMPH
866 echo "#define __CPU__ 586" >> $TMPH
868 if test "$builtin_vector" = "yes" ; then
869 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
870 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
872 if test "$mmi" = "yes" ; then
873 echo "TARGET_MMI=yes" >> config.mak
874 echo "#define HAVE_MMI 1" >> $TMPH
876 if test "$altivec" = "yes" ; then
877 echo "TARGET_ALTIVEC=yes" >> config.mak
878 echo "#define HAVE_ALTIVEC 1" >> $TMPH
879 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
880 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
881 if test "$_altivec_h" = "yes" ; then
882 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
884 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
887 if test "$gprof" = "yes" ; then
888 echo "TARGET_GPROF=yes" >> config.mak
889 echo "#define HAVE_GPROF 1" >> $TMPH
891 if test "$strptime" = "yes" ; then
892 echo "#define HAVE_STRPTIME 1" >> $TMPH
894 echo "BUILD_STRPTIME=yes" >> config.mak
896 if test "$imlib2" = "yes" ; then
897 echo "HAVE_IMLIB2=yes" >> config.mak
899 if test "$freetype2" = "yes" ; then
900 echo "HAVE_FREETYPE2=yes" >> config.mak
902 if test "$sdl" = "yes" ; then
903 echo "CONFIG_SDL=yes" >> config.mak
904 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
905 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
907 if test "$have_lrintf" = "yes" ; then
908 echo "#define HAVE_LRINTF 1" >> $TMPH
910 if test "$vhook" = "yes" ; then
911 echo "BUILD_VHOOK=yes" >> config.mak
912 echo "#define HAVE_VHOOK 1" >> $TMPH
913 extralibs="$extralibs $ldl"
915 if test "$lshared" = "yes" ; then
916 echo "BUILD_SHARED=yes" >> config.mak
917 echo "PIC=-fPIC" >> config.mak
919 echo "EXTRALIBS=$extralibs" >> config.mak
920 echo "VERSION=`head $source_path/VERSION`" >>config.mak
922 # if you do not want to use encoders, disable that.
923 echo "#define CONFIG_ENCODERS 1" >> $TMPH
924 echo "CONFIG_ENCODERS=yes" >> config.mak
926 # if you do not want to use decoders, disable that.
927 echo "#define CONFIG_DECODERS 1" >> $TMPH
928 echo "CONFIG_DECODERS=yes" >> config.mak
931 if test "$a52" = "yes" ; then
932 echo "#define CONFIG_AC3 1" >> $TMPH
933 echo "CONFIG_AC3=yes" >> config.mak
935 if test "$a52bin" = "yes" ; then
936 echo "#define CONFIG_A52BIN 1" >> $TMPH
937 echo "CONFIG_A52BIN=yes" >> config.mak
942 if test "$pp" = "yes" ; then
943 echo "#define CONFIG_PP 1" >> $TMPH
944 echo "CONFIG_PP=yes" >> config.mak
946 if test "$shared_pp" = "yes" ; then
947 echo "#define SHARED_PP 1" >> $TMPH
948 echo "SHARED_PP=yes" >> config.mak
952 # mpeg audio high precision mode
953 if test "$mpegaudio_hp" = "yes" ; then
954 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
957 if test "$v4l" = "yes" ; then
958 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
959 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
962 if test "$dv1394" = "yes" ; then
963 echo "#define CONFIG_DV1394 1" >> $TMPH
964 echo "CONFIG_DV1394=yes" >> config.mak
967 if test "$dlopen" = "yes" ; then
968 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
971 if test "$dlfcn" = "yes" ; then
972 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
975 if test "$audio_oss" = "yes" ; then
976 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
977 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
980 if test "$audio_beos" = "yes" ; then
981 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
982 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
985 if test "$network" = "yes" ; then
986 echo "#define CONFIG_NETWORK 1" >> $TMPH
987 echo "CONFIG_NETWORK=yes" >> config.mak
990 if test "$zlib" = "yes" ; then
991 echo "#define CONFIG_ZLIB 1" >> $TMPH
992 echo "CONFIG_ZLIB=yes" >> config.mak
995 if test "$mp3lame" = "yes" ; then
996 echo "#define CONFIG_MP3LAME 1" >> $TMPH
997 echo "CONFIG_MP3LAME=yes" >> config.mak
1000 if test "$vorbis" = "yes" ; then
1001 echo "#define CONFIG_VORBIS 1" >> $TMPH
1002 echo "CONFIG_VORBIS=yes" >> config.mak
1005 if test "$faad" = "yes" ; then
1006 echo "#define CONFIG_FAAD 1" >> $TMPH
1007 echo "CONFIG_FAAD=yes" >> config.mak
1010 if test "$faadbin" = "yes" ; then
1011 echo "#define CONFIG_FAADBIN 1" >> $TMPH
1012 echo "CONFIG_FAADBIN=yes" >> config.mak
1015 if test "$win32" = "yes" ; then
1016 echo "#define CONFIG_WIN32 1" >> $TMPH
1017 echo "CONFIG_WIN32=yes" >> config.mak
1020 if test "$mingw32" = "yes" ; then
1021 echo "#define CONFIG_WIN32 1" >> $TMPH
1022 echo "CONFIG_WIN32=yes" >> config.mak
1023 echo "#define __MINGW32__ 1" >> $TMPH
1024 echo "__MINGW32__=1" >> config.mak
1027 if test "$cygwin" = "yes" ; then
1028 # setup correct exesuffix
1029 echo "CONFIG_WIN32=yes" >> config.mak
1032 if test "$os2" = "yes" ; then
1033 echo "#define CONFIG_OS2 1" >> $TMPH
1034 echo "CONFIG_OS2=yes" >> config.mak
1037 if test "$TARGET_OS" = "SunOS" ; then
1038 echo "#define CONFIG_SUNOS 1" >> $TMPH
1041 if test "$darwin" = "yes"; then
1042 echo "#define CONFIG_DARWIN 1" >> $TMPH
1043 echo "CONFIG_DARWIN=yes" >> config.mak
1046 if test "$_malloc_h" = "yes" ; then
1047 echo "#define HAVE_MALLOC_H 1" >> $TMPH
1049 echo "#undef HAVE_MALLOC_H" >> $TMPH
1052 if test "$_memalign" = "yes" ; then
1053 echo "#define HAVE_MEMALIGN 1" >> $TMPH
1055 echo "#undef HAVE_MEMALIGN" >> $TMPH
1058 if test "$netserver" = "yes" ; then
1059 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1060 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1063 if test "$need_inet_aton" = "yes" ; then
1064 echo "NEED_INET_ATON=yes" >> config.mak
1067 if test "$simpleidct" = "yes" ; then
1068 echo "#define SIMPLE_IDCT 1" >> $TMPH
1071 if test "$ffserver" = "yes" ; then
1072 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1073 echo "CONFIG_FFSERVER=yes" >> config.mak
1076 if test "$ffplay" = "yes" ; then
1077 echo "CONFIG_FFPLAY=yes" >> config.mak
1080 if test "$risky" = "yes" ; then
1081 echo "#define CONFIG_RISKY 1" >> $TMPH
1082 echo "CONFIG_RISKY=yes" >> config.mak
1085 echo "#define restrict $_restrict" >> $TMPH
1087 # build tree in object directory if source path is different from current one
1088 if test "$source_path_used" = "yes" ; then
1089 DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
1090 libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
1091 FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
1092 for dir in $DIRS ; do
1095 for f in $FILES ; do
1096 ln -sf $source_path/$f $f
1099 echo "SRC_PATH=$source_path" >> config.mak
1101 if test "$amr_nb" = "yes" ; then
1102 echo "#define AMR_NB 1" >> $TMPH
1103 echo "AMR_NB=yes" >> config.mak
1105 if test "$amr_nb_fixed" = "yes" ; then
1106 echo "AMR_NB_FIXED=yes" >> config.mak
1107 echo "#define AMR_NB_FIXED 1" >> $TMPH
1108 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1109 echo "REL-5 version 5.1.0 from "
1110 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
1111 echo "and extracted src to libavcodec/amr"
1112 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1113 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1116 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1117 echo "REL-5 V5.1.0 from "
1118 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
1119 echo "and extracted the source to libavcodec/amr_float"
1125 diff $TMPH config.h >/dev/null 2>&1
1126 if test $? -ne 0 ; then
1127 mv -f $TMPH config.h
1129 echo "config.h is unchanged"
1132 rm -f $TMPO $TMPC $TMPE $TMPS $TMPH