From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RObDa-0003vx-DB for qemu-devel@nongnu.org; Thu, 10 Nov 2011 15:27:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RObDQ-0004Kq-Eg for qemu-devel@nongnu.org; Thu, 10 Nov 2011 15:27:26 -0500 Received: from mail-bw0-f45.google.com ([209.85.214.45]:36232) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RObDQ-0004Kl-6P for qemu-devel@nongnu.org; Thu, 10 Nov 2011 15:27:16 -0500 Received: by bkbzu5 with SMTP id zu5so3118911bkb.4 for ; Thu, 10 Nov 2011 12:27:15 -0800 (PST) From: Pavel Borzenkov Date: Fri, 11 Nov 2011 00:26:59 +0400 Message-Id: <1320956819-91322-1-git-send-email-pavel.borzenkov@gmail.com> Subject: [Qemu-devel] [PATCH 1.0] configure: Do not use 'sed -i' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell '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 Signed-off-by: Pavel Borzenkov --- 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 < #include +#ifdef CONFIG_LIBATTR +#include +#else #include +#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 , 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 -- 1.7.5.4