echo " --incdir=DIR install includes in DIR [PREFIX/include/ffmpeg]"
echo " --mandir=DIR install man page in DIR [PREFIX/man]"
echo " --enable-mp3lame enable MP3 encoding via libmp3lame [default=no]"
+ echo " --enable-libnut enable NUT support via libnut [default=no]"
echo " --enable-libogg enable Ogg support via libogg [default=no]"
echo " --enable-vorbis enable Vorbis support via libvorbis [default=no]"
echo " --enable-faad enable FAAD support via libfaad [default=no]"
echo " --enable-gprof enable profiling with gprof [$gprof]"
echo " --disable-debug disable debugging symbols"
echo " --disable-opts disable compiler optimizations"
+ echo " --enable-extra-warnings enable more compiler warnings"
echo " --disable-mpegaudio-hp faster (but less accurate)"
echo " MPEG audio decoding [default=no]"
echo " --disable-protocols disable I/O protocols support [default=no]"
+ echo " --disable-ffmpeg disable ffmpeg build"
echo " --disable-ffserver disable ffserver build"
echo " --disable-ffplay disable ffplay build"
echo " --enable-small optimize for size instead of speed"
fi
fi
;;
- # armv4l is a subset of armv5tel
- arm|armv4l|armv5tel)
+ # armv4l is a subset of armv[567]*l
+ arm|armv[4567]*l)
arch="armv4l"
;;
alpha)
zlib="yes"
libgsm="no"
mp3lame="no"
+libnut="no"
libogg="no"
vorbis="no"
faad="no"
lshared="no"
optimize="yes"
debug="yes"
+extrawarnings="no"
dostrip="yes"
installstrip="-s"
extralibs="-lm"
netserver="no"
need_inet_aton="no"
protocols="yes"
+ffmpeg="yes"
ffserver="yes"
ffplay="yes"
LIBOBJFLAGS=""
esac
# find source path
-source_path="`dirname $0`"
+source_path="`dirname \"$0\"`"
source_path_used="yes"
if test -z "$source_path" -o "$source_path" = "." ; then
- source_path=`pwd`
+ source_path="`pwd`"
source_path_used="no"
else
source_path="`cd \"$source_path\"; pwd`"
+ echo "$source_path" | grep -q '[[:blank:]]' &&
+ die "Out of tree builds are impossible with whitespace in source path."
fi
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
FFMPEG_CONFIGURATION="$FFMPEG_CONFIGURATION""$opt "
done
-ENCODER_LIST=`grep 'register_avcodec(&[a-z0-9_]*_encoder)' $source_path/libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'`
-DECODER_LIST=`grep 'register_avcodec(&[a-z0-9_]*_decoder)' $source_path/libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'`
-PARSER_LIST=`grep 'av_register_codec_parser(&[a-z]' $source_path/libavcodec/allcodecs.c | sed 's/.*&\(.*\)).*/\1/'`
-MUXER_LIST=`grep 'av_register_output_format(&[a-z]' $source_path/libavformat/allformats.c | sed 's/.*&\(.*\)).*/\1/'`
-DEMUXER_LIST=`grep 'av_register_input_format(&[a-z]' $source_path/libavformat/allformats.c | sed 's/.*&\(.*\)).*/\1/'`
+ENCODER_LIST=`grep 'register_avcodec(&[a-z0-9_]*_encoder)' "$source_path/libavcodec/allcodecs.c" | sed 's/.*&\(.*\)).*/\1/'`
+DECODER_LIST=`grep 'register_avcodec(&[a-z0-9_]*_decoder)' "$source_path/libavcodec/allcodecs.c" | sed 's/.*&\(.*\)).*/\1/'`
+PARSER_LIST=`grep 'av_register_codec_parser(&[a-z]' "$source_path/libavcodec/allcodecs.c" | sed 's/.*&\(.*\)).*/\1/'`
+MUXER_LIST=`grep 'av_register_output_format(&[a-z]' "$source_path/libavformat/allformats.c" | sed 's/.*&\(.*\)).*/\1/'`
+DEMUXER_LIST=`grep 'av_register_input_format(&[a-z]' "$source_path/libavformat/allformats.c" | sed 's/.*&\(.*\)).*/\1/'`
for opt do
optval="${opt#*=}"
;;
--enable-mp3lame) mp3lame="yes"
;;
+ --enable-libnut) libnut="yes"
+ ;;
--enable-libogg) libogg="yes"
pkg_requires="$pkg_requires ogg >= 1.1"
;;
;;
--disable-opts) optimize="no"
;;
+ --enable-extra-warnings) extrawarnings="yes"
+ ;;
--disable-mpegaudio-hp) mpegaudio_hp="no"
;;
--disable-protocols) protocols="no"; network="no"; ffserver="no"
;;
+ --disable-ffmpeg) ffmpeg="no"
+ ;;
--disable-ffserver) ffserver="no"
;;
--disable-ffplay) ffplay="no"
die "Error, no memalign() but SSE enabled, disable it or use --enable-memalign-hack."
fi
+check_header byteswap.h && byteswap_h=yes || byteswap_h=no
+
check_func localtime_r && localtime_r=yes || localtime_r=no
enabled zlib && check_lib zlib.h zlibVersion -lz || zlib="no"
enabled mp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm
enabled vorbis && require libvorbis vorbis/vorbisenc.h vorbis_info_init -lvorbis -lvorbisenc -logg
enabled libogg && require libogg ogg/ogg.h ogg_sync_init -logg
+enabled libnut && require libnut nut.h nut_demuxer_init -lnut
enabled xvid && require XviD xvid.h xvid_global -lxvidcore
enabled x264 && require x264 x264.h x264_encoder_open -lx264
enabled dc1394 && require libdc1394 libdc1394/dc1394_control.h dc1394_create_handle -ldc1394_control -lraw1394
check_cflags -Wdisabled-optimization
check_cflags -Wpointer-arith
check_cflags -Wredundant-decls
-check_cflags -Winline
+enabled extrawarnings && check_cflags -Winline
# add some linker flags
check_ldflags $LDLATEFLAGS
echo "zlib enabled $zlib"
echo "libgsm enabled $libgsm"
echo "mp3lame enabled $mp3lame"
+echo "libnut enabled $libnut"
echo "libogg enabled $libogg"
echo "Vorbis enabled $vorbis"
echo "FAAD enabled $faad"
echo "#define HAVE_THREADS 1" >> $TMPH
fi
if test "$sdl" = "yes" ; then
- echo "CONFIG_SDL=yes" >> config.mak
+ echo "HAVE_SDL=yes" >> config.mak
echo "SDL_LIBS=`"${SDL_CONFIG}" --libs`" >> config.mak
echo "SDL_CFLAGS=`"${SDL_CONFIG}" --cflags`" >> config.mak
if test "$sdl_video_size" = "yes"; then
echo "#define HAVE_LRINTF 1" >> $TMPH
fi
if test "$vhook" = "yes" ; then
- echo "BUILD_VHOOK=yes" >> config.mak
- echo "#define HAVE_VHOOK 1" >> $TMPH
+ echo "CONFIG_VHOOK=yes" >> config.mak
+ echo "#define CONFIG_VHOOK 1" >> $TMPH
fi
sws_version=`grep '#define LIBSWSCALE_VERSION ' "$source_path/libswscale/swscale.h" | sed 's/[^0-9\.]//g'`
echo "CONFIG_MP3LAME=yes" >> config.mak
fi
+if test "$libnut" = "yes" ; then
+ echo "#define CONFIG_LIBNUT 1" >> $TMPH
+ echo "CONFIG_LIBNUT=yes" >> config.mak
+fi
+
if test "$libogg" = "yes" ; then
echo "#define CONFIG_LIBOGG 1" >> $TMPH
echo "CONFIG_LIBOGG=yes" >> config.mak
echo "#define MEMALIGN_HACK 1" >> $TMPH
fi
+if test "$byteswap_h" = "yes"; then
+ echo "#define HAVE_BYTESWAP_H 1" >> $TMPH
+fi
if test "$netserver" = "yes" ; then
echo "#define CONFIG_BEOS_NETSERVER 1" >> $TMPH
echo "CONFIG_PROTOCOLS=yes" >> config.mak
fi
+if test "$ffmpeg" = "yes" ; then
+ echo "#define CONFIG_FFMPEG 1" >> $TMPH
+ echo "CONFIG_FFMPEG=yes" >> config.mak
+fi
+
if test "$ffserver" = "yes" ; then
echo "#define CONFIG_FFSERVER 1" >> $TMPH
echo "CONFIG_FFSERVER=yes" >> config.mak
"
FILES="\
Makefile \
+ common.mak \
libavformat/Makefile \
libavcodec/Makefile \
libpostproc/Makefile \
ln -sf "$source_path/$f" $f
done
fi
-echo "SRC_PATH=$source_path" >> config.mak
-echo "BUILD_ROOT=$PWD" >> config.mak
+echo "SRC_PATH=\"$source_path\"" >> config.mak
+echo "SRC_PATH_BARE=$source_path" >> config.mak
+echo "BUILD_ROOT=\"$PWD\"" >> config.mak
if test "$amr" = "yes" ; then
echo "#define CONFIG_AMR 1" >> $TMPH