2016-05-12 17:51:24 +03:00
|
|
|
dnl #
|
2020-01-17 23:40:09 +03:00
|
|
|
dnl # Set the target cpu architecture. This allows the
|
|
|
|
dnl # following syntax to be used in a Makefile.am.
|
|
|
|
dnl #
|
|
|
|
dnl # ifeq ($(TARGET_CPU),x86_64)
|
|
|
|
dnl # ...
|
|
|
|
dnl # endif
|
|
|
|
dnl #
|
|
|
|
dnl # if TARGET_CPU_POWERPC
|
|
|
|
dnl # ...
|
|
|
|
dnl # else
|
|
|
|
dnl # ...
|
|
|
|
dnl # endif
|
2016-05-12 17:51:24 +03:00
|
|
|
dnl #
|
|
|
|
AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_ARCH], [
|
2020-01-17 23:40:09 +03:00
|
|
|
case $target_cpu in
|
|
|
|
i?86)
|
|
|
|
TARGET_CPU=i386
|
|
|
|
;;
|
|
|
|
x86_64)
|
|
|
|
TARGET_CPU=x86_64
|
2016-05-12 17:51:24 +03:00
|
|
|
;;
|
2020-01-17 23:40:09 +03:00
|
|
|
powerpc*)
|
|
|
|
TARGET_CPU=powerpc
|
|
|
|
;;
|
|
|
|
aarch64*)
|
|
|
|
TARGET_CPU=aarch64
|
|
|
|
;;
|
|
|
|
sparc64)
|
|
|
|
TARGET_CPU=sparc64
|
2016-05-12 17:51:24 +03:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2020-01-17 23:40:09 +03:00
|
|
|
AC_SUBST(TARGET_CPU)
|
|
|
|
|
|
|
|
AM_CONDITIONAL([TARGET_CPU_I386], test $TARGET_CPU = i386)
|
|
|
|
AM_CONDITIONAL([TARGET_CPU_X86_64], test $TARGET_CPU = x86_64)
|
|
|
|
AM_CONDITIONAL([TARGET_CPU_POWERPC], test $TARGET_CPU = powerpc)
|
|
|
|
AM_CONDITIONAL([TARGET_CPU_AARCH64], test $TARGET_CPU = aarch64)
|
|
|
|
AM_CONDITIONAL([TARGET_CPU_SPARC64], test $TARGET_CPU = sparc64)
|
2016-05-12 17:51:24 +03:00
|
|
|
])
|