From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:52494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROx3F-0006A8-Nl for qemu-devel@nongnu.org; Fri, 11 Nov 2011 14:46:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ROx3E-0002Cq-Hr for qemu-devel@nongnu.org; Fri, 11 Nov 2011 14:46:13 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:35059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ROx3E-0001is-En for qemu-devel@nongnu.org; Fri, 11 Nov 2011 14:46:12 -0500 Received: by mail-iy0-f173.google.com with SMTP id k32so5202243iak.4 for ; Fri, 11 Nov 2011 11:46:12 -0800 (PST) Message-ID: <4EBD7B7F.2090308@codemonkey.ws> Date: Fri, 11 Nov 2011 13:46:07 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1320956819-91322-1-git-send-email-pavel.borzenkov@gmail.com> In-Reply-To: <1320956819-91322-1-git-send-email-pavel.borzenkov@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1.0] configure: Do not use 'sed -i' List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Pavel Borzenkov Cc: Peter Maydell , qemu-devel@nongnu.org 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 > Signed-off-by: Pavel Borzenkov 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< #include > #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