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"
161 SHFLAGS="-dynamiclib"
166 FFSLDFLAGS=-Wl,-bind_at_load
167 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f4-)"
168 case "$gcc_version" in
170 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer"
173 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic"
191 test -f /usr/include/inttypes.h || \
192 test -f /usr/local/include/inttypes.h || \
193 echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
194 "/usr/include/inttypes.h !!!"
197 LDFLAGS="$LDFLAGS -rdynamic"
202 ranlib="echo ignoring ranlib"
203 strip="echo ignoring strip"
205 LDFLAGS="-Zomf -Zstack 16384 -s"
223 # From mplayer configure. We need TARGET_OS available
224 # to the Makefile, so it can distinguish between flavors
225 # of AltiVec on PowerPC
226 TARGET_OS=`( uname -s ) 2>&1`
228 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
236 [cC][yY][gG][wW][iI][nN]*)
240 TARGET_OS="$TARGET_OS-UNKNOWN"
245 # XXX: we assume an absolute path is given when launching configure,
246 # except in './configure' case.
247 source_path="`echo $0 | sed -e 's#/configure##'`"
248 source_path_used="yes"
249 if test -z "$source_path" -o "$source_path" = "." ; then
251 source_path_used="no"
256 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
258 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
260 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
262 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
264 --make=*) make=`echo $opt | cut -d '=' -f 2`
266 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
268 --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
270 --extra-libs=*) extralibs=${opt#--extra-libs=}
272 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
274 --disable-mmx) mmx="no"
276 --disable-altivec) altivec="no"
278 --enable-gprof) gprof="yes"
280 --disable-v4l) v4l="no"
282 --disable-audio-oss) audio_oss="no"
284 --disable-audio-beos) audio_beos="no"
286 --disable-dv1394) dv1394="no"
288 --disable-network) network="no"
290 --disable-zlib) zlib="no"
292 --disable-a52) a52="no"
294 --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
296 --disable-pp) pp="no"
298 --enable-shared-pp) shared_pp="yes"
300 --enable-mp3lame) mp3lame="yes"
302 --enable-vorbis) vorbis="yes"
304 --enable-faad) faad="yes"
306 --enable-faadbin) faadbin="yes"
308 --disable-vhook) vhook="no"
310 --disable-simple_idct) simpleidct="no"
312 --enable-win32) win32="yes"
314 --enable-mingw32) mingw32="yes"
316 --enable-shared) lshared="yes"
318 --disable-mpegaudio-hp) mpegaudio_hp="no"
320 --disable-ffserver) ffserver="no"
322 --disable-ffplay) ffplay="no"
324 --disable-risky) risky="no"
326 --enable-small) small="yes"
328 --enable-amr_nb) amr_nb="yes"
330 --enable-amr_nb-fixed) amr_nb_fixed="yes"
336 if test $mmx = "default"; then
337 if test $cpu = "x86"; then
344 # Can only do AltiVec on PowerPC
345 if test $altivec = "default"; then
346 if test $cpu = "powerpc"; then
353 # See if we have <altivec.h>
356 int main( void ) { return 0; }
360 if $cc -o $TMPE $TMPC 2> /dev/null ; then
364 # See does our compiler support Motorola AltiVec C API
365 if test $altivec = "yes"; then
366 if test $_altivec_h = "yes"; then
370 vector signed int v1, v2, v3;
378 vector signed int v1, v2, v3;
384 if test "$darwin" = "yes"; then
385 $cc -o $TMPE $TMPC -faltivec 2> /dev/null || altivec="no"
387 $cc -o $TMPE $TMPC -maltivec -mabi=altivec 2> /dev/null || altivec="no"
391 # Can only do mmi on mips
392 if test $mmi = "default"; then
393 if test $cpu = "mips"; then
400 # See does our compiler support mmi
401 if test $mmi = "yes"; then
404 __asm__ ("lq \$2, 0(\$2)");
408 $cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
411 # Checking for CFLAGS
412 if test -z "$CFLAGS"; then
416 if test "$win32" = "yes" ; then
417 cross_prefix="i386-mingw32msvc-"
424 if test "$mingw32" = "yes" ; then
432 cc="${cross_prefix}${cc}"
433 ar="${cross_prefix}${ar}"
434 ranlib="${cross_prefix}${ranlib}"
435 strip="${cross_prefix}${strip}"
437 if test -z "$cross_prefix" ; then
440 # big/little endian test
442 #include <inttypes.h>
443 int main(int argc, char ** argv){
444 volatile uint32_t i=0x01234567;
445 return (*((uint8_t*)(&i))) == 0x67;
449 if $cc -o $TMPE $TMPC 2>/dev/null ; then
450 $TMPE && bigendian="yes"
452 echo big/little test failed
457 # if cross compiling, cannot launch a program, so make a static guess
458 if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
465 # check availability of some header files
469 int main( void ) { return 0; }
474 if $cc -o $TMPE $TMPC 2> /dev/null ; then
477 # check for memalign - atmos
482 string = memalign(64, sizeof(char));
486 $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
492 int main( void ) { return *strptime("", "", 0); }
496 if $cc -o $TMPE $TMPC 2> /dev/null ; then
500 if test "$zlib" = "yes"; then
501 # check for zlib - mmu_man
505 if (zlibVersion() != ZLIB_VERSION)
506 puts("zlib version differs !!!");
511 $cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
512 # $TMPE 2> /dev/null > /dev/null || zlib="no"
513 # XXX: more tests needed - runtime test
515 if test "$zlib" = "yes"; then
516 extralibs="$extralibs -lz"
519 # test for lrintf in math.h
521 #define _ISOC9X_SOURCE 1
523 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
527 if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
529 $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
533 for restrict_keyword in restrict __restrict__ __restrict; do
534 echo "void foo(char * $restrict_keyword p);" > $TMPC
535 if $cc -c -o $TMPO $TMPC 2> /dev/null; then
536 _restrict=$restrict_keyword
541 # test gcc version to see if vector builtins can be used
542 # currently only used on i386 for MMX builtins
545 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
548 #error no vector builtins
554 if $cc -o $TMPO $TMPC 2> /dev/null ; then
558 # dlopen/dlfcn.h probing
562 int main( void ) { return (int) dlopen("foo", 0); }
567 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
572 if $cc -o $TMPE $TMPC 2> /dev/null ; then
579 int main( void ) { return (int) dlopen("foo", 0); }
582 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
586 if $cc -o $TMPE $TMPC 2> /dev/null ; then
591 if test "$vhook" = "default" ; then
595 ##########################################
599 #include <X11/Xlib.h>
601 int main( void ) { return (int) imlib_load_font("foo"); }
605 if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
609 ##########################################
613 #include <ft2build.h>
614 int main( void ) { return (int) FT_Init_FreeType(0); }
618 if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
619 if test "`which freetype-config`" != ""; then
620 if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then
626 ##########################################
631 #undef main /* We don't want SDL to override our main() */
632 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
637 if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` 2> /dev/null ; then
638 _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
639 if test "$_sdlversion" -lt 121 ; then
646 if test "$sdl" = "no" ; then
650 if test "$small" = "yes"; then
651 # CFLAGS=${CFLAGS//-O3/-Os}
655 if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
658 Usage: configure [options]
659 Options: [defaults in brackets after descriptions]
662 echo "Standard options:"
663 echo " --help print this message"
664 echo " --prefix=PREFIX install in PREFIX [$prefix]"
665 echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
666 echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
667 echo " --enable-faad enable faad support via libfaad [default=no]"
668 echo " --enable-faadbin build faad support with runtime linking [default=no]"
669 echo " --enable-win32 enable win32 cross compile"
670 echo " --enable-mingw32 enable mingw32 native windows compile"
671 echo " --disable-a52 disable GPL'ed A52 support [default=no]"
672 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
673 echo " --disable-pp disable GPL'ed post processing support [default=no]"
674 echo " --enable-shared-pp use libpostproc.so [default=no]"
675 echo " --enable-shared build shared libraries [default=no]"
676 echo " --enable-amr_nb enable amr_nb float audio codec"
677 echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
679 echo "Advanced options (experts only):"
680 echo " --source-path=PATH path of source code [$source_path]"
681 echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
682 echo " --cc=CC use C compiler CC [$cc]"
683 echo " --make=MAKE use specified make [$make]"
684 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
685 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
686 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
687 echo " --cpu=CPU force cpu to CPU [$cpu]"
688 echo " --disable-mmx disable mmx usage"
689 echo " --disable-altivec disable AltiVec usage"
690 echo " --disable-audio-oss disable OSS audio support [default=no]"
691 echo " --disable-audio-beos disable BeOS audio support [default=no]"
692 echo " --disable-v4l disable video4linux grabbing [default=no]"
693 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
694 echo " --disable-network disable network support [default=no]"
695 echo " --disable-zlib disable zlib [default=no]"
696 echo " --disable-simple_idct disable simple IDCT routines [default=no]"
697 echo " --disable-vhook disable video hooking support"
698 echo " --enable-gprof enable profiling with gprof [$gprof]"
699 echo " --disable-mpegaudio-hp faster (but less accurate)"
700 echo " mpegaudio decoding [default=no]"
701 echo " --disable-ffserver disable ffserver build"
702 echo " --disable-ffplay disable ffplay build"
703 echo " --disable-risky disables patent encumbered codecs"
704 echo " --enable-small optimize for size instead of speed"
706 echo "NOTE: The object files are build at the place where configure is launched"
710 echo "Install prefix $prefix"
711 echo "Source path $source_path"
712 echo "C compiler $cc"
715 echo "Big Endian $bigendian"
716 if test $cpu = "x86"; then
717 echo "MMX enabled $mmx"
718 echo "Vector Builtins $builtin_vector"
720 if test $cpu = "mips"; then
721 echo "MMI enabled $mmi"
723 if test $cpu = "powerpc"; then
724 echo "AltiVec enabled $altivec"
726 echo "gprof enabled $gprof"
727 echo "zlib enabled $zlib"
728 echo "mp3lame enabled $mp3lame"
729 echo "vorbis enabled $vorbis"
730 echo "faad enabled $faad"
731 echo "faadbin enabled $faadbin"
732 echo "a52 support $a52"
733 echo "a52 dlopened $a52bin"
734 echo "pp support $pp"
735 echo "shared pp $shared_pp"
736 echo "Video hooking $vhook"
737 echo "SDL support $sdl"
738 if test $sdl_too_old = "yes"; then
739 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
741 echo "risky / patent encumbered codecs $risky"
742 echo "optimize for size $small"
744 if test "$vhook" = "yes" ; then
745 echo "Imlib2 support $imlib2"
746 echo "freetype support $freetype2"
748 echo "AMR-NB float support" $amr_nb
749 echo "AMR-NB fixed support" $amr_nb_fixed
751 echo "Creating config.mak and config.h"
753 echo "# Automatically generated by configure - do not modify" > config.mak
754 echo "/* Automatically generated by configure - do not modify */" > $TMPH
756 echo "prefix=$prefix" >> config.mak
757 echo "MAKE=$make" >> config.mak
758 echo "CC=$cc" >> config.mak
759 echo "AR=$ar" >> config.mak
760 echo "RANLIB=$ranlib" >> config.mak
761 echo "STRIP=$strip" >> config.mak
762 echo "OPTFLAGS=$CFLAGS" >> config.mak
763 echo "LDFLAGS=$LDFLAGS" >> config.mak
764 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
765 echo "SHFLAGS=$SHFLAGS" >> config.mak
766 echo "LIBPREF=$LIBPREF" >> config.mak
767 echo "LIBSUF=$LIBSUF" >> config.mak
768 echo "SLIBPREF=$SLIBPREF" >> config.mak
769 echo "SLIBSUF=$SLIBSUF" >> config.mak
770 echo "TARGET_OS=$TARGET_OS" >> config.mak
771 if test "$cpu" = "x86" ; then
772 echo "TARGET_ARCH_X86=yes" >> config.mak
773 echo "#define ARCH_X86 1" >> $TMPH
774 elif test "$cpu" = "armv4l" ; then
775 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
776 echo "#define ARCH_ARMV4L 1" >> $TMPH
777 elif test "$cpu" = "alpha" ; then
778 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
779 echo "#define ARCH_ALPHA 1" >> $TMPH
780 elif test "$cpu" = "sparc64" ; then
781 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
782 echo "#define ARCH_SPARC64 1" >> $TMPH
783 elif test "$cpu" = "powerpc" ; then
784 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
785 echo "#define ARCH_POWERPC 1" >> $TMPH
786 echo "// Enable the next line to get PowerPC performance report" >> $TMPH
787 echo "// #define POWERPC_TBL_PERFORMANCE_REPORT 1" >> $TMPH
788 echo "// Enable the next line to use PMC registers instead of TBL" >> $TMPH
789 echo "// #define POWERPC_PERF_USE_PMC 1" >> $TMPH
790 elif test "$cpu" = "mips" ; then
791 echo "TARGET_ARCH_MIPS=yes" >> config.mak
792 echo "#define ARCH_MIPS 1" >> $TMPH
794 if test "$bigendian" = "yes" ; then
795 echo "WORDS_BIGENDIAN=yes" >> config.mak
796 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
798 if test "$mmx" = "yes" ; then
799 echo "TARGET_MMX=yes" >> config.mak
800 echo "#define HAVE_MMX 1" >> $TMPH
801 echo "#define __CPU__ 586" >> $TMPH
803 if test "$builtin_vector" = "yes" ; then
804 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
805 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
807 if test "$mmi" = "yes" ; then
808 echo "TARGET_MMI=yes" >> config.mak
809 echo "#define HAVE_MMI 1" >> $TMPH
811 if test "$altivec" = "yes" ; then
812 echo "TARGET_ALTIVEC=yes" >> config.mak
813 echo "#define HAVE_ALTIVEC 1" >> $TMPH
814 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
815 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
816 if test "$_altivec_h" = "yes" ; then
817 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
819 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
822 if test "$gprof" = "yes" ; then
823 echo "TARGET_GPROF=yes" >> config.mak
824 echo "#define HAVE_GPROF 1" >> $TMPH
826 if test "$strptime" = "yes" ; then
827 echo "#define HAVE_STRPTIME 1" >> $TMPH
829 echo "BUILD_STRPTIME=yes" >> config.mak
831 if test "$imlib2" = "yes" ; then
832 echo "HAVE_IMLIB2=yes" >> config.mak
834 if test "$freetype2" = "yes" ; then
835 echo "HAVE_FREETYPE2=yes" >> config.mak
837 if test "$sdl" = "yes" ; then
838 echo "CONFIG_SDL=yes" >> config.mak
839 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
840 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
842 if test "$have_lrintf" = "yes" ; then
843 echo "#define HAVE_LRINTF 1" >> $TMPH
845 if test "$vhook" = "yes" ; then
846 echo "BUILD_VHOOK=yes" >> config.mak
847 echo "#define HAVE_VHOOK 1" >> $TMPH
848 extralibs="$extralibs $ldl"
850 if test "$lshared" = "yes" ; then
851 echo "BUILD_SHARED=yes" >> config.mak
852 echo "PIC=-fPIC" >> config.mak
854 echo "EXTRALIBS=$extralibs" >> config.mak
855 echo "VERSION=`head $source_path/VERSION`" >>config.mak
857 # if you do not want to use encoders, disable that.
858 echo "#define CONFIG_ENCODERS 1" >> $TMPH
859 echo "CONFIG_ENCODERS=yes" >> config.mak
861 # if you do not want to use decoders, disable that.
862 echo "#define CONFIG_DECODERS 1" >> $TMPH
863 echo "CONFIG_DECODERS=yes" >> config.mak
866 if test "$a52" = "yes" ; then
867 echo "#define CONFIG_AC3 1" >> $TMPH
868 echo "CONFIG_AC3=yes" >> config.mak
870 if test "$a52bin" = "yes" ; then
871 echo "#define CONFIG_A52BIN 1" >> $TMPH
872 echo "CONFIG_A52BIN=yes" >> config.mak
877 if test "$pp" = "yes" ; then
878 echo "#define CONFIG_PP 1" >> $TMPH
879 echo "CONFIG_PP=yes" >> config.mak
881 if test "$shared_pp" = "yes" ; then
882 echo "#define SHARED_PP 1" >> $TMPH
883 echo "SHARED_PP=yes" >> config.mak
887 # mpeg audio high precision mode
888 if test "$mpegaudio_hp" = "yes" ; then
889 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
892 if test "$v4l" = "yes" ; then
893 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
894 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
897 if test "$dv1394" = "yes" ; then
898 echo "#define CONFIG_DV1394 1" >> $TMPH
899 echo "CONFIG_DV1394=yes" >> config.mak
902 if test "$dlopen" = "yes" ; then
903 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
906 if test "$dlfcn" = "yes" ; then
907 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
910 if test "$audio_oss" = "yes" ; then
911 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
912 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
915 if test "$audio_beos" = "yes" ; then
916 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
917 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
920 if test "$network" = "yes" ; then
921 echo "#define CONFIG_NETWORK 1" >> $TMPH
922 echo "CONFIG_NETWORK=yes" >> config.mak
925 if test "$zlib" = "yes" ; then
926 echo "#define CONFIG_ZLIB 1" >> $TMPH
927 echo "CONFIG_ZLIB=yes" >> config.mak
930 if test "$mp3lame" = "yes" ; then
931 echo "#define CONFIG_MP3LAME 1" >> $TMPH
932 echo "CONFIG_MP3LAME=yes" >> config.mak
935 if test "$vorbis" = "yes" ; then
936 echo "#define CONFIG_VORBIS 1" >> $TMPH
937 echo "CONFIG_VORBIS=yes" >> config.mak
940 if test "$faad" = "yes" ; then
941 echo "#define CONFIG_FAAD 1" >> $TMPH
942 echo "CONFIG_FAAD=yes" >> config.mak
945 if test "$faadbin" = "yes" ; then
946 echo "#define CONFIG_FAADBIN 1" >> $TMPH
947 echo "CONFIG_FAADBIN=yes" >> config.mak
950 if test "$win32" = "yes" ; then
951 echo "#define CONFIG_WIN32 1" >> $TMPH
952 echo "CONFIG_WIN32=yes" >> config.mak
955 if test "$mingw32" = "yes" ; then
956 echo "#define CONFIG_WIN32 1" >> $TMPH
957 echo "CONFIG_WIN32=yes" >> config.mak
958 echo "#define __MINGW32__ 1" >> $TMPH
959 echo "__MINGW32__=1" >> config.mak
962 if test "$cygwin" = "yes" ; then
963 # setup correct exesuffix
964 echo "CONFIG_WIN32=yes" >> config.mak
967 if test "$os2" = "yes" ; then
968 echo "#define CONFIG_OS2 1" >> $TMPH
969 echo "CONFIG_OS2=yes" >> config.mak
972 if test "$TARGET_OS" = "SunOS" ; then
973 echo "#define CONFIG_SUNOS 1" >> $TMPH
976 if test "$darwin" = "yes"; then
977 echo "#define CONFIG_DARWIN 1" >> $TMPH
978 echo "CONFIG_DARWIN=yes" >> config.mak
981 if test "$_malloc_h" = "yes" ; then
982 echo "#define HAVE_MALLOC_H 1" >> $TMPH
984 echo "#undef HAVE_MALLOC_H" >> $TMPH
987 if test "$_memalign" = "yes" ; then
988 echo "#define HAVE_MEMALIGN 1" >> $TMPH
990 echo "#undef HAVE_MEMALIGN" >> $TMPH
993 if test "$netserver" = "yes" ; then
994 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
995 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
998 if test "$need_inet_aton" = "yes" ; then
999 echo "NEED_INET_ATON=yes" >> config.mak
1002 if test "$simpleidct" = "yes" ; then
1003 echo "#define SIMPLE_IDCT 1" >> $TMPH
1006 if test "$ffserver" = "yes" ; then
1007 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1008 echo "CONFIG_FFSERVER=yes" >> config.mak
1011 if test "$ffplay" = "yes" ; then
1012 echo "CONFIG_FFPLAY=yes" >> config.mak
1015 if test "$risky" = "yes" ; then
1016 echo "#define CONFIG_RISKY 1" >> $TMPH
1017 echo "CONFIG_RISKY=yes" >> config.mak
1020 echo "#define restrict $_restrict" >> $TMPH
1022 # build tree in object directory if source path is different from current one
1023 if test "$source_path_used" = "yes" ; then
1024 DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
1025 libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
1026 FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
1027 for dir in $DIRS ; do
1030 for f in $FILES ; do
1031 ln -sf $source_path/$f $f
1034 echo "SRC_PATH=$source_path" >> config.mak
1036 if test "$amr_nb" = "yes" ; then
1037 echo "#define AMR_NB 1" >> $TMPH
1038 echo "AMR_NB=yes" >> config.mak
1040 if test "$amr_nb_fixed" = "yes" ; then
1041 echo "AMR_NB_FIXED=yes" >> config.mak
1042 echo "#define AMR_NB_FIXED 1" >> $TMPH
1043 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1044 echo "REL-5 version 5.1.0 from "
1045 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
1046 echo "and extracted src to libavcodec/amr"
1047 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1048 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1051 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1052 echo "REL-5 V5.1.0 from "
1053 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
1054 echo "and extracted the source to libavcodec/amr_float"
1060 diff $TMPH config.h >/dev/null 2>&1
1061 if test $? -ne 0 ; then
1062 mv -f $TMPH config.h
1064 echo "config.h is unchanged"
1067 rm -f $TMPO $TMPC $TMPE $TMPS $TMPH