1
0
Fork 0
mirror of https://github.com/tailix/drivers.git synced 2024-11-20 11:06:32 -05:00

Detect CPU architectures

This commit is contained in:
Alex Kotov 2022-12-03 19:38:24 +04:00
parent 4658be866b
commit b3dcc54312
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08

View file

@ -32,6 +32,37 @@ AM_INIT_AUTOMAKE([1.16 subdir-objects])
#########################
# Automake conditionals #
#########################
dnl Architecture
AM_CONDITIONAL([ASM_I386], [test "$host_cpu" = i386])
AM_CONDITIONAL([ASM_RISCV64], [test "$host_cpu" = riscv64])
AM_CONDITIONAL([ASM_X86_64], [test "$host_cpu" = x86_64])
dnl Architecture (additional)
AM_CONDITIONAL([ASM_RISCV], [test "$host_cpu" = riscv64])
AM_CONDITIONAL([ASM_X86], [test "$host_cpu" = i386 -o "$host_cpu" = x86_64])
####################
# Autoconf defines #
####################
dnl Architecture
AS_IF([test "$host_cpu" = i386], [AC_DEFINE([ASM_I386], [1], [architecture is i386])])
AS_IF([test "$host_cpu" = riscv64], [AC_DEFINE([ASM_RISCV64], [1], [architecture is RISC-V 64-bit])])
AS_IF([test "$host_cpu" = x86_64], [AC_DEFINE([ASM_X86_64], [1], [architecture is x86_64])])
dnl Architecture (additional)
AS_IF([test "$host_cpu" = riscv64], [AC_DEFINE([ASM_RISCV], [1], [architecture is RISC-V])])
AS_IF([test "$host_cpu" = i386], [AC_DEFINE([ASM_X86], [1], [architecture is x86])])
AS_IF([test "$host_cpu" = x86_64], [AC_DEFINE([ASM_X86], [1], [architecture is x86])])
##############
# Run checks #
##############