summaryrefslogtreecommitdiffstats
path: root/libvpx/configure
diff options
context:
space:
mode:
Diffstat (limited to 'libvpx/configure')
-rwxr-xr-xlibvpx/configure90
1 files changed, 49 insertions, 41 deletions
diff --git a/libvpx/configure b/libvpx/configure
index 24be893..297cec4 100755
--- a/libvpx/configure
+++ b/libvpx/configure
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
##
## configure
##
@@ -38,6 +38,7 @@ Advanced options:
${toggle_internal_stats} output of encoder internal stats for debug, if supported (encoders)
${toggle_mem_tracker} track memory usage
${toggle_postproc} postprocessing
+ ${toggle_vp9_postproc} vp9 specific postprocessing
${toggle_multithread} multithreaded encoding and decoding
${toggle_spatial_resampling} spatial sampling (scaling) support
${toggle_realtime_only} enable this option while building for real-time encoding
@@ -153,7 +154,7 @@ all_targets="libs examples docs"
# all targets available are enabled, by default.
for t in ${all_targets}; do
- [ -f ${source_path}/${t}.mk ] && enable ${t}
+ [ -f ${source_path}/${t}.mk ] && enable_feature ${t}
done
# check installed doxygen version
@@ -164,30 +165,30 @@ if [ ${doxy_major:-0} -ge 1 ]; then
doxy_minor=${doxy_version%%.*}
doxy_patch=${doxy_version##*.}
- [ $doxy_major -gt 1 ] && enable doxygen
- [ $doxy_minor -gt 5 ] && enable doxygen
- [ $doxy_minor -eq 5 ] && [ $doxy_patch -ge 3 ] && enable doxygen
+ [ $doxy_major -gt 1 ] && enable_feature doxygen
+ [ $doxy_minor -gt 5 ] && enable_feature doxygen
+ [ $doxy_minor -eq 5 ] && [ $doxy_patch -ge 3 ] && enable_feature doxygen
fi
# install everything except the sources, by default. sources will have
# to be enabled when doing dist builds, since that's no longer a common
# case.
-enabled doxygen && php -v >/dev/null 2>&1 && enable install_docs
-enable install_bins
-enable install_libs
-
-enable static
-enable optimizations
-enable fast_unaligned #allow unaligned accesses, if supported by hw
-enable md5
-enable spatial_resampling
-enable multithread
-enable os_support
-enable temporal_denoising
-
-[ -d ${source_path}/../include ] && enable alt_tree_layout
+enabled doxygen && php -v >/dev/null 2>&1 && enable_feature install_docs
+enable_feature install_bins
+enable_feature install_libs
+
+enable_feature static
+enable_feature optimizations
+enable_feature fast_unaligned #allow unaligned accesses, if supported by hw
+enable_feature md5
+enable_feature spatial_resampling
+enable_feature multithread
+enable_feature os_support
+enable_feature temporal_denoising
+
+[ -d ${source_path}/../include ] && enable_feature alt_tree_layout
for d in vp8 vp9; do
- [ -d ${source_path}/${d} ] && disable alt_tree_layout;
+ [ -d ${source_path}/${d} ] && disable_feature alt_tree_layout;
done
if ! enabled alt_tree_layout; then
@@ -200,10 +201,10 @@ else
[ -f ${source_path}/../include/vpx/vp8dx.h ] && CODECS="${CODECS} vp8_decoder"
[ -f ${source_path}/../include/vpx/vp9cx.h ] && CODECS="${CODECS} vp9_encoder"
[ -f ${source_path}/../include/vpx/vp9dx.h ] && CODECS="${CODECS} vp9_decoder"
-[ -f ${source_path}/../include/vpx/vp8cx.h ] || disable vp8_encoder
-[ -f ${source_path}/../include/vpx/vp8dx.h ] || disable vp8_decoder
-[ -f ${source_path}/../include/vpx/vp9cx.h ] || disable vp9_encoder
-[ -f ${source_path}/../include/vpx/vp9dx.h ] || disable vp9_decoder
+[ -f ${source_path}/../include/vpx/vp8cx.h ] || disable_feature vp8_encoder
+[ -f ${source_path}/../include/vpx/vp8dx.h ] || disable_feature vp8_decoder
+[ -f ${source_path}/../include/vpx/vp9cx.h ] || disable_feature vp9_encoder
+[ -f ${source_path}/../include/vpx/vp9dx.h ] || disable_feature vp9_decoder
[ -f ${source_path}/../lib/*/*mt.lib ] && soft_enable static_msvcrt
fi
@@ -279,6 +280,7 @@ CONFIG_LIST="
dc_recon
runtime_cpu_detect
postproc
+ vp9_postproc
multithread
internal_stats
${CODECS}
@@ -314,6 +316,7 @@ CMDLINE_SELECT="
gprof
gcov
pic
+ use_x86inc
optimizations
ccache
runtime_cpu_detect
@@ -332,6 +335,7 @@ CMDLINE_SELECT="
dequant_tokens
dc_recon
postproc
+ vp9_postproc
multithread
internal_stats
${CODECS}
@@ -357,12 +361,12 @@ process_cmdline() {
for opt do
optval="${opt#*=}"
case "$opt" in
- --disable-codecs) for c in ${CODECS}; do disable $c; done ;;
+ --disable-codecs) for c in ${CODECS}; do disable_feature $c; done ;;
--enable-?*|--disable-?*)
eval `echo "$opt" | sed 's/--/action=/;s/-/ option=/;s/-/_/g'`
if echo "${EXPERIMENT_LIST}" | grep "^ *$option\$" >/dev/null; then
if enabled experimental; then
- $action $option
+ ${action}_feature $option
else
log_echo "Ignoring $opt -- not in experimental mode."
fi
@@ -383,8 +387,8 @@ post_process_cmdline() {
# If the codec family is enabled, enable all components of that family.
log_echo "Configuring selected codecs"
for c in ${CODECS}; do
- disabled ${c%%_*} && disable ${c}
- enabled ${c%%_*} && enable ${c}
+ disabled ${c%%_*} && disable_feature ${c}
+ enabled ${c%%_*} && enable_feature ${c}
done
# Enable all detected codecs, if they haven't been disabled
@@ -392,12 +396,12 @@ post_process_cmdline() {
# Enable the codec family if any component of that family is enabled
for c in ${CODECS}; do
- enabled $c && enable ${c%_*}
+ enabled $c && enable_feature ${c%_*}
done
# Set the {en,de}coders variable if any algorithm in that class is enabled
for c in ${CODECS}; do
- enabled ${c} && enable ${c##*_}s
+ enabled ${c} && enable_feature ${c##*_}s
done
}
@@ -437,7 +441,7 @@ process_targets() {
done
enabled debug_libs && DIST_DIR="${DIST_DIR}-debug"
enabled codec_srcs && DIST_DIR="${DIST_DIR}-src"
- ! enabled postproc && DIST_DIR="${DIST_DIR}-nopost"
+ ! enabled postproc && ! enabled vp9_postproc && DIST_DIR="${DIST_DIR}-nopost"
! enabled multithread && DIST_DIR="${DIST_DIR}-nomt"
! enabled install_docs && DIST_DIR="${DIST_DIR}-nodocs"
DIST_DIR="${DIST_DIR}-${tgt_isa}-${tgt_os}"
@@ -507,13 +511,13 @@ process_detect() {
fi
if [ -z "$CC" ] || enabled external_build; then
echo "Bypassing toolchain for environment detection."
- enable external_build
+ enable_feature external_build
check_header() {
log fake_check_header "$@"
header=$1
shift
var=`echo $header | sed 's/[^A-Za-z0-9_]/_/g'`
- disable $var
+ disable_feature $var
# Headers common to all environments
case $header in
stdio.h)
@@ -525,7 +529,7 @@ process_detect() {
[ -f "${d##-I}/$header" ] && result=true && break
done
${result:-true}
- esac && enable $var
+ esac && enable_feature $var
# Specialize windows and POSIX environments.
case $toolchain in
@@ -533,7 +537,7 @@ process_detect() {
case $header-$toolchain in
stdint*-gcc) true;;
*) false;;
- esac && enable $var
+ esac && enable_feature $var
;;
*)
case $header in
@@ -542,7 +546,7 @@ process_detect() {
sys/mman.h) true;;
unistd.h) true;;
*) false;;
- esac && enable $var
+ esac && enable_feature $var
esac
enabled $var
}
@@ -560,7 +564,7 @@ EOF
check_header sys/mman.h
check_header unistd.h # for sysconf(3) and friends.
- check_header vpx/vpx_integer.h -I${source_path} && enable vpx_ports
+ check_header vpx/vpx_integer.h -I${source_path} && enable_feature vpx_ports
}
process_toolchain() {
@@ -642,14 +646,18 @@ process_toolchain() {
# ccache only really works on gcc toolchains
enabled gcc || soft_disable ccache
if enabled mips; then
- enable dequant_tokens
- enable dc_recon
+ enable_feature dequant_tokens
+ enable_feature dc_recon
+ fi
+
+ if enabled internal_stats; then
+ enable_feature vp9_postproc
fi
# Enable the postbuild target if building for visual studio.
case "$tgt_cc" in
- vs*) enable msvs
- enable solution
+ vs*) enable_feature msvs
+ enable_feature solution
vs_version=${tgt_cc##vs}
case $vs_version in
[789])