From: Pavel Borzenkov Date: Thu, 10 Nov 2011 20:26:59 +0000 (+0400) Subject: configure: Do not use 'sed -i' X-Git-Tag: qemu-xen-4.2.0~146 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=f2338fb48a3bca830aa1d694a117fe90751c3978;p=qemu-xen.git configure: Do not use 'sed -i' '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 Reviewed-by: Peter Maydell Signed-off-by: Pavel Borzenkov Signed-off-by: Anthony Liguori --- diff --git a/configure b/configure index 8d85d232c1..6c77fbb1a5 100755 --- a/configure +++ b/configure @@ -1963,13 +1963,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