qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 1.0] configure: Do not use 'sed -i'


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 1.0] configure: Do not use 'sed -i'
Date: Fri, 11 Nov 2011 13:46:07 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13

On 11/10/2011 02:26 PM, Pavel Borzenkov wrote:
'sed -i' is not defined in POSIX. It doesn't work on Mac OS X the way
it's used in configure (without suffix argument). This patch implements
Peter Maydell's idea of xattr.h detection.

Cc: Peter Maydell<address@hidden>
Signed-off-by: Pavel Borzenkov<address@hidden>

Applied.  Thanks.

Regards,

Anthony Liguori

---
  configure |    6 +++++-
  1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/configure b/configure
index 401d9a6..d6103c0 100755
--- a/configure
+++ b/configure
@@ -1962,13 +1962,17 @@ if test "$attr" != "no" ; then
    cat>  $TMPC<<EOF
  #include<stdio.h>
  #include<sys/types.h>
+#ifdef CONFIG_LIBATTR
+#include<attr/xattr.h>
+#else
  #include<sys/xattr.h>
+#endif
  int main(void) { getxattr(NULL, NULL, NULL, 0); setxattr(NULL, NULL, NULL, 0, 
0); return 0; }
  EOF
    if compile_prog "" "" ; then
      attr=yes
    # Older distros have<attr/xattr.h>, and need -lattr:
-  elif sed -i s,sys/xattr,attr/xattr, $TMPC&&  compile_prog "" "-lattr" ; then
+  elif compile_prog "-DCONFIG_LIBATTR" "-lattr" ; then
      attr=yes
      LIBS="-lattr $LIBS"
      libattr=yes




reply via email to

[Prev in Thread] Current Thread [Next in Thread]