1 dnl Copyright (C) 2003, 2004, 2006, 2007 Silicon Graphics, Inc.
3 dnl This program is free software: you can redistribute it and/or modify it
4 dnl under the terms of the GNU General Public License as published by
5 dnl the Free Software Foundation, either version 2 of the License, or
6 dnl (at your option) any later version.
8 dnl This program is distributed in the hope that it will be useful,
9 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
10 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 dnl GNU General Public License for more details.
13 dnl You should have received a copy of the GNU General Public License
14 dnl along with this program. If not, see <http://www.gnu.org/licenses/>.
15 AC_DEFUN([AC_PACKAGE_NEED_ATTR_XATTR_H],
16 [ AC_CHECK_HEADERS([attr/xattr.h])
17 if test "$ac_cv_header_attr_xattr_h" != "yes"; then
19 echo 'FATAL ERROR: attr/xattr.h does not exist.'
20 echo 'Install the extended attributes (attr) development package.'
21 echo 'Alternatively, run "make install-dev" from the attr source.'
26 AC_DEFUN([AC_PACKAGE_NEED_ATTR_ERROR_H],
27 [ AC_CHECK_HEADERS([attr/error_context.h])
28 if test "$ac_cv_header_attr_error_context_h" != "yes"; then
30 echo 'FATAL ERROR: attr/error_context.h does not exist.'
31 echo 'Install the extended attributes (attr) development package.'
32 echo 'Alternatively, run "make install-dev" from the attr source.'
37 AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_H],
38 [ have_attributes_h=false
39 AC_CHECK_HEADERS([attr/attributes.h sys/attributes.h], [have_attributes_h=true], )
40 if test "$have_attributes_h" = "false"; then
42 echo 'FATAL ERROR: attributes.h does not exist.'
43 echo 'Install the extended attributes (attr) development package.'
44 echo 'Alternatively, run "make install-dev" from the attr source.'
49 AC_DEFUN([AC_PACKAGE_WANT_ATTRLIST_LIBATTR],
50 [ AC_CHECK_LIB(attr, attr_list, [have_attr_list=true], [have_attr_list=false])
51 AC_SUBST(have_attr_list)
54 AC_DEFUN([AC_PACKAGE_NEED_GETXATTR_LIBATTR],
55 [ AC_CHECK_LIB(attr, getxattr,, [
57 echo 'FATAL ERROR: could not find a valid Extended Attributes library.'
58 echo 'Install the extended attributes (attr) development package.'
59 echo 'Alternatively, run "make install-lib" from the attr source.'
63 test -f `pwd`/../attr/libattr/libattr.la && \
64 libattr="`pwd`/../attr/libattr/libattr.la"
68 AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATTR],
69 [ AC_CHECK_LIB(attr, attr_get,, [
71 echo 'FATAL ERROR: could not find a valid Extended Attributes library.'
72 echo 'Install the extended attributes (attr) development package.'
73 echo 'Alternatively, run "make install-lib" from the attr source.'
77 test -f `pwd`/../attr/libattr/libattr.la && \
78 libattr="`pwd`/../attr/libattr/libattr.la"
82 AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_MACROS],
83 [ AC_MSG_CHECKING([macros in attr/attributes.h])
85 #include <sys/types.h>
86 #include <attr/attributes.h>],
87 [ int x = ATTR_SECURE; ], [ echo ok ], [
89 echo 'FATAL ERROR: could not find a current attributes header.'
90 echo 'Upgrade the extended attributes (attr) development package.'
91 echo 'Alternatively, run "make install-dev" from the attr source.'