summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDan Nicholson <[email protected]>2007-12-12 09:02:31 -0800
committerDan Nicholson <[email protected]>2007-12-12 17:39:21 -0800
commit3e288627cb67c81fee92f2450a802f9c0b5ad040 (patch)
tree5456833850d15b96475840d289c96527776cf7eb /configure.ac
parent16a07fb5569a7e4d471a389f292a8b245fc12cba (diff)
autoconf: Optional assembly usage with --disable-asm
Allow the user to disable use of assembly code through the --disable-asm option. This is only relevant on the platforms where assembly is normally enabled such as Linux and FreeBSD.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac45
1 files changed, 31 insertions, 14 deletions
diff --git a/configure.ac b/configure.ac
index 94d84ec6c31..5db4af77eea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -149,6 +149,13 @@ if test "x$enable_debug" = xyes; then
CXXFLAGS="$CXXFLAGS -g"
fi
fi
+dnl These will be used near the end in the arch specific options
+AC_ARG_ENABLE(asm,
+ [AS_HELP_STRING([--disable-asm],
+ [disable assembly usage @<:@default=enabled on supported plaforms@:>@])],
+ enable_asm="$enableval",
+ enable_asm=yes
+)
dnl
dnl library names
@@ -714,18 +721,24 @@ linux*)
PIC_FLAGS="-fPIC"
case "$host_cpu" in
i*86)
- ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
- ASM_SOURCES='$(X86_SOURCES)'
- ASM_API='$(X86_API)'
+ if test "x$enable_asm" = xyes; then
+ ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
+ ASM_SOURCES='$(X86_SOURCES)'
+ ASM_API='$(X86_API)'
+ fi
;;
x86_64)
- ASM_FLAGS="-DUSE_X86_64_ASM"
- ASM_SOURCES='$(X86-64_SOURCES)'
- ASM_API='$(X86-64_API)'
+ if test "x$enable_asm" = xyes; then
+ ASM_FLAGS="-DUSE_X86_64_ASM"
+ ASM_SOURCES='$(X86-64_SOURCES)'
+ ASM_API='$(X86-64_API)'
+ fi
;;
powerpc)
- ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM"
- ASM_SOURCES='$(PPC_SOURCES)'
+ if test "x$enable_asm" = xyes; then
+ ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM"
+ ASM_SOURCES='$(PPC_SOURCES)'
+ fi
;;
esac
;;
@@ -734,14 +747,18 @@ freebsd*)
case "$host_os" in
i*86)
PIC_FLAGS=""
- ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
- ASM_SOURCES='$(X86_SOURCES)'
- ASM_API='$(X86_API)'
+ if test "x$enable_asm" = xyes; then
+ ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
+ ASM_SOURCES='$(X86_SOURCES)'
+ ASM_API='$(X86_API)'
+ fi
;;
x86_64)
- ASM_FLAGS="-DUSE_X86_64_ASM"
- ASM_SOURCES='$(X86-64_SOURCES)'
- ASM_API='$(X86-64_API)'
+ if test "x$enable_asm" = xyes; then
+ ASM_FLAGS="-DUSE_X86_64_ASM"
+ ASM_SOURCES='$(X86-64_SOURCES)'
+ ASM_API='$(X86-64_API)'
+ fi
;;
esac
;;