Blame m4/package_attrdev.m4

rpm-build 0a0c83
dnl Copyright (C) 2003, 2004, 2006, 2007  Silicon Graphics, Inc.
rpm-build 0a0c83
dnl
rpm-build 0a0c83
dnl This program is free software: you can redistribute it and/or modify it
rpm-build 0a0c83
dnl under the terms of the GNU General Public License as published by
rpm-build 0a0c83
dnl the Free Software Foundation, either version 2 of the License, or
rpm-build 0a0c83
dnl (at your option) any later version.
rpm-build 0a0c83
dnl
rpm-build 0a0c83
dnl This program is distributed in the hope that it will be useful,
rpm-build 0a0c83
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
rpm-build 0a0c83
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
rpm-build 0a0c83
dnl GNU General Public License for more details.
rpm-build 0a0c83
dnl
rpm-build 0a0c83
dnl You should have received a copy of the GNU General Public License
rpm-build 0a0c83
dnl along with this program.  If not, see <http://www.gnu.org/licenses/>.
rpm-build 0a0c83
AC_DEFUN([AC_PACKAGE_NEED_ATTR_ERROR_H],
rpm-build 0a0c83
  [ AC_CHECK_HEADERS([attr/error_context.h])
rpm-build 0a0c83
    if test "$ac_cv_header_attr_error_context_h" != "yes"; then
rpm-build 0a0c83
        echo
rpm-build 0a0c83
        echo 'FATAL ERROR: attr/error_context.h does not exist.'
rpm-build 0a0c83
        echo 'Install the extended attributes (attr) development package.'
rpm-build 0a0c83
        echo 'Alternatively, run "make install-dev" from the attr source.'
rpm-build 0a0c83
        exit 1
rpm-build 0a0c83
    fi
rpm-build 0a0c83
  ])
rpm-build 0a0c83
rpm-build 0a0c83
AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_H],
rpm-build 0a0c83
  [ have_attributes_h=false
rpm-build 0a0c83
    AC_CHECK_HEADERS([attr/attributes.h sys/attributes.h], [have_attributes_h=true], )
rpm-build 0a0c83
    if test "$have_attributes_h" = "false"; then
rpm-build 0a0c83
        echo
rpm-build 0a0c83
        echo 'FATAL ERROR: attributes.h does not exist.'
rpm-build 0a0c83
        echo 'Install the extended attributes (attr) development package.'
rpm-build 0a0c83
        echo 'Alternatively, run "make install-dev" from the attr source.'
rpm-build 0a0c83
        exit 1
rpm-build 0a0c83
    fi
rpm-build 0a0c83
  ])
rpm-build 0a0c83
rpm-build 0a0c83
AC_DEFUN([AC_PACKAGE_WANT_ATTRLIST_LIBATTR],
rpm-build 0a0c83
  [ AC_CHECK_LIB(attr, attr_list, [have_attr_list=true], [have_attr_list=false])
rpm-build 0a0c83
    AC_SUBST(have_attr_list)
rpm-build 0a0c83
  ])
rpm-build 0a0c83
rpm-build 0a0c83
AC_DEFUN([AC_PACKAGE_NEED_GETXATTR_LIBATTR],
rpm-build 0a0c83
  [ AC_CHECK_LIB(attr, getxattr,, [
rpm-build 0a0c83
        echo
rpm-build 0a0c83
        echo 'FATAL ERROR: could not find a valid Extended Attributes library.'
rpm-build 0a0c83
        echo 'Install the extended attributes (attr) development package.'
rpm-build 0a0c83
        echo 'Alternatively, run "make install-lib" from the attr source.'
rpm-build 0a0c83
        exit 1
rpm-build 0a0c83
    ])
rpm-build 0a0c83
    libattr="-lattr"
rpm-build 0a0c83
    test -f `pwd`/../attr/libattr/libattr.la && \
rpm-build 0a0c83
        libattr="`pwd`/../attr/libattr/libattr.la"
rpm-build 0a0c83
    AC_SUBST(libattr)
rpm-build 0a0c83
  ])
rpm-build 0a0c83
rpm-build 0a0c83
AC_DEFUN([AC_PACKAGE_NEED_ATTRGET_LIBATTR],
rpm-build 0a0c83
  [ AC_CHECK_LIB(attr, attr_get,, [
rpm-build 0a0c83
        echo
rpm-build 0a0c83
        echo 'FATAL ERROR: could not find a valid Extended Attributes library.'
rpm-build 0a0c83
        echo 'Install the extended attributes (attr) development package.'
rpm-build 0a0c83
        echo 'Alternatively, run "make install-lib" from the attr source.'
rpm-build 0a0c83
        exit 1
rpm-build 0a0c83
    ])
rpm-build 0a0c83
    libattr="-lattr"
rpm-build 0a0c83
    test -f `pwd`/../attr/libattr/libattr.la && \
rpm-build 0a0c83
        libattr="`pwd`/../attr/libattr/libattr.la"
rpm-build 0a0c83
    AC_SUBST(libattr)
rpm-build 0a0c83
  ])
rpm-build 0a0c83
rpm-build 0a0c83
AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_MACROS],
rpm-build 0a0c83
  [ AC_MSG_CHECKING([macros in attr/attributes.h])
rpm-build 0a0c83
    AC_TRY_LINK([
rpm-build 0a0c83
#include <sys/types.h>
rpm-build 0a0c83
#include <attr/attributes.h>],
rpm-build 0a0c83
    [ int x = ATTR_SECURE; ], [ echo ok ], [
rpm-build 0a0c83
        echo
rpm-build 0a0c83
	echo 'FATAL ERROR: could not find a current attributes header.'
rpm-build 0a0c83
        echo 'Upgrade the extended attributes (attr) development package.'
rpm-build 0a0c83
        echo 'Alternatively, run "make install-dev" from the attr source.'
rpm-build 0a0c83
	exit 1 ])
rpm-build 0a0c83
  ])