[x264-devel] [PATCH 4/4] detect GNU as and set $ASFLAGS appropriately
Sean McGovern
gseanmcg at gmail.com
Thu Sep 29 20:00:09 CEST 2011
---
configure | 19 +++++++++++++++++--
1 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
index 9159eef..28de7d7 100755
--- a/configure
+++ b/configure
@@ -655,6 +655,13 @@ fi
[ $asm = no ] && AS=""
[ "x$AS" = x ] && asm="no" || asm="yes"
+# check for GNU as
+non_gnu_as="yes"
+if [ "$asm" != "no" ]; then
+ AS_TYPE=`$AS --version 2>$DEVNULL | head -n 1 | awk '{ print $1; }'`
+ [ "x$AS_TYPE" = "xGNU" ] && non_gnu_as="no"
+fi
+
define ARCH_$ARCH
define SYS_$SYS
@@ -912,10 +919,18 @@ fi
if [ "$bit_depth" -gt "8" ]; then
define HIGH_BIT_DEPTH
- ASFLAGS="$ASFLAGS -DHIGH_BIT_DEPTH"
+ [ "$non_gnu_as" = "yes" -a "$asm" != "no" ] && \
+ ASFLAGS="$ASFLAGS -DHIGH_BIT_DEPTH" || \
+ [ "$asm" != "no" ] && ASFLAGS="$ASFLAGS --defsym HIGH_BIT_DEPTH"
fi
-ASFLAGS="$ASFLAGS -DBIT_DEPTH=$bit_depth"
+if [ "$non_gnu_as" = "yes" -a "$asm" != "no" ]; then
+ ASFLAGS="$ASFLAGS -DBIT_DEPTH=$bit_depth"
+ # tell Sun's assembler to run the preprocessor
+ [ "x$SYS" = "xSunOS" -a "$(which $AS)" = "/usr/ccs/bin/as" ] && ASFLAGS="$ASFLAGS -P"
+else
+ [ "$asm" != "no" ] && ASFLAGS="$ASFLAGS --defsym HIGH_BIT_DEPTH=$bit_depth"
+fi
[ $gpl = yes ] && define HAVE_GPL && x264_gpl=1 || x264_gpl=0
--
1.7.6
More information about the x264-devel
mailing list