Browse code

configure: check asm support using $as

Originally committed as revision 17828 to svn://svn.ffmpeg.org/ffmpeg/trunk

Måns Rullgård authored on 2009/03/06 06:20:04
Showing 1 changed files
... ...
@@ -525,12 +525,19 @@ check_cpp(){
525 525
     check_cmd $cc $CFLAGS "$@" -E -o $TMPO $TMPC
526 526
 }
527 527
 
528
+check_as(){
529
+    log check_as "$@"
530
+    cat > $TMPC
531
+    log_file $TMPC
532
+    check_cmd $as $CFLAGS "$@" -c -o $TMPO $TMPC
533
+}
534
+
528 535
 check_asm(){
529 536
     log check_asm "$@"
530 537
     name="$1"
531 538
     asm="$2"
532 539
     shift 2
533
-    check_cc "$@" <<EOF && enable $name || disable $name
540
+    check_as "$@" <<EOF && enable $name || disable $name
534 541
 void foo(void){ __asm__ volatile($asm); }
535 542
 EOF
536 543
 }
... ...
@@ -1798,7 +1805,9 @@ EOF
1798 1798
 sym=$($nm -P -g $TMPO | grep ff_extern)
1799 1799
 extern_prefix=${sym%%ff_extern*}
1800 1800
 
1801
-check_asm inline_asm '""'
1801
+check_cc <<EOF && enable inline_asm
1802
+void foo(void) { __asm__ volatile ("" ::); }
1803
+EOF
1802 1804
 
1803 1805
 if enabled x86; then
1804 1806
     # check whether EBP is available on x86