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)
90 LDFLAGS=-Wl,--warn-common
105 prefix="/boot/home/config"
106 # helps building libavcodec
107 CFLAGS="-O3 -DPIC -fomit-frame-pointer"
108 # 3 gcc releases known for BeOS, each with ugly bugs
109 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
110 case "$gcc_version" in
111 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
114 *20010315*) echo "BeBits gcc"
115 CFLAGS="$CFLAGS -fno-expensive-optimizations"
119 # disable linux things
125 # no need for libm, but the inet stuff
127 if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
128 extralibs="-lbind -lsocket"
142 extralibs="$extralibs -lsocket -lnsl"
149 LDFLAGS="$LDFLAGS -export-dynamic"
155 extralibs="-lpoll -lgnugetopt -lm"
164 SHFLAGS="-dynamiclib"
169 FFSLDFLAGS=-Wl,-bind_at_load
170 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f4-)"
171 case "$gcc_version" in
173 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer"
176 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic"
194 test -f /usr/include/inttypes.h || \
195 test -f /usr/local/include/inttypes.h || \
196 echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
197 "/usr/include/inttypes.h !!!"
200 LDFLAGS="$LDFLAGS -rdynamic"
205 ranlib="echo ignoring ranlib"
206 strip="echo ignoring strip"
208 LDFLAGS="-Zomf -Zstack 16384 -s"
226 # From mplayer configure. We need TARGET_OS available
227 # to the Makefile, so it can distinguish between flavors
228 # of AltiVec on PowerPC
229 TARGET_OS=`( uname -s ) 2>&1`
231 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
239 [cC][yY][gG][wW][iI][nN]*)
243 TARGET_OS="$TARGET_OS-UNKNOWN"
248 # XXX: we assume an absolute path is given when launching configure,
249 # except in './configure' case.
250 source_path="`echo $0 | sed -e 's#/configure##'`"
251 source_path_used="yes"
252 if test -z "$source_path" -o "$source_path" = "." ; then
254 source_path_used="no"
259 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
261 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
263 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
265 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
267 --make=*) make=`echo $opt | cut -d '=' -f 2`
269 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
271 --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
273 --extra-libs=*) extralibs=${opt#--extra-libs=}
275 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
277 --tune=*) tune=`echo $opt | cut -d '=' -f 2`
279 --powerpc-perf-enable) powerpc_perf="yes"
281 --disable-mmx) mmx="no"
283 --disable-altivec) altivec="no"
285 --enable-gprof) gprof="yes"
287 --disable-v4l) v4l="no"
289 --disable-audio-oss) audio_oss="no"
291 --disable-audio-beos) audio_beos="no"
293 --disable-dv1394) dv1394="no"
295 --disable-network) network="no"
297 --disable-zlib) zlib="no"
299 --disable-a52) a52="no"
301 --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
303 --disable-pp) pp="no"
305 --enable-shared-pp) shared_pp="yes"
307 --enable-mp3lame) mp3lame="yes"
309 --enable-vorbis) vorbis="yes"
311 --enable-faad) faad="yes"
313 --enable-faadbin) faadbin="yes"
315 --disable-vhook) vhook="no"
317 --disable-simple_idct) simpleidct="no"
319 --enable-win32) win32="yes"
321 --enable-mingw32) mingw32="yes"
323 --enable-shared) lshared="yes"
325 --disable-mpegaudio-hp) mpegaudio_hp="no"
327 --disable-ffserver) ffserver="no"
329 --disable-ffplay) ffplay="no"
331 --disable-risky) risky="no"
333 --enable-small) small="yes"
335 --enable-amr_nb) amr_nb="yes"
337 --enable-amr_nb-fixed) amr_nb_fixed="yes"
343 if test $mmx = "default"; then
344 if test $cpu = "x86"; then
351 # Can only do AltiVec on PowerPC
352 if test $altivec = "default"; then
353 if test $cpu = "powerpc"; then
360 # Add processor-specific flags
362 if test $tune != "generic"; then
364 601|ppc601|PowerPC601)
365 CFLAGS="$CFLAGS -mcpu=601"
366 if test $altivec = "yes"; then
367 echo "WARNING: tuning for PPC601 but altivec enabled !";
371 603*|ppc603*|PowerPC603*)
372 CFLAGS="$CFLAGS -mcpu=603"
373 if test $altivec = "yes"; then
374 echo "WARNING: tuning for PPC603 but altivec enabled !";
378 604*|ppc604*|PowerPC604*)
379 CFLAGS="$CFLAGS -mcpu=604"
380 if test $altivec = "yes"; then
381 echo "WARNING: tuning for PPC604 but altivec enabled !";
385 G3|75*|ppc75*|PowerPC75*)
386 CFLAGS="$CFLAGS -mcpu=750 -mtune=750"
387 if test $altivec = "yes"; then
388 echo "WARNING: tuning for PPC75x but altivec enabled !";
392 G4|745*|ppc745*|PowerPC745*)
393 CFLAGS="$CFLAGS -mcpu=7450 -mtune=7450"
394 if test $altivec = "no"; then
395 echo "WARNING: tuning for PPC745x but altivec disabled !";
399 74*|ppc74*|PowerPC74*)
400 CFLAGS="$CFLAGS -mcpu=7400 -mtune=7400"
401 if test $altivec = "no"; then
402 echo "WARNING: tuning for PPC74xx but altivec disabled !";
406 G5|970|ppc970|PowerPC970|power4*|Power4*)
407 CFLAGS="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc64 -force_cpusubtype_ALL "
408 if test $altivec = "no"; then
409 echo "WARNING: tuning for PPC970 but altivec disabled !";
414 echo "WARNING: unknown CPU "$tune", ignored"
419 # See if we have <altivec.h>
422 int main( void ) { return 0; }
426 if $cc -o $TMPE $TMPC 2> /dev/null ; then
430 # See does our compiler support Motorola AltiVec C API
431 if test $altivec = "yes"; then
432 if test $_altivec_h = "yes"; then
436 vector signed int v1, v2, v3;
444 vector signed int v1, v2, v3;
450 if test "$darwin" = "yes"; then
451 $cc -o $TMPE $TMPC -faltivec 2> /dev/null || altivec="no"
453 $cc -o $TMPE $TMPC -maltivec -mabi=altivec 2> /dev/null || altivec="no"
457 # Can only do mmi on mips
458 if test $mmi = "default"; then
459 if test $cpu = "mips"; then
466 # See does our compiler support mmi
467 if test $mmi = "yes"; then
470 __asm__ ("lq \$2, 0(\$2)");
474 $cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
477 # Checking for CFLAGS
478 if test -z "$CFLAGS"; then
482 if test "$win32" = "yes" ; then
483 cross_prefix="i386-mingw32msvc-"
490 if test "$mingw32" = "yes" ; then
498 cc="${cross_prefix}${cc}"
499 ar="${cross_prefix}${ar}"
500 ranlib="${cross_prefix}${ranlib}"
501 strip="${cross_prefix}${strip}"
503 if test -z "$cross_prefix" ; then
506 # big/little endian test
508 #include <inttypes.h>
509 int main(int argc, char ** argv){
510 volatile uint32_t i=0x01234567;
511 return (*((uint8_t*)(&i))) == 0x67;
515 if $cc -o $TMPE $TMPC 2>/dev/null ; then
516 $TMPE && bigendian="yes"
518 echo big/little test failed
523 # if cross compiling, cannot launch a program, so make a static guess
524 if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
531 # check availability of some header files
535 int main( void ) { return 0; }
540 if $cc -o $TMPE $TMPC 2> /dev/null ; then
543 # check for memalign - atmos
548 string = memalign(64, sizeof(char));
552 $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
558 int main( void ) { return *strptime("", "", 0); }
562 if $cc -o $TMPE $TMPC 2> /dev/null ; then
566 if test "$zlib" = "yes"; then
567 # check for zlib - mmu_man
571 if (zlibVersion() != ZLIB_VERSION)
572 puts("zlib version differs !!!");
577 $cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
578 # $TMPE 2> /dev/null > /dev/null || zlib="no"
579 # XXX: more tests needed - runtime test
581 if test "$zlib" = "yes"; then
582 extralibs="$extralibs -lz"
585 # test for lrintf in math.h
587 #define _ISOC9X_SOURCE 1
589 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
593 if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
595 $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
599 for restrict_keyword in restrict __restrict__ __restrict; do
600 echo "void foo(char * $restrict_keyword p);" > $TMPC
601 if $cc -c -o $TMPO $TMPC 2> /dev/null; then
602 _restrict=$restrict_keyword
607 # test gcc version to see if vector builtins can be used
608 # currently only used on i386 for MMX builtins
611 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
614 #error no vector builtins
620 if $cc -o $TMPO $TMPC 2> /dev/null ; then
624 # dlopen/dlfcn.h probing
628 int main( void ) { return (int) dlopen("foo", 0); }
633 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
638 if $cc -o $TMPE $TMPC 2> /dev/null ; then
645 int main( void ) { return (int) dlopen("foo", 0); }
648 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
652 if $cc -o $TMPE $TMPC 2> /dev/null ; then
657 if test "$vhook" = "default" ; then
661 ##########################################
665 #include <X11/Xlib.h>
667 int main( void ) { return (int) imlib_load_font("foo"); }
671 if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
675 ##########################################
679 #include <ft2build.h>
680 int main( void ) { return (int) FT_Init_FreeType(0); }
684 if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
685 if test "`which freetype-config`" != ""; then
686 if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then
692 ##########################################
697 #undef main /* We don't want SDL to override our main() */
698 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
703 if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` 2> /dev/null ; then
704 _sdlversion=`sdl-config --version | sed 's/[^0-9]//g'`
705 if test "$_sdlversion" -lt 121 ; then
712 if test "$sdl" = "no" ; then
716 if test "$small" = "yes"; then
717 # CFLAGS=${CFLAGS//-O3/-Os}
721 if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
724 Usage: configure [options]
725 Options: [defaults in brackets after descriptions]
728 echo "Standard options:"
729 echo " --help print this message"
730 echo " --prefix=PREFIX install in PREFIX [$prefix]"
731 echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
732 echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
733 echo " --enable-faad enable faad support via libfaad [default=no]"
734 echo " --enable-faadbin build faad support with runtime linking [default=no]"
735 echo " --enable-win32 enable win32 cross compile"
736 echo " --enable-mingw32 enable mingw32 native windows compile"
737 echo " --disable-a52 disable GPL'ed A52 support [default=no]"
738 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
739 echo " --disable-pp disable GPL'ed post processing support [default=no]"
740 echo " --enable-shared-pp use libpostproc.so [default=no]"
741 echo " --enable-shared build shared libraries [default=no]"
742 echo " --enable-amr_nb enable amr_nb float audio codec"
743 echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
745 echo "Advanced options (experts only):"
746 echo " --source-path=PATH path of source code [$source_path]"
747 echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
748 echo " --cc=CC use C compiler CC [$cc]"
749 echo " --make=MAKE use specified make [$make]"
750 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
751 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
752 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
753 echo " --cpu=CPU force cpu to CPU [$cpu]"
754 echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)"
755 echo " --powerpc-perf-enable enable performance report on PPC (requires enabling PMC)"
756 echo " --disable-mmx disable mmx usage"
757 echo " --disable-altivec disable AltiVec usage"
758 echo " --disable-audio-oss disable OSS audio support [default=no]"
759 echo " --disable-audio-beos disable BeOS audio support [default=no]"
760 echo " --disable-v4l disable video4linux grabbing [default=no]"
761 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
762 echo " --disable-network disable network support [default=no]"
763 echo " --disable-zlib disable zlib [default=no]"
764 echo " --disable-simple_idct disable simple IDCT routines [default=no]"
765 echo " --disable-vhook disable video hooking support"
766 echo " --enable-gprof enable profiling with gprof [$gprof]"
767 echo " --disable-mpegaudio-hp faster (but less accurate)"
768 echo " mpegaudio decoding [default=no]"
769 echo " --disable-ffserver disable ffserver build"
770 echo " --disable-ffplay disable ffplay build"
771 echo " --disable-risky disables patent encumbered codecs"
772 echo " --enable-small optimize for size instead of speed"
774 echo "NOTE: The object files are build at the place where configure is launched"
778 echo "Install prefix $prefix"
779 echo "Source path $source_path"
780 echo "C compiler $cc"
782 echo "CPU $cpu ($tune)"
783 echo "Big Endian $bigendian"
784 if test $cpu = "x86"; then
785 echo "MMX enabled $mmx"
786 echo "Vector Builtins $builtin_vector"
788 if test $cpu = "mips"; then
789 echo "MMI enabled $mmi"
791 if test $cpu = "powerpc"; then
792 echo "AltiVec enabled $altivec"
794 echo "gprof enabled $gprof"
795 echo "zlib enabled $zlib"
796 echo "mp3lame enabled $mp3lame"
797 echo "vorbis enabled $vorbis"
798 echo "faad enabled $faad"
799 echo "faadbin enabled $faadbin"
800 echo "a52 support $a52"
801 echo "a52 dlopened $a52bin"
802 echo "pp support $pp"
803 echo "shared pp $shared_pp"
804 echo "Video hooking $vhook"
805 echo "SDL support $sdl"
806 if test $sdl_too_old = "yes"; then
807 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
809 echo "risky / patent encumbered codecs $risky"
810 echo "optimize for size $small"
812 if test "$vhook" = "yes" ; then
813 echo "Imlib2 support $imlib2"
814 echo "freetype support $freetype2"
816 echo "AMR-NB float support" $amr_nb
817 echo "AMR-NB fixed support" $amr_nb_fixed
819 echo "Creating config.mak and config.h"
821 echo "# Automatically generated by configure - do not modify" > config.mak
822 echo "/* Automatically generated by configure - do not modify */" > $TMPH
824 echo "prefix=$prefix" >> config.mak
825 echo "MAKE=$make" >> config.mak
826 echo "CC=$cc" >> config.mak
827 echo "AR=$ar" >> config.mak
828 echo "RANLIB=$ranlib" >> config.mak
829 echo "STRIP=$strip" >> config.mak
830 echo "OPTFLAGS=$CFLAGS" >> config.mak
831 echo "LDFLAGS=$LDFLAGS" >> config.mak
832 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
833 echo "SHFLAGS=$SHFLAGS" >> config.mak
834 echo "LIBPREF=$LIBPREF" >> config.mak
835 echo "LIBSUF=$LIBSUF" >> config.mak
836 echo "SLIBPREF=$SLIBPREF" >> config.mak
837 echo "SLIBSUF=$SLIBSUF" >> config.mak
838 echo "TARGET_OS=$TARGET_OS" >> config.mak
839 if test "$cpu" = "x86" ; then
840 echo "TARGET_ARCH_X86=yes" >> config.mak
841 echo "#define ARCH_X86 1" >> $TMPH
842 elif test "$cpu" = "armv4l" ; then
843 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
844 echo "#define ARCH_ARMV4L 1" >> $TMPH
845 elif test "$cpu" = "alpha" ; then
846 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
847 echo "#define ARCH_ALPHA 1" >> $TMPH
848 elif test "$cpu" = "sparc64" ; then
849 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
850 echo "#define ARCH_SPARC64 1" >> $TMPH
851 elif test "$cpu" = "powerpc" ; then
852 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
853 echo "#define ARCH_POWERPC 1" >> $TMPH
854 if test "$powerpc_perf" = "yes"; then
855 echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
857 elif test "$cpu" = "mips" ; then
858 echo "TARGET_ARCH_MIPS=yes" >> config.mak
859 echo "#define ARCH_MIPS 1" >> $TMPH
861 echo "#define TUNECPU $TUNECPU" >> $TMPH
862 if test "$bigendian" = "yes" ; then
863 echo "WORDS_BIGENDIAN=yes" >> config.mak
864 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
866 if test "$mmx" = "yes" ; then
867 echo "TARGET_MMX=yes" >> config.mak
868 echo "#define HAVE_MMX 1" >> $TMPH
869 echo "#define __CPU__ 586" >> $TMPH
871 if test "$builtin_vector" = "yes" ; then
872 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
873 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
875 if test "$mmi" = "yes" ; then
876 echo "TARGET_MMI=yes" >> config.mak
877 echo "#define HAVE_MMI 1" >> $TMPH
879 if test "$altivec" = "yes" ; then
880 echo "TARGET_ALTIVEC=yes" >> config.mak
881 echo "#define HAVE_ALTIVEC 1" >> $TMPH
882 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
883 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
884 if test "$_altivec_h" = "yes" ; then
885 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
887 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
890 if test "$gprof" = "yes" ; then
891 echo "TARGET_GPROF=yes" >> config.mak
892 echo "#define HAVE_GPROF 1" >> $TMPH
894 if test "$strptime" = "yes" ; then
895 echo "#define HAVE_STRPTIME 1" >> $TMPH
897 echo "BUILD_STRPTIME=yes" >> config.mak
899 if test "$imlib2" = "yes" ; then
900 echo "HAVE_IMLIB2=yes" >> config.mak
902 if test "$freetype2" = "yes" ; then
903 echo "HAVE_FREETYPE2=yes" >> config.mak
905 if test "$sdl" = "yes" ; then
906 echo "CONFIG_SDL=yes" >> config.mak
907 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
908 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
910 if test "$have_lrintf" = "yes" ; then
911 echo "#define HAVE_LRINTF 1" >> $TMPH
913 if test "$vhook" = "yes" ; then
914 echo "BUILD_VHOOK=yes" >> config.mak
915 echo "#define HAVE_VHOOK 1" >> $TMPH
916 extralibs="$extralibs $ldl"
918 if test "$lshared" = "yes" ; then
919 echo "BUILD_SHARED=yes" >> config.mak
920 echo "PIC=-fPIC" >> config.mak
922 echo "EXTRALIBS=$extralibs" >> config.mak
923 echo "VERSION=`head $source_path/VERSION`" >>config.mak
925 # if you do not want to use encoders, disable that.
926 echo "#define CONFIG_ENCODERS 1" >> $TMPH
927 echo "CONFIG_ENCODERS=yes" >> config.mak
929 # if you do not want to use decoders, disable that.
930 echo "#define CONFIG_DECODERS 1" >> $TMPH
931 echo "CONFIG_DECODERS=yes" >> config.mak
934 if test "$a52" = "yes" ; then
935 echo "#define CONFIG_AC3 1" >> $TMPH
936 echo "CONFIG_AC3=yes" >> config.mak
938 if test "$a52bin" = "yes" ; then
939 echo "#define CONFIG_A52BIN 1" >> $TMPH
940 echo "CONFIG_A52BIN=yes" >> config.mak
945 if test "$pp" = "yes" ; then
946 echo "#define CONFIG_PP 1" >> $TMPH
947 echo "CONFIG_PP=yes" >> config.mak
949 if test "$shared_pp" = "yes" ; then
950 echo "#define SHARED_PP 1" >> $TMPH
951 echo "SHARED_PP=yes" >> config.mak
955 # mpeg audio high precision mode
956 if test "$mpegaudio_hp" = "yes" ; then
957 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
960 if test "$v4l" = "yes" ; then
961 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
962 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
965 if test "$dv1394" = "yes" ; then
966 echo "#define CONFIG_DV1394 1" >> $TMPH
967 echo "CONFIG_DV1394=yes" >> config.mak
970 if test "$dlopen" = "yes" ; then
971 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
974 if test "$dlfcn" = "yes" ; then
975 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
978 if test "$audio_oss" = "yes" ; then
979 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
980 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
983 if test "$audio_beos" = "yes" ; then
984 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
985 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
988 if test "$network" = "yes" ; then
989 echo "#define CONFIG_NETWORK 1" >> $TMPH
990 echo "CONFIG_NETWORK=yes" >> config.mak
993 if test "$zlib" = "yes" ; then
994 echo "#define CONFIG_ZLIB 1" >> $TMPH
995 echo "CONFIG_ZLIB=yes" >> config.mak
998 if test "$mp3lame" = "yes" ; then
999 echo "#define CONFIG_MP3LAME 1" >> $TMPH
1000 echo "CONFIG_MP3LAME=yes" >> config.mak
1003 if test "$vorbis" = "yes" ; then
1004 echo "#define CONFIG_VORBIS 1" >> $TMPH
1005 echo "CONFIG_VORBIS=yes" >> config.mak
1008 if test "$faad" = "yes" ; then
1009 echo "#define CONFIG_FAAD 1" >> $TMPH
1010 echo "CONFIG_FAAD=yes" >> config.mak
1013 if test "$faadbin" = "yes" ; then
1014 echo "#define CONFIG_FAADBIN 1" >> $TMPH
1015 echo "CONFIG_FAADBIN=yes" >> config.mak
1018 if test "$win32" = "yes" ; then
1019 echo "#define CONFIG_WIN32 1" >> $TMPH
1020 echo "CONFIG_WIN32=yes" >> config.mak
1023 if test "$mingw32" = "yes" ; then
1024 echo "#define CONFIG_WIN32 1" >> $TMPH
1025 echo "CONFIG_WIN32=yes" >> config.mak
1026 echo "#define __MINGW32__ 1" >> $TMPH
1027 echo "__MINGW32__=1" >> config.mak
1030 if test "$cygwin" = "yes" ; then
1031 # setup correct exesuffix
1032 echo "CONFIG_WIN32=yes" >> config.mak
1035 if test "$os2" = "yes" ; then
1036 echo "#define CONFIG_OS2 1" >> $TMPH
1037 echo "CONFIG_OS2=yes" >> config.mak
1040 if test "$TARGET_OS" = "SunOS" ; then
1041 echo "#define CONFIG_SUNOS 1" >> $TMPH
1044 if test "$darwin" = "yes"; then
1045 echo "#define CONFIG_DARWIN 1" >> $TMPH
1046 echo "CONFIG_DARWIN=yes" >> config.mak
1049 if test "$_malloc_h" = "yes" ; then
1050 echo "#define HAVE_MALLOC_H 1" >> $TMPH
1052 echo "#undef HAVE_MALLOC_H" >> $TMPH
1055 if test "$_memalign" = "yes" ; then
1056 echo "#define HAVE_MEMALIGN 1" >> $TMPH
1058 echo "#undef HAVE_MEMALIGN" >> $TMPH
1061 if test "$netserver" = "yes" ; then
1062 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1063 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1066 if test "$need_inet_aton" = "yes" ; then
1067 echo "NEED_INET_ATON=yes" >> config.mak
1070 if test "$simpleidct" = "yes" ; then
1071 echo "#define SIMPLE_IDCT 1" >> $TMPH
1074 if test "$ffserver" = "yes" ; then
1075 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1076 echo "CONFIG_FFSERVER=yes" >> config.mak
1079 if test "$ffplay" = "yes" ; then
1080 echo "CONFIG_FFPLAY=yes" >> config.mak
1083 if test "$risky" = "yes" ; then
1084 echo "#define CONFIG_RISKY 1" >> $TMPH
1085 echo "CONFIG_RISKY=yes" >> config.mak
1088 echo "#define restrict $_restrict" >> $TMPH
1090 # build tree in object directory if source path is different from current one
1091 if test "$source_path_used" = "yes" ; then
1092 DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
1093 libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
1094 FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
1095 for dir in $DIRS ; do
1098 for f in $FILES ; do
1099 ln -sf $source_path/$f $f
1102 echo "SRC_PATH=$source_path" >> config.mak
1104 if test "$amr_nb" = "yes" ; then
1105 echo "#define AMR_NB 1" >> $TMPH
1106 echo "AMR_NB=yes" >> config.mak
1108 if test "$amr_nb_fixed" = "yes" ; then
1109 echo "AMR_NB_FIXED=yes" >> config.mak
1110 echo "#define AMR_NB_FIXED 1" >> $TMPH
1111 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1112 echo "REL-5 version 5.1.0 from "
1113 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
1114 echo "and extracted src to libavcodec/amr"
1115 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1116 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1119 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1120 echo "REL-5 V5.1.0 from "
1121 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
1122 echo "and extracted the source to libavcodec/amr_float"
1128 diff $TMPH config.h >/dev/null 2>&1
1129 if test $? -ne 0 ; then
1130 mv -f $TMPH config.h
1132 echo "config.h is unchanged"
1135 rm -f $TMPO $TMPC $TMPE $TMPS $TMPH