[x264-devel] 2 proposals for configure script about assembler check

Surf Chen surfchen at gmail.com
Mon May 19 06:25:09 CEST 2008


1st :
NASM_BUILD=`nasm -v|grep "Apple Computer"|sed 's/.*build \([0-9]*\).*/\1/'`
if [ $NASM_BUILD -lt $NASM_BUILD_REQUIRED ]

It works if we are using the nasm produced by Apple.But when we
download nasm from sf.net and compile it by ourself,the script will
fail since here nasm -v would output "NASM version 2.02 compiled on
May 19 2008",but not 'NASM version 0.98.40 (Apple Computer, Inc. build
11) compiled on Sep 23 2007'.

2nd:
If the yasm not exists,there will be a msg output to stderr.I use the
below patch(produced with git diff) to fix it.

index 94554de..f0d2e19 100755
--- a/configure
+++ b/configure
@@ -314,8 +314,9 @@ then
 fi

 if [ $ARCH = X86 -o $ARCH = X86_64 ] ; then
+    yv=`yasm --version 2>$DEVNULL| head -n 1 `
     if [ $ARCH = X86 -a $pic = yes -a x$AS = xyasm -a\
-         "`yasm --version | head -n 1`" "<" "yasm 0.6.2" ] ; then
+         "$yv" "<" "yasm 0.6.2" ] ; then
          echo "yasm prior to 0.6.2 miscompiles PIC. trying nasm instead..."
          AS=nasm
     fi


More information about the x264-devel mailing list