Commit 2040a29a authored by diego's avatar diego

Change all straight 'test $foo = "yes"' to 'enabled foo'.

patch by Ramiro Polla, ramiro lisha.ufsc br


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@7722 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent fc19d522
...@@ -397,7 +397,7 @@ check_lib(){ ...@@ -397,7 +397,7 @@ check_lib(){
} }
check_exec(){ check_exec(){
check_ld "$@" && { test "$cross_compile" = yes || $TMPE >>$logfile 2>&1; } check_ld "$@" && { enabled cross_compile || $TMPE >>$logfile 2>&1; }
} }
require(){ require(){
...@@ -1131,7 +1131,7 @@ for opt do ...@@ -1131,7 +1131,7 @@ for opt do
done done
if test "$logging" != no; then if test "$logging" != no; then
test "$logging" = yes || logfile="$logging" enabled logging || logfile="$logging"
echo "# $0 $@" >$logfile echo "# $0 $@" >$logfile
set >>$logfile set >>$logfile
else else
...@@ -1155,7 +1155,7 @@ EOF ...@@ -1155,7 +1155,7 @@ EOF
dc1394="no" dc1394="no"
ffserver="no" ffserver="no"
network="no" network="no"
if test "$wince" = "yes"; then if enabled wince; then
protocols="no" protocols="no"
fi fi
SLIBPREF="" SLIBPREF=""
...@@ -1188,11 +1188,11 @@ EOF ...@@ -1188,11 +1188,11 @@ EOF
exit 1; exit 1;
fi fi
if test "$libtheora" = "yes" && test "$libogg" = "no"; then if enabled libtheora && test "$libogg" = "no"; then
die "libogg must be enabled to enable libtheora." die "libogg must be enabled to enable libtheora."
fi fi
if test "$libvorbis" = "yes" && test "$libogg" = "no"; then if enabled libvorbis && test "$libogg" = "no"; then
die "libogg must be enabled to enable libvorbis." die "libogg must be enabled to enable libvorbis."
fi fi
...@@ -1302,25 +1302,25 @@ if test $cpu != "generic"; then ...@@ -1302,25 +1302,25 @@ if test $cpu != "generic"; then
case $cpu in case $cpu in
601|ppc601|PowerPC601) 601|ppc601|PowerPC601)
add_cflags "-mcpu=601" add_cflags "-mcpu=601"
if test $altivec = "yes"; then if enabled altivec; then
echo "WARNING: Tuning for PPC601 but AltiVec enabled!"; echo "WARNING: Tuning for PPC601 but AltiVec enabled!";
fi fi
;; ;;
603*|ppc603*|PowerPC603*) 603*|ppc603*|PowerPC603*)
add_cflags "-mcpu=603" add_cflags "-mcpu=603"
if test $altivec = "yes"; then if enabled altivec; then
echo "WARNING: Tuning for PPC603 but AltiVec enabled!"; echo "WARNING: Tuning for PPC603 but AltiVec enabled!";
fi fi
;; ;;
604*|ppc604*|PowerPC604*) 604*|ppc604*|PowerPC604*)
add_cflags "-mcpu=604" add_cflags "-mcpu=604"
if test $altivec = "yes"; then if enabled altivec; then
echo "WARNING: Tuning for PPC604 but AltiVec enabled!"; echo "WARNING: Tuning for PPC604 but AltiVec enabled!";
fi fi
;; ;;
G3|g3|75*|ppc75*|PowerPC75*) G3|g3|75*|ppc75*|PowerPC75*)
add_cflags "-mcpu=750 -mpowerpc-gfxopt" add_cflags "-mcpu=750 -mpowerpc-gfxopt"
if test $altivec = "yes"; then if enabled altivec; then
echo "WARNING: Tuning for PPC75x but AltiVec enabled!"; echo "WARNING: Tuning for PPC75x but AltiVec enabled!";
fi fi
;; ;;
...@@ -1416,7 +1416,7 @@ fi ...@@ -1416,7 +1416,7 @@ fi
# AltiVec flags: The FSF version of GCC differs from the Apple version # AltiVec flags: The FSF version of GCC differs from the Apple version
if test $arch = "powerpc"; then if test $arch = "powerpc"; then
if test $altivec = "yes"; then if enabled altivec; then
if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
add_cflags "-faltivec" add_cflags "-faltivec"
else else
...@@ -1428,8 +1428,8 @@ fi ...@@ -1428,8 +1428,8 @@ fi
check_header altivec.h check_header altivec.h
# check if our compiler supports Motorola AltiVec C API # check if our compiler supports Motorola AltiVec C API
if test $altivec = "yes"; then if enabled altivec; then
if test $altivec_h = "yes"; then if enabled altivec_h; then
inc_altivec_h="#include <altivec.h>" inc_altivec_h="#include <altivec.h>"
else else
inc_altivec_h= inc_altivec_h=
...@@ -1808,7 +1808,7 @@ if enabled optimize; then ...@@ -1808,7 +1808,7 @@ if enabled optimize; then
fi fi
# PIC flags for shared library objects where they are needed # PIC flags for shared library objects where they are needed
if test "$lshared" = "yes" ; then if enabled lshared; then
# LIBOBJFLAGS may have already been set in the OS configuration # LIBOBJFLAGS may have already been set in the OS configuration
if test -z "$LIBOBJFLAGS" ; then if test -z "$LIBOBJFLAGS" ; then
case "$arch" in case "$arch" in
...@@ -1817,13 +1817,13 @@ if test "$lshared" = "yes" ; then ...@@ -1817,13 +1817,13 @@ if test "$lshared" = "yes" ; then
fi fi
fi fi
if test "$gprof" = "yes" ; then if enabled gprof; then
add_cflags "-p" add_cflags "-p"
add_ldflags "-p" add_ldflags "-p"
fi fi
VHOOKCFLAGS="-fPIC $CFLAGS" VHOOKCFLAGS="-fPIC $CFLAGS"
test "$needmdynamicnopic" = yes && add_cflags -mdynamic-no-pic enabled needmdynamicnopic && add_cflags -mdynamic-no-pic
# find if .align arg is power-of-two or not # find if .align arg is power-of-two or not
if test $asmalign_pot = "unknown"; then if test $asmalign_pot = "unknown"; then
...@@ -1867,17 +1867,17 @@ echo "shared $lshared" ...@@ -1867,17 +1867,17 @@ echo "shared $lshared"
echo "postprocessing support $pp" echo "postprocessing support $pp"
echo "software scaler enabled $swscaler" echo "software scaler enabled $swscaler"
echo "video hooking $vhook" echo "video hooking $vhook"
if test "$vhook" = "yes"; then if enabled vhook; then
echo "Imlib2 support $imlib2" echo "Imlib2 support $imlib2"
echo "FreeType support $freetype2" echo "FreeType support $freetype2"
fi fi
echo "network support $network" echo "network support $network"
if test "$network" = "yes" ; then if enabled network; then
echo "IPv6 support $ipv6" echo "IPv6 support $ipv6"
fi fi
echo "threading support $thread_type" echo "threading support $thread_type"
echo "SDL support $sdl" echo "SDL support $sdl"
if test $sdl_too_old = "yes"; then if enabled sdl_too_old; then
echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support." echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support."
fi fi
echo "Sun medialib support $mlib" echo "Sun medialib support $mlib"
...@@ -1924,7 +1924,7 @@ echo "MAKE=$make" >> config.mak ...@@ -1924,7 +1924,7 @@ echo "MAKE=$make" >> config.mak
echo "CC=$cc" >> config.mak echo "CC=$cc" >> config.mak
echo "AR=$ar" >> config.mak echo "AR=$ar" >> config.mak
echo "RANLIB=$ranlib" >> config.mak echo "RANLIB=$ranlib" >> config.mak
if test "$dostrip" = "yes" ; then if enabled dostrip; then
echo "STRIP=$strip" >> config.mak echo "STRIP=$strip" >> config.mak
else else
echo "STRIP=echo ignoring strip" >> config.mak echo "STRIP=echo ignoring strip" >> config.mak
...@@ -1943,7 +1943,7 @@ echo "BUILD_STATIC=$lstatic" >> config.mak ...@@ -1943,7 +1943,7 @@ echo "BUILD_STATIC=$lstatic" >> config.mak
echo "BUILDSUF=$BUILDSUF" >> config.mak echo "BUILDSUF=$BUILDSUF" >> config.mak
echo "LIBPREF=$LIBPREF" >> config.mak echo "LIBPREF=$LIBPREF" >> config.mak
echo "LIBSUF=\${BUILDSUF}$LIBSUF" >> config.mak echo "LIBSUF=\${BUILDSUF}$LIBSUF" >> config.mak
if test "$lstatic" = "yes" ; then if enabled lstatic; then
echo "LIB=$LIB" >> config.mak echo "LIB=$LIB" >> config.mak
else # Some Make complain if this variable does not exist. else # Some Make complain if this variable does not exist.
echo "LIB=" >> config.mak echo "LIB=" >> config.mak
...@@ -1967,7 +1967,7 @@ case "$arch" in ...@@ -1967,7 +1967,7 @@ case "$arch" in
if test "$POWERPCMODE" = "64bits"; then if test "$POWERPCMODE" = "64bits"; then
echo "#define POWERPC_MODE_64BITS 1" >> $TMPH echo "#define POWERPC_MODE_64BITS 1" >> $TMPH
fi fi
if test "$powerpc_perf" = "yes"; then if enabled powerpc_perf; then
echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH echo "#define POWERPC_PERFORMANCE_REPORT 1" >> $TMPH
fi fi
;; ;;
...@@ -1977,46 +1977,46 @@ case "$arch" in ...@@ -1977,46 +1977,46 @@ case "$arch" in
;; ;;
esac esac
if test "$bigendian" = "yes" ; then if enabled bigendian; then
echo "WORDS_BIGENDIAN=yes" >> config.mak echo "WORDS_BIGENDIAN=yes" >> config.mak
echo "#define WORDS_BIGENDIAN 1" >> $TMPH echo "#define WORDS_BIGENDIAN 1" >> $TMPH
fi fi
if test "$mmx" = "yes" ; then if enabled mmx; then
echo "TARGET_MMX=yes" >> config.mak echo "TARGET_MMX=yes" >> config.mak
echo "#define HAVE_MMX 1" >> $TMPH echo "#define HAVE_MMX 1" >> $TMPH
echo "#define __CPU__ 586" >> $TMPH echo "#define __CPU__ 586" >> $TMPH
fi fi
if test "$cmov" = "yes" ; then if enabled cmov; then
echo "TARGET_CMOV=yes" >> config.mak echo "TARGET_CMOV=yes" >> config.mak
echo "#define HAVE_CMOV 1" >> $TMPH echo "#define HAVE_CMOV 1" >> $TMPH
fi fi
if test "$cmov_is_fast" = "yes" ; then if enabled cmov_is_fast; then
echo "TARGET_CMOV_IS_FAST=yes" >> config.mak echo "TARGET_CMOV_IS_FAST=yes" >> config.mak
echo "#define CMOV_IS_FAST 1" >> $TMPH echo "#define CMOV_IS_FAST 1" >> $TMPH
fi fi
if test "$armv5te" = "yes" ; then if enabled armv5te; then
echo "TARGET_ARMV5TE=yes" >> config.mak echo "TARGET_ARMV5TE=yes" >> config.mak
echo "#define HAVE_ARMV5TE 1" >> $TMPH echo "#define HAVE_ARMV5TE 1" >> $TMPH
fi fi
if test "$iwmmxt" = "yes" ; then if enabled iwmmxt; then
echo "TARGET_IWMMXT=yes" >> config.mak echo "TARGET_IWMMXT=yes" >> config.mak
echo "#define HAVE_IWMMXT 1" >> $TMPH echo "#define HAVE_IWMMXT 1" >> $TMPH
fi fi
if test "$mmi" = "yes" ; then if enabled mmi; then
echo "TARGET_MMI=yes" >> config.mak echo "TARGET_MMI=yes" >> config.mak
echo "#define HAVE_MMI 1" >> $TMPH echo "#define HAVE_MMI 1" >> $TMPH
fi fi
if test "$altivec" = "yes" ; then if enabled altivec; then
echo "TARGET_ALTIVEC=yes" >> config.mak echo "TARGET_ALTIVEC=yes" >> config.mak
echo "#define HAVE_ALTIVEC 1" >> $TMPH echo "#define HAVE_ALTIVEC 1" >> $TMPH
fi fi
if test "$sdl" = "yes" ; then if enabled sdl; then
echo "SDL_LIBS=`"${SDL_CONFIG}" --libs`" >> config.mak echo "SDL_LIBS=`"${SDL_CONFIG}" --libs`" >> config.mak
echo "SDL_CFLAGS=`"${SDL_CONFIG}" --cflags`" >> config.mak echo "SDL_CFLAGS=`"${SDL_CONFIG}" --cflags`" >> config.mak
fi fi
if test "$texi2html" = "yes"; then if enabled texi2html; then
echo "BUILD_DOC=yes" >> config.mak echo "BUILD_DOC=yes" >> config.mak
fi fi
...@@ -2028,7 +2028,7 @@ lavu_version=`grep '#define LIBAVUTIL_VERSION ' "$source_path/libavutil/avutil.h ...@@ -2028,7 +2028,7 @@ lavu_version=`grep '#define LIBAVUTIL_VERSION ' "$source_path/libavutil/avutil.h
if test "$lshared" = "yes" ; then if enabled lshared; then
echo "BUILD_SHARED=yes" >> config.mak echo "BUILD_SHARED=yes" >> config.mak
echo "PIC=-fPIC -DPIC" >> config.mak echo "PIC=-fPIC -DPIC" >> config.mak
echo "SPPMAJOR=${pp_version%%.*}" >> config.mak echo "SPPMAJOR=${pp_version%%.*}" >> config.mak
...@@ -2078,12 +2078,12 @@ echo "SRC_PATH=\"$source_path\"" >> config.mak ...@@ -2078,12 +2078,12 @@ echo "SRC_PATH=\"$source_path\"" >> config.mak
echo "SRC_PATH_BARE=$source_path" >> config.mak echo "SRC_PATH_BARE=$source_path" >> config.mak
echo "BUILD_ROOT=\"$PWD\"" >> config.mak echo "BUILD_ROOT=\"$PWD\"" >> config.mak
if test "$amr_if2" = "yes" ; then if enabled amr_if2; then
echo "AMR_CFLAGS=-DIF2=1" >> config.mak echo "AMR_CFLAGS=-DIF2=1" >> config.mak
fi fi
# Apparently it's not possible to portably echo a backslash. # Apparently it's not possible to portably echo a backslash.
if test "$asmalign_pot" = "yes" ; then if enabled asmalign_pot; then
printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> $TMPH printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> $TMPH
else else
printf '#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\\n\\t"\n' >> $TMPH printf '#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\\n\\t"\n' >> $TMPH
...@@ -2113,7 +2113,7 @@ fi ...@@ -2113,7 +2113,7 @@ fi
rm -f $TMPO $TMPC $TMPE $TMPS $TMPH rm -f $TMPO $TMPC $TMPE $TMPS $TMPH
# build tree in object directory if source path is different from current one # build tree in object directory if source path is different from current one
if test "$source_path_used" = "yes" ; then if enabled source_path_used; then
DIRS="\ DIRS="\
doc \ doc \
libavformat \ libavformat \
...@@ -2215,7 +2215,7 @@ pkgconfig_generate_uninstalled libavcodec "FFmpeg codec library" "$lavc_version" ...@@ -2215,7 +2215,7 @@ pkgconfig_generate_uninstalled libavcodec "FFmpeg codec library" "$lavc_version"
pkgconfig_generate libavformat "FFmpeg container format library" "$lavf_version" "-lavformat $extralibs" "$pkg_requires libavcodec = $lavc_version" ffmpeg pkgconfig_generate libavformat "FFmpeg container format library" "$lavf_version" "-lavformat $extralibs" "$pkg_requires libavcodec = $lavc_version" ffmpeg
pkgconfig_generate_uninstalled libavformat "FFmpeg container format library" "$lavf_version" "$extralibs" "$pkg_requires libavcodec = $lavc_version" pkgconfig_generate_uninstalled libavformat "FFmpeg container format library" "$lavf_version" "$extralibs" "$pkg_requires libavcodec = $lavc_version"
if test "$pp" = "yes"; then if enabled pp; then
pkgconfig_generate libpostproc "FFmpeg post processing library" "$pp_version" -lpostproc "" postproc pkgconfig_generate libpostproc "FFmpeg post processing library" "$pp_version" -lpostproc "" postproc
pkgconfig_generate_uninstalled libpostproc "FFmpeg post processing library" "$pp_version" pkgconfig_generate_uninstalled libpostproc "FFmpeg post processing library" "$pp_version"
fi fi
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment