From: Pavel Borzenkov <pavel.borzenkov@gmail.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>
Subject: [Qemu-devel] [PATCH 1.0] configure: Do not use 'sed -i'
Date: Fri, 11 Nov 2011 00:26:59 +0400 [thread overview]
Message-ID: <1320956819-91322-1-git-send-email-pavel.borzenkov@gmail.com> (raw)
'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 <peter.maydell@linaro.org>
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
---
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
--
1.7.5.4
next reply other threads:[~2011-11-10 20:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-10 20:26 Pavel Borzenkov [this message]
2011-11-10 22:51 ` [Qemu-devel] [PATCH 1.0] configure: Do not use 'sed -i' Peter Maydell
2011-11-11 19:46 ` Anthony Liguori
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1320956819-91322-1-git-send-email-pavel.borzenkov@gmail.com \
--to=pavel.borzenkov@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).