]> git.proxmox.com Git - mirror_qemu.git/blobdiff - configure
configure: Do not use 'sed -i'
[mirror_qemu.git] / configure
index 8d85d232c12ef1f6d5c627ec10f1ac6eaf882768..6c77fbb1a58357294139046b11360009114fde42 100755 (executable)
--- a/configure
+++ b/configure
@@ -1963,13 +1963,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