]> granicus.if.org Git - libx264/commitdiff
Make i686 the default arch on x86_32
authorFiona Glaser <fiona@x264.com>
Sat, 16 May 2009 19:16:34 +0000 (12:16 -0700)
committerLoren Merritt <pengvado@akuvian.org>
Tue, 19 May 2009 05:23:21 +0000 (05:23 +0000)
Disabling asm will default to a generic arch.
Also fix configure for gcc 4.4.

configure

index f4b53446fc07766cc0ed288ce4e82022709adfa3..f02d3e70eb229c4ad1e40bec5b3694f57c917670 100755 (executable)
--- a/configure
+++ b/configure
@@ -31,15 +31,11 @@ cc_check() {
 int main () { $3 return 0; }
 EOF
     $CC conftest.c $CFLAGS $LDFLAGS $2 -o conftest 2>$DEVNULL
-    TMP="$?"
-    return $TMP
 }
 
 as_check() {
     echo "$1" > conftest.asm
     $AS conftest.asm $ASFLAGS $2 -o conftest.o 2>$DEVNULL
-    TMP="$?"
-    return $TMP
 }
 
 rm -f config.h config.mak x264.pc conftest*
@@ -236,6 +232,9 @@ case $host_cpu in
     ARCH="X86"
     AS="yasm"
     ASFLAGS="$ASFLAGS -O2"
+    if [[ "$asm" == yes && "$CFLAGS" != *-march* ]]; then
+      CFLAGS="$CFLAGS -march=i686"
+    fi
     if [ "$SYS" = MACOSX ]; then
       ASFLAGS="$ASFLAGS -f macho -DPREFIX"
     elif [ "$SYS" = MINGW ]; then