]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
FreeBSD/configure.ac: No RPMs and fix YASM selection
authorWillem Jan Withagen <wjw@digiware.nl>
Thu, 24 Mar 2016 13:00:11 +0000 (14:00 +0100)
committerWillem Jan Withagen <wjw@digiware.nl>
Tue, 10 May 2016 21:41:17 +0000 (23:41 +0200)
 - FreeBSD does not have arch, so use uname
 - Freebsd packaging does not have rpm
 - do not use [ for test(1) in autobuild tools
   [ is used as special char in autobuild as well. Better to avoid
   possible trouble.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
configure.ac

index 5cbdbd697492ed91d797c51c5d109bf382c4e824..aae79163038257695ba5b9c28dc4d7b9eed9f434 100644 (file)
@@ -17,7 +17,7 @@ RPM_RELEASE=0
 AC_SUBST(RPM_RELEASE)
 if test -d ".git" ; then
   AC_CHECK_PROG(GIT_CHECK, git, yes)
-  if test x"$GIT_CHECK" = x"yes"; then
+  if test x"$GIT_CHECK" = x"yes" -a x"$freebsd" != x"yes"; then
     RPM_RELEASE=`if expr index $(git describe --always) '-' > /dev/null ; then git describe --always | cut -d- -f2- | tr '-' '.' ; else echo "0"; fi`
   fi
 fi
@@ -244,7 +244,14 @@ 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'
-     if test `arch` = "x86_64" ; then
+     # 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
         echo 'we are x86_64'
         arch_x32=0
         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[