]> git.sesse.net Git - x264/blobdiff - configure
Refactor asm macros part 2: DCT
[x264] / configure
index 10e0aa5d43d56b3c308eede40f9288072bea26ed..29e1b25bc047448128cf51b7a8a5b94ce4f15b32 100755 (executable)
--- a/configure
+++ b/configure
@@ -7,10 +7,11 @@ echo ""
 echo "available options:"
 echo ""
 echo "  --help                   print this message"
-echo "  --enable-avis-input      enables avisynth input (win32 only)"
-echo "  --enable-mp4-output      enables mp4 output (using gpac)"
+echo "  --disable-avis-input     disables avisynth input (win32 only)"
+echo "  --disable-mp4-output     disables mp4 output (using gpac)"
+echo "  --disable-pthread        disables multithreaded encoding"
+echo "  --disable-asm            disables assembly optimizations on x86"
 echo "  --enable-gtk             build GTK+ interface"
-echo "  --enable-pthread         enables multithreaded encoding"
 echo "  --enable-debug           adds -g, doesn't strip"
 echo "  --enable-gprof           adds -pg, doesn't strip"
 echo "  --enable-visualize       enables visualization (X11 only)"
@@ -53,6 +54,7 @@ DEVNULL='/dev/null'
 avis_input="auto"
 mp4_output="auto"
 pthread="auto"
+asm="yes"
 debug="no"
 gprof="no"
 pic="no"
@@ -102,6 +104,12 @@ for opt do
         --includedir=*)
             includedir="$optarg"
             ;;
+        --enable-asm)
+            asm="yes"
+            ;;
+        --disable-asm)
+            asm="no"
+            ;;
         --enable-avis-input)
             avis_input="yes"
             ;;
@@ -241,8 +249,6 @@ case $host_cpu in
       ASFLAGS="$ASFLAGS -f macho -DPREFIX"
     elif [ "$SYS" = MINGW ]; then
       ASFLAGS="$ASFLAGS -f win32 -DPREFIX"
-    elif [ "$SYS" = NETBSD ]; then
-      ASFLAGS="$ASFLAGS -f aoutb"
     else
       ASFLAGS="$ASFLAGS -f elf"
     fi
@@ -302,32 +308,21 @@ if [ $shared = yes -a \( $ARCH = "X86_64" -o $ARCH = "PPC" -o $ARCH = "ALPHA" \)
     pic="yes"
 fi
 
-if [ $SYS = MACOSX -a $ARCH = X86 ]
-then
-  # we want Apple's nasm from Xcode 2.4.1 or later
-  NASM_BUILD_REQUIRED=11
-  NASM_BUILD=`nasm -v|grep "Apple Computer"|sed 's/.*build \([0-9]*\).*/\1/'`
-  if [ $NASM_BUILD -lt $NASM_BUILD_REQUIRED ]
-  then
-    echo "Your version of 'nasm' is too old."
-    echo "Please install Xcode 2.4.1 or later."
-    AS=""
-  fi
-fi
-
-if [ $ARCH = X86 -o $ARCH = X86_64 ] ; then
+if [ $asm = yes -a \( $ARCH = X86 -o $ARCH = X86_64 \) ] ; then
     if [ $ARCH = X86 -a $pic = yes -a x$AS = xyasm -a\
-         "`yasm --version | head -n 1`" "<" "yasm 0.6.2" ] ; then
+         "`yasm --version 2>$DEVNULL | head -n 1`" "<" "yasm 0.6.2" ] ; then
          echo "yasm prior to 0.6.2 miscompiles PIC. trying nasm instead..."
          AS=nasm
     fi
     if as_check "pabsw xmm0, xmm0" ; then
         CFLAGS="$CFLAGS -DHAVE_MMX"
     else
-        echo "No suitable assembler found.  x264 will be several times slower."
-        echo "Please install 'yasm' to get MMX/SSE optimized code."
-        AS=""
+        echo "No suitable assembler found.  Install 'yasm' to get MMX/SSE optimized code."
+        echo "If you really want to compile without asm, configure with --disable-asm."
+        exit 1
     fi
+else
+    AS=""
 fi
 
 CFLAGS="$CFLAGS -DARCH_$ARCH -DSYS_$SYS"
@@ -497,6 +492,7 @@ EOF
 
 echo "Platform:   $ARCH"
 echo "System:     $SYS"
+echo "asm:        $asm"
 echo "avis input: $avis_input"
 echo "mp4 output: $mp4_output"
 echo "pthread:    $pthread"