])
-case "$host" in
- i?86-*) intel=true ;;
- m68*) m68k=true ;;
- sparc*) sparc=true ;;
-esac
+dnl UTIL_SET_ARCH(ARCHNAME, PATTERN)
+dnl ---------------------------------
+AC_DEFUN([UTIL_SET_ARCH], [
+ cpu_$1=false
+ case "$host" in
+ $2) cpu_$1=true ;;
+ esac
+ AM_CONDITIONAL(AS_TR_CPP(ARCH_$1), [test x$cpu_$1 = xtrue])
+])
-AM_CONDITIONAL(INTEL, test x$intel = xtrue)
-AM_CONDITIONAL(M68K, test x$m68k = xtrue)
-AM_CONDITIONAL(SPARC, test x$sparc = xtrue)
+UTIL_SET_ARCH(I86, i?86-*)
+UTIL_SET_ARCH(86_64, x86_64*)
+UTIL_SET_ARCH(IA64, ia64*)
+UTIL_SET_ARCH(S390, s390*)
+UTIL_SET_ARCH(SPARC, sparc*)
+UTIL_SET_ARCH(PPC, ppc*|powerpc*)
+UTIL_SET_ARCH(M68K, m68*)
+UTIL_SET_ARCH(MIPS, mips*)
AC_ARG_ENABLE([agetty],
fdisk_common = disksize.c i386_sys_types.c common.h gpt.c gpt.h
-if !M68K
+if !ARCH_M68K
sbin_PROGRAMS = fdisk
man_MANS = fdisk.8
fdisk.h fdisksunlabel.h fdisksgilabel.h fdiskaixlabel.h \
fdiskbsdlabel.h fdiskmaclabel.h $(fdisk_common)
-if !SPARC
+if !ARCH_SPARC
sbin_PROGRAMS += sfdisk
man_MANS += sfdisk.8
endif
endif
-endif # !SPARC
-endif # !M68K
+endif # !ARCH_SPARC
+endif # !ARCH_M68K