[PATCH 8/8] Cleanup arch tests

David Shea dshea at redhat.com
Thu Sep 5 14:42:45 UTC 2013


Use the build cpu from autoconf instead of uname. Remove unused automake
conditionals. Use the POSIX string equality syntax.
---
 configure.ac | 26 ++++----------------------
 1 file changed, 4 insertions(+), 22 deletions(-)

diff --git a/configure.ac b/configure.ac
index 99952f0..85ff0aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -186,30 +186,12 @@ LIBS=
 rel="`awk '/Release:/ { split($2, r, "%"); print r[[1]] }' anaconda.spec.in`"
 AC_SUBST(PACKAGE_RELEASE, [$rel])
 
-# Set $(ARCH) and arch-related tests
-s_arch="`uname -m | sed -e s/i.86/i386/ -e s/ppc.*/ppc/`"
-AC_SUBST(ARCH, [$s_arch])
+# Perform arch related tests
+AC_CANONICAL_BUILD
+s_arch="`echo $build_cpu | sed -e s/i.86/i386/ -e s/powerpc.*/ppc/`"
 
 AM_CONDITIONAL(IS_LIVEINST_ARCH,
-  [test x$s_arch == xppc || test x$s_arch == xi386 || test x$s_arch == xx86_64])
-
-AM_CONDITIONAL(IS_GPTSYNC_ARCH,
-  [test x$s_arch == xi386 || test x$s_arch == xx86_64])
-
-AM_CONDITIONAL(IS_KEYMAPS_OVERRIDE_ARCH,
-  [test x$s_arch == xi386 || test x$s_arch == xppc || test x$s_arch == xx86_64])
-
-AM_CONDITIONAL(IS_I386,
-  [test x$s_arch == xi386])
-
-AM_CONDITIONAL(IS_PPC,
-  [test x$s_arch == xppc])
-
-AM_CONDITIONAL(IS_S390,
-  [test x$s_arch == xs390 || test x$s_arch == xs390x])
-
-AM_CONDITIONAL(IS_X86_64,
-  [test x$s_arch == xx86_64])
+  [test x$s_arch = xppc || test x$s_arch = xi386 || test x$s_arch = xx86_64])
 
 AC_CONFIG_SUBDIRS([widgets])
 
-- 
1.8.3.1



More information about the anaconda-patches mailing list