+AC_DEFUN([AC_PACKAGE_NEED_OPEN_BY_FSHANDLE],
+ [ AC_CHECK_LIB(handle, open_by_fshandle,, [
+ echo
+ echo 'FATAL ERROR: could not find a current XFS handle library.'
+ echo 'Install or upgrade the XFS library package.'
+ echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
+ exit 1
+ ])
+ libhdl="-lhandle"
+ test -f `pwd`/../xfsprogs/libhandle/libhandle.la && \
+ libhdl="`pwd`/../xfsprogs/libhandle/libhandle.la"
+ test -f ${libexecdir}${libdirsuffix}/libhandle.la && \
+ libhdl="${libexecdir}${libdirsuffix}/libhandle.la"
+ AC_SUBST(libhdl)
+ ])
+