Preferring Linux include file sys/xattr.h over attr/attr.h

This commit is contained in:
Thomas Schmitt 2018-05-18 17:21:50 +02:00
parent 198ecef0c4
commit b1a47ed9a6
2 changed files with 53 additions and 5 deletions

View File

@ -1,6 +1,6 @@
# configure.ac stems from xorriso/configure_ac.txt and leads to ./configure
# Copyright (c) 2007 - 2017 Thomas Schmitt <scdbackup@gmx.net>
# Copyright (c) 2007 - 2018 Thomas Schmitt <scdbackup@gmx.net>
# Provided under GPL version 2 or later.
AC_INIT([xorriso], [1.4.9], [http://libburnia-project.org])
@ -251,11 +251,16 @@ fi
AH_TEMPLATE([Libisofs_with_aaip_xattR],
[Define to use Linux xattr capabilities])
AH_TEMPLATE([Libisofs_with_sys_xattR],
[Define to include Linux sys/xattr.h instead of attr/xattr.h])
AH_TEMPLATE([Libisofs_with_freebsd_extattR],
[Define to use FreeBSD extattr capabilities])
AC_ARG_ENABLE(xattr,
[ --enable-xattr Enable use of extended file attributes by libisofs, default=yes],
, enable_xattr=yes)
AC_ARG_ENABLE(xattr_h_pref_attr,
[ --enable-xattr-h-pref-attr Prefer include file attr/xattr.h over sys/xattr.h, default=no],
, enable_xattr_h_pref_attr=no)
XATTR_DEF=
if test x"$LIBBURNIA_SUPP_FATTR" = xxattr
@ -263,9 +268,52 @@ then
if test "x$enable_xattr" = xyes; then
dnl Check whether there is the header for Linux xattr.
dnl If not, erase this macro which would enable use of listxattr and others
XATTR_DEF="-DLibisofs_with_aaip_xattR"
AC_CHECK_HEADER(attr/xattr.h, AC_CHECK_LIB(c, listxattr, X= ,
XATTR_DEF= ), XATTR_DEF= )
XATTR_A_DEF=
XATTR_S_DEF=
if test x"$enable_xattr_h_pref_attr" = xyes
then
echo "prefering include file attr/xattr.h over sys/attr.h"
XATTR_A_DEF=1
AC_CHECK_HEADER(attr/xattr.h, AC_CHECK_LIB(c, listxattr, X= ,
XATTR_A_DEF= ), XATTR_A_DEF= )
if test x"$XATTR_A_DEF" = x1
then
XATTR_DEF="-DLibisofs_with_aaip_xattR"
else
XATTR_S_DEF=1
AC_CHECK_HEADER(sys/xattr.h, AC_CHECK_LIB(c, listxattr, X= ,
XATTR_S_DEF= ), XATTR_S_DEF= )
if test x"$XATTR_S_DEF" = x1
then
XATTR_DEF="-DLibisofs_with_aaip_xattR"
AC_DEFINE([Libisofs_with_sys_xattR], [])
fi
fi
else
XATTR_S_DEF=1
AC_CHECK_HEADER(sys/xattr.h, AC_CHECK_LIB(c, listxattr, X= ,
XATTR_S_DEF= ), XATTR_S_DEF= )
if test x"$XATTR_S_DEF" = x1
then
XATTR_DEF="-DLibisofs_with_aaip_xattR"
AC_DEFINE([Libisofs_with_sys_xattR], [])
else
XATTR_A_DEF=1
AC_CHECK_HEADER(attr/xattr.h, AC_CHECK_LIB(c, listxattr, X= ,
XATTR_A_DEF= ), XATTR_A_DEF= )
if test x"$XATTR_A_DEF" = x1
then
XATTR_DEF="-DLibisofs_with_aaip_xattR"
fi
fi
fi
if test x"$XATTR_S_DEF" = x1
then
echo "decided to include file sys/attr.h"
elif test x"$XATTR_A_DEF" = x1
then
echo "decided to include file attr/xattr.h"
fi
fi
elif test x"$LIBBURNIA_SUPP_FATTR" = xextattr
then

View File

@ -1 +1 @@
#define Xorriso_timestamP "2018.05.08.092636"
#define Xorriso_timestamP "2018.05.18.152119"