3 # ffmpeg configure script (c) 2000, 2001, 2002 Fabrice Bellard
6 # This configure script has been hacked for cinelerra's own purposes!
7 # search for the 'cinelerra' strings to observe these hacks.
9 if test x
"$1" = x
"-h" -o x
"$1" = x
"--help" ; then
12 Usage: configure [options]
13 Options: [defaults in brackets after descriptions]
16 echo "Standard options:"
17 echo " --help print this message"
18 echo " --prefix=PREFIX install in PREFIX [$prefix]"
19 echo " --libdir=DIR install libs in DIR [PREFIX/lib]"
20 echo " --mandir=DIR man documentation in DIR [PREFIX/man]"
21 echo " --enable-mp3lame enable mp3 encoding via libmp3lame [default=no]"
22 echo " --enable-libogg enable ogg support via libogg [default=no]"
23 echo " --enable-vorbis enable vorbis support via libvorbis [default=no]"
24 echo " --enable-theora enable theora support via libtheora [default=no]"
25 echo " --enable-faad enable faad support via libfaad [default=no]"
26 echo " --enable-faadbin build faad support with runtime linking [default=no]"
27 echo " --enable-faac enable faac support via libfaac [default=no]"
28 echo " --enable-libgsm enable gsm support via libgsm [default=no]"
29 echo " --enable-xvid enable xvid support via xvidcore [default=no]"
30 echo " --enable-x264 enable H.264 encoding via x264 [default=no]"
31 echo " --enable-mingw32 enable mingw32 native/cross windows compile"
32 echo " --enable-a52 enable GPL'ed A52 support [default=no]"
33 echo " --enable-a52bin open liba52.so.0 at runtime [default=no]"
34 echo " --enable-dts enable GPL'ed DTS support [default=no]"
35 echo " --enable-pp enable GPL'ed post processing support [default=no]"
36 echo " --enable-shared-pp use libpostproc.so [default=no]"
37 echo " --enable-shared build shared libraries [default=no]"
38 echo " --enable-amr_nb enable amr_nb float audio codec"
39 echo " --enable-amr_nb-fixed use fixed point for amr-nb codec"
40 echo " --enable-amr_wb enable amr_wb float audio codec"
41 echo " --enable-sunmlib use Sun medialib [default=no]"
42 echo " --enable-pthreads use pthreads [default=no]"
43 echo " --enable-dc1394 enable IIDC-1394 grabbing using libdc1394 and libraw1394 [default=no]"
44 echo " --enable-gpl allow use of gpl code, the resulting libav* and ffmpeg will be under gpl [default=no]"
46 echo "Advanced options (experts only):"
47 echo " --source-path=PATH path of source code [$source_path]"
48 echo " --cross-prefix=PREFIX use PREFIX for compile tools [$cross_prefix]"
49 echo " --cc=CC use C compiler CC [$cc]"
50 echo " --make=MAKE use specified make [$make]"
51 echo " --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS [$CFLAGS]"
52 echo " --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS [$LDFLAGS]"
53 echo " --extra-libs=ELIBS add ELIBS [$ELIBS]"
54 echo " --build-suffix=SUFFIX suffix for application specific build []"
55 echo " --cpu=CPU force cpu to CPU [$cpu]"
56 echo " --tune=PROCESSOR tune code for a particular CPU (may fails or misperforms on other CPUs)"
57 echo " --powerpc-perf-enable enable performance report on PPC (requires enabling PMC)"
58 echo " --disable-mmx disable mmx usage"
59 echo " --disable-iwmmxt disable iwmmxt usage"
60 echo " --disable-altivec disable AltiVec usage"
61 echo " --disable-audio-oss disable OSS audio support [default=no]"
62 echo " --disable-audio-beos disable BeOS audio support [default=no]"
63 echo " --disable-v4l disable video4linux grabbing [default=no]"
64 echo " --disable-bktr disable bktr video grabbing [default=no]"
65 echo " --disable-dv1394 disable DV1394 grabbing [default=no]"
66 echo " --disable-network disable network support [default=no]"
67 echo " --disable-zlib disable zlib [default=no]"
68 echo " --disable-simple_idct disable simple IDCT routines [default=no]"
69 echo " --disable-vhook disable video hooking support"
70 echo " --enable-gprof enable profiling with gprof [$gprof]"
71 echo " --disable-debug disable debugging symbols"
72 echo " --disable-opts disable compiler optimizations"
73 echo " --disable-mpegaudio-hp faster (but less accurate)"
74 echo " mpegaudio decoding [default=no]"
75 echo " --disable-ffserver disable ffserver build"
76 echo " --disable-ffplay disable ffplay build"
77 echo " --enable-small optimize for size instead of speed"
78 echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers"
79 echo " --disable-strip disable stripping of executables and shared libraries"
80 echo " --enable-codec=codec enables codec"
81 echo " --disable-codec=codec disables codec"
82 echo " --disable-encoders disables all encoders"
83 echo " --disable-decoders disables all decoders"
85 echo "NOTE: The object files are build at the place where configure is launched"
89 # set temporary file name
90 if test ! -z "$TMPDIR" ; then
92 elif test ! -z "$TEMPDIR" ; then
98 TMPC
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.c"
99 TMPO
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.o"
100 TMPE
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}"
101 TMPS
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.S"
102 TMPH
="${TMPDIR1}/ffmpeg-conf-${RANDOM}-$$-${RANDOM}.h"
123 i386|i486|i586|i686|i86pc|BePC
)
128 canon_arch
="`cc -dumpmachine | sed -e 's,\([^-]*\)-.*,\1,'`"
129 if [ x
"$canon_arch" = x
"x86_64" -o x
"$canon_arch" = x
"amd64" ]; then
130 if [ -z "`echo $CFLAGS | grep -- -m32`" ]; then
135 # armv4l is a subset of armv5tel
142 "Power Macintosh"|ppc
)
207 LDFLAGS
=-Wl,--warn-common
229 prefix
="/boot/home/config"
230 # helps building libavcodec
231 CFLAGS
="-DPIC -fomit-frame-pointer"
232 # 3 gcc releases known for BeOS, each with ugly bugs
233 gcc_version
="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
234 case "$gcc_version" in
235 2.9-beos-991026*|
2.9-beos-000224*) echo "R5/GG gcc"
238 *20010315*) echo "BeBits gcc"
239 CFLAGS
="$CFLAGS -fno-expensive-optimizations"
243 # disable linux things
249 # no need for libm, but the inet stuff
251 if (echo $BEINCLUDES|
grep 'headers/be/bone' >/dev
/null
); then
252 extralibs
="-lbind -lsocket"
266 extralibs
="$extralibs -lsocket -lnsl"
274 LDFLAGS
="$LDFLAGS -export-dynamic"
276 2.
*) extralibs
="-lossaudio"
286 LIBOBJFLAGS
="\$(PIC)"
287 LDFLAGS
="$LDFLAGS -export-dynamic -pthread"
288 LDCONFIG
="ldconfig -m \$(libdir)"
289 extralibs
="$extralibs -lossaudio"
298 LDFLAGS
="$LDFLAGS -export-dynamic -pthread"
305 extralibs
="-lpoll -lgnugetopt -lm"
314 SHFLAGS
="-dynamiclib"
318 LDFLAGS
="-Wl,-d,-search_paths_first"
319 FFSLDFLAGS
=-Wl,-bind_at_load
322 # Note: the rest of the mingw32 config is done afterwards as mingw32
323 # can be forced on command line for linux cross compilation
336 LDFLAGS
="$LDFLAGS -rdynamic"
339 ranlib
="echo ignoring ranlib"
347 ranlib
="echo ignoring ranlib"
348 strip
="echo ignoring strip"
350 LDFLAGS
="-Zomf -Zstack 16384 -s"
351 SHFLAGS
="-Zdll -Zomf"
371 # From mplayer configure. We need TARGET_OS available
372 # to the Makefile, so it can distinguish between flavors
373 # of AltiVec on PowerPC
374 TARGET_OS
=`( uname -s ) 2>&1`
376 Linux|FreeBSD|NetBSD|BSD
/OS|OpenBSD|SunOS|QNX|Darwin|GNU|BeOS
)
384 [cC
][yY
][gG
][wW
][iI
][nN
]*)
388 TARGET_OS
="$TARGET_OS-UNKNOWN"
393 source_path
="`echo $0 | sed -e 's#/configure##'`"
394 source_path_used
="yes"
395 if test -z "$source_path" -o "$source_path" = "." ; then
397 source_path_used
="no"
399 source_path
="`cd \"$source_path\"; pwd`"
402 FFMPEG_CONFIGURATION
=" "
404 FFMPEG_CONFIGURATION
="$FFMPEG_CONFIGURATION""$opt "
407 CODEC_LIST
=`grep 'register_avcodec(&[a-z]' $source_path/libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'`
411 --prefix=*) prefix
=`echo $opt | cut -d '=' -f 2`; force_prefix
=yes
413 --libdir=*) libdir
=`echo $opt | cut -d '=' -f 2`; force_libdir
=yes
415 --mandir=*) mandir
=`echo $opt | cut -d '=' -f 2`
417 --source-path=*) source_path
=`echo $opt | cut -d '=' -f 2`
419 --cross-prefix=*) cross_prefix
=`echo $opt | cut -d '=' -f 2`
421 --cc=*) cc
=`echo $opt | cut -d '=' -f 2-`
423 --make=*) make=`echo $opt | cut -d '=' -f 2`
425 --extra-cflags=*) CFLAGS
="$CFLAGS ${opt#--extra-cflags=}"
427 --extra-ldflags=*) LDFLAGS
="$LDFLAGS ${opt#--extra-ldflags=}"
429 --extra-libs=*) extralibs
=${opt#--extra-libs=}
431 --build-suffix=*) BUILDSUF
=${opt#--build-suffix=}
433 --cpu=*) cpu
=`echo $opt | cut -d '=' -f 2`
435 --tune=*) tune
=`echo $opt | cut -d '=' -f 2`
437 --powerpc-perf-enable) powerpc_perf
="yes"
439 --disable-mmx) mmx
="no"
441 --disable-iwmmxt) iwmmxt
="no"
443 --disable-altivec) altivec
="no"
445 --enable-gprof) gprof
="yes"
447 --disable-v4l) v4l
="no"
449 --disable-bktr) bktr
="no"
451 --disable-audio-oss) audio_oss
="no"
453 --disable-audio-beos) audio_beos
="no"
455 --disable-dv1394) dv1394
="no"
457 --disable-network) network
="no"; ffserver
="no"
459 --disable-zlib) zlib
="no"
461 --enable-a52) a52
="yes"
463 --enable-a52bin) a52bin
="yes" ; extralibs
="$ldl $extralibs"
465 --enable-dts) dts
="yes" ; extralibs
="$extralibs -ldts"
467 --enable-pp) pp
="yes"
469 --enable-shared-pp) shared_pp
="yes"
471 --enable-libgsm) libgsm
="yes"
473 --enable-mp3lame) mp3lame
="yes"
475 --enable-libogg) libogg
="yes"
477 --enable-vorbis) vorbis
="yes"
479 --enable-theora) theora
="yes"
481 --enable-faad) faad
="yes"
483 --enable-faadbin) faadbin
="yes"
485 --enable-faac) faac
="yes"
487 --enable-xvid) xvid
="yes"
489 --enable-x264) x264
="yes"; extralibs
="$extralibs -lx264"
491 --enable-dc1394) dc1394
="yes"
493 --disable-vhook) vhook
="no"
495 --disable-simple_idct) simpleidct
="no"
497 --enable-mingw32) mingw32
="yes"
499 --enable-shared) lshared
="yes"
501 --disable-debug) debug
="no"
503 --disable-opts) optimize
="no"
505 --disable-mpegaudio-hp) mpegaudio_hp
="no"
507 --disable-ffserver) ffserver
="no"
509 --disable-ffplay) ffplay
="no"
511 --enable-small) optimize
="small"
513 --enable-amr_nb) amr_nb
="yes"
515 --enable-amr_nb-fixed) amr_nb_fixed
="yes"
517 --enable-amr_wb) amr_wb
="yes"
519 --enable-amr_if2) amr_if2
="yes"
521 --enable-sunmlib) sunmlib
="yes"
523 --enable-pthreads) pthreads
="yes"
525 --enable-gpl) gpl
="yes"
527 --enable-memalign-hack) memalignhack
="yes"
529 --disable-strip) dostrip
="no"
531 --enable-codec=*) CODEC_LIST
="$CODEC_LIST ${opt#--enable-codec=}"
533 --disable-codec=*) CODEC_LIST
="`echo $CODEC_LIST | sed -e \"s#${opt#--disable-codec=}##\"`"
535 --disable-encoders) CODEC_LIST
="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*encoder//g'`"
537 --disable-decoders) CODEC_LIST
="`echo $CODEC_LIST | sed 's/[-_a-zA-Z0-9]*decoder//g'`"
542 if test "$theora" = "yes" ; then
543 if test "$libogg" = "no"; then
544 echo "libogg must be enabled to enable Theora"
550 if test "$vorbis" = "yes" ; then
551 if test "$libogg" = "no"; then
552 echo "libogg must be enabled to enable Vorbis"
558 if test "$gpl" != "yes"; then
559 if test "$pp" != "no" -o "$shared_pp" != "no"; then
560 echo "The Postprocessing code is under GPL and --enable-gpl is not specified"
564 if test "$a52" != "no" -o "$a52bin" != "no"; then
565 echo "liba52 is under GPL and --enable-gpl is not specified"
569 if test "$xvid" != "no"; then
570 echo "libxvidcore is under GPL and --enable-gpl is not specified"
574 if test "$x264" != "no"; then
575 echo "x264 is under GPL and --enable-gpl is not specified"
579 if test "$dts" != "no"; then
580 echo "libdts is under GPL and --enable-gpl is not specified"
584 if test "$faad" != "no" -o "$faadbin" != "no"; then
587 int main( void ) { return 0; }
590 if $cc $CFLAGS -o $TMPE $TMPC 2> /dev
/null
; then
593 #ifndef FAAD2_VERSION
596 int main( void ) { return 0; }
598 if $cc $CFLAGS -o $TMPE $TMPC 2> /dev
/null
; then
599 echo "faad2 is under GPL and --enable-gpl is not specified"
605 echo "faad test failed"
610 if test "$fail" = "yes"; then
616 if test $mmx = "default"; then
617 if test $cpu = "x86" -o $cpu = "x86_64"; then
624 # check iwmmxt support
625 if test $iwmmxt = "default" -a $cpu = "armv4l"; then
628 __asm__ __volatile__ ("wunpckelub wr6, wr4");
633 if ${cross_prefix}${cc} -o $TMPO $TMPC 2> /dev
/null
; then
639 needmdynamicnopic
="no"
640 if test $targetos = Darwin
; then
641 if test -n "`$cc -v 2>&1 | grep xlc`"; then
642 CFLAGS
="$CFLAGS -qpdf2 -qlanglvl=extc99 -qmaxmem=-1 -qarch=auto -qtune=auto"
644 gcc_version
="`$cc -v 2>&1 | grep version | cut -d ' ' -f3-`"
645 case "$gcc_version" in
647 CFLAGS
="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
650 CFLAGS
="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer -force_cpusubtype_ALL -Wno-sign-compare"
651 if test "$lshared" = no
; then
652 needmdynamicnopic
="yes"
656 CFLAGS
="$CFLAGS -no-cpp-precomp -pipe -fomit-frame-pointer"
657 if test "$lshared" = no
; then
658 needmdynamicnopic
="yes"
665 # Can only do AltiVec on PowerPC
666 if test $altivec = "default"; then
667 if test $cpu = "powerpc"; then
674 # Add processor-specific flags
677 if test $tune != "generic"; then
679 601|ppc601|PowerPC601
)
680 CFLAGS
="$CFLAGS -mcpu=601"
681 if test $altivec = "yes"; then
682 echo "WARNING: tuning for PPC601 but altivec enabled !";
686 603*|ppc603
*|PowerPC603
*)
687 CFLAGS
="$CFLAGS -mcpu=603"
688 if test $altivec = "yes"; then
689 echo "WARNING: tuning for PPC603 but altivec enabled !";
693 604*|ppc604
*|PowerPC604
*)
694 CFLAGS
="$CFLAGS -mcpu=604"
695 if test $altivec = "yes"; then
696 echo "WARNING: tuning for PPC604 but altivec enabled !";
700 G3|g3|
75*|ppc75
*|PowerPC75
*)
701 CFLAGS
="$CFLAGS -mcpu=750 -mtune=750 -mpowerpc-gfxopt"
702 if test $altivec = "yes"; then
703 echo "WARNING: tuning for PPC75x but altivec enabled !";
707 G4|g4|
745*|ppc745
*|PowerPC745
*)
708 CFLAGS
="$CFLAGS -mcpu=7450 -mtune=7450 -mpowerpc-gfxopt"
709 if test $altivec = "no"; then
710 echo "WARNING: tuning for PPC745x but altivec disabled !";
714 74*|ppc74
*|PowerPC74
*)
715 CFLAGS
="$CFLAGS -mcpu=7400 -mtune=7400 -mpowerpc-gfxopt"
716 if test $altivec = "no"; then
717 echo "WARNING: tuning for PPC74xx but altivec disabled !";
721 G5|g5|
970|ppc970|PowerPC970|power4
*|Power4
*)
722 CFLAGS
="$CFLAGS -mcpu=970 -mtune=970 -mpowerpc-gfxopt -mpowerpc64"
723 if test $altivec = "no"; then
724 echo "WARNING: tuning for PPC970 but altivec disabled !";
729 i
[3456]86|pentium|pentiumpro|pentium-mmx|pentium
[234]|prescott|k6|k6-
[23]|athlon|athlon-tbird|athlon-4|athlon-
[mx
]p|winchip-c6|winchip2|c3|nocona
)
730 CFLAGS
="$CFLAGS -march=$tune"
733 echo "WARNING: unknown CPU \"$tune\", ignored"
738 # AltiVec flags: The FSF version of GCC differs from the Apple version
739 if test $cpu = "powerpc"; then
740 if test $altivec = "yes"; then
741 if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
742 CFLAGS
="$CFLAGS -faltivec"
744 CFLAGS
="$CFLAGS -maltivec -mabi=altivec"
749 # See if we have <altivec.h>
752 int main( void ) { return 0; }
756 if $cc $CFLAGS -o $TMPE $TMPC 2> /dev
/null
; then
760 # See does our compiler support Motorola AltiVec C API
761 if test $altivec = "yes"; then
762 if test $_altivec_h = "yes"; then
766 vector signed int v1, v2, v3;
774 vector signed int v1, v2, v3;
780 $cc $CFLAGS -o $TMPE $TMPC 2> /dev
/null || altivec
="no"
783 # Can only do mmi on mips
784 if test $mmi = "default"; then
785 if test $cpu = "mips"; then
792 # See does our compiler support mmi
793 if test $mmi = "yes"; then
796 __asm__ ("lq \$2, 0(\$2)");
800 $cc -o $TMPE $TMPC 2> /dev
/null || mmi
="no"
803 if test "$mingw32" = "yes" ; then
816 if test "$force_prefix" != yes; then prefix
="/c/Program Files/FFmpeg"; fi
817 if test "$force_libdir" != yes; then bindir
="$prefix"; fi
820 cc
="${cross_prefix}${cc}"
821 ar="${cross_prefix}${ar}"
822 ranlib
="${cross_prefix}${ranlib}"
823 strip
="${cross_prefix}${strip}"
825 if test -z "$cross_prefix" ; then
828 # big/little endian test
830 #include <inttypes.h>
831 int main(int argc, char ** argv){
832 volatile uint32_t i=0x01234567;
833 return (*((uint8_t*)(&i))) == 0x67;
837 if $cc -o $TMPE $TMPC 2>/dev
/null
; then
838 $TMPE && bigendian
="yes"
840 echo big
/little
test failed
845 # if cross compiling, cannot launch a program, so make a static guess
846 if test "$cpu" = "powerpc" -o "$cpu" = "mips" ; then
855 #include <inttypes.h>
856 int main(int argc, char ** argv){
861 $cc -o $TMPE $TMPC 2>/dev
/null || inttypes
="no"
866 #include <inttypes.h>
867 int main(int argc, char ** argv){
868 volatile uint_fast64_t i=0x01234567;
873 $cc -o $TMPE $TMPC 2>/dev
/null || emu_fast_int
="yes"
876 # check availability of some header files
880 int main( void ) { return 0; }
885 if $cc -o $TMPE $TMPC 2> /dev
/null
; then
888 # check for memalign - atmos
894 string = memalign(64, sizeof(char));
898 $cc -o $TMPE $TMPC 2> /dev
/null || _memalign
=no
901 if test "$_memalign" = "no" -a "$mmx" = "yes" -a "$memalignhack" != "yes"; then
902 echo "error, no memalign() but sse enabled, either disable it or use --enable-memalign-hack"
908 int main( void ) { localtime_r(NULL, NULL); }
912 if $cc -o $TMPE $TMPC 2> /dev
/null
; then
916 if test "$zlib" = "yes"; then
917 # check for zlib - mmu_man
921 if (zlibVersion() != ZLIB_VERSION)
922 puts("zlib version differs !!!");
927 $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -lz 2> /dev
/null || zlib
="no"
928 # $TMPE 2> /dev/null > /dev/null || zlib="no"
929 # XXX: more tests needed - runtime test
931 if test "$zlib" = "yes"; then
932 extralibs
="$extralibs -lz"
935 # test for lrintf in math.h
937 #define _ISOC9X_SOURCE 1
939 int main( void ) { return (lrintf(3.999f) > 0)?0:1; }
943 if $cc $extralibs -o $TMPE $TMPC 2> /dev
/null
; then
945 # allanc@chickenandporn.com: cannot execute cross-compiled
946 # code on the host. Only execute if not cross-compiling.
947 if test -z "$cross_prefix" ; then
948 $TMPE 2> /dev
/null
> /dev
/null || have_lrintf
="no"
953 for restrict_keyword
in restrict __restrict__ __restrict
; do
954 echo "void foo(char * $restrict_keyword p);" > $TMPC
955 if $cc -c -o $TMPO $TMPC 2> /dev
/null
; then
956 _restrict
=$restrict_keyword
961 # test gcc version to see if vector builtins can be used
962 # currently only used on i386 for MMX builtins
964 #include <xmmintrin.h>
966 #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
969 #error no vector builtins
975 if $cc -msse -o $TMPO $TMPC 2> /dev
/null
; then
979 # dlopen/dlfcn.h probing
983 int main( void ) { return (int) dlopen("foo", 0); }
988 if $cc -o $TMPE $TMPC -ldl > /dev
/null
2>&1 ; then
993 if $cc -o $TMPE $TMPC > /dev
/null
2>&1 ; then
1000 int main( void ) { return (int) dlopen("foo", 0); }
1003 if $cc -o $TMPE $TMPC -ldl > /dev
/null
2>&1 ; then
1007 if $cc -o $TMPE $TMPC > /dev
/null
2>&1 ; then
1012 if test "$vhook" = "default" ; then
1016 ##########################################
1020 #include <X11/Xlib.h>
1022 int main( void ) { return (int) imlib_load_font("foo"); }
1026 if $cc $CFLAGS $LDFLAGS -o $TMPE $TMPC -lImlib2 -lm > /dev
/null
2>&1 ; then
1030 ##########################################
1034 #include <ft2build.h>
1035 int main( void ) { return (int) FT_Init_FreeType(0); }
1039 if test "x$targetos" != "xBeOS" && test "$os2" != "yes"; then
1040 if (freetype-config
--version) >/dev
/null
2>&1 ; then
1041 if $cc -o $TMPE $TMPC `freetype-config --cflags` `freetype-config --libs` > /dev
/null
2>&1 ; then
1047 ##########################################
1052 #undef main /* We don't want SDL to override our main() */
1053 int main( void ) { return SDL_Init (SDL_INIT_VIDEO); }
1058 if (sdl-config
--version) >/dev
/null
2>&1 ; then
1059 if $cc -o $TMPE `sdl-config --cflags` $TMPC `sdl-config --libs` > /dev
/null
2>&1 ; then
1060 _sdlversion
=`sdl-config --version | sed 's/[^0-9]//g'`
1061 if test "$_sdlversion" -lt 121 ; then
1069 ##########################################
1073 if (texi2html
-version) >/dev
/null
2>&1; then
1077 if test "$network" = "yes" ; then
1078 ##########################################
1082 #include <sys/types.h>
1083 #include <sys/socket.h>
1084 #include <netinet/in.h>
1087 struct sockaddr_storage saddr;
1088 struct ipv6_mreq mreq6;
1089 getaddrinfo(0,0,0,0);
1090 getnameinfo(0,0,0,0,0,0,0);
1091 IN6_IS_ADDR_MULTICAST(0);
1096 if $cc -o $TMPE $TMPC > /dev
/null
2>&1 ; then
1101 case "`$cc -v 2>&1 | grep version`" in
1103 CFLAGS
="-Wall -Wno-switch $CFLAGS"
1109 if test "$sdl" = "no" ; then
1113 if test "$debug" = "yes"; then
1117 if test "$optimize" = "small"; then
1118 # CFLAGS=${CFLAGS//-O3/-Os}
1119 CFLAGS
="$CFLAGS -Os"
1122 if test "$optimize" = "yes"; then
1123 if test -n "`$cc -v 2>&1 | grep xlc`"; then
1124 CFLAGS
="$CFLAGS -O5"
1125 LDFLAGS
="$LDFLAGS -O5"
1127 CFLAGS
="-O3 $CFLAGS"
1131 # PIC flags for shared library objects where they are needed
1132 if test "$lshared" = "yes" ; then
1133 # LIBOBJFLAGS may have already been set in the OS configuration
1134 if test -z "$LIBOBJFLAGS" ; then
1135 if test "$cpu" = "x86_64" ; then
1136 LIBOBJFLAGS
="\$(PIC)"
1141 if test x
"$bindir" = x
""; then
1142 bindir
="${prefix}/bin"
1145 if test x
"$libdir" = x
""; then
1146 libdir
="${prefix}/lib"
1149 if test x
"$mandir" = x
""; then
1150 mandir
="${prefix}/man"
1153 echo "Install prefix $prefix"
1154 echo "Source path $source_path"
1155 echo "C compiler $cc"
1157 echo "CPU $cpu ($tune)"
1158 if test "$BUILDSUF" != ""; then
1159 echo "Build suffix $BUILDSUF"
1161 echo "Big Endian $bigendian"
1162 echo "inttypes.h $inttypes"
1163 echo "broken inttypes.h $emu_fast_int"
1164 if test $cpu = "x86" -o $cpu = "x86_64"; then
1165 echo "MMX enabled $mmx"
1166 echo "Vector Builtins $builtin_vector"
1168 if test $cpu = "armv4l"; then
1169 echo "IWMMXT enabled $iwmmxt"
1171 if test $cpu = "mips"; then
1172 echo "MMI enabled $mmi"
1174 if test $cpu = "powerpc"; then
1175 echo "AltiVec enabled $altivec"
1177 echo "gprof enabled $gprof"
1178 echo "zlib enabled $zlib"
1179 echo "libgsm enabled $libgsm"
1180 echo "mp3lame enabled $mp3lame"
1181 echo "libogg enabled $libogg"
1182 echo "vorbis enabled $vorbis"
1183 echo "theora enabled $theora"
1184 echo "faad enabled $faad"
1185 echo "faadbin enabled $faadbin"
1186 echo "faac enabled $faac"
1187 echo "xvid enabled $xvid"
1188 echo "x264 enabled $x264"
1189 echo "a52 support $a52"
1190 echo "a52 dlopened $a52bin"
1191 echo "dts support $dts"
1192 echo "pp support $pp"
1193 echo "debug symbols $debug"
1194 echo "strip symbols $dostrip"
1195 echo "optimize $optimize"
1196 echo "shared pp $shared_pp"
1197 echo "Video hooking $vhook"
1198 echo "SDL support $sdl"
1199 if test $sdl_too_old = "yes"; then
1200 echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
1203 if test "$vhook" = "yes" ; then
1204 echo "Imlib2 support $imlib2"
1205 echo "freetype support $freetype2"
1207 echo "Sun medialib support" $sunmlib
1208 echo "pthreads support" $pthreads
1209 echo "AMR-NB float support" $amr_nb
1210 echo "AMR-NB fixed support" $amr_nb_fixed
1211 echo "AMR-WB float support" $amr_wb
1212 echo "AMR-WB IF2 support" $amr_if2
1213 echo "network support $network"
1214 if test "$network" = "yes" ; then
1215 echo "IPv6 support $ipv6"
1217 if test "$gpl" = "no" ; then
1218 echo "License: LGPL"
1223 # CINELERRA - This script makes avconfig.h directly!
1224 echo "creating avconfig.mak and avconfig.h"
1227 echo " $0 $FFMPEG_CONFIGURATION" >> config.log
1228 echo "# Automatically generated by configure - do not modify" > config.mak
1229 echo "/* Automatically generated by configure - do not modify */" > $TMPH
1230 echo "#define FFMPEG_CONFIGURATION "'"'"$FFMPEG_CONFIGURATION"'"' >> $TMPH
1232 echo "prefix=$prefix" >> config.mak
1233 echo "libdir=$libdir" >> config.mak
1234 echo "bindir=$bindir" >> config.mak
1235 echo "mandir=$mandir" >> config.mak
1236 echo "MAKE=$make" >> config.mak
1237 echo "CC=$cc" >> config.mak
1238 echo "AR=$ar" >> config.mak
1239 echo "RANLIB=$ranlib" >> config.mak
1240 if test "$dostrip" = "yes" ; then
1241 echo "STRIP=$strip" >> config.mak
1242 echo "INSTALLSTRIP=-s" >> config.mak
1244 echo "STRIP=echo ignoring strip" >> config.mak
1245 echo "INSTALLSTRIP=" >> config.mak
1248 # SHCFLAGS is a copy of CFLAGS without -mdynamic-no-pic. Used when building
1249 # shared modules on OS/X (vhook/Makefile).
1251 if test "$needmdynamicnopic" = yes; then
1252 CFLAGS
="$CFLAGS -mdynamic-no-pic"
1255 echo "OPTFLAGS=$CFLAGS" >> config.mak
1256 echo "SHCFLAGS=$SHCFLAGS">>config.mak
1257 echo "LDFLAGS=$LDFLAGS" >> config.mak
1258 echo "LDCONFIG=$LDCONFIG" >> config.mak
1259 echo "FFSLDFLAGS=$FFSLDFLAGS" >> config.mak
1260 echo "SHFLAGS=$SHFLAGS" >> config.mak
1261 echo "LIBOBJFLAGS=$LIBOBJFLAGS" >> config.mak
1262 echo "BUILDSUF=$BUILDSUF" >> config.mak
1263 echo "LIBPREF=$LIBPREF" >> config.mak
1264 echo "LIBSUF=\${BUILDSUF}$LIBSUF" >> config.mak
1265 echo "SLIBPREF=$SLIBPREF" >> config.mak
1266 echo "SLIBSUF=\${BUILDSUF}$SLIBSUF" >> config.mak
1267 echo "EXESUF=\${BUILDSUF}$EXESUF" >> config.mak
1268 echo "TARGET_OS=$TARGET_OS" >> config.mak
1269 if test "$cpu" = "x86" ; then
1270 echo "TARGET_ARCH_X86=yes" >> config.mak
1271 echo "#define ARCH_X86 1" >> $TMPH
1272 elif test "$cpu" = "x86_64" ; then
1273 echo "TARGET_ARCH_X86_64=yes" >> config.mak
1274 echo "#define ARCH_X86_64 1" >> $TMPH
1275 elif test "$cpu" = "armv4l" ; then
1276 echo "TARGET_ARCH_ARMV4L=yes" >> config.mak
1277 echo "#define ARCH_ARMV4L 1" >> $TMPH
1278 elif test "$cpu" = "alpha" ; then
1279 echo "TARGET_ARCH_ALPHA=yes" >> config.mak
1280 echo "#define ARCH_ALPHA 1" >> $TMPH
1281 elif test "$cpu" = "sparc64" ; then
1282 echo "TARGET_ARCH_SPARC64=yes" >> config.mak
1283 echo "#define ARCH_SPARC64 1" >> $TMPH
1284 echo "TARGET_ARCH_SPARC=yes" >> config.mak
1285 echo "#define ARCH_SPARC 1" >> $TMPH
1286 elif test "$cpu" = "sparc" ; then
1287 echo "TARGET_ARCH_SPARC=yes" >> config.mak
1288 echo "#define ARCH_SPARC 1" >> $TMPH
1289 elif test "$cpu" = "powerpc" ; then
1290 echo "TARGET_ARCH_POWERPC=yes" >> config.mak
1291 echo "#define ARCH_POWERPC 1" >> $TMPH
1292 if test $POWERPCMODE = "32bits"; then
1293 echo "#define POWERPC_MODE_32BITS 1" >> $TMPH
1295 echo "#define POWERPC_MODE_64BITS 1" >> $TMPH
1297 if test "$powerpc_perf" = "yes"; then
1298 echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
1300 elif test "$cpu" = "mips" ; then
1301 echo "TARGET_ARCH_MIPS=yes" >> config.mak
1302 echo "#define ARCH_MIPS 1" >> $TMPH
1303 elif test "$cpu" = "sh4" ; then
1304 echo "TARGET_ARCH_SH4=yes" >> config.mak
1305 echo "#define ARCH_SH4 1" >> $TMPH
1307 echo "#define TUNECPU $TUNECPU" >> $TMPH
1308 if test "$bigendian" = "yes" ; then
1309 echo "WORDS_BIGENDIAN=yes" >> config.mak
1310 echo "#define WORDS_BIGENDIAN 1" >> $TMPH
1312 if test "$inttypes" != "yes" ; then
1313 echo "#define EMULATE_INTTYPES 1" >> $TMPH
1315 if test "$emu_fast_int" = "yes" ; then
1316 echo "#define EMULATE_FAST_INT 1" >> $TMPH
1318 if test "$mmx" = "yes" ; then
1319 echo "TARGET_MMX=yes" >> config.mak
1320 echo "#define HAVE_MMX 1" >> $TMPH
1321 echo "#define __CPU__ 586" >> $TMPH
1323 if test "$builtin_vector" = "yes" ; then
1324 echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
1325 echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
1327 if test "$iwmmxt" = "yes" ; then
1328 echo "TARGET_IWMMXT=yes" >> config.mak
1329 echo "#define HAVE_IWMMXT 1" >> $TMPH
1331 if test "$mmi" = "yes" ; then
1332 echo "TARGET_MMI=yes" >> config.mak
1333 echo "#define HAVE_MMI 1" >> $TMPH
1335 if test "$altivec" = "yes" ; then
1336 echo "TARGET_ALTIVEC=yes" >> config.mak
1337 echo "#define HAVE_ALTIVEC 1" >> $TMPH
1338 echo "// Enable the next line to use the reference C code instead of AltiVec" >> $TMPH
1339 echo "// #define ALTIVEC_USE_REFERENCE_C_CODE 1" >> $TMPH
1340 if test "$_altivec_h" = "yes" ; then
1341 echo "#define HAVE_ALTIVEC_H 1" >> $TMPH
1343 echo "#undef HAVE_ALTIVEC_H" >> $TMPH
1346 if test "$gprof" = "yes" ; then
1347 echo "TARGET_GPROF=yes" >> config.mak
1348 echo "#define HAVE_GPROF 1" >> $TMPH
1350 if test "$localtime_r" = "yes" ; then
1351 echo "#define HAVE_LOCALTIME_R 1" >> $TMPH
1353 if test "$imlib2" = "yes" ; then
1354 echo "HAVE_IMLIB2=yes" >> config.mak
1356 if test "$freetype2" = "yes" ; then
1357 echo "HAVE_FREETYPE2=yes" >> config.mak
1359 if test "$sunmlib" = "yes" ; then
1360 echo "HAVE_MLIB=yes" >> config.mak
1361 echo "#define HAVE_MLIB 1" >> $TMPH
1362 extralibs
="$extralibs -lmlib"
1364 if test "$pthreads" = "yes" ; then
1365 echo "HAVE_PTHREADS=yes" >> config.mak
1366 echo "#define HAVE_PTHREADS 1" >> $TMPH
1367 echo "#define HAVE_THREADS 1" >> $TMPH
1368 if test $targetos != FreeBSD
-a $targetos != OpenBSD
; then
1369 extralibs
="$extralibs -lpthread"
1372 if test "$sdl" = "yes" ; then
1373 echo "CONFIG_SDL=yes" >> config.mak
1374 echo "SDL_LIBS=`sdl-config --libs`" >> config.mak
1375 echo "SDL_CFLAGS=`sdl-config --cflags`" >> config.mak
1377 if test "$texi2html" = "yes"; then
1378 echo "BUILD_DOC=yes" >> config.mak
1380 if test "$have_lrintf" = "yes" ; then
1381 echo "#define HAVE_LRINTF 1" >> $TMPH
1383 if test "$vhook" = "yes" ; then
1384 echo "BUILD_VHOOK=yes" >> config.mak
1385 echo "#define HAVE_VHOOK 1" >> $TMPH
1386 extralibs
="$extralibs $ldl"
1388 if test "$lshared" = "yes" ; then
1389 echo "BUILD_SHARED=yes" >> config.mak
1390 echo "PIC=-fPIC -DPIC" >> config.mak
1392 echo "EXTRALIBS=$extralibs" >> config.mak
1393 version
=`grep '#define FFMPEG_VERSION ' "$source_path/libavcodec/avcodec.h" |
1395 echo "VERSION=$version" >>config.mak
1396 # if you do not want to use encoders, disable that.
1397 echo "#define CONFIG_ENCODERS 1" >> $TMPH
1398 echo "CONFIG_ENCODERS=yes" >> config.mak
1400 # if you do not want to use decoders, disable that.
1401 echo "#define CONFIG_DECODERS 1" >> $TMPH
1402 echo "CONFIG_DECODERS=yes" >> config.mak
1405 if test "$a52" = "yes" ; then
1406 echo "#define CONFIG_AC3 1" >> $TMPH
1407 echo "CONFIG_AC3=yes" >> config.mak
1409 if test "$a52bin" = "yes" ; then
1410 echo "#define CONFIG_A52BIN 1" >> $TMPH
1411 echo "CONFIG_A52BIN=yes" >> config.mak
1416 if test "$dts" = "yes" ; then
1417 echo "#define CONFIG_DTS 1" >> $TMPH
1418 echo "CONFIG_DTS=yes" >> config.mak
1422 if test "$pp" = "yes" ; then
1423 echo "#define CONFIG_PP 1" >> $TMPH
1424 echo "CONFIG_PP=yes" >> config.mak
1426 if test "$shared_pp" = "yes" ; then
1427 echo "#define SHARED_PP 1" >> $TMPH
1428 echo "SHARED_PP=yes" >> config.mak
1432 # mpeg audio high precision mode
1433 if test "$mpegaudio_hp" = "yes" ; then
1434 echo "#define CONFIG_MPEGAUDIO_HP 1" >> $TMPH
1437 if test "$v4l" = "yes" ; then
1438 echo "#define CONFIG_VIDEO4LINUX 1" >> $TMPH
1439 echo "CONFIG_VIDEO4LINUX=yes" >> config.mak
1442 if test "$bktr" = "yes" ; then
1443 echo "#define CONFIG_BKTR 1" >> $TMPH
1444 echo "CONFIG_BKTR=yes" >> config.mak
1447 if test "$dv1394" = "yes" ; then
1448 echo "#define CONFIG_DV1394 1" >> $TMPH
1449 echo "CONFIG_DV1394=yes" >> config.mak
1452 if test "$dc1394" = "yes" ; then
1453 echo "#define CONFIG_DC1394 1" >> $TMPH
1454 echo "CONFIG_DC1394=yes" >> config.mak
1457 if test "$dlopen" = "yes" ; then
1458 echo "#define CONFIG_HAVE_DLOPEN 1" >> $TMPH
1461 if test "$dlfcn" = "yes" ; then
1462 echo "#define CONFIG_HAVE_DLFCN 1" >> $TMPH
1465 if test "$audio_oss" = "yes" ; then
1466 echo "#define CONFIG_AUDIO_OSS 1" >> $TMPH
1467 echo "CONFIG_AUDIO_OSS=yes" >> config.mak
1470 if test "$audio_beos" = "yes" ; then
1471 echo "#define CONFIG_AUDIO_BEOS 1" >> $TMPH
1472 echo "CONFIG_AUDIO_BEOS=yes" >> config.mak
1475 if test "$network" = "yes" ; then
1476 echo "#define CONFIG_NETWORK 1" >> $TMPH
1477 echo "CONFIG_NETWORK=yes" >> config.mak
1480 if test "$ipv6" = "yes" ; then
1481 echo "#define CONFIG_IPV6 1" >> $TMPH
1484 if test "$zlib" = "yes" ; then
1485 echo "#define CONFIG_ZLIB 1" >> $TMPH
1486 echo "CONFIG_ZLIB=yes" >> config.mak
1489 if test "$libgsm" = "yes" ; then
1490 echo "#define CONFIG_LIBGSM 1" >> $TMPH
1491 echo "CONFIG_LIBGSM=yes" >> config.mak
1494 if test "$mp3lame" = "yes" ; then
1495 echo "#define CONFIG_MP3LAME 1" >> $TMPH
1496 echo "CONFIG_MP3LAME=yes" >> config.mak
1499 if test "$libogg" = "yes" ; then
1500 echo "#define CONFIG_LIBOGG 1" >> $TMPH
1501 echo "CONFIG_LIBOGG=yes" >> config.mak
1504 if test "$vorbis" = "yes" ; then
1505 echo "#define CONFIG_LIBVORBIS 1" >> $TMPH
1506 echo "CONFIG_LIBVORBIS=yes" >> config.mak
1509 if test "$theora" = "yes" ; then
1510 echo "#define CONFIG_LIBTHEORA 1" >> $TMPH
1511 echo "CONFIG_LIBTHEORA=yes" >> config.mak
1514 if test "$faad" = "yes" ; then
1515 echo "#define CONFIG_FAAD 1" >> $TMPH
1516 echo "CONFIG_FAAD=yes" >> config.mak
1519 if test "$faadbin" = "yes" ; then
1520 echo "#define CONFIG_FAADBIN 1" >> $TMPH
1521 echo "CONFIG_FAADBIN=yes" >> config.mak
1524 if test "$faac" = "yes" ; then
1525 echo "#define CONFIG_FAAC 1" >> $TMPH
1526 echo "CONFIG_FAAC=yes" >> config.mak
1529 if test "$xvid" = "yes" ; then
1530 echo "#define CONFIG_XVID 1" >> $TMPH
1531 echo "CONFIG_XVID=yes" >> config.mak
1534 if test "$x264" = "yes" ; then
1535 echo "#define CONFIG_X264 1" >> $TMPH
1536 echo "CONFIG_X264=yes" >> config.mak
1539 if test "$mingw32" = "yes" ; then
1540 echo "#define CONFIG_WIN32 1" >> $TMPH
1541 echo "CONFIG_WIN32=yes" >> config.mak
1542 echo "HAVE_W32THREADS=yes" >> config.mak
1543 echo "#define HAVE_W32THREADS 1" >> $TMPH
1544 echo "#define HAVE_THREADS 1" >> $TMPH
1545 echo "#ifndef __MINGW32__" >> $TMPH
1546 echo "#define __MINGW32__ 1" >> $TMPH
1547 echo "#endif" >> $TMPH
1550 if test "$os2" = "yes" ; then
1551 echo "#define CONFIG_OS2 1" >> $TMPH
1552 echo "CONFIG_OS2=yes" >> config.mak
1555 if test "$TARGET_OS" = "SunOS" ; then
1556 echo "#define CONFIG_SUNOS 1" >> $TMPH
1559 if test "$TARGET_OS" = "BeOS" ; then
1560 echo "HAVE_BEOSTHREADS=yes" >> config.mak
1561 echo "#define HAVE_BEOSTHREADS 1" >> $TMPH
1562 echo "#define HAVE_THREADS 1" >> $TMPH
1565 if test "$darwin" = "yes"; then
1566 echo "#define CONFIG_DARWIN 1" >> $TMPH
1567 echo "CONFIG_DARWIN=yes" >> config.mak
1570 if test "$_malloc_h" = "yes" ; then
1571 echo "#define HAVE_MALLOC_H 1" >> $TMPH
1573 echo "#undef HAVE_MALLOC_H" >> $TMPH
1576 if test "$_memalign" = "yes" ; then
1577 echo "#define HAVE_MEMALIGN 1" >> $TMPH
1579 echo "#undef HAVE_MEMALIGN" >> $TMPH
1582 if test "$memalignhack" = "yes" ; then
1583 echo "#define MEMALIGN_HACK 1" >> $TMPH
1587 if test "$netserver" = "yes" ; then
1588 echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
1589 echo "CONFIG_BEOS_NETSERVER=yes" >> config.mak
1592 if test "$need_inet_aton" = "yes" ; then
1593 echo "NEED_INET_ATON=yes" >> config.mak
1596 if test "$simpleidct" = "yes" ; then
1597 echo "#define SIMPLE_IDCT 1" >> $TMPH
1600 if test "$ffserver" = "yes" ; then
1601 echo "#define CONFIG_FFSERVER 1" >> $TMPH
1602 echo "CONFIG_FFSERVER=yes" >> config.mak
1605 if test "$ffplay" = "yes" ; then
1606 echo "CONFIG_FFPLAY=yes" >> config.mak
1609 if test "$gpl" = "yes" ; then
1610 echo "#define CONFIG_GPL 1" >> $TMPH
1611 echo "CONFIG_GPL=yes" >> config.mak
1614 echo "#define restrict $_restrict" >> $TMPH
1616 if test "$optimize" = "small"; then
1617 echo "#define always_inline" >> $TMPH
1620 # build tree in object directory if source path is different from current one
1621 if test "$source_path_used" = "yes" ; then
1622 DIRS
="doc libavformat libavcodec libavcodec/alpha libavcodec/armv4l \
1623 libavcodec/i386 libavcodec/sparc libavcodec/mlib \
1624 libavcodec/ppc libavcodec/liba52 libavcodec/libpostproc tests vhook"
1625 FILES
="Makefile libavformat/Makefile libavcodec/Makefile \
1626 libavcodec/libpostproc/Makefile tests/Makefile vhook/Makefile \
1627 doc/Makefile doc/texi2pod.pl"
1628 # CINELERRA - commented to avoid creating directories...
1629 # for dir in $DIRS ; do
1632 # for f in $FILES ; do
1633 # ln -sf "$source_path/$f" $f
1635 echo "SRC_PATH=$source_path" >> config.mak
1637 echo "SRC_PATH='$source_path'" >> config.mak
1640 if test "$amr_wb" = "yes" ; then
1641 echo "#define AMR_WB 1" >> $TMPH
1642 echo "AMR_WB=yes" >> config.mak
1644 echo "AMR WB FLOAT NOTICE ! Make sure you have downloaded TS26.204"
1646 echo "http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-510.zip"
1647 echo "and extracted the source to libavcodec/amrwb_float"
1651 if test "$amr_nb" = "yes" ; then
1652 echo "#define AMR_NB 1" >> $TMPH
1653 echo "AMR_NB=yes" >> config.mak
1655 if test "$amr_nb_fixed" = "yes" ; then
1656 echo "AMR_NB_FIXED=yes" >> config.mak
1657 echo "#define AMR_NB_FIXED 1" >> $TMPH
1658 echo "AMR NB FIXED POINT NOTICE! Make sure you have downloaded TS26.073 "
1659 echo "REL-5 version 5.1.0 from "
1660 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26073-5??.zip"
1661 echo "and extracted src to libavcodec/amr"
1662 echo "You must also add -DMMS_IO and remove -pedantic-errors to/from CFLAGS in libavcodec/amr/makefile."
1663 echo "i.e. CFLAGS = -Wall -I. \$(CFLAGS_\$(MODE)) -D\$(VAD) -DMMS_IO"
1666 echo "AMR NB FLOAT NOTICE ! Make sure you have downloaded TS26.104"
1667 echo "REL-5 V5.1.0 from "
1668 echo "http://www.3gpp.org/ftp/Specs/latest/Rel-5/26_series/26104-5??.zip"
1669 echo "and extracted the source to libavcodec/amr_float"
1670 echo "and if u try this on an alpha, u may need to change Word32 to int in amr/typedef.h"
1674 if test "$amr_if2" = "yes" ; then
1675 echo "AMR_CFLAGS=-DIF2=1" >> config.mak
1680 for codec
in $CODEC_LIST ; do
1681 echo "#define CONFIG_`echo $codec | tr a-z A-Z` 1" >> $TMPH
1682 echo "CONFIG_`echo $codec | tr a-z A-Z`=yes" >> config.mak
1685 # CINELERRA - This script makes avconfig.h directly!
1686 diff $TMPH avconfig.h
>/dev
/null
2>&1
1687 if test $?
-ne 0 ; then
1688 mv -f $TMPH avconfig.h
1690 echo "avconfig.h is unchanged"
1693 rm -f $TMPO $TMPC $TMPE $TMPS $TMPH
1696 # build pkg-config files libavcodec.pc, libavformat.pc and libpostproc.pc
1698 lavc_build
=`grep '#define LIBAVCODEC_BUILD' "$source_path/libavcodec/avcodec.h" | sed 's/[^0-9]//g'`
1699 # CINELERRA: libavformat directory not actually in the Cinelerra repo
1700 #lavf_build=`grep '#define LIBAVFORMAT_BUILD' "$source_path/libavformat/avformat.h" | sed 's/[^0-9]//g'`
1703 test "$libogg" = "yes" && requires
="$requires ogg >= 1.1"
1704 test "$vorbis" = "yes" && requires
="$requires vorbis"
1705 test "$theora" = "yes" && requires
="$requires theora"
1708 # BEGIN COMMENTING OUT THE .pc FILES
1709 if test 1 -eq 0 ; then
1712 cat <<EOF >libavcodec.pc
1714 exec_prefix=\${prefix}
1715 libdir=\${exec_prefix}/lib
1716 includedir=\${prefix}/include
1719 Description: FFmpeg codec library
1720 Version: $version-$lavc_build
1723 Libs: -L\${libdir} -lavcodec $extralibs
1724 Cflags: -I\${includedir} -I\${includedir}/ffmpeg
1727 cat <<EOF >libavcodec-uninstalled.pc
1730 libdir=\${pcfiledir}/libavcodec
1731 includedir=\${pcfiledir}/libavcodec
1734 Description: FFmpeg codec library
1735 Version: $version-$lavc_build
1738 Libs: \${libdir}/${LIBPREF}avcodec${LIBSUF} $extralibs
1739 Cflags: -I\${includedir}
1743 cat <<EOF >libavformat.pc
1745 exec_prefix=\${prefix}
1746 libdir=\${exec_prefix}/lib
1747 includedir=\${prefix}/include
1750 Description: FFmpeg container format library
1751 Version: $version-$lavf_build
1752 Requires: $requires libavcodec = $version-$lavc_build
1754 Libs: -L\${libdir} -lavformat $extralibs
1755 Cflags: -I\${includedir} -I\${includedir}/ffmpeg
1758 cat <<EOF >libavformat-uninstalled.pc
1761 libdir=\${pcfiledir}/libavformat
1762 includedir=\${pcfiledir}/libavformat
1765 Description: FFmpeg container format library
1766 Version: $version-$lavf_build
1767 Requires: $requires libavcodec = $version-$lavc_build
1769 Libs: \${libdir}/${LIBPREF}avformat${LIBSUF} $extralibs
1770 Cflags: -I\${includedir}
1775 cat <<EOF >libpostproc.pc
1777 exec_prefix=\${prefix}
1778 libdir=\${exec_prefix}/lib
1779 includedir=\${prefix}/include
1782 Description: FFmpeg post processing library
1786 Libs: -L\${libdir} -lpostproc
1787 Cflags: -I\${includedir} -I\${includedir}/postproc
1790 cat <<EOF >libpostproc-uninstalled.pc
1793 libdir=\${pcfiledir}/libavcodec/libpostproc
1794 includedir=\${pcfiledir}/libavcodec/libpostproc
1797 Description: FFmpeg post processing library
1801 Libs: \${libdir}/${LIBPREF}postproc${LIBSUF}
1802 Cflags: -I\${includedir}
1806 # END COMMENTING OUT THE .pc FILES