]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
configure.ac: Use uname instead of arch. 9766/head
authorJohn Coyle <dx9err@gmail.com>
Wed, 9 Mar 2016 00:48:20 +0000 (19:48 -0500)
committerJohn Coyle <dx9err@gmail.com>
Thu, 23 Jun 2016 02:41:26 +0000 (22:41 -0400)
arch is deprecated in linux-utils and coreutils does not install it by default.

https://git.kernel.org/cgit/utils/util-linux/util-linux.git/commit/?id=27abd8094845b4b2002a8ed5c3dd212999902c8f
http://www.gnu.org/software/coreutils/manual/html_node/arch-invocation.html#arch-invocation

Use uname -m, because uname -p returns unknown on alpine.

Signed-off-by: John Coyle <dx9err@gmail.com>
configure.ac

index b83cdf9e4e91e06cb2f8ba053a05869625c76556..5e1c92a13b76f17ebf6afe948cf4528ff4e18358 100644 (file)
@@ -244,14 +244,7 @@ AC_CHECK_PROG(YASM_CHECK, yasm, yes)
 if test x"$YASM_CHECK" = x"yes"; then
   if yasm -f elf64 src/common/crc32c_intel_fast_asm.S -o /dev/null; then
      echo 'we have a modern and working yasm'
-     # FreeBSD has uname -p not arch(1), so do not exec arch
-     arch_x86_64=0
-     if test x`uname -p`x = x"amd64"x ; then
-       arch_x86_64=1
-     elif which arch 2>&1 > /dev/null; then 
-       test x`arch`x = x"x86_64"x  && arch_x86_64=1
-     fi
-     if test $arch_x86_64 -eq 1 ; then
+     if test x`uname -m`x = x"x86_64"x || test x`uname -m`x = x"amd64"x; then
         echo 'we are x86_64'
         arch_x32=0
         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[