Replace one-lined if;elses to && ||
Originally committed as revision 10540 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
44
configure
vendored
44
configure
vendored
@@ -1447,20 +1447,16 @@ 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 enabled altivec; then
|
if enabled altivec; then
|
||||||
if test -n "`$cc -v 2>&1 | grep version | grep Apple`"; then
|
test -n "`$cc -v 2>&1 | grep version | grep Apple`" &&
|
||||||
add_cflags "-faltivec"
|
add_cflags "-faltivec" ||
|
||||||
else
|
|
||||||
add_cflags "-maltivec -mabi=altivec"
|
add_cflags "-maltivec -mabi=altivec"
|
||||||
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 enabled altivec_h; then
|
enabled altivec_h &&
|
||||||
inc_altivec_h="#include <altivec.h>"
|
inc_altivec_h="#include <altivec.h>" ||
|
||||||
else
|
|
||||||
inc_altivec_h=
|
inc_altivec_h=
|
||||||
fi
|
|
||||||
check_cc <<EOF || disable altivec
|
check_cc <<EOF || disable altivec
|
||||||
$inc_altivec_h
|
$inc_altivec_h
|
||||||
int main(void) {
|
int main(void) {
|
||||||
@@ -1551,11 +1547,9 @@ fi
|
|||||||
|
|
||||||
for thread in $THREADS_LIST; do
|
for thread in $THREADS_LIST; do
|
||||||
if enabled $thread; then
|
if enabled $thread; then
|
||||||
if test -n "$thread_type"; then
|
test -n "$thread_type" &&
|
||||||
die "ERROR: Only one thread type must be selected."
|
die "ERROR: Only one thread type must be selected." ||
|
||||||
else
|
|
||||||
thread_type="$thread"
|
thread_type="$thread"
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -1852,11 +1846,9 @@ echo "libvorbis enabled ${libvorbis-no}"
|
|||||||
echo "x264 enabled ${libx264-no}"
|
echo "x264 enabled ${libx264-no}"
|
||||||
echo "XviD enabled ${libxvid-no}"
|
echo "XviD enabled ${libxvid-no}"
|
||||||
echo "zlib enabled ${zlib-no}"
|
echo "zlib enabled ${zlib-no}"
|
||||||
if ! enabled gpl; then
|
enabled gpl &&
|
||||||
|
echo "License: GPL" ||
|
||||||
echo "License: LGPL"
|
echo "License: LGPL"
|
||||||
else
|
|
||||||
echo "License: GPL"
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Creating config.mak and config.h..."
|
echo "Creating config.mak and config.h..."
|
||||||
|
|
||||||
@@ -1876,11 +1868,9 @@ 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
|
||||||
echo "LN_S=$ln_s" >> config.mak
|
echo "LN_S=$ln_s" >> config.mak
|
||||||
if enabled dostrip; then
|
enabled dostrip &&
|
||||||
echo "STRIP=$strip" >> config.mak
|
echo "STRIP=$strip" >> config.mak ||
|
||||||
else
|
|
||||||
echo "STRIP=echo ignoring strip" >> config.mak
|
echo "STRIP=echo ignoring strip" >> config.mak
|
||||||
fi
|
|
||||||
|
|
||||||
echo "OPTFLAGS=$CFLAGS" >> config.mak
|
echo "OPTFLAGS=$CFLAGS" >> config.mak
|
||||||
echo "VHOOKCFLAGS=$VHOOKCFLAGS">>config.mak
|
echo "VHOOKCFLAGS=$VHOOKCFLAGS">>config.mak
|
||||||
@@ -1968,19 +1958,15 @@ echo "SRC_PATH_BARE=$source_path" >> config.mak
|
|||||||
echo "BUILD_ROOT=\"$PWD\"" >> config.mak
|
echo "BUILD_ROOT=\"$PWD\"" >> config.mak
|
||||||
|
|
||||||
# Apparently it's not possible to portably echo a backslash.
|
# Apparently it's not possible to portably echo a backslash.
|
||||||
if enabled asmalign_pot; then
|
enabled asmalign_pot &&
|
||||||
printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> $TMPH
|
printf '#define ASMALIGN(ZEROBITS) ".align " #ZEROBITS "\\n\\t"\n' >> $TMPH ||
|
||||||
else
|
|
||||||
printf '#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\\n\\t"\n' >> $TMPH
|
printf '#define ASMALIGN(ZEROBITS) ".align 1<<" #ZEROBITS "\\n\\t"\n' >> $TMPH
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Do not overwrite config.h if unchanged to avoid superfluous rebuilds.
|
# Do not overwrite config.h if unchanged to avoid superfluous rebuilds.
|
||||||
if ! cmp -s $TMPH config.h; then
|
cmp -s $TMPH config.h &&
|
||||||
mv -f $TMPH config.h
|
echo "config.h is unchanged" ||
|
||||||
else
|
mv -f $TMPH config.h
|
||||||
echo "config.h is unchanged"
|
|
||||||
fi
|
|
||||||
|
|
||||||
rm -f $TMPO $TMPC $TMPE $TMPS $TMPH
|
rm -f $TMPO $TMPC $TMPE $TMPS $TMPH
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user