]> git.sesse.net Git - ffmpeg/blobdiff - configure
Check for sys/mman.h and set appropriate definitions.
[ffmpeg] / configure
index ac46aeb9da7cb999452cf2e8485cce9223292b00..46996db35b5a7b46ee2ca5540bbb4ca3332c440a 100755 (executable)
--- a/configure
+++ b/configure
@@ -699,6 +699,7 @@ ARCH_EXT_LIST='
     iwmmxt
     mmi
     mmx
+    mmx2
     ssse3
     vis
 '
@@ -753,6 +754,7 @@ HAVE_LIST="
     socklen_t
     soundcard_h
     poll_h
+    sys_mman_h
     sys_select_h
     sys_soundcard_h
     termios_h
@@ -780,6 +782,7 @@ armv6_deps="armv4l"
 iwmmxt_deps="armv4l"
 mmi_deps="mips"
 mmx_deps="x86"
+mmx2_deps="x86"
 ssse3_deps="x86"
 vis_deps="sparc"
 
@@ -888,6 +891,7 @@ bindir='$(PREFIX)/bin'
 # toolchain
 cc="gcc"
 ar="ar"
+nm="nm"
 ranlib="ranlib"
 make="make"
 strip="strip"
@@ -1315,6 +1319,7 @@ LDFLAGS="$FFLDFLAGS $LDFLAGS"
 test -n "$cross_prefix" && enable cross_compile
 cc="${cross_prefix}${cc}"
 ar="${cross_prefix}${ar}"
+nm="${cross_prefix}${nm}"
 ranlib="${cross_prefix}${ranlib}"
 strip="${cross_prefix}${strip}"
 
@@ -1494,7 +1499,7 @@ fi
 check_cc <<EOF || die "Symbol mangling check failed."
 int ff_extern;
 EOF
-sym=$(nm -P -g $TMPO)
+sym=$($nm -P -g $TMPO)
 extern_prefix=${sym%%ff_extern*}
 
 check_asm inline_asm '""'
@@ -1515,8 +1520,9 @@ EOF
     # check wether EBX is available on x86
     check_asm ebx_available '"":::"%ebx"'
 
-    # check whether binutils is new enough to compile SSSE3
+    # check whether binutils is new enough to compile SSSE3/MMX2
     enabled ssse3 && check_asm ssse3 '"pabsw %xmm0, %xmm0"'
+    enabled mmx2  && check_asm mmx2  '"movss %xmm0, %xmm0"'
 
     check_asm bswap '"bswap %%eax" ::: "%eax"'
 fi
@@ -1592,6 +1598,7 @@ check_header byteswap.h
 check_header conio.h
 check_header dlfcn.h
 check_header malloc.h
+check_header sys/mman.h
 check_header termios.h
 
 if ! enabled_any memalign memalign_hack && enabled need_memalign ; then