From b1a47ed9a628cd0a38cf4d04dba98d654aaaa615 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 18 May 2018 17:21:50 +0200 Subject: [PATCH] Preferring Linux include file sys/xattr.h over attr/attr.h --- xorriso/configure_ac.txt | 56 ++++++++++++++++++++++++++++++++++--- xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/xorriso/configure_ac.txt b/xorriso/configure_ac.txt index 0fc8715c..7d2080bb 100644 --- a/xorriso/configure_ac.txt +++ b/xorriso/configure_ac.txt @@ -1,6 +1,6 @@ # configure.ac stems from xorriso/configure_ac.txt and leads to ./configure -# Copyright (c) 2007 - 2017 Thomas Schmitt +# Copyright (c) 2007 - 2018 Thomas Schmitt # 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 diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 1c48dddd..c563a8ab 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2018.05.08.092636" +#define Xorriso_timestamP "2018.05.18.152119"