]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - config/always-arch.m4
Vendor import of openzfs master @ 184df27eef0abdc7ab2105b21257f753834b936b
[FreeBSD/FreeBSD.git] / config / always-arch.m4
1 dnl #
2 dnl # Set the target cpu architecture.  This allows the
3 dnl # following syntax to be used in a Makefile.am.
4 dnl #
5 dnl # ifeq ($(TARGET_CPU),x86_64)
6 dnl # ...
7 dnl # endif
8 dnl #
9 dnl # if TARGET_CPU_POWERPC
10 dnl # ...
11 dnl # else
12 dnl # ...
13 dnl # endif
14 dnl #
15 AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_ARCH], [
16         case $target_cpu in
17         i?86)
18                 TARGET_CPU=i386
19                 ;;
20         amd64|x86_64)
21                 TARGET_CPU=x86_64
22                 ;;
23         powerpc*)
24                 TARGET_CPU=powerpc
25                 ;;
26         aarch64*)
27                 TARGET_CPU=aarch64
28                 ;;
29         sparc64)
30                 TARGET_CPU=sparc64
31                 ;;
32         esac
33
34         AC_SUBST(TARGET_CPU)
35
36         AM_CONDITIONAL([TARGET_CPU_I386], test $TARGET_CPU = i386)
37         AM_CONDITIONAL([TARGET_CPU_X86_64], test $TARGET_CPU = x86_64)
38         AM_CONDITIONAL([TARGET_CPU_POWERPC], test $TARGET_CPU = powerpc)
39         AM_CONDITIONAL([TARGET_CPU_AARCH64], test $TARGET_CPU = aarch64)
40         AM_CONDITIONAL([TARGET_CPU_SPARC64], test $TARGET_CPU = sparc64)
41 ])