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"
384 if test $altivec = "yes"; then
385 echo "WARNING: tuning for PPC75x but altivec enabled !";
389 G4|
74*|ppc74
*|PowerPC74
*)
390 CFLAGS
="$CFLAGS -mcpu=7400"
391 if test $altivec = "no"; then
392 echo "WARNING: tuning for PPC74xx but altivec disabled !";
396 G5|
970|ppc970|PowerPC970|power4
*|Power4
*)
397 CFLAGS
="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc64 -force_cpusubtype_ALL "
398 if test $altivec = "no"; then
399 echo "WARNING: tuning for PPC970 but altivec disabled !";
404 echo "WARNING: unknown CPU "$tune", ignored"
409 # See if we have <altivec.h>
412 int main( void ) { return 0; }
416 if $cc -o
$TMPE $TMPC 2> /dev
/null
; then
420 # See does our compiler support Motorola AltiVec C API
421 if test $altivec = "yes"; then
422 if test $_altivec_h = "yes"; then
426 vector signed int v1, v2, v3;
434 vector signed int v1, v2, v3;
440 if test "$darwin" = "yes"; then
441 $cc -o
$TMPE $TMPC -faltivec
2> /dev
/null || altivec
="no"
443 $cc -o
$TMPE $TMPC -maltivec
-mabi
=altivec
2> /dev
/null || altivec
="no"
447 # Can only do mmi on mips
448 if test $mmi = "default"; then
449 if test $cpu = "mips"; then
456 # See does our compiler support mmi
457 if test $mmi = "yes"; then
460 __asm__ ("lq \$2, 0(\$2)");
464 $cc -o
$TMPE $TMPC 2> /dev
/null || mmi
="no"
467 # Checking for CFLAGS
468 if test -z
"$CFLAGS"; then
472 if test "$win32" = "yes" ; then
473 cross_prefix
="i386-mingw32msvc-"
480 if test "$mingw32" = "yes" ; then
488 cc
="${cross_prefix}${cc}"
489 ar="${cross_prefix}${ar}"
490 ranlib
="${cross_prefix}${ranlib}"
491 strip
="${cross_prefix}${strip}"
493 if test -z
"$cross_prefix" ; then
496 # big/little endian test
498 #include <inttypes.h>
499 int main(int argc, char ** argv){
500 volatile uint32_t i=0x01234567;
501 return (*((uint8_t*)(&i))) == 0x67;
505 if $cc -o
$TMPE $TMPC 2>/dev
/null
; then
506 $TMPE && bigendian
="yes"
508 echo big
/little
test failed
513 # if cross compiling, cannot launch a program, so make a static guess
514 if test "$cpu" = "powerpc" -o
"$cpu" = "mips" ; then
521 # check availability of some header files
525 int main( void ) { return 0; }
530 if $cc -o
$TMPE $TMPC 2> /dev
/null
; then
533 # check for memalign - atmos
538 string = memalign(64, sizeof(char));
542 $cc -o
$TMPE $TMPC 2> /dev
/null || _memalign
=no
548 int main( void ) { return *strptime("", "", 0); }
552 if $cc -o
$TMPE $TMPC 2> /dev
/null
; then
556 if test "$zlib" = "yes"; then
557 # check for zlib - mmu_man
561 if (zlibVersion() != ZLIB_VERSION)
562 puts("zlib version differs !!!");
567 $cc -o
$TMPE $TMPC -lz
2> /dev
/null || zlib
="no"
568 # $TMPE 2> /dev/null > /dev/null || zlib="no"
569 # XXX: more tests needed - runtime test
571 if test "$zlib" = "yes"; then
572 extralibs
="$extralibs -lz"
575 # test for lrintf in math.h
577 #define _ISOC9X_SOURCE 1
579 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
583 if $cc $extralibs -o
$TMPE $TMPC 2> /dev
/null
; then
585 $TMPE 2> /dev
/null
> /dev
/null || have_lrintf
="no"
589 for restrict_keyword
in restrict __restrict__ __restrict
; do
590 echo "void foo(char * $restrict_keyword p);" > $TMPC
591 if $cc -c
-o
$TMPO $TMPC 2> /dev
/null
; then
592 _restrict
=$restrict_keyword
597 # test gcc version to see if vector builtins can be used
598 # currently only used on i386 for MMX builtins
601 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
604 #error no vector builtins
610 if $cc -o
$TMPO $TMPC 2> /dev
/null
; then
614 # dlopen/dlfcn.h probing
618 int main( void ) { return (int) dlopen("foo", 0); }
623 if $cc -o
$TMPE $TMPC -ldl
2> /dev
/null
; then
628 if $cc -o
$TMPE $TMPC 2> /dev
/null
; then
635 int main( void ) { return (int) dlopen("foo", 0); }
638 if $cc -o
$TMPE $TMPC -ldl
2> /dev
/null
; then
642 if $cc -o
$TMPE $TMPC 2> /dev
/null
; then
647 if test "$vhook" = "default" ; then
651 ##########################################
655 #include <X11/Xlib.h>
657 int main( void ) { return (int) imlib_load_font("foo"); }
661 if $cc -o
$TMPE $TMPC -lImlib2
2> /dev
/null
; then
665 ##########################################
669 #include <ft2build.h>
670 int main( void ) { return (int) FT_Init_FreeType(0); }
674 if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
675 if test "`which freetype-config`" != ""; then
676 if $cc -o
$TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` 2> /dev
/null
; then
682 ##########################################
687 #undef main /* We don't want SDL to override our main() */
688 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
693 if $cc -o
$TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` 2> /dev
/null
; then
694 _sdlversion
=`sdl-config --version | sed 's/[^0-9]//g'`
695 if test "$_sdlversion" -lt
121 ; then
702 if test "$sdl" = "no" ; then
706 if test "$small" = "yes"; then
707 # CFLAGS=${CFLAGS//-O3/-Os}
711 if test x
"$1" = x
"-h" -o x
"$1" = x
"--help" ; then
714 Usage: configure [options]
715 Options: [defaults in brackets after descriptions]
718 echo "Standard options:"
719 echo " --help print this message"
720 echo " --prefix=PREFIX install in PREFIX [$prefix]"
721 echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
722 echo " --enable-vorbis enable vorbis support via libvorbisenc [default=no]"
723 echo " --enable-faad enable faad support via libfaad [default=no]"
724 echo " --enable-faadbin build faad support with runtime linking [default=no]"
725 echo " --enable-win32 enable win32 cross compile"
726 echo " --enable-mingw32 enable mingw32 native windows compile"
727 echo " --disable-a52 disable GPL'ed A52 support [default=no]"
728 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
729 echo " --disable-pp disable GPL'ed post processing support [default=no]"
730 echo " --enable-shared-pp use libpostproc.so [default=no]"
731 echo " --enable-shared build shared libraries [default=no]"
732 echo " --enable-amr_nb enable amr_nb float audio codec"
733 echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
735 echo "Advanced options (experts only):"
736 echo " --source-path=PATH path of source code [$source_path]"
737 echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
738 echo " --cc=CC use C compiler CC [$cc]"
739 echo " --make=MAKE use specified make [$make]"
740 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
741 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
742 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
743 echo " --cpu=CPU force cpu to CPU [$cpu]"
744 echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)"
745 echo " --disable-mmx disable mmx usage"
746 echo " --disable-altivec disable AltiVec usage"
747 echo " --disable-audio-oss disable OSS audio support [default=no]"
748 echo " --disable-audio-beos disable BeOS audio support [default=no]"
749 echo " --disable-v4l disable video4linux grabbing [default=no]"
750 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
751 echo " --disable-network disable network support [default=no]"
752 echo " --disable-zlib disable zlib [default=no]"
753 echo " --disable-simple_idct disable simple IDCT routines [default=no]"
754 echo " --disable-vhook disable video hooking support"
755 echo " --enable-gprof enable profiling with gprof [$gprof]"
756 echo " --disable-mpegaudio-hp faster (but less accurate)"
757 echo " mpegaudio decoding [default=no]"
758 echo " --disable-ffserver disable ffserver build"
759 echo " --disable-ffplay disable ffplay build"
760 echo " --disable-risky disables patent encumbered codecs"
761 echo " --enable-small optimize for size instead of speed"
763 echo "NOTE: The object files are build at the place where configure is launched"
767 echo "Install prefix $prefix"
768 echo "Source path $source_path"
769 echo "C compiler $cc"
771 echo "CPU $cpu ($tune)"
772 echo "Big Endian $bigendian"
773 if test $cpu = "x86"; then
774 echo "MMX enabled $mmx"
775 echo "Vector Builtins $builtin_vector"
777 if test $cpu = "mips"; then
778 echo "MMI enabled $mmi"
780 if test $cpu = "powerpc"; then
781 echo "AltiVec enabled $altivec"
783 echo "gprof enabled $gprof"
784 echo "zlib enabled $zlib"
785 echo "mp3lame enabled $mp3lame"
786 echo "vorbis enabled $vorbis"
787 echo "faad enabled $faad"
788 echo "faadbin enabled $faadbin"
789 echo "a52 support $a52"
790 echo "a52 dlopened $a52bin"
791 echo "pp support $pp"
792 echo "shared pp $shared_pp"
793 echo "Video hooking $vhook"
794 echo "SDL support $sdl"
795 if test $sdl_too_old = "yes"; then
796 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
798 echo "risky / patent encumbered codecs $risky"
799 echo "optimize for size $small"
801 if test "$vhook" = "yes" ; then
802 echo "Imlib2 support $imlib2"
803 echo "freetype support $freetype2"
805 echo "AMR-NB float support" $amr_nb
806 echo "AMR-NB fixed support" $amr_nb_fixed
808 echo "Creating config.mak and config.h"
810 echo "# Automatically generated by configure - do not modify" > config.mak
811 echo "/* Automatically generated by configure - do not modify */" > $TMPH
813 echo "prefix=$prefix" >> config.mak
814 echo "MAKE=$make" >> config.mak
815 echo "CC=$cc" >> config.mak
816 echo "AR=$ar" >> config.mak
817 echo "RANLIB=$ranlib" >> config.mak
818 echo "STRIP=$strip" >> config.mak
819 echo "OPTFLAGS=$CFLAGS" >> config.mak
820 echo "LDFLAGS=$LDFLAGS" >> config.mak
821 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
822 echo "SHFLAGS=$SHFLAGS" >> config.mak
823 echo "LIBPREF=$LIBPREF" >> config.mak
824 echo "LIBSUF=$LIBSUF" >> config.mak
825 echo "SLIBPREF=$SLIBPREF" >> config.mak
826 echo "SLIBSUF=$SLIBSUF" >> config.mak
827 echo "TARGET_OS=$TARGET_OS" >> config.mak
828 if test "$cpu" = "x86" ; then
829 echo "TARGET_ARCH_X86=yes" >> config.mak
830 echo "#define ARCH_X86 1" >> $TMPH
831 elif test "$cpu" = "armv4l" ; then
832 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
833 echo "#define ARCH_ARMV4L 1" >> $TMPH
834 elif test "$cpu" = "alpha" ; then
835 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
836 echo "#define ARCH_ALPHA 1" >> $TMPH
837 elif test "$cpu" = "sparc64" ; then
838 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
839 echo "#define ARCH_SPARC64 1" >> $TMPH
840 elif test "$cpu" = "powerpc" ; then
841 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
842 echo "#define ARCH_POWERPC 1" >> $TMPH
843 echo "// Enable the next line to get PowerPC performance report" >> $TMPH
844 echo "// #define POWERPC_TBL_PERFORMANCE_REPORT 1" >> $TMPH
845 echo "// Enable the next line to use PMC registers instead of TBL" >> $TMPH
846 echo "// #define POWERPC_PERF_USE_PMC 1" >> $TMPH
847 elif test "$cpu" = "mips" ; then
848 echo "TARGET_ARCH_MIPS=yes" >> config.mak
849 echo "#define ARCH_MIPS 1" >> $TMPH
851 echo "#define TUNECPU $TUNECPU" >> $TMPH
852 if test "$bigendian" = "yes" ; then
853 echo "WORDS_BIGENDIAN=yes" >> config.mak
854 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
856 if test "$mmx" = "yes" ; then
857 echo "TARGET_MMX=yes" >> config.mak
858 echo "#define HAVE_MMX 1" >> $TMPH
859 echo "#define __CPU__ 586" >> $TMPH
861 if test "$builtin_vector" = "yes" ; then
862 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
863 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
865 if test "$mmi" = "yes" ; then
866 echo "TARGET_MMI=yes" >> config.mak
867 echo "#define HAVE_MMI 1" >> $TMPH
869 if test "$altivec" = "yes" ; then
870 echo "TARGET_ALTIVEC=yes" >> config.mak
871 echo "#define HAVE_ALTIVEC 1" >> $TMPH
872 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
873 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
874 if test "$_altivec_h" = "yes" ; then
875 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
877 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
880 if test "$gprof" = "yes" ; then
881 echo "TARGET_GPROF=yes" >> config.mak
882 echo "#define HAVE_GPROF 1" >> $TMPH
884 if test "$strptime" = "yes" ; then
885 echo "#define HAVE_STRPTIME 1" >> $TMPH
887 echo "BUILD_STRPTIME=yes" >> config.mak
889 if test "$imlib2" = "yes" ; then
890 echo "HAVE_IMLIB2=yes" >> config.mak
892 if test "$freetype2" = "yes" ; then
893 echo "HAVE_FREETYPE2=yes" >> config.mak
895 if test "$sdl" = "yes" ; then
896 echo "CONFIG_SDL=yes" >> config.mak
897 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
898 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
900 if test "$have_lrintf" = "yes" ; then
901 echo "#define HAVE_LRINTF 1" >> $TMPH
903 if test "$vhook" = "yes" ; then
904 echo "BUILD_VHOOK=yes" >> config.mak
905 echo "#define HAVE_VHOOK 1" >> $TMPH
906 extralibs
="$extralibs $ldl"
908 if test "$lshared" = "yes" ; then
909 echo "BUILD_SHARED=yes" >> config.mak
910 echo "PIC=-fPIC" >> config.mak
912 echo "EXTRALIBS=$extralibs" >> config.mak
913 echo "VERSION=`head $source_path/VERSION`" >>config.mak
915 # if you do not want to use encoders, disable that.
916 echo "#define CONFIG_ENCODERS 1" >> $TMPH
917 echo "CONFIG_ENCODERS=yes" >> config.mak
919 # if you do not want to use decoders, disable that.
920 echo "#define CONFIG_DECODERS 1" >> $TMPH
921 echo "CONFIG_DECODERS=yes" >> config.mak
924 if test "$a52" = "yes" ; then
925 echo "#define CONFIG_AC3 1" >> $TMPH
926 echo "CONFIG_AC3=yes" >> config.mak
928 if test "$a52bin" = "yes" ; then
929 echo "#define CONFIG_A52BIN 1" >> $TMPH
930 echo "CONFIG_A52BIN=yes" >> config.mak
935 if test "$pp" = "yes" ; then
936 echo "#define CONFIG_PP 1" >> $TMPH
937 echo "CONFIG_PP=yes" >> config.mak
939 if test "$shared_pp" = "yes" ; then
940 echo "#define SHARED_PP 1" >> $TMPH
941 echo "SHARED_PP=yes" >> config.mak
945 # mpeg audio high precision mode
946 if test "$mpegaudio_hp" = "yes" ; then
947 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
950 if test "$v4l" = "yes" ; then
951 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
952 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
955 if test "$dv1394" = "yes" ; then
956 echo "#define CONFIG_DV1394 1" >> $TMPH
957 echo "CONFIG_DV1394=yes" >> config.mak
960 if test "$dlopen" = "yes" ; then
961 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
964 if test "$dlfcn" = "yes" ; then
965 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
968 if test "$audio_oss" = "yes" ; then
969 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
970 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
973 if test "$audio_beos" = "yes" ; then
974 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
975 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
978 if test "$network" = "yes" ; then
979 echo "#define CONFIG_NETWORK 1" >> $TMPH
980 echo "CONFIG_NETWORK=yes" >> config.mak
983 if test "$zlib" = "yes" ; then
984 echo "#define CONFIG_ZLIB 1" >> $TMPH
985 echo "CONFIG_ZLIB=yes" >> config.mak
988 if test "$mp3lame" = "yes" ; then
989 echo "#define CONFIG_MP3LAME 1" >> $TMPH
990 echo "CONFIG_MP3LAME=yes" >> config.mak
993 if test "$vorbis" = "yes" ; then
994 echo "#define CONFIG_VORBIS 1" >> $TMPH
995 echo "CONFIG_VORBIS=yes" >> config.mak
998 if test "$faad" = "yes" ; then
999 echo "#define CONFIG_FAAD 1" >> $TMPH
1000 echo "CONFIG_FAAD=yes" >> config.mak
1003 if test "$faadbin" = "yes" ; then
1004 echo "#define CONFIG_FAADBIN 1" >> $TMPH
1005 echo "CONFIG_FAADBIN=yes" >> config.mak
1008 if test "$win32" = "yes" ; then
1009 echo "#define CONFIG_WIN32 1" >> $TMPH
1010 echo "CONFIG_WIN32=yes" >> config.mak
1013 if test "$mingw32" = "yes" ; then
1014 echo "#define CONFIG_WIN32 1" >> $TMPH
1015 echo "CONFIG_WIN32=yes" >> config.mak
1016 echo "#define __MINGW32__ 1" >> $TMPH
1017 echo "__MINGW32__=1" >> config.mak
1020 if test "$cygwin" = "yes" ; then
1021 # setup correct exesuffix
1022 echo "CONFIG_WIN32=yes" >> config.mak
1025 if test "$os2" = "yes" ; then
1026 echo "#define CONFIG_OS2 1" >> $TMPH
1027 echo "CONFIG_OS2=yes" >> config.mak
1030 if test "$TARGET_OS" = "SunOS" ; then
1031 echo "#define CONFIG_SUNOS 1" >> $TMPH
1034 if test "$darwin" = "yes"; then
1035 echo "#define CONFIG_DARWIN 1" >> $TMPH
1036 echo "CONFIG_DARWIN=yes" >> config.mak
1039 if test "$_malloc_h" = "yes" ; then
1040 echo "#define HAVE_MALLOC_H 1" >> $TMPH
1042 echo "#undef HAVE_MALLOC_H" >> $TMPH
1045 if test "$_memalign" = "yes" ; then
1046 echo "#define HAVE_MEMALIGN 1" >> $TMPH
1048 echo "#undef HAVE_MEMALIGN" >> $TMPH
1051 if test "$netserver" = "yes" ; then
1052 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1053 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1056 if test "$need_inet_aton" = "yes" ; then
1057 echo "NEED_INET_ATON=yes" >> config.mak
1060 if test "$simpleidct" = "yes" ; then
1061 echo "#define SIMPLE_IDCT 1" >> $TMPH
1064 if test "$ffserver" = "yes" ; then
1065 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1066 echo "CONFIG_FFSERVER=yes" >> config.mak
1069 if test "$ffplay" = "yes" ; then
1070 echo "CONFIG_FFPLAY=yes" >> config.mak
1073 if test "$risky" = "yes" ; then
1074 echo "#define CONFIG_RISKY 1" >> $TMPH
1075 echo "CONFIG_RISKY=yes" >> config.mak
1078 echo "#define restrict $_restrict" >> $TMPH
1080 # build tree in object directory if source path is different from current one
1081 if test "$source_path_used" = "yes" ; then
1082 DIRS
="libavformat libavcodec libavcodec/alpha libavcodec/armv4l libavcodec/i386 \
1083 libavcodec/ppc libavcodec/liba52 libavcodec/mlib libavcodec/libpostproc tests vhook"
1084 FILES
="Makefile libavformat/Makefile libavcodec/Makefile libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile"
1085 for dir
in $DIRS ; do
1088 for f
in $FILES ; do
1089 ln -sf
$source_path/$f $f
1092 echo "SRC_PATH=$source_path" >> config.mak
1094 if test "$amr_nb" = "yes" ; then
1095 echo "#define AMR_NB 1" >> $TMPH
1096 echo "AMR_NB=yes" >> config.mak
1098 if test "$amr_nb_fixed" = "yes" ; then
1099 echo "AMR_NB_FIXED=yes" >> config.mak
1100 echo "#define AMR_NB_FIXED 1" >> $TMPH
1101 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1102 echo "REL-5 version 5.1.0 from "
1103 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-510.zip"
1104 echo "and extracted src to libavcodec/amr"
1105 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1106 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1109 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1110 echo "REL-5 V5.1.0 from "
1111 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-510.zip"
1112 echo "and extracted the source to libavcodec/amr_float"
1118 diff $TMPH config.h
>/dev
/null
2>&1
1119 if test $?
-ne
0 ; then
1120 mv -f
$TMPH config.h
1122 echo "config.h is unchanged"
1125 rm -f
$TMPO $TMPC $TMPE $TMPS $TMPH