cat <<EOF
Usage: ./configure [options]
-available options:
+Help:
+ -h, --help print this message
+
+Standard options:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [/usr/local]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+ --bindir=DIR install binaries in DIR [EPREFIX/bin]
+ --libdir=DIR install libs in DIR [EPREFIX/lib]
+ --includedir=DIR install includes in DIR [PREFIX/include]
+ --extra-asflags=EASFLAGS add EASFLAGS to ASFLAGS
+ --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS
+ --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS
- --help print this message
- --disable-cli disables cli
+Configuration options:
+ --disable-cli disable cli
--system-libx264 use system libx264 instead of internal
--enable-shared build shared library
--enable-static build static library
- --disable-avs disables avisynth support (windows only)
- --disable-lavf disables libavformat support
- --disable-ffms disables ffmpegsource support
- --disable-gpac disables gpac support
- --disable-gpl disables GPL-only features
- --disable-thread disables multithreaded encoding
+ --disable-gpl disable GPL-only features
+ --disable-thread disable multithreaded encoding
--enable-win32thread use win32threads (windows only)
- --disable-swscale disables swscale support
- --disable-asm disables platform-specific assembly optimizations
- --disable-interlaced disables interlaced encoding support
- --enable-debug adds -g
- --enable-gprof adds -pg
- --enable-strip adds -s
- --enable-visualize enables visualization (X11 only)
+ --disable-interlaced disable interlaced encoding support
+ --enable-visualize enable visualization (X11 only)
+ --bit-depth=BIT_DEPTH set output bit depth (8-10) [8]
+
+Advanced options:
+ --disable-asm disable platform-specific assembly optimizations
+ --enable-debug add -g
+ --enable-gprof add -pg
+ --enable-strip add -s
--enable-pic build position-independent code
- --bit-depth=BIT_DEPTH sets output bit depth (8-10), default 8
- --extra-asflags=EASFLAGS add EASFLAGS to ASFLAGS
- --extra-cflags=ECFLAGS add ECFLAGS to CFLAGS
- --extra-ldflags=ELDFLAGS add ELDFLAGS to LDFLAGS
+
+Cross-compilation:
--host=HOST build programs to run on HOST
--cross-prefix=PREFIX use PREFIX for compilation tools
--sysroot=SYSROOT root of cross-build tree
+External library support:
+ --disable-avs disable avisynth support (windows only)
+ --disable-swscale disable swscale support
+ --disable-lavf disable libavformat support
+ --disable-ffms disable ffmpegsource support
+ --disable-gpac disable gpac support
+
EOF
exit 1
fi
gpl="no"
;;
--extra-asflags=*)
- ASFLAGS="$ASFLAGS ${opt#--extra-asflags=}"
+ ASFLAGS="$ASFLAGS $optarg"
;;
--extra-cflags=*)
- CFLAGS="$CFLAGS ${opt#--extra-cflags=}"
+ CFLAGS="$CFLAGS $optarg"
;;
--extra-ldflags=*)
- LDFLAGS="$LDFLAGS ${opt#--extra-ldflags=}"
+ LDFLAGS="$LDFLAGS $optarg"
;;
--disable-thread)
thread="no"
vis="yes"
;;
--host=*)
- host="${opt#--host=}"
+ host="$optarg"
;;
--cross-prefix=*)
- cross_prefix="${opt#--cross-prefix=}"
+ cross_prefix="$optarg"
;;
--sysroot=*)
- CFLAGS="$CFLAGS --sysroot=${opt#--sysroot=}"
- LDFLAGS="$LDFLAGS --sysroot=${opt#--sysroot=}"
+ CFLAGS="$CFLAGS --sysroot=$optarg"
+ LDFLAGS="$LDFLAGS --sysroot=$optarg"
;;
--bit-depth=*)
- bit_depth="${opt#--bit-depth=}"
+ bit_depth="$optarg"
if [ "$bit_depth" -lt "8" -o "$bit_depth" -gt "10" ]; then
echo "Supplied bit depth must be in range [8,10]."
exit 1
if [ $asm = auto -a $ARCH = ARM ] ; then
# set flags so neon is built by default
- echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu|-mfloat-abi)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp"
+ echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu)' || CFLAGS="$CFLAGS -mcpu=cortex-a8 -mfpu=neon"
if cc_check '' '' '__asm__("rev ip, ip");' ; then define HAVE_ARMV6
cc_check '' '' '__asm__("movt r0, #0");' && define HAVE_ARMV6T2
if [ "$swscale" = "auto" ] ; then
swscale="no"
if ${cross_prefix}pkg-config --exists libswscale 2>/dev/null; then
- SWSCALE_LIBS="$SWSCALE_LIBS $(${cross_prefix}pkg-config --libs libswscale)"
- SWSCALE_CFLAGS="$SWSCALE_CFLAGS $(${cross_prefix}pkg-config --cflags libswscale)"
+ SWSCALE_LIBS="$SWSCALE_LIBS $(${cross_prefix}pkg-config --libs libswscale libavutil)"
+ SWSCALE_CFLAGS="$SWSCALE_CFLAGS $(${cross_prefix}pkg-config --cflags libswscale libavutil)"
fi
[ -z "$SWSCALE_LIBS" ] && SWSCALE_LIBS="-lswscale -lavutil"
done
fi
LAVF_LIBS="-L. $LAVF_LIBS"
- if cc_check libavformat/avformat.h "$LAVF_CFLAGS $LAVF_LIBS" "avformat_open_input(0,0,0,0);" ; then
+ if cc_check libavformat/avformat.h "$LAVF_CFLAGS $LAVF_LIBS" "avformat_open_input(0,0,0,0); avcodec_open2(0,0,0);" ; then
if [ "$swscale" = "yes" ]; then
lavf="yes"
else