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:
parent
0733f4c999
commit
b9b5c54cd4
1 changed files with 12 additions and 14 deletions
26
configure.ac
26
configure.ac
|
@ -288,29 +288,27 @@ AC_ARG_ENABLE([assembler], AC_HELP_STRING([--disable-assembler],
|
|||
for the architecture.]),
|
||||
[], [enable_assembler=yes])
|
||||
if test "x$enable_assembler" = xyes; then
|
||||
case $host_cpu in
|
||||
i?86) enable_assembler=x86 ;;
|
||||
x86_64) enable_assembler=x86_64 ;;
|
||||
*) enable_assembler=no ;;
|
||||
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
|
||||
i?86) enable_assembler=x86 ;;
|
||||
x86_64) enable_assembler=x86_64 ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $enable_assembler in
|
||||
x86)
|
||||
AC_DEFINE([HAVE_ASM_X86], [1],
|
||||
[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)
|
||||
x86 | x86_64 | no)
|
||||
AC_MSG_RESULT([$enable_assembler])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([])
|
||||
AC_MSG_ERROR([--enable-assembler accepts only \`yes', \`no', \`x86', or \`x86_64'.])
|
||||
;;
|
||||
esac
|
||||
AC_MSG_RESULT([$enable_assembler])
|
||||
AM_CONDITIONAL(COND_ASM_X86, test "x$enable_assembler" = xx86)
|
||||
AM_CONDITIONAL(COND_ASM_X86_64, test "x$enable_assembler" = xx86_64)
|
||||
|
||||
|
|
Loading…
Reference in a new issue