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)
42 "Power Macintosh"|ppc)
86 LDFLAGS=-Wl,--warn-common
100 prefix="/boot/home/config"
101 # helps building libavcodec
102 CFLAGS="-O3 -DPIC -fomit-frame-pointer"
103 # 3 gcc releases known for BeOS, each with ugly bugs
104 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f3-)"
105 case "$gcc_version" in
106 2.9-beos-991026*|2.9-beos-000224*) echo "R5/GG gcc"
109 *20010315*) echo "BeBits gcc"
110 CFLAGS="$CFLAGS -fno-expensive-optimizations"
114 # disable linux things
120 # no need for libm, but the inet stuff
122 if (echo $BEINCLUDES|grep 'headers/be/bone' >/dev/null); then
123 extralibs="-lbind -lsocket"
137 extralibs="$extralibs -lsocket -lnsl"
144 LDFLAGS="$LDFLAGS -export-dynamic"
150 extralibs="-lpoll -lgnugetopt -lm"
158 SHFLAGS="-dynamiclib"
163 FFSLDFLAGS=-Wl,-bind_at_load
164 gcc_version="$($cc -v 2>&1 | grep version | cut -d ' ' -f4-)"
165 case "$gcc_version" in
167 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer"
170 CFLAGS="-no-cpp-precomp -pipe -O3 -fomit-frame-pointer -mdynamic-no-pic"
188 test -f /usr/include/inttypes.h || \
189 test -f /usr/local/include/inttypes.h || \
190 echo "Missing inttypes.h, please copy cygwin_inttypes.h to" \
191 "/usr/include/inttypes.h !!!"
194 LDFLAGS="$LDFLAGS -rdynamic"
199 ranlib="echo ignoring ranlib"
200 strip="echo ignoring strip"
202 LDFLAGS="-Zomf -Zstack 16384 -s"
220 # From mplayer configure. We need TARGET_OS available
221 # to the Makefile, so it can distinguish between flavors
222 # of AltiVec on PowerPC
223 TARGET_OS=`( uname -s ) 2>&1`
225 Linux|FreeBSD|NetBSD|BSD/OS|OpenBSD|SunOS|QNX|Darwin|GNU)
233 [cC][yY][gG][wW][iI][nN]*)
237 TARGET_OS="$TARGET_OS-UNKNOWN"
242 # XXX: we assume an absolute path is given when launching configure,
243 # except in './configure' case.
244 source_path="`echo $0 | sed -e 's#/configure##'`"
245 source_path_used="yes"
246 if test -z "$source_path" -o "$source_path" = "." ; then
248 source_path_used="no"
253 --prefix=*) prefix=`echo $opt | cut -d '=' -f 2`
255 --source-path=*) source_path=`echo $opt | cut -d '=' -f 2`
257 --cross-prefix=*) cross_prefix=`echo $opt | cut -d '=' -f 2`
259 --cc=*) cc=`echo $opt | cut -d '=' -f 2`
261 --make=*) make=`echo $opt | cut -d '=' -f 2`
263 --extra-cflags=*) CFLAGS="${opt#--extra-cflags=}"
265 --extra-ldflags=*) LDFLAGS=${opt#--extra-ldflags=}
267 --extra-libs=*) extralibs=${opt#--extra-libs=}
269 --cpu=*) cpu=`echo $opt | cut -d '=' -f 2`
271 --disable-mmx) mmx="no"
273 --disable-altivec) altivec="no"
275 --enable-gprof) gprof="yes"
277 --disable-v4l) v4l="no"
279 --disable-audio-oss) audio_oss="no"
281 --disable-audio-beos) audio_beos="no"
283 --disable-dv1394) dv1394="no"
285 --disable-network) network="no"
287 --disable-zlib) zlib="no"
289 --disable-a52) a52="no"
291 --enable-a52bin) a52bin="yes" ; extralibs="$ldl $extralibs"
293 --disable-pp) pp="no"
295 --enable-shared-pp) shared_pp="yes"
297 --enable-mp3lame) mp3lame="yes"
299 --enable-vorbis) vorbis="yes"
301 --enable-faad) faad="yes"
303 --enable-faadbin) faadbin="yes"
305 --disable-vhook) vhook="no"
307 --disable-simple_idct) simpleidct="no"
309 --enable-win32) win32="yes"
311 --enable-mingw32) mingw32="yes"
313 --enable-shared) lshared="yes"
315 --disable-mpegaudio-hp) mpegaudio_hp="no"
317 --disable-ffserver) ffserver="no"
319 --disable-risky) risky="no"
321 --enable-small) small="yes"
323 --enable-amr_nb) amr_nb="yes"
329 if test $mmx = "default"; then
330 if test $cpu = "x86"; then
337 # Can only do AltiVec on PowerPC
338 if test $altivec = "default"; then
339 if test $cpu = "powerpc"; then
346 # See if we have <altivec.h>
349 int main( void ) { return 0; }
353 if $cc -o $TMPE $TMPC 2> /dev/null ; then
357 # See does our compiler support Motorola AltiVec C API
358 if test $altivec = "yes"; then
359 if test $_altivec_h = "yes"; then
363 vector signed int v1, v2, v3;
371 vector signed int v1, v2, v3;
377 if test "$darwin" = "yes"; then
378 $cc -o $TMPE $TMPC -faltivec 2> /dev/null || altivec="no"
380 $cc -o $TMPE $TMPC -maltivec -mabi=altivec 2> /dev/null || altivec="no"
384 # Can only do mmi on mips
385 if test $mmi = "default"; then
386 if test $cpu = "mips"; then
393 # See does our compiler support mmi
394 if test $mmi = "yes"; then
397 __asm__ ("lq \$2, 0(\$2)");
401 $cc -o $TMPE $TMPC 2> /dev/null || mmi="no"
404 # Checking for CFLAGS
405 if test -z "$CFLAGS"; then
409 if test "$win32" = "yes" ; then
410 cross_prefix="i386-mingw32msvc-"
417 if test "$mingw32" = "yes" ; then
425 cc="${cross_prefix}${cc}"
426 ar="${cross_prefix}${ar}"
427 ranlib="${cross_prefix}${ranlib}"
428 strip="${cross_prefix}${strip}"
430 if test -z "$cross_prefix" ; then
433 # big/little endian test
435 #include <inttypes.h>
436 int main(int argc, char ** argv){
437 volatile uint32_t i=0x01234567;
438 return (*((uint8_t*)(&i))) == 0x67;
442 if $cc -o $TMPE $TMPC 2>/dev/null ; then
443 $TMPE && bigendian="yes"
445 echo big/little test failed
450 # if cross compiling, cannot launch a program, so make a static guess
451 if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
458 # check availability of some header files
462 int main( void ) { return 0; }
467 if $cc -o $TMPE $TMPC 2> /dev/null ; then
470 # check for memalign - atmos
475 string = memalign(64, sizeof(char));
479 $cc -o $TMPE $TMPC 2> /dev/null || _memalign=no
485 int main( void ) { return *strptime("", "", 0); }
489 if $cc -o $TMPE $TMPC 2> /dev/null ; then
493 if test "$zlib" = "yes"; then
494 # check for zlib - mmu_man
498 if (zlibVersion() != ZLIB_VERSION)
499 puts("zlib version differs !!!");
504 $cc -o $TMPE $TMPC -lz 2> /dev/null || zlib="no"
505 # $TMPE 2> /dev/null > /dev/null || zlib="no"
506 # XXX: more tests needed - runtime test
508 if test "$zlib" = "yes"; then
509 extralibs="$extralibs -lz"
512 # test for lrintf in math.h
514 #define _ISOC9X_SOURCE 1
516 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
520 if $cc $extralibs -o $TMPE $TMPC 2> /dev/null ; then
522 $TMPE 2> /dev/null > /dev/null || have_lrintf="no"
526 for restrict_keyword in restrict __restrict__ __restrict; do
527 echo "void foo(char * $restrict_keyword p);" > $TMPC
528 if $cc -c -o $TMPO $TMPC 2> /dev/null; then
529 _restrict=$restrict_keyword
534 # test gcc version to see if vector builtins can be used
535 # currently only used on i386 for MMX builtins
538 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
541 #error no vector builtins
547 if $cc -o $TMPO $TMPC 2> /dev/null ; then
551 # dlopen/dlfcn.h probing
555 int main( void ) { return (int) dlopen("foo", 0); }
560 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
565 if $cc -o $TMPE $TMPC 2> /dev/null ; then
572 int main( void ) { return (int) dlopen("foo", 0); }
575 if $cc -o $TMPE $TMPC -ldl 2> /dev/null ; then
579 if $cc -o $TMPE $TMPC 2> /dev/null ; then
584 if test "$vhook" = "default" ; then
589 #include <X11/Xlib.h>
591 int main( void ) { return (int) imlib_load_font("foo"); }
595 if $cc -o $TMPE $TMPC -lImlib2 2> /dev/null ; then
600 #include <ft2build.h>
601 int main( void ) { return (int) FT_Init_FreeType(0); }
605 if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
606 if test "`which freetype-config`" != ""; then
607 if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev/null ; then
613 if test "$small" = "yes"; then
614 # CFLAGS=${CFLAGS//-O3/-Os}
618 if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
621 Usage: configure [options]
622 Options: [defaults in brackets after descriptions]
625 echo "Standard options:"
626 echo " --help print this message"
627 echo " --prefix=PREFIX install in PREFIX [$prefix]"
628 echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
629 echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
630 echo " --enable-faad enable faad support via libfaad [default=no]"
631 echo " --enable-faadbin build faad support with runtime linking [default=no]"
632 echo " --enable-win32 enable win32 cross compile"
633 echo " --enable-mingw32 enable mingw32 native windows compile"
634 echo " --disable-a52 disable GPL'ed A52 support [default=no]"
635 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
636 echo " --disable-pp disable GPL'ed post processing support [default=no]"
637 echo " --enable-shared-pp use libpostproc.so [default=no]"
638 echo " --enable-shared build shared libraries [default=no]"
639 echo " --enable-amr_nb enable amr_nb audio codec"
641 echo "Advanced options (experts only):"
642 echo " --source-path=PATH path of source code [$source_path]"
643 echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
644 echo " --cc=CC use C compiler CC [$cc]"
645 echo " --make=MAKE use specified make [$make]"
646 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
647 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
648 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
649 echo " --cpu=CPU force cpu to CPU [$cpu]"
650 echo " --disable-mmx disable mmx usage"
651 echo " --disable-altivec disable AltiVec usage"
652 echo " --disable-audio-oss disable OSS audio support [default=no]"
653 echo " --disable-audio-beos disable BeOS audio support [default=no]"
654 echo " --disable-v4l disable video4linux grabbing [default=no]"
655 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
656 echo " --disable-network disable network support [default=no]"
657 echo " --disable-zlib disable zlib [default=no]"
658 echo " --disable-simple_idct disable simple IDCT routines [default=no]"
659 echo " --disable-vhook disable video hooking support"
660 echo " --enable-gprof enable profiling with gprof [$gprof]"
661 echo " --disable-mpegaudio-hp faster (but less accurate)"
662 echo " mpegaudio decoding [default=no]"
663 echo " --disable-ffserver disable ffserver build"
664 echo " --disable-risky disables patent encumbered codecs"
665 echo " --enable-small optimize for size instead of speed"
667 echo "NOTE: The object files are build at the place where configure is launched"
671 echo "Install prefix $prefix"
672 echo "Source path $source_path"
673 echo "C compiler $cc"
676 echo "Big Endian $bigendian"
677 if test $cpu = "x86"; then
678 echo "MMX enabled $mmx"
679 echo "Vector Builtins $builtin_vector"
681 if test $cpu = "mips"; then
682 echo "MMI enabled $mmi"
684 if test $cpu = "powerpc"; then
685 echo "AltiVec enabled $altivec"
687 echo "gprof enabled $gprof"
688 echo "zlib enabled $zlib"
689 echo "mp3lame enabled $mp3lame"
690 echo "vorbis enabled $vorbis"
691 echo "faad enabled $faad"
692 echo "faadbin enabled $faadbin"
693 echo "a52 support $a52"
694 echo "a52 dlopened $a52bin"
695 echo "pp support $pp"
696 echo "shared pp $shared_pp"
697 echo "Video hooking $vhook"
698 echo "risky / patent encumbered codecs $risky"
699 echo "optimize for size $small"
701 if test "$vhook" = "yes" ; then
702 echo "Imlib2 support $imlib2"
703 echo "freetype support $freetype2"
705 echo "AMR-NB support" $amr_nb
707 echo "Creating config.mak and config.h"
709 echo "# Automatically generated by configure - do not modify" > config.mak
710 echo "/* Automatically generated by configure - do not modify */" > $TMPH
712 echo "prefix=$prefix" >> config.mak
713 echo "MAKE=$make" >> config.mak
714 echo "CC=$cc" >> config.mak
715 echo "AR=$ar" >> config.mak
716 echo "RANLIB=$ranlib" >> config.mak
717 echo "STRIP=$strip" >> config.mak
718 echo "OPTFLAGS=$CFLAGS" >> config.mak
719 echo "LDFLAGS=$LDFLAGS" >> config.mak
720 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
721 echo "SHFLAGS=$SHFLAGS" >> config.mak
722 echo "LIBPREF=$LIBPREF" >> config.mak
723 echo "LIBSUF=$LIBSUF" >> config.mak
724 echo "SLIBPREF=$SLIBPREF" >> config.mak
725 echo "SLIBSUF=$SLIBSUF" >> config.mak
726 echo "TARGET_OS=$TARGET_OS" >> config.mak
727 if test "$cpu" = "x86" ; then
728 echo "TARGET_ARCH_X86=yes" >> config.mak
729 echo "#define ARCH_X86 1" >> $TMPH
730 elif test "$cpu" = "armv4l" ; then
731 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
732 echo "#define ARCH_ARMV4L 1" >> $TMPH
733 elif test "$cpu" = "alpha" ; then
734 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
735 echo "#define ARCH_ALPHA 1" >> $TMPH
736 elif test "$cpu" = "sparc64" ; then
737 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
738 echo "#define ARCH_SPARC64 1" >> $TMPH
739 elif test "$cpu" = "powerpc" ; then
740 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
741 echo "#define ARCH_POWERPC 1" >> $TMPH
742 echo "// Enable the next line to get PowerPC performance report" >> $TMPH
743 echo "// #define POWERPC_TBL_PERFORMANCE_REPORT 1" >> $TMPH
744 echo "// Enable the next line to use PMC registers instead of TBL" >> $TMPH
745 echo "// #define POWERPC_PERF_USE_PMC 1" >> $TMPH
746 elif test "$cpu" = "mips" ; then
747 echo "TARGET_ARCH_MIPS=yes" >> config.mak
748 echo "#define ARCH_MIPS 1" >> $TMPH
750 if test "$bigendian" = "yes" ; then
751 echo "WORDS_BIGENDIAN=yes" >> config.mak
752 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
754 if test "$mmx" = "yes" ; then
755 echo "TARGET_MMX=yes" >> config.mak
756 echo "#define HAVE_MMX 1" >> $TMPH
757 echo "#define __CPU__ 586" >> $TMPH
759 if test "$builtin_vector" = "yes" ; then
760 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
761 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
763 if test "$mmi" = "yes" ; then
764 echo "TARGET_MMI=yes" >> config.mak
765 echo "#define HAVE_MMI 1" >> $TMPH
767 if test "$altivec" = "yes" ; then
768 echo "TARGET_ALTIVEC=yes" >> config.mak
769 echo "#define HAVE_ALTIVEC 1" >> $TMPH
770 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
771 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
772 if test "$_altivec_h" = "yes" ; then
773 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
775 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
778 if test "$gprof" = "yes" ; then
779 echo "TARGET_GPROF=yes" >> config.mak
780 echo "#define HAVE_GPROF 1" >> $TMPH
782 if test "$strptime" = "yes" ; then
783 echo "#define HAVE_STRPTIME 1" >> $TMPH
785 echo "BUILD_STRPTIME=yes" >> config.mak
787 if test "$imlib2" = "yes" ; then
788 echo "HAVE_IMLIB2=yes" >> config.mak
790 if test "$freetype2" = "yes" ; then
791 echo "HAVE_FREETYPE2=yes" >> config.mak
793 if test "$have_lrintf" = "yes" ; then
794 echo "#define HAVE_LRINTF 1" >> $TMPH
796 if test "$vhook" = "yes" ; then
797 echo "BUILD_VHOOK=yes" >> config.mak
798 echo "#define HAVE_VHOOK 1" >> $TMPH
799 extralibs="$extralibs $ldl"
801 if test "$lshared" = "yes" ; then
802 echo "BUILD_SHARED=yes" >> config.mak
803 echo "PIC=-fPIC" >> config.mak
805 echo "EXTRALIBS=$extralibs" >> config.mak
806 echo "VERSION=`head $source_path/VERSION`" >>config.mak
808 # if you do not want to use encoders, disable that.
809 echo "#define CONFIG_ENCODERS 1" >> $TMPH
810 echo "CONFIG_ENCODERS=yes" >> config.mak
812 # if you do not want to use decoders, disable that.
813 echo "#define CONFIG_DECODERS 1" >> $TMPH
814 echo "CONFIG_DECODERS=yes" >> config.mak
817 if test "$a52" = "yes" ; then
818 echo "#define CONFIG_AC3 1" >> $TMPH
819 echo "CONFIG_AC3=yes" >> config.mak
821 if test "$a52bin" = "yes" ; then
822 echo "#define CONFIG_A52BIN 1" >> $TMPH
823 echo "CONFIG_A52BIN=yes" >> config.mak
828 if test "$pp" = "yes" ; then
829 echo "#define CONFIG_PP 1" >> $TMPH
830 echo "CONFIG_PP=yes" >> config.mak
832 if test "$shared_pp" = "yes" ; then
833 echo "#define SHARED_PP 1" >> $TMPH
834 echo "SHARED_PP=yes" >> config.mak
838 # mpeg audio high precision mode
839 if test "$mpegaudio_hp" = "yes" ; then
840 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
843 if test "$v4l" = "yes" ; then
844 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
845 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
848 if test "$dv1394" = "yes" ; then
849 echo "#define CONFIG_DV1394 1" >> $TMPH
850 echo "CONFIG_DV1394=yes" >> config.mak
853 if test "$dlopen" = "yes" ; then
854 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
857 if test "$dlfcn" = "yes" ; then
858 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
861 if test "$audio_oss" = "yes" ; then
862 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
863 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
866 if test "$audio_beos" = "yes" ; then
867 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
868 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
871 if test "$network" = "yes" ; then
872 echo "#define CONFIG_NETWORK 1" >> $TMPH
873 echo "CONFIG_NETWORK=yes" >> config.mak
876 if test "$zlib" = "yes" ; then
877 echo "#define CONFIG_ZLIB 1" >> $TMPH
878 echo "CONFIG_ZLIB=yes" >> config.mak
881 if test "$mp3lame" = "yes" ; then
882 echo "#define CONFIG_MP3LAME 1" >> $TMPH
883 echo "CONFIG_MP3LAME=yes" >> config.mak
886 if test "$vorbis" = "yes" ; then
887 echo "#define CONFIG_VORBIS 1" >> $TMPH
888 echo "CONFIG_VORBIS=yes" >> config.mak
891 if test "$faad" = "yes" ; then
892 echo "#define CONFIG_FAAD 1" >> $TMPH
893 echo "CONFIG_FAAD=yes" >> config.mak
896 if test "$faadbin" = "yes" ; then
897 echo "#define CONFIG_FAADBIN 1" >> $TMPH
898 echo "CONFIG_FAADBIN=yes" >> config.mak
901 if test "$win32" = "yes" ; then
902 echo "#define CONFIG_WIN32 1" >> $TMPH
903 echo "CONFIG_WIN32=yes" >> config.mak
906 if test "$mingw32" = "yes" ; then
907 echo "#define CONFIG_WIN32 1" >> $TMPH
908 echo "CONFIG_WIN32=yes" >> config.mak
909 echo "#define __MINGW32__ 1" >> $TMPH
910 echo "__MINGW32__=1" >> config.mak
913 if test "$cygwin" = "yes" ; then
914 # setup correct exesuffix
915 echo "CONFIG_WIN32=yes" >> config.mak
918 if test "$os2" = "yes" ; then
919 echo "#define CONFIG_OS2 1" >> $TMPH
920 echo "CONFIG_OS2=yes" >> config.mak
923 if test "$TARGET_OS" = "SunOS" ; then
924 echo "#define CONFIG_SUNOS 1" >> $TMPH
927 if test "$darwin" = "yes"; then
928 echo "#define CONFIG_DARWIN 1" >> $TMPH
929 echo "CONFIG_DARWIN=yes" >> config.mak
932 if test "$_malloc_h" = "yes" ; then
933 echo "#define HAVE_MALLOC_H 1" >> $TMPH
935 echo "#undef HAVE_MALLOC_H" >> $TMPH
938 if test "$_memalign" = "yes" ; then
939 echo "#define HAVE_MEMALIGN 1" >> $TMPH
941 echo "#undef HAVE_MEMALIGN" >> $TMPH
944 if test "$netserver" = "yes" ; then
945 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
946 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
949 if test "$need_inet_aton" = "yes" ; then
950 echo "NEED_INET_ATON=yes" >> config.mak
953 if test "$simpleidct" = "yes" ; then
954 echo "#define SIMPLE_IDCT 1" >> $TMPH
957 if test "$ffserver" = "yes" ; then
958 echo "#define CONFIG_FFSERVER 1" >> $TMPH
959 echo "CONFIG_FFSERVER=yes" >> config.mak
962 if test "$risky" = "yes" ; then
963 echo "#define CONFIG_RISKY 1" >> $TMPH
964 echo "CONFIG_RISKY=yes" >> config.mak
967 echo "#define restrict $_restrict" >> $TMPH
969 # build tree in object directory if source path is different from current one
970 if test "$source_path_used" = "yes" ; then
971 DIRS="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
972 libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
973 FILES="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
974 for dir in $DIRS ; do
978 ln -sf $source_path/$f $f
981 echo "SRC_PATH=$source_path" >> config.mak
983 if test "$amr_nb" = "yes" ; then
984 echo "#define AMR_NB 1" >> $TMPH
985 echo "AMR_NB=yes" >> config.mak
987 echo "AMR NB NOTICE! Make sure you have downloaded TS26.073 from "
988 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
989 echo "and extracted src to libavcodec/amr"
990 echo "You must also add -DMMS_IO to CFLAGS in libavcodec/amr/makefile."
994 diff $TMPH config.h >/dev/null 2>&1
995 if test $? -ne 0 ; then
998 echo "config.h is unchanged"
1001 rm -f $TMPO $TMPC $TMPE $TMPS $TMPH