#!/bin/sh # The simplest configure for codecs . ../functions log(){ echo "$@" >>"$TMPLOG" } log_file(){ log BEGIN $1 cat -n $1 >>"$TMPLOG" log END $1 } echolog(){ log "$@" echo "$@" } # "tr '[a-z]' '[A-Z]'" is a workaround for Solaris tr not grokking "tr a-z A-Z" toupper(){ echo "$@" | tr '[a-z]' '[A-Z]' } tolower(){ echo "$@" | tr '[A-Z]' '[a-z]' } set_all(){ value=$1 shift for var in $*; do eval $var=$value done } pushvar(){ for var in $*; do eval level=\${${var}_level:=0} eval ${var}_${level}="\$$var" eval ${var}_level=$(($level+1)) done } popvar(){ for var in $*; do eval level=\${${var}_level:-0} test $level = 0 && continue eval level=$(($level-1)) eval $var="\${${var}_${level}}" eval ${var}_level=$level eval unset ${var}_${level} done } enable(){ set_all yes $* } disable(){ set_all no $* } enabled(){ eval test "x\$$1" = "xyes" } disabled(){ eval test "x\$$1" = "xno" } enabled_all(){ for opt; do enabled $opt || return 1 done } disabled_all(){ for opt; do disabled $opt || return 1 done } enabled_any(){ for opt; do enabled $opt && return 0 done } disabled_any(){ for opt; do disabled $opt && return 0 done } check_deps(){ for cfg; do enabled ${cfg}_checking && die "Circular dependency for $cfg." disabled ${cfg}_checking && continue enable ${cfg}_checking eval dep_all="\$${cfg}_deps" eval dep_any="\$${cfg}_deps_any" pushvar cfg dep_all dep_any check_deps $dep_all $dep_any popvar cfg dep_all dep_any enabled_all $dep_all || disable $cfg enabled_any $dep_any || disable $cfg disable ${cfg}_checking done } print_config(){ pfx=$1 header=$2 makefile=$3 shift 3 for cfg; do if enabled $cfg; then ucname="${pfx}`toupper $cfg`" echo "#define ${ucname} 1" >> $header echo "${ucname}=yes" >> $makefile fi done } flags_saved(){ (: ${SAVE_CFLAGS?}) 2>/dev/null } save_flags(){ flags_saved && return SAVE_CFLAGS="$CFLAGS" SAVE_LDFLAGS="$LDFLAGS" SAVE_extralibs="$extralibs" } restore_flags(){ flags_saved || return CFLAGS="$SAVE_CFLAGS" LDFLAGS="$SAVE_LDFLAGS" extralibs="$SAVE_extralibs" unset SAVE_CFLAGS unset SAVE_LDFLAGS unset SAVE_extralibs } temp_cflags(){ save_flags CFLAGS="$CFLAGS $*" } temp_ldflags(){ save_flags LDFLAGS="$LDFLAGS $*" } temp_extralibs(){ save_flags extralibs="$extralibs $*" } append(){ var=$1 shift flags_saved && eval "SAVE_$var=\"\$SAVE_$var $*\"" eval "$var=\"\$$var $*\"" } add_cflags(){ append CFLAGS "$@" } add_ldflags(){ append LDFLAGS "$@" } add_extralibs(){ append extralibs "$@" } check_cmd(){ log "$@" "$@" >>"$TMPLOG" 2>&1 } check_cc(){ log check_cc "$@" cat >$TMPC log_file $TMPC check_cmd $_cc $CFLAGS "$@" -c -o $TMPO $TMPC } check_cpp(){ log check_cpp "$@" cat >$TMPC log_file $TMPC check_cmd $_cc $CFLAGS "$@" -E -o $TMPO $TMPC } check_ld(){ log check_ld "$@" check_cc || return check_cmd $_cc $LDFLAGS "$@" -o $TMPE $TMPO $extralibs } check_cflags(){ log check_cflags "$@" check_cc "$@" < int x; EOF } check_lheader(){ echocheck "$1" log check_lheader "$@" name=$1 header=$2 shift 2 disable $name check_cpp "$@" < int x; EOF answer="no" enabled $name && answer="yes" echores $answer } check_func(){ log check_func "$@" func=$1 shift disable $func check_ld "$@" <>"$TMPLOG" 2>&1; } } require(){ echocheck "$1" name="$1" header="$2" func="$3" shift 3 check_lib $header $func "$@" || disable $name answer="no" enabled $name && answer="yes" echores $answer } require2(){ echocheck "$1" name="$1" headers="$2" func="$3" shift 3 check_lib2 "$headers" $func "$@" || disable $name answer="no" enabled $name && answer="yes" echores $answer } check_foo_config(){ cfg=$1 pkg=$2 header=$3 func=$4 shift 4 disable $cfg check_cmd ${pkg}-config --version err=$? if test "$err" = 0; then temp_cflags `${pkg}-config --cflags` temp_extralibs `${pkg}-config --libs` check_lib "$@" $header $func && enable $cfg fi return $err } apply(){ file=$1 shift "$@" < "$file" > "$file.tmp" && mv "$file.tmp" "$file" || rm "$file.tmp" } for parm in "$@" ; do if test "$parm" = "--help" || test "$parm" = "-help" || test "$parm" = "-h" ; then cat << EOF Usage: $0 [OPTIONS]... Configuration: -h, --help display this help and exit Installation directories: --prefix=DIR use this prefix for installing mplayer [/usr/local] Fine tuning of the installation directories: --datadir=DIR use this prefix for installing machine independent data files (fonts, skins) [PREFIX/share/mplayer] --confdir=DIR use this prefix for installing configuration files [same as datadir] --libdir=DIR use this prefix for installing shared libraries [PREFIX/lib/mplayerxp] Program names: --program-suffix=SUFX append SUFX to installed program names Use these options if autodetection fails: --with-extraincdir=DIR extra headers (png, dvb, mad, sdl, css, ...) in DIR --with-extralibdir=DIR extra library files (png, SDL, ...) in DIR --with-mlibdir=DIR libmlib (MLIB support) in DIR (Solaris only) Miscellaneous options: --cc=COMPILER use this C compiler to build MPlayer [gcc] --as=ASSEMBLER use this C compiler to build MPlayer [as] --target=PLATFORM target platform (i386-pc-linux, arm-none-linux, etc) Advanced options: --enable-mlib build with MLIB support (Solaris only) [autodetect] --enable-debug[=1-3] compile debugging information into mplayer [disable] --enable-profile compile profiling information into mplayer [disable] --disable-fastcall disable regparm method on x86 systems [autodetect] Expert options: --disable-builtin-ffmpeg disable builtin support for ffmpeg codecs EOF exit 0 fi done # for parm in ... # LGB: temporary files for I in "$TMPDIR" "$TEMPDIR" "/tmp" ; do test "$I" && break done TMPLOG="configure.log" rm -f "$TMPLOG" TMPC="$I/mplayerxp-conf-$RANDOM-$$.c" TMPCPP="$I/mplayerxp-conf-$RANDOM-$$.cpp" TMPO="$I/mplayerxp-conf-$RANDOM-$$.o" TMPE="$I/mplayerxp-conf-$RANDOM-$$" TMPS="$I/mplayerxp-conf-$RANDOM-$$.S" TMPH="$I/mplayerxp-conf-$RANDOM-$$.h" _cc=gcc _mlib=auto _prefix="/usr/local" _ffmpeg=yes _fastcall=auto _psuffix= _target= _as=auto for ac_option do case "$ac_option" in --target=*) _target=`echo $ac_option | cut -d '=' -f 2` ;; --prefix=*) _prefix=`echo $ac_option | cut -d '=' -f 2` ;; --datadir=*) _datadir=`echo $ac_option | cut -d '=' -f 2` ;; --confdir=*) _confdir=`echo $ac_option | cut -d '=' -f 2` ;; --libdir=*) _libdir=`echo $ac_option | cut -d '=' -f 2` ;; --program-suffix=*) _psuffix=`echo $ac_option | cut -d '=' -f 2` ;; --with-extraincdir=*) _inc_extra=-I`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -I,g'` ;; --with-extralibdir=*) _ld_extra=-L`echo $ac_option | cut -d '=' -f 2 | sed 's,:, -L,g'` ;; --with-mlibdir=*) _mlibdir=`echo $ac_option | cut -d '=' -f 2` _mlib=yes ;; --cc=*) _cc=`echo $ac_option | cut -d '=' -f 2` ;; --as=*) _as=`echo $ac_option | cut -d '=' -f 2` ;; --disable-profile) _profile= ;; --enable-profile) _profile='-p' ;; --enable-debug) _debug='-g' ;; --enable-debug=*) _debug=`echo $_echo_n '-g'$_echo_c; echo $ac_option | cut -d '=' -f 2` ;; --enable-mlib) _mlib=yes ;; --disable-mlib) _mlib=no ;; --disable-builtin-ffmpeg) _ffmpeg=no ;; --enable-fastcall) _fastcall=yes ;; --disable-fastcall) _fastcall=no ;; *) ;; esac done guess_target config.mak config.h echocheck "Program name" _prog_alias="mplayerxp$_psuffix" echores "$_prog_alias" # Atmos: moved this here, to be correct, if --prefix is specified if cygwin ; then test -z "$_datadir" && _datadir="." test -z "$_confdir" && _confdir="." test -z "$_libdir" && _libdir="." else test -z "$_datadir" && _datadir="$_prefix/share/$_prog_alias" test -z "$_confdir" && _confdir="$_datadir" test -z "$_libdir" && _libdir="$_prefix/lib/$_prog_alias" fi test -z "$_mlibdir" && _mlibdir="$MLIBHOME" # Fix libavcodec if test "$_ffmpeg" = yes ; then cd libavcodec if ! test -f Makefile ; then #patch --force <../libavcodec.diff #else echo "**WARNING**: local copy of libavcodec doesn't exist! Please copy libavcodec" echo "from ffmpeg distro into mplayerxp/codecs/libavcodec subfolder." echo "Otherwise support of builtin ffmpeg's codecs will be disabled" echo "Press any key" read _answer _ffmpeg=no fi cd ../libavutil if ! test -f Makefile ; then echo "**WARNING**: local copy of libavutil doesn't exist! Please copy libavutil" echo "from ffmpeg distro into mplayerxp/codecs/libavutil subfolder." echo "Otherwise support of builtin ffmpeg's codecs will be disabled" echo "Press any key" read _answer _ffmpeg=no fi cd ../libavformat if ! test -f Makefile ; then #patch --force <../libavformat.diff #else echo "**WARNING**: local copy of libavformat doesn't exist! Please copy libavformat" echo "from ffmpeg distro into mplayerxp/codecs/libavformat subfolder." echo "Otherwise support of builtin ffmpeg's codecs will be disabled" echo "Press any key" read _answer _ffmpeg=no fi cd ../libpostproc if ! test -f Makefile ; then echo "**WARNING**: local copy of libpostproc doesn't exist! Please copy libpostproc" echo "from ffmpeg distro into mplayerxp/codecs/libpostproc subfolder." echo "Otherwise support of builtin ffmpeg's codecs will be disabled" echo "Press any key" read _answer _ffmpeg=no fi cd .. fi _subdirs="mp3lib liba52 libdca libfaad2 libmpeg2" if test "$_ffmpeg" = yes ; then _subdirs="$_subdirs libavutil libavcodec libpostproc libavformat" fi cc_version=`$_cc -dumpversion` if test "$_fastcall" = auto ; then echocheck "__fastcall optimization abilities" case $cc_version in '') _fastcall=no ;; # avoid fastcall usage on gcc-2.95.2 and older 2.95.[3-9]|2.95.[3-9].[0-9]|3.[0-9]|3.[0-9].[0-9]|4.[0-9].[0-9]) _fastcall=yes ;; *) _fastcall=no ;; esac echores "$_fastcall" fi # now that we know what compiler should be used for compilation, try to find # out which assembler is used by the $_cc compiler echocheck "as" if test "$_as" = auto ; then _as=`$_cc -print-prog-name=as` test -z "$_as" && _as=as fi echores "$_as" test_optimizations config.mak config.h _march="-march=$_build_cpu" # Checking for CFLAGS _def_fastcall='#undef __USE_FASTCALL' if test "$_fastcall" = yes && test -z "$_profile" ; then _def_fastcall='#define __USE_FASTCALL 1' fi if test "$_profile" || test "$_debug" ; then CFLAGS="-W -Wall -O2 $_march $_debug $_profile" elif test -z "$CFLAGS" ; then if test "$_build_arch" != "mips" ; then CFLAGS="-O4 $_march -pipe -ffast-math -fomit-frame-pointer" else CFLAGS="-O4 $_march -ffast-math -fomit-frame-pointer" fi fi echocheck "malloc.h" cat > $TMPC << EOF #include int main(void) { (void) malloc(0); return 0; } EOF _malloc=no cc_check && _malloc=yes if test "$_malloc" = yes ; then _def_malloc='#define HAVE_MALLOC_H 1' else _def_malloc='#undef HAVE_MALLOC_H' fi # malloc.h emits a warning in FreeBSD freebsd && _def_malloc='#undef HAVE_MALLOC_H' echores "$_malloc" echocheck "memalign()" # XXX restrict to x86 ? extend to other CPUs/cacheline sizes ? cat > $TMPC << EOF #include int main (void) { (void) memalign(64, sizeof(char)); return 0; } EOF _memalign=no cc_check && _memalign=yes if test "$_memalign" = yes ; then _def_memalign='#define HAVE_MEMALIGN 1' else _def_memalign='#undef HAVE_MEMALIGN' fi echores "$_memalign" echocheck "alloca.h" cat > $TMPC << EOF #include int main(void) { (void) alloca(0); return 0; } EOF _alloca=no cc_check && _alloca=yes if test "$_alloca" = yes ; then _def_alloca='#define HAVE_ALLOCA_H 1' else _def_alloca='#undef HAVE_ALLOCA_H' fi echores "$_alloca" echocheck "Sun mediaLib" if test "$_mlib" = auto ; then _mlib=no test -z "$_mlibdir" && _mlibdir=/opt/SUNWmlib cat > $TMPC << EOF #include int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; } EOF cc_check -I${_mlibdir}/include -L${_mlibdir}/lib -lmlib && _mlib=yes fi if test "$_mlib" = yes ; then _def_mlib='#define HAVE_MLIB 1' _inc_mlib=" -I${_mlibdir}/include " _ld_mlib=" -L${_mlibdir}/lib -R${_mlibdir}/lib -lmlib " else _def_mlib='#undef HAVE_MLIB' fi echores "$_mlib" echocheck "pthread" cat > $TMPC << EOF #include void* func(void *arg) { return arg; } int main(void) { pthread_t tid; return pthread_create (&tid, 0, func, 0) == 0 ? 0 : 1; } EOF if ( cc_check && $TMPO ) ; then # QNX _ld_pthread='' elif ( cc_check -lpthread && $TMPO ) ; then _ld_pthread='-lpthread' elif ( cc_check -pthread && $TMPO ) ; then _ld_pthread='-pthread' else if test "$_ld_static" ; then # for crosscompilation, we cannot execute the program, be happy if we can link statically if ( cc_check -lpthread ) ; then _ld_pthread='-lpthread' elif ( cc_check -pthread ) ; then _ld_pthread='-pthread' else die "Static lib pthread not found. (needed by xp mode)" fi else die "Lib pthread not found. (needed by xp mode)" fi fi _have_pthreads='yes' _def_pthread='#define HAVE_PTHREADS 1' echores "yes (using '$_ld_pthread')" extralibs="$extralibs $_ld_pthread -lm" echocheck "zlib" _zlib=yes # check for zlib - mmu_man cat > $TMPC << EOF #include int main ( void ) { if (zlibVersion() != ZLIB_VERSION) puts("zlib version differs !!!"); return 1; return 0; } EOF cc_check -lz 2> /dev/null || _zlib="no" # $TMPE 2> /dev/null > /dev/null || zlib="no" # XXX: more tests needed - runtime test if test "$_zlib" = "yes"; then extralibs="$extralibs -lz" _def_zlib='#define CONFIG_ZLIB 1' else _def_zlib='#undef CONFIG_ZLIB' fi echores "$_zlib" # test for lrintf in math.h echocheck "lrintf" cat > $TMPC << EOF #define _ISOC9X_SOURCE 1 #include int main( void ) { return (lrintf(3.999f) > 0)?0:1; } EOF _have_lrintf="no" cc_check -lm && _have_lrintf=yes if test "$_have_lrintf" = yes ; then _def_lrintf='#define HAVE_LRINTF 1' else _def_lrintf='#undef HAVE_LRINTF' fi echores "$_have_lrintf" # test for lrintf in math.h echocheck "llrint" cat > $TMPC << EOF #define _ISOC9X_SOURCE 1 #include int main( void ) { return (llrint(3.999f) > 0)?0:1; } EOF _have_llrint="no" cc_check -lm && _have_llrint=yes if test "$_have_llrint" = yes ; then _def_llrint='#define HAVE_LLRINT 1' else _def_llrint='/*#undef HAVE_LLRINT*/' fi echores "$_have_llrint" #test for restrict _restrict= for restrict_keyword in restrict __restrict__ __restrict; do cat > $TMPC << EOF void foo(char * $restrict_keyword p); int main(void) { } EOF cc_check && _restrict=$restrict_keyword && break done source_path=`pwd` _buildsuf= ############################################################################# echo "Creating config.mak" cat >> config.mak << EOF # -------- Generated by configure ----------- prefix = $_prefix PROGNAME = $_prog_alias DATADIR = $_datadir CONFDIR = $_confdir SUBDIRS = $_subdirs OPTFLAGS = $CFLAGS SHCFLAGS = $CFLAGS HAVE_MLIB = $_mlib MLIB_LIB = $_ld_mlib MLIB_INC = $_inc_mlib # For embeddeded libavcodec HAVE_PTHREADS=$_have_pthreads CONFIG_GPL=yes CONFIG_RISKY = yes CONFIG_ENCODERS=yes CONFIG_DECODERS=yes CONFIG_MUXERS=yes CONFIG_DEMUXERS=yes CONFIG_PP=yes CONFIG_ZLIB=$_zlib BUILD_SHARED=yes SRC_PATH=$source_path BUILD_ROOT=$source_path #MAKE=make CC=$_cc AR=ar RANLIB=ranlib STRIP=strip INSTALLSTRIP=-s LDFLAGS= FFSLDFLAGS= SHFLAGS=-shared LIBPREF=lib LIBSUF=.a BUILDSUF= SLIBPREF=lib SLIBNAME=\$(SLIBPREF)\$(NAME)\$(SLIBSUF) EOF ############################################################################# echo "Creating config.h" cat >> config.h << EOF /* -------- This file has been automatically generated by configure ---------*/ /* Common data directory (for fonts, etc) */ #define PROGNAME "$_prog_alias" #define DATADIR "$_datadir" #define CONFDIR "$_confdir" #define LIBDIR "$_libdir" $_def_mlib /* Sun mediaLib, available only on solaris */ /* libmpeg2 uses a different feature test macro for mediaLib */ #ifdef HAVE_MLIB #define LIBMPEG2_MLIB 1 #endif /* Define this if your system has the "malloc.h" header file */ $_def_malloc /* memalign is mapped to malloc if unsupported */ $_def_memalign #ifndef HAVE_MEMALIGN # define memalign(a,b) malloc(b) #endif /* Define this if your system has the "alloca.h" header file */ $_def_alloca /* Define if your cpu has the MVI intruction set */ $_def_mvi /* Define if your mathlib has lrintf */ $_def_lrintf /* Define this if your system has the llrint in "math.h" header file */ $_def_llrint #ifndef HAVE_LLRINT #define HAVE_LLRINT 1 static inline long long int llrint(double x) { return (int)(x + (((int)x-x) < 0 ? -0.5 : 0.5)); } #endif /* special for embedded libavcodec */ #ifdef CAN_COMPILE_MMX #define HAVE_MMX 1 #endif #define CONFIG_ENCODERS 1 #define CONFIG_DECODERS 1 #define CONFIG_MUXERS 1 #define CONFIG_DEMUXERS 1 #define CONFIG_PP 1 #define CONFIG_RISKY 1 #define CONFIG_GPL 1 $_def_pthread $_def_zlib #ifdef HAVE_PTHREADS /* BeOS workaround */ #define HAVE_THREADS 1 #endif $_def_fastcall /* Defined to some form of __attribute__ ((...)) if the compiler supports a different, more efficient calling convention. */ #if defined ( __USE_FASTCALL ) && defined ( ARCH_X86 ) /*# define internal_function __attribute__ ((regparm (3), stdcall))*/ # define __FASTCALL__ __attribute__ ((regparm (3))) #else # define __FASTCALL__ #endif EOF echo "#define restrict $_restrict" >> config.h # find if .align arg is power-of-two or not echocheck ".align is power-of-two" cat > $TMPC << EOF asm (".align 3"); EOF asmalign_pot="no" cc_check && asmalign_pot="yes" echores $asmalign_pot if test "$asmalign_pot" = "yes" ; then printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> config.h else printf '#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\\n\\t"\n' >> config.h fi # Addon for newest ffmpeg's versions echo "Generating list of ffmpeg's codecs! Please wait" ENCODER_LIST=`sed -n 's/^[^#]*ENC.*, *\(.*\)).*/\1_encoder/p' "$source_path/libavcodec/allcodecs.c"` DECODER_LIST=`sed -n 's/^[^#]*DEC.*, *\(.*\)).*/\1_decoder/p' "$source_path/libavcodec/allcodecs.c"` PARSER_LIST=`sed -n 's/^[^#]*PARSER.*, *\(.*\)).*/\1_parser/p' "$source_path/libavcodec/allcodecs.c"` MUXER_LIST=`sed -n 's/^[^#]*_MUX.*, *\(.*\)).*/\1_muxer/p' "$source_path/libavformat/allformats.c"` DEMUXER_LIST=`sed -n 's/^[^#]*DEMUX.*, *\(.*\)).*/\1_demuxer/p' "$source_path/libavformat/allformats.c"` CONFIG_LIST=' liba52 libdts libgsm libmp3lame libtheora libvorbis libogg libnut xvid x264 libfaac libfaad avisynth amr amr_nb amr_wb ipv6 network pp protocols ' enable $ENCODER_LIST $DECODER_LIST $PARSER_LIST $MUXER_LIST $DEMUXER_LIST $CONFIG_LIST enabled_any $ENCODER_LIST && enable encoders enabled_any $DECODER_LIST && enable decoders enabled_any $MUXER_LIST && enable muxers enabled_any $DEMUXER_LIST && enable demuxers enabled_any pthreads beosthreads os2threads w32threads && enable threads # suppress some experimental stuff disable mpeg_xvmc_decoder disable aac_decoder disable mpeg4aac_decoder disable libtheora disable avisynth disable audio_muxer disable audio_demuxer disable video_grab_device_demuxer disable x11_grab_device_demuxer ########################################## # IPv6 check enabled ipv6 && check_ld < #include #include #include int main( void ) { struct sockaddr_storage saddr; struct ipv6_mreq mreq6; getaddrinfo(0,0,0,0); getnameinfo(0,0,0,0,0,0,0); IN6_IS_ADDR_MULTICAST((const struct in6_addr *)0); } EOF # check configurable stuff enabled liba52 && require liba52 a52dec/a52.h a52_init -la52 enabled libdts && require libdts dts.h dts_init -ldts -lm enabled libgsm && require libgsm gsm.h gsm_create -lgsm enabled libmp3lame && require libmp3lame lame/lame.h lame_init -lmp3lame -lm enabled libtheora && require libtheora theora/theora.h theora_info_init -ltheora -logg enabled libvorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbis -lvorbisenc -logg enabled libogg && require libogg ogg/ogg.h ogg_sync_init -logg enabled xvid && require xvid xvid.h xvid_global -lxvidcore enabled x264 && require x264 x264.h x264_encoder_open -lx264 enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac enabled libfaad && require2 libfaad faad.h faacDecOpen -lfaad enabled avisynth && require2 avisynth "windows.h vfw.h" AVIFileInit -lvfw32 enabled libnut && require libnut libnut.h nut_demuxer_init -lnut disabled liba52 && disable liba52_decoder disabled libdts && disable dts_decoder disabled libgsm && disable libgsm_decoder libgsm_ms_decoder libgsm_encoder libgsm_ms_encoder disabled libtheora && disable theora_decoder libtheora_encoder disabled libvorbis && disable oggvorbis_decoder oggvorbis_encoder disabled xvid && disable xvid_encoder disabled x264 && disable x264_encoder disabled libfaac && disable faac_encoder disabled libfaad && disable faad_decoder disabled libmp3lame && disable mp3lame_encoder disabled libogg && disable ogg_demuxer ogg_muxer disabled libnut && disable libnut_demuxer libnut_muxer enabled dc1394_demuxer && require dc1394_demuxer libdc1394/dc1394_control.h dc1394_create_handle -ldc1394_control -lraw1394 enabled v4l_demuxer && check_sheader v4l_demuxer linux/videodev.h enabled v4l2_demuxer && check_sheader v4l2_demuxer linux/videodev2.h enabled amr_nb_decoder && check_lheader amr_nb_decoder $source_path/libavcodec/amr_float/interf_dec.h enabled amr_wb_decoder && check_lheader amr_wb_decoder $source_path/libavcodec/amrwb_float/dec_if.h disabled amr_nb_decoder && disable amr_nb_encoder disabled amr_wb_decoder && disable amr_wb_encoder disabled amr_nb_decoder && disable amr_nb disabled amr_wb_decoder && disable amr_wb disabled_all amr_nb_decoder amr_wb_decoder && disable amr echo "/* List of ffmpeg's codecs! */" >> config.h echo "# List of ffmpeg's codecs!" >> config.mak for codec in $CONFIG_LIST $DECODER_LIST $ENCODER_LIST $PARSER_LIST $DEMUXER_LIST $MUXER_LIST; do ucname="`toupper $codec`" config_name="CONFIG_$ucname" enabled_name="ENABLE_$ucname" if enabled $codec; then echo "#define $config_name 1" >> config.h echo "#define $enabled_name 1" >> config.h echo "$config_name=yes" >> config.mak else echo "#define $enabled_name 0" >> config.h fi done echo "EXTRALIBS=$extralibs" >> config.mak # Last move: rm -f "$TMPO" "$TMPC" "$TMPS" "$TMPCPP"