1eda14cbcSMatt Macydnl # 2eda14cbcSMatt Macydnl # Set the target cpu architecture. This allows the 3eda14cbcSMatt Macydnl # following syntax to be used in a Makefile.am. 4eda14cbcSMatt Macydnl # 5eda14cbcSMatt Macydnl # if TARGET_CPU_POWERPC 6eda14cbcSMatt Macydnl # ... 7eda14cbcSMatt Macydnl # else 8eda14cbcSMatt Macydnl # ... 9eda14cbcSMatt Macydnl # endif 10eda14cbcSMatt Macydnl # 11eda14cbcSMatt MacyAC_DEFUN([ZFS_AC_CONFIG_ALWAYS_ARCH], [ 12eda14cbcSMatt Macy case $target_cpu in 13eda14cbcSMatt Macy i?86) 14eda14cbcSMatt Macy TARGET_CPU=i386 15eda14cbcSMatt Macy ;; 16eda14cbcSMatt Macy amd64|x86_64) 17eda14cbcSMatt Macy TARGET_CPU=x86_64 18eda14cbcSMatt Macy ;; 19eda14cbcSMatt Macy powerpc*) 20eda14cbcSMatt Macy TARGET_CPU=powerpc 21eda14cbcSMatt Macy ;; 22eda14cbcSMatt Macy aarch64*) 23eda14cbcSMatt Macy TARGET_CPU=aarch64 24eda14cbcSMatt Macy ;; 25*2a58b312SMartin Matuska armv*) 26*2a58b312SMartin Matuska TARGET_CPU=arm 27*2a58b312SMartin Matuska ;; 28eda14cbcSMatt Macy sparc64) 29eda14cbcSMatt Macy TARGET_CPU=sparc64 30eda14cbcSMatt Macy ;; 31da5137abSMartin Matuska *) 32da5137abSMartin Matuska TARGET_CPU=$target_cpu 33da5137abSMartin Matuska ;; 34eda14cbcSMatt Macy esac 35eda14cbcSMatt Macy 361f1e2261SMartin Matuska AM_CONDITIONAL([TARGET_CPU_AARCH64], test $TARGET_CPU = aarch64) 37eda14cbcSMatt Macy AM_CONDITIONAL([TARGET_CPU_X86_64], test $TARGET_CPU = x86_64) 38eda14cbcSMatt Macy AM_CONDITIONAL([TARGET_CPU_POWERPC], test $TARGET_CPU = powerpc) 391f1e2261SMartin Matuska AM_CONDITIONAL([TARGET_CPU_SPARC64], test $TARGET_CPU = sparc64) 40*2a58b312SMartin Matuska AM_CONDITIONAL([TARGET_CPU_ARM], test $TARGET_CPU = arm) 41eda14cbcSMatt Macy]) 42