diff --git a/configure.ac b/configure.ac index e48137f..fbec94e 100644 --- a/configure.ac +++ b/configure.ac @@ -255,7 +255,7 @@ asm_arch="" ASM_FLAGS="" ASM_SOURCES="" ASM_API="" -AC_MSG_CHECKING([whether to enable assembly]) +AC_MSG_CHECKING([whether to enable assembly at all]) test "x$enable_asm" = xno && AC_MSG_RESULT([no]) # disable if cross compiling on x86/x86_64 since we must run gen_matypes if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then @@ -294,22 +294,111 @@ if test "x$enable_asm" = xyes; then case "$asm_arch" in x86) - ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM" - ASM_SOURCES='$(X86_SOURCES)' - ASM_API='$(X86_API)' - AC_MSG_RESULT([yes, x86]) + #ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM" + + dnl specifically disable x86 assembly implementations + AC_ARG_ENABLE([x86_asm], + [AS_HELP_STRING([--disable-x86-asm], + [on x86, disable x86 specific assembly code @<:@default=enabled on x86@:>@])], + [enable_x86_asm="$enableval"], + [enable_x86_asm=yes]) + if test "x$enable_x86_asm" = xyes; then + ASM_FLAGS="$ASM_FLAGS -DUSE_X86_ASM" + fi + + dnl specifically disable x86 SSE assembly implementations + AC_ARG_ENABLE([x86_sse], + [AS_HELP_STRING([--disable-x86-sse], + [on x86, disable SSE asm implementations @<:@default=enabled on x86@:>@])], + [enable_x86_sse="$enableval"], + [enable_x86_sse=yes]) + if test "x$enable_x86_sse" = xyes; then + ASM_FLAGS="$ASM_FLAGS -DUSE_SSE_ASM" + fi + + dnl specifically disable x86 MMX assembly implementations + AC_ARG_ENABLE([x86_mmx], + [AS_HELP_STRING([--disable-x86-mmx], + [on x86, disable MMX assembly code @<:@default=enabled on x86@:>@])], + [enable_x86_mmx="$enableval"], + [enable_x86_mmx=yes]) + if test "x$enable_x86_mmx" = xyes; then + ASM_FLAGS="$ASM_FLAGS -DUSE_MMX_ASM" + fi + + dnl specifically disable x86 3DNOW assembly implementations + AC_ARG_ENABLE([x86_3dnow], + [AS_HELP_STRING([--disable-x86-3dnow], + [on x86, disable 3DNOW! assembly code @<:@default=enabled on x86@:>@])], + [enable_x86_3dnow="$enableval"], + [enable_x86_3dnow=yes]) + if test "x$enable_x86_3dnow" = xyes; then + ASM_FLAGS="$ASM_FLAGS -DUSE_3DNOW_ASM" + fi + + if test -n "${ASM_FLAGS}" ; then + ASM_SOURCES='$(X86_SOURCES)' + ASM_API='$(X86_API)' + AC_MSG_RESULT([yes, x86]) + else + AC_MSG_RESULT([no, all x86 relevant assembly options are disabled]) + fi ;; x86_64) - ASM_FLAGS="-DUSE_X86_64_ASM" - ASM_SOURCES='$(X86-64_SOURCES)' - ASM_API='$(X86-64_API)' - AC_MSG_RESULT([yes, x86_64]) + #ASM_FLAGS="-DUSE_X86_64_ASM" + dnl specifically disable x86-64 assembly implementations + AC_ARG_ENABLE([x86_64_asm], + [AS_HELP_STRING([--disable-x86-64-asm], + [on x86-64, disable x86-64 specific assembly code \ + @<:@default=enabled on x86-64@:>@])], + [enable_x86_64_asm="$enableval"], + [enable_x86_64_asm=yes]) + if test "x$enable_x86_64_asm" = xyes; then + ASM_FLAGS="$ASM_FLAGS -DUSE_X86_64_ASM" + fi + + if test -n "${ASM_FLAGS}" ; then + ASM_SOURCES='$(X86-64_SOURCES)' + ASM_API='$(X86-64_API)' + AC_MSG_RESULT([yes, x86-64]) + else + AC_MSG_RESULT([no, all x86-64 relevant assembly options are disabled]) + + fi ;; ppc) - ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM" - ASM_SOURCES='$(PPC_SOURCES)' - AC_MSG_RESULT([yes, ppc]) - ;; + + #ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM" + + dnl specifically disable ppc assembly implementations + AC_ARG_ENABLE([ppc_asm], + [AS_HELP_STRING([--disable-ppc-asm], + [on ppc, disable ppc specific assembly code @<:@default=enabled on ppc@:>@])], + [enable_ppc_asm="$enableval"], + [enable_ppc_asm=yes]) + if test "x$enable_ppc_asm" = xyes; then + ASM_FLAGS="$ASM_FLAGS -DUSE_PPC_ASM" + fi + + dnl specifically disable vmx assembly implementations + AC_ARG_ENABLE([ppc_vmx_asm], + [AS_HELP_STRING([--disable-ppc-vmx-asm], + [on ppc, disable vmx specific assembly code @<:@default=enabled on ppc@:>@])], + [enable_ppc_vmx_asm="$enableval"], + [enable_ppc_vmx_asm=yes]) + if test "x$enable_ppc_vmx_asm" = xyes; then + ASM_FLAGS="$ASM_FLAGS -DUSE_VMX_ASM" + fi + + + if test -n "${ASM_FLAGS}" ; then + ASM_SOURCES='$(PPC_SOURCES)' + AC_MSG_RESULT([yes, ppc]) + else + AC_MSG_RESULT([no, all ppc relevant assembly options are disabled]) + fi + ;; + dnl FIXME: missing SPARC here *) AC_MSG_RESULT([no, platform not supported]) ;;