X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;ds=sidebyside;f=acinclude.m4;h=3b28b3bd63ddacd9cab238882a81dad73a26d78e;hb=7bf812579c1cfead7a06d9cab78621bf120b80e4;hp=30381d380df8573516bdbd65c73f2aa086c0c48b;hpb=b997c90f9e3a64186341c57c8f3f25c2246d0ebb;p=chaz%2Ftar
diff --git a/acinclude.m4 b/acinclude.m4
index 30381d3..3b28b3b 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,18 +1,21 @@
-dnl Special Autoconf macros for GNU Tar -*- autoconf -*-
-dnl Copyright (C) 2009 Free Software Foundation, Inc.
+dnl Special Autoconf macros for GNU tar -*- autoconf -*-
+
+dnl Copyright 2009, 2013-2014 Free Software Foundation, Inc.
+dnl
+dnl This file is part of GNU tar.
dnl
dnl GNU tar is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
-dnl the Free Software Foundation; either version 3, or (at your option)
-dnl any later version.
+dnl the Free Software Foundation; either version 3 of the License, or
+dnl (at your option) any later version.
dnl
dnl GNU tar is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
-dnl You should have received a copy of the GNU General Public License along
-dnl with GNU tar. If not, see .
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program. If not, see .
AC_DEFUN([TAR_COMPR_PROGRAM],[
m4_pushdef([tar_compr_define],translit($1,[a-z+-],[A-ZX_])[_PROGRAM])
@@ -34,19 +37,40 @@ AC_DEFUN([TAR_HEADERS_ATTR_XATTR_H],
[], [with_xattrs=maybe]
)
- AC_CHECK_HEADERS([attr/xattr.h])
- AM_CONDITIONAL([TAR_COND_XATTR_H],[test "$ac_cv_header_attr_xattr_h" = yes])
- if test "$ac_cv_header_attr_xattr_h" = yes; then
+ # First check for
+ AC_CHECK_HEADERS([sys/xattr.h])
+ AM_CONDITIONAL([TAR_COND_XATTR_H],[test "$ac_cv_header_sys_xattr_h" = yes])
+ AM_CONDITIONAL([TAR_LIB_ATTR],[false])
+ if test "$ac_cv_header_sys_xattr_h" = yes; then
AC_CHECK_FUNCS(getxattr fgetxattr lgetxattr \
setxattr fsetxattr lsetxattr \
listxattr flistxattr llistxattr,
# only when functions are present
- AC_DEFINE([HAVE_ATTR_XATTR_H], [1],
- [define to 1 if we have header])
+ AC_DEFINE([HAVE_SYS_XATTR_H], [1],
+ [define to 1 if we have header])
if test "$with_xattrs" != no; then
AC_DEFINE([HAVE_XATTRS],,[Define when we have working linux xattrs.])
fi
)
fi
+
+ # If is not found, then check for
+ if test "$ac_cv_header_sys_xattr_h" != yes; then
+ AC_CHECK_HEADERS([attr/xattr.h])
+ AM_CONDITIONAL([TAR_COND_XATTR_H],[test "$ac_cv_header_attr_xattr_h" = yes])
+ AC_CHECK_LIB([attr],[fgetxattr])
+ AM_CONDITIONAL([TAR_LIB_ATTR],[test "$ac_cv_lib_attr_fgetxattr" = yes])
+ if test "$ac_cv_header_attr_xattr_h" = yes; then
+ AC_CHECK_FUNCS(getxattr fgetxattr lgetxattr \
+ setxattr fsetxattr lsetxattr \
+ listxattr flistxattr llistxattr,
+ # only when functions are present
+ AC_DEFINE([HAVE_ATTR_XATTR_H], [1],
+ [define to 1 if we have header])
+ if test "$with_xattrs" != no; then
+ AC_DEFINE([HAVE_XATTRS],,[Define when we have working linux xattrs.])
+ fi
+ )
+ fi
+ fi
])
-
\ No newline at end of file