1
0
Fork 0
mirror of https://git.tukaani.org/xz.git synced 2024-04-04 12:36:23 +02:00

Enable assembler code only if it is known to work

on that operating system.

I'm too lazy to think how to make a good Autoconf test
for this and it's not that important anyway.

No longer define HAVE_ASM_X86 or HAVE_ASM_X86_64.
Inline assembler (if any) is used if a macro like
__i386__ or __x86_64__ is defined.
This commit is contained in:
Lasse Collin 2009-11-22 12:00:30 +02:00
parent 0733f4c999
commit b9b5c54cd4

View file

@ -288,29 +288,27 @@ AC_ARG_ENABLE([assembler], AC_HELP_STRING([--disable-assembler],
for the architecture.]), for the architecture.]),
[], [enable_assembler=yes]) [], [enable_assembler=yes])
if test "x$enable_assembler" = xyes; then if test "x$enable_assembler" = xyes; then
enable_assembler=no
case $host_os in
# Darwin should work too but only if not creating universal
# binaries. Solaris x86 could work too but I cannot test.
linux* | *bsd* | mingw* | cygwin*)
case $host_cpu in case $host_cpu in
i?86) enable_assembler=x86 ;; i?86) enable_assembler=x86 ;;
x86_64) enable_assembler=x86_64 ;; x86_64) enable_assembler=x86_64 ;;
*) enable_assembler=no ;; esac
;;
esac esac
fi fi
case $enable_assembler in case $enable_assembler in
x86) x86 | x86_64 | no)
AC_DEFINE([HAVE_ASM_X86], [1], AC_MSG_RESULT([$enable_assembler])
[Define to 1 if using x86 assembler optimizations.])
;;
x86_64)
AC_DEFINE([HAVE_ASM_X86_64], [1],
[Define to 1 if using x86_64 assembler optimizations.])
;;
no)
;; ;;
*) *)
AC_MSG_RESULT([]) AC_MSG_RESULT([])
AC_MSG_ERROR([--enable-assembler accepts only \`yes', \`no', \`x86', or \`x86_64'.]) AC_MSG_ERROR([--enable-assembler accepts only \`yes', \`no', \`x86', or \`x86_64'.])
;; ;;
esac esac
AC_MSG_RESULT([$enable_assembler])
AM_CONDITIONAL(COND_ASM_X86, test "x$enable_assembler" = xx86) AM_CONDITIONAL(COND_ASM_X86, test "x$enable_assembler" = xx86)
AM_CONDITIONAL(COND_ASM_X86_64, test "x$enable_assembler" = xx86_64) AM_CONDITIONAL(COND_ASM_X86_64, test "x$enable_assembler" = xx86_64)