diff options
| author | Pavel Borzenkov | 2011-11-10 21:26:59 +0100 |
|---|---|---|
| committer | Anthony Liguori | 2011-11-11 19:49:51 +0100 |
| commit | f2338fb48a3bca830aa1d694a117fe90751c3978 (patch) | |
| tree | 8f188bd6395426544aeefe28a075f1be5ef57ef5 /configure | |
| parent | vl.c: Fail gracefully if no machine is found (diff) | |
| download | qemu-f2338fb48a3bca830aa1d694a117fe90751c3978.tar.gz qemu-f2338fb48a3bca830aa1d694a117fe90751c3978.tar.xz qemu-f2338fb48a3bca830aa1d694a117fe90751c3978.zip | |
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 <peter.maydell@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 |
