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"
33 i386|i486|i586|i686|i86pc|BePC)
36 # armv4l is a subset of armv5tel
43 "Power Macintosh"|ppc)
88 LDFLAGS=-Wl,--warn-common
103 prefix="/boot/home/config"
104 # helps building libavcodec
105 CFLAGS="-O3 -DPIC -fomit-frame-pointer"
106 # 3 gcc releases known for BeOS, each with ugly bugs
107 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
108 case "$gcc_version" in
109 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
112 *20010315*) echo "BeBits gcc"
113 CFLAGS="$CFLAGS -fno-expensive-optimizations"
117 # disable linux things
123 # no need for libm, but the inet stuff
125 if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
126 extralibs="-lbind -lsocket"
140 extralibs="$extralibs -lsocket -lnsl"
147 LDFLAGS="$LDFLAGS -export-dynamic"
153 extralibs="-lpoll -lgnugetopt -lm"
162 SHFLAGS="-dynamiclib"
167 FFSLDFLAGS=-Wl,-bind_at_load
168 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f4-)"
169 case "$gcc_version" in
171 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer"
174 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic"
192 test -f /usr/include/inttypes.h || \
193 test -f /usr/local/include/inttypes.h || \
194 echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
195 "/usr/include/inttypes.h !!!"
198 LDFLAGS="$LDFLAGS -rdynamic"
203 ranlib="echo ignoring ranlib"
204 strip="echo ignoring strip"
206 LDFLAGS="-Zomf -Zstack 16384 -s"
224 # From mplayer configure. We need TARGET_OS available
225 # to the Makefile, so it can distinguish between flavors
226 # of AltiVec on PowerPC
227 TARGET_OS=`( uname -s ) 2>&1`
229 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
237 [cC][yY][gG][wW][iI][nN]*)
241 TARGET_OS="$TARGET_OS-UNKNOWN"
246 # XXX: we assume an absolute path is given when launching configure,
247 # except in './configure' case.
248 source_path="`echo $0 | sed -e 's#/configure##'`"
249 source_path_used="yes"
250 if test -z "$source_path" -o "$source_path" = "." ; then
252 source_path_used="no"
257 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
259 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
261 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
263 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
265 --make=*) make=`echo $opt | cut -d '=' -f 2`
267 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
269 --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
271 --extra-libs=*) extralibs=${opt#--extra-libs=}
273 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
275 --disable-mmx) mmx="no"
277 --disable-altivec) altivec="no"
279 --enable-gprof) gprof="yes"
281 --disable-v4l) v4l="no"
283 --disable-audio-oss) audio_oss="no"
285 --disable-audio-beos) audio_beos="no"
287 --disable-dv1394) dv1394="no"
289 --disable-network) network="no"
291 --disable-zlib) zlib="no"
293 --disable-a52) a52="no"
295 --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
297 --disable-pp) pp="no"
299 --enable-shared-pp) shared_pp="yes"
301 --enable-mp3lame) mp3lame="yes"
303 --enable-vorbis) vorbis="yes"
305 --enable-faad) faad="yes"
307 --enable-faadbin) faadbin="yes"
309 --disable-vhook) vhook="no"
311 --disable-simple_idct) simpleidct="no"
313 --enable-win32) win32="yes"
315 --enable-mingw32) mingw32="yes"
317 --enable-shared) lshared="yes"
319 --disable-mpegaudio-hp) mpegaudio_hp="no"
321 --disable-ffserver) ffserver="no"
323 --disable-ffplay) ffplay="no"
325 --disable-risky) risky="no"
327 --enable-small) small="yes"
329 --enable-amr_nb) amr_nb="yes"
331 --enable-amr_nb-fixed) amr_nb_fixed="yes"
337 if test $mmx = "default"; then
338 if test $cpu = "x86"; then
345 # Can only do AltiVec on PowerPC
346 if test $altivec = "default"; then
347 if test $cpu = "powerpc"; then
354 # See if we have <altivec.h>
357 int main( void ) { return 0; }
361 if $cc -o $TMPE $TMPC 2> /dev/null ; then
365 # See does our compiler support Motorola AltiVec C API
366 if test $altivec = "yes"; then
367 if test $_altivec_h = "yes"; then
371 vector signed int v1, v2, v3;
379 vector signed int v1, v2, v3;
385 if test "$darwin" = "yes"; then
386 $cc -o $TMPE $TMPC -faltivec 2> /dev/null || altivec="no"
388 $cc -o $TMPE $TMPC -maltivec -mabi=altivec 2> /dev/null || altivec="no"
392 # Can only do mmi on mips
393 if test $mmi = "default"; then
394 if test $cpu = "mips"; then
401 # See does our compiler support mmi
402 if test $mmi = "yes"; then
405 __asm__ ("lq \$2, 0(\$2)");
409 $cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
412 # Checking for CFLAGS
413 if test -z "$CFLAGS"; then
417 if test "$win32" = "yes" ; then
418 cross_prefix="i386-mingw32msvc-"
425 if test "$mingw32" = "yes" ; then
433 cc="${cross_prefix}${cc}"
434 ar="${cross_prefix}${ar}"
435 ranlib="${cross_prefix}${ranlib}"
436 strip="${cross_prefix}${strip}"
438 if test -z "$cross_prefix" ; then
441 # big/little endian test
443 #include <inttypes.h>
444 int main(int argc, char ** argv){
445 volatile uint32_t i=0x01234567;
446 return (*((uint8_t*)(&i))) == 0x67;
450 if $cc -o $TMPE $TMPC 2>/dev/null ; then
451 $TMPE && bigendian="yes"
453 echo big/little test failed
458 # if cross compiling, cannot launch a program, so make a static guess
459 if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
466 # check availability of some header files
470 int main( void ) { return 0; }
475 if $cc -o $TMPE $TMPC 2> /dev/null ; then
478 # check for memalign - atmos
483 string = memalign(64, sizeof(char));
487 $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
493 int main( void ) { return *strptime("", "", 0); }
497 if $cc -o $TMPE $TMPC 2> /dev/null ; then
501 if test "$zlib" = "yes"; then
502 # check for zlib - mmu_man
506 if (zlibVersion() != ZLIB_VERSION)
507 puts("zlib version differs !!!");
512 $cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
513 # $TMPE 2> /dev/null > /dev/null || zlib="no"
514 # XXX: more tests needed - runtime test
516 if test "$zlib" = "yes"; then
517 extralibs="$extralibs -lz"
520 # test for lrintf in math.h
522 #define _ISOC9X_SOURCE 1
524 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
528 if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
530 $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
534 for restrict_keyword in restrict __restrict__ __restrict; do
535 echo "void foo(char * $restrict_keyword p);" > $TMPC
536 if $cc -c -o $TMPO $TMPC 2> /dev/null; then
537 _restrict=$restrict_keyword
542 # test gcc version to see if vector builtins can be used
543 # currently only used on i386 for MMX builtins
546 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
549 #error no vector builtins
555 if $cc -o $TMPO $TMPC 2> /dev/null ; then
559 # dlopen/dlfcn.h probing
563 int main( void ) { return (int) dlopen("foo", 0); }
568 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
573 if $cc -o $TMPE $TMPC 2> /dev/null ; then
580 int main( void ) { return (int) dlopen("foo", 0); }
583 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
587 if $cc -o $TMPE $TMPC 2> /dev/null ; then
592 if test "$vhook" = "default" ; then
596 ##########################################
600 #include <X11/Xlib.h>
602 int main( void ) { return (int) imlib_load_font("foo"); }
606 if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
610 ##########################################
614 #include <ft2build.h>
615 int main( void ) { return (int) FT_Init_FreeType(0); }
619 if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
620 if test "`which freetype-config`" != ""; then
621 if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then
627 ##########################################
632 #undef main /* We don't want SDL to override our main() */
633 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
638 if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` 2> /dev/null ; then
639 _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
640 if test "$_sdlversion" -lt 121 ; then
647 if test "$sdl" = "no" ; then
651 if test "$small" = "yes"; then
652 # CFLAGS=${CFLAGS//-O3/-Os}
656 if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
659 Usage: configure [options]
660 Options: [defaults in brackets after descriptions]
663 echo "Standard options:"
664 echo " --help print this message"
665 echo " --prefix=PREFIX install in PREFIX [$prefix]"
666 echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
667 echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
668 echo " --enable-faad enable faad support via libfaad [default=no]"
669 echo " --enable-faadbin build faad support with runtime linking [default=no]"
670 echo " --enable-win32 enable win32 cross compile"
671 echo " --enable-mingw32 enable mingw32 native windows compile"
672 echo " --disable-a52 disable GPL'ed A52 support [default=no]"
673 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
674 echo " --disable-pp disable GPL'ed post processing support [default=no]"
675 echo " --enable-shared-pp use libpostproc.so [default=no]"
676 echo " --enable-shared build shared libraries [default=no]"
677 echo " --enable-amr_nb enable amr_nb float audio codec"
678 echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
680 echo "Advanced options (experts only):"
681 echo " --source-path=PATH path of source code [$source_path]"
682 echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
683 echo " --cc=CC use C compiler CC [$cc]"
684 echo " --make=MAKE use specified make [$make]"
685 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
686 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
687 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
688 echo " --cpu=CPU force cpu to CPU [$cpu]"
689 echo " --disable-mmx disable mmx usage"
690 echo " --disable-altivec disable AltiVec usage"
691 echo " --disable-audio-oss disable OSS audio support [default=no]"
692 echo " --disable-audio-beos disable BeOS audio support [default=no]"
693 echo " --disable-v4l disable video4linux grabbing [default=no]"
694 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
695 echo " --disable-network disable network support [default=no]"
696 echo " --disable-zlib disable zlib [default=no]"
697 echo " --disable-simple_idct disable simple IDCT routines [default=no]"
698 echo " --disable-vhook disable video hooking support"
699 echo " --enable-gprof enable profiling with gprof [$gprof]"
700 echo " --disable-mpegaudio-hp faster (but less accurate)"
701 echo " mpegaudio decoding [default=no]"
702 echo " --disable-ffserver disable ffserver build"
703 echo " --disable-ffplay disable ffplay build"
704 echo " --disable-risky disables patent encumbered codecs"
705 echo " --enable-small optimize for size instead of speed"
707 echo "NOTE: The object files are build at the place where configure is launched"
711 echo "Install prefix $prefix"
712 echo "Source path $source_path"
713 echo "C compiler $cc"
716 echo "Big Endian $bigendian"
717 if test $cpu = "x86"; then
718 echo "MMX enabled $mmx"
719 echo "Vector Builtins $builtin_vector"
721 if test $cpu = "mips"; then
722 echo "MMI enabled $mmi"
724 if test $cpu = "powerpc"; then
725 echo "AltiVec enabled $altivec"
727 echo "gprof enabled $gprof"
728 echo "zlib enabled $zlib"
729 echo "mp3lame enabled $mp3lame"
730 echo "vorbis enabled $vorbis"
731 echo "faad enabled $faad"
732 echo "faadbin enabled $faadbin"
733 echo "a52 support $a52"
734 echo "a52 dlopened $a52bin"
735 echo "pp support $pp"
736 echo "shared pp $shared_pp"
737 echo "Video hooking $vhook"
738 echo "SDL support $sdl"
739 if test $sdl_too_old = "yes"; then
740 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
742 echo "risky / patent encumbered codecs $risky"
743 echo "optimize for size $small"
745 if test "$vhook" = "yes" ; then
746 echo "Imlib2 support $imlib2"
747 echo "freetype support $freetype2"
749 echo "AMR-NB float support" $amr_nb
750 echo "AMR-NB fixed support" $amr_nb_fixed
752 echo "Creating config.mak and config.h"
754 echo "# Automatically generated by configure - do not modify" > config.mak
755 echo "/* Automatically generated by configure - do not modify */" > $TMPH
757 echo "prefix=$prefix" >> config.mak
758 echo "MAKE=$make" >> config.mak
759 echo "CC=$cc" >> config.mak
760 echo "AR=$ar" >> config.mak
761 echo "RANLIB=$ranlib" >> config.mak
762 echo "STRIP=$strip" >> config.mak
763 echo "OPTFLAGS=$CFLAGS" >> config.mak
764 echo "LDFLAGS=$LDFLAGS" >> config.mak
765 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
766 echo "SHFLAGS=$SHFLAGS" >> config.mak
767 echo "LIBPREF=$LIBPREF" >> config.mak
768 echo "LIBSUF=$LIBSUF" >> config.mak
769 echo "SLIBPREF=$SLIBPREF" >> config.mak
770 echo "SLIBSUF=$SLIBSUF" >> config.mak
771 echo "TARGET_OS=$TARGET_OS" >> config.mak
772 if test "$cpu" = "x86" ; then
773 echo "TARGET_ARCH_X86=yes" >> config.mak
774 echo "#define ARCH_X86 1" >> $TMPH
775 elif test "$cpu" = "armv4l" ; then
776 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
777 echo "#define ARCH_ARMV4L 1" >> $TMPH
778 elif test "$cpu" = "alpha" ; then
779 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
780 echo "#define ARCH_ALPHA 1" >> $TMPH
781 elif test "$cpu" = "sparc64" ; then
782 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
783 echo "#define ARCH_SPARC64 1" >> $TMPH
784 elif test "$cpu" = "powerpc" ; then
785 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
786 echo "#define ARCH_POWERPC 1" >> $TMPH
787 echo "// Enable the next line to get PowerPC performance report" >> $TMPH
788 echo "// #define POWERPC_TBL_PERFORMANCE_REPORT 1" >> $TMPH
789 echo "// Enable the next line to use PMC registers instead of TBL" >> $TMPH
790 echo "// #define POWERPC_PERF_USE_PMC 1" >> $TMPH
791 elif test "$cpu" = "mips" ; then
792 echo "TARGET_ARCH_MIPS=yes" >> config.mak
793 echo "#define ARCH_MIPS 1" >> $TMPH
795 if test "$bigendian" = "yes" ; then
796 echo "WORDS_BIGENDIAN=yes" >> config.mak
797 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
799 if test "$mmx" = "yes" ; then
800 echo "TARGET_MMX=yes" >> config.mak
801 echo "#define HAVE_MMX 1" >> $TMPH
802 echo "#define __CPU__ 586" >> $TMPH
804 if test "$builtin_vector" = "yes" ; then
805 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
806 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
808 if test "$mmi" = "yes" ; then
809 echo "TARGET_MMI=yes" >> config.mak
810 echo "#define HAVE_MMI 1" >> $TMPH
812 if test "$altivec" = "yes" ; then
813 echo "TARGET_ALTIVEC=yes" >> config.mak
814 echo "#define HAVE_ALTIVEC 1" >> $TMPH
815 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
816 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
817 if test "$_altivec_h" = "yes" ; then
818 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
820 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
823 if test "$gprof" = "yes" ; then
824 echo "TARGET_GPROF=yes" >> config.mak
825 echo "#define HAVE_GPROF 1" >> $TMPH
827 if test "$strptime" = "yes" ; then
828 echo "#define HAVE_STRPTIME 1" >> $TMPH
830 echo "BUILD_STRPTIME=yes" >> config.mak
832 if test "$imlib2" = "yes" ; then
833 echo "HAVE_IMLIB2=yes" >> config.mak
835 if test "$freetype2" = "yes" ; then
836 echo "HAVE_FREETYPE2=yes" >> config.mak
838 if test "$sdl" = "yes" ; then
839 echo "CONFIG_SDL=yes" >> config.mak
840 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
841 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
843 if test "$have_lrintf" = "yes" ; then
844 echo "#define HAVE_LRINTF 1" >> $TMPH
846 if test "$vhook" = "yes" ; then
847 echo "BUILD_VHOOK=yes" >> config.mak
848 echo "#define HAVE_VHOOK 1" >> $TMPH
849 extralibs="$extralibs $ldl"
851 if test "$lshared" = "yes" ; then
852 echo "BUILD_SHARED=yes" >> config.mak
853 echo "PIC=-fPIC" >> config.mak
855 echo "EXTRALIBS=$extralibs" >> config.mak
856 echo "VERSION=`head $source_path/VERSION`" >>config.mak
858 # if you do not want to use encoders, disable that.
859 echo "#define CONFIG_ENCODERS 1" >> $TMPH
860 echo "CONFIG_ENCODERS=yes" >> config.mak
862 # if you do not want to use decoders, disable that.
863 echo "#define CONFIG_DECODERS 1" >> $TMPH
864 echo "CONFIG_DECODERS=yes" >> config.mak
867 if test "$a52" = "yes" ; then
868 echo "#define CONFIG_AC3 1" >> $TMPH
869 echo "CONFIG_AC3=yes" >> config.mak
871 if test "$a52bin" = "yes" ; then
872 echo "#define CONFIG_A52BIN 1" >> $TMPH
873 echo "CONFIG_A52BIN=yes" >> config.mak
878 if test "$pp" = "yes" ; then
879 echo "#define CONFIG_PP 1" >> $TMPH
880 echo "CONFIG_PP=yes" >> config.mak
882 if test "$shared_pp" = "yes" ; then
883 echo "#define SHARED_PP 1" >> $TMPH
884 echo "SHARED_PP=yes" >> config.mak
888 # mpeg audio high precision mode
889 if test "$mpegaudio_hp" = "yes" ; then
890 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
893 if test "$v4l" = "yes" ; then
894 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
895 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
898 if test "$dv1394" = "yes" ; then
899 echo "#define CONFIG_DV1394 1" >> $TMPH
900 echo "CONFIG_DV1394=yes" >> config.mak
903 if test "$dlopen" = "yes" ; then
904 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
907 if test "$dlfcn" = "yes" ; then
908 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
911 if test "$audio_oss" = "yes" ; then
912 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
913 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
916 if test "$audio_beos" = "yes" ; then
917 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
918 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
921 if test "$network" = "yes" ; then
922 echo "#define CONFIG_NETWORK 1" >> $TMPH
923 echo "CONFIG_NETWORK=yes" >> config.mak
926 if test "$zlib" = "yes" ; then
927 echo "#define CONFIG_ZLIB 1" >> $TMPH
928 echo "CONFIG_ZLIB=yes" >> config.mak
931 if test "$mp3lame" = "yes" ; then
932 echo "#define CONFIG_MP3LAME 1" >> $TMPH
933 echo "CONFIG_MP3LAME=yes" >> config.mak
936 if test "$vorbis" = "yes" ; then
937 echo "#define CONFIG_VORBIS 1" >> $TMPH
938 echo "CONFIG_VORBIS=yes" >> config.mak
941 if test "$faad" = "yes" ; then
942 echo "#define CONFIG_FAAD 1" >> $TMPH
943 echo "CONFIG_FAAD=yes" >> config.mak
946 if test "$faadbin" = "yes" ; then
947 echo "#define CONFIG_FAADBIN 1" >> $TMPH
948 echo "CONFIG_FAADBIN=yes" >> config.mak
951 if test "$win32" = "yes" ; then
952 echo "#define CONFIG_WIN32 1" >> $TMPH
953 echo "CONFIG_WIN32=yes" >> config.mak
956 if test "$mingw32" = "yes" ; then
957 echo "#define CONFIG_WIN32 1" >> $TMPH
958 echo "CONFIG_WIN32=yes" >> config.mak
959 echo "#define __MINGW32__ 1" >> $TMPH
960 echo "__MINGW32__=1" >> config.mak
963 if test "$cygwin" = "yes" ; then
964 # setup correct exesuffix
965 echo "CONFIG_WIN32=yes" >> config.mak
968 if test "$os2" = "yes" ; then
969 echo "#define CONFIG_OS2 1" >> $TMPH
970 echo "CONFIG_OS2=yes" >> config.mak
973 if test "$TARGET_OS" = "SunOS" ; then
974 echo "#define CONFIG_SUNOS 1" >> $TMPH
977 if test "$darwin" = "yes"; then
978 echo "#define CONFIG_DARWIN 1" >> $TMPH
979 echo "CONFIG_DARWIN=yes" >> config.mak
982 if test "$_malloc_h" = "yes" ; then
983 echo "#define HAVE_MALLOC_H 1" >> $TMPH
985 echo "#undef HAVE_MALLOC_H" >> $TMPH
988 if test "$_memalign" = "yes" ; then
989 echo "#define HAVE_MEMALIGN 1" >> $TMPH
991 echo "#undef HAVE_MEMALIGN" >> $TMPH
994 if test "$netserver" = "yes" ; then
995 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
996 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
999 if test "$need_inet_aton" = "yes" ; then
1000 echo "NEED_INET_ATON=yes" >> config.mak
1003 if test "$simpleidct" = "yes" ; then
1004 echo "#define SIMPLE_IDCT 1" >> $TMPH
1007 if test "$ffserver" = "yes" ; then
1008 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1009 echo "CONFIG_FFSERVER=yes" >> config.mak
1012 if test "$ffplay" = "yes" ; then
1013 echo "CONFIG_FFPLAY=yes" >> config.mak
1016 if test "$risky" = "yes" ; then
1017 echo "#define CONFIG_RISKY 1" >> $TMPH
1018 echo "CONFIG_RISKY=yes" >> config.mak
1021 echo "#define restrict $_restrict" >> $TMPH
1023 # build tree in object directory if source path is different from current one
1024 if test "$source_path_used" = "yes" ; then
1025 DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
1026 libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
1027 FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
1028 for dir in $DIRS ; do
1031 for f in $FILES ; do
1032 ln -sf $source_path/$f $f
1035 echo "SRC_PATH=$source_path" >> config.mak
1037 if test "$amr_nb" = "yes" ; then
1038 echo "#define AMR_NB 1" >> $TMPH
1039 echo "AMR_NB=yes" >> config.mak
1041 if test "$amr_nb_fixed" = "yes" ; then
1042 echo "AMR_NB_FIXED=yes" >> config.mak
1043 echo "#define AMR_NB_FIXED 1" >> $TMPH
1044 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1045 echo "REL-5 version 5.1.0 from "
1046 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
1047 echo "and extracted src to libavcodec/amr"
1048 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1049 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1052 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1053 echo "REL-5 V5.1.0 from "
1054 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
1055 echo "and extracted the source to libavcodec/amr_float"
1061 diff $TMPH config.h >/dev/null 2>&1
1062 if test $? -ne 0 ; then
1063 mv -f $TMPH config.h
1065 echo "config.h is unchanged"
1068 rm -f $TMPO $TMPC $TMPE $TMPS $TMPH