]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
configure: check asm support using $as
authormru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 5 Mar 2009 21:20:04 +0000 (21:20 +0000)
committermru <mru@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Thu, 5 Mar 2009 21:20:04 +0000 (21:20 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17828 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

configure

index f03052868845334e46081edd767d11bf12e9f7de..d59d81e6e3fbcd00c66d7fa471efda51795fe86e 100755 (executable)
--- a/configure
+++ b/configure
@@ -525,12 +525,19 @@ check_cpp(){
     check_cmd $cc $CFLAGS "$@" -E -o $TMPO $TMPC
 }
 
+check_as(){
+    log check_as "$@"
+    cat > $TMPC
+    log_file $TMPC
+    check_cmd $as $CFLAGS "$@" -c -o $TMPO $TMPC
+}
+
 check_asm(){
     log check_asm "$@"
     name="$1"
     asm="$2"
     shift 2
-    check_cc "$@" <<EOF && enable $name || disable $name
+    check_as "$@" <<EOF && enable $name || disable $name
 void foo(void){ __asm__ volatile($asm); }
 EOF
 }
@@ -1798,7 +1805,9 @@ EOF
 sym=$($nm -P -g $TMPO | grep ff_extern)
 extern_prefix=${sym%%ff_extern*}
 
-check_asm inline_asm '""'
+check_cc <<EOF && enable inline_asm
+void foo(void) { __asm__ volatile ("" ::); }
+EOF
 
 if enabled x86; then
     # check whether EBP is available on x86