1 AC_DEFUN([AC_PACKAGE_NEED_XFS_XFS_H],
2 [ AC_CHECK_HEADERS([xfs/xfs.h],,,[
4 #define _FILE_OFFSET_BITS 64
6 if test "$ac_cv_header_xfs_xfs_h" != "yes"; then
8 echo 'FATAL ERROR: cannot find a valid <xfs/xfs.h> header file.'
9 echo 'Run "make install-dev" from the xfsprogs source.'
14 AC_DEFUN([AC_PACKAGE_WANT_LIBXFS_H],
15 [ AC_CHECK_HEADERS([xfs/libxfs.h], [ have_libxfs=true ],
16 [ have_libxfs=false ], [#define _GNU_SOURCE])
20 AC_DEFUN([AC_PACKAGE_WANT_XLOG_ASSIGN_LSN],
21 [ AC_CHECK_DECL(xlog_assign_lsn,
22 [ have_xlog_assign_lsn=true ], [ have_xlog_assign_lsn=false ], [[
24 #include <xfs/libxfs.h>]])
25 AC_SUBST(have_xlog_assign_lsn)
28 AC_DEFUN([AC_PACKAGE_NEED_XFS_XQM_H],
29 [ AC_CHECK_HEADERS([xfs/xqm.h],,,[
31 #define _FILE_OFFSET_BITS 64
33 if test "$ac_cv_header_xfs_xqm_h" != "yes"; then
35 echo 'FATAL ERROR: cannot find a valid <xfs/xqm.h> header file.'
36 echo 'Install or upgrade the XFS development package.'
37 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
42 AC_DEFUN([AC_PACKAGE_NEED_XFS_HANDLE_H],
43 [ AC_CHECK_HEADERS([xfs/handle.h])
44 if test "$ac_cv_header_xfs_handle_h" != "yes"; then
46 echo 'FATAL ERROR: cannot find a valid <xfs/handle.h> header file.'
47 echo 'Install or upgrade the XFS development package.'
48 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
53 AC_DEFUN([AC_PACKAGE_NEED_LIBXFSINIT_LIBXFS],
54 [ AC_CHECK_LIB(xfs, libxfs_init,, [
56 echo 'FATAL ERROR: could not find a valid XFS base library.'
57 echo 'Install or upgrade the XFS library package.'
58 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
62 test -f ${libexecdir}${libdirsuffix}/libxfs.la && \
63 libxfs="${libexecdir}${libdirsuffix}/libxfs.la"
67 AC_DEFUN([AC_PACKAGE_NEED_OPEN_BY_FSHANDLE],
68 [ AC_CHECK_LIB(handle, open_by_fshandle,, [
70 echo 'FATAL ERROR: could not find a current XFS handle library.'
71 echo 'Install or upgrade the XFS library package.'
72 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
76 test -f ${libexecdir}${libdirsuffix}/libhandle.la && \
77 libhdl="${libexecdir}${libdirsuffix}/libhandle.la"
81 AC_DEFUN([AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE],
82 [ AC_CHECK_LIB(handle, attr_list_by_handle,, [
84 echo 'FATAL ERROR: could not find a current XFS handle library.'
85 echo 'Install or upgrade the XFS library package.'
86 echo 'Alternatively, run "make install-lib" from the xfsprogs source.'
90 test -f ${libexecdir}${libdirsuffix}/libhandle.la && \
91 libhdl="${libexecdir}${libdirsuffix}/libhandle.la"
95 AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO],
96 [ AC_MSG_CHECKING([xfsctl from xfs/xfs.h])
99 #define _FILE_OFFSET_BITS 64
100 #include <xfs/xfs.h> ],
101 [ int x = xfsctl(0, 0, 0, 0); ],
104 echo 'FATAL ERROR: cannot find required macros in the XFS headers.'
105 echo 'Upgrade your XFS programs (xfsprogs) development package.'
106 echo 'Alternatively, run "make install-dev" from the xfsprogs source.'