xfstests: check for dmapi headers
authorBarry Naujok <bnaujok@sgi.com>
Thu, 20 Nov 2008 14:22:49 +0000 (14:22 +0000)
committerBarry Naujok <bnaujok@sgi.com>
Thu, 20 Nov 2008 14:22:49 +0000 (14:22 +0000)
Merge of master-melb:xfs-cmds:32507a by kenmcd.

  xfstests: check for dmapi headers

Makefile
aclocal.m4
configure.in
include/builddefs.in

index 0a0fc27..39e5290 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -25,8 +25,10 @@ else
        $(SUBDIRS_MAKERULE)
        # automake doesn't always support "default" target 
        # so do dmapi make explicitly with "all"
+ifeq ($(HAVE_DMAPI), true)
        cd $(TOPDIR)/dmapi; make all
 endif
+endif
 
 ifeq ($(HAVE_BUILDDEFS), yes)
 include $(BUILDRULES)
index dd65e1c..c90451a 100644 (file)
@@ -99,6 +99,11 @@ AC_DEFUN([AC_PACKAGE_WANT_AIO],
     AC_SUBST(have_aio)
   ])
 
+AC_DEFUN([AC_PACKAGE_WANT_DMAPI],
+  [ AC_CHECK_HEADERS(sys/dmapi/dmapi.h, [ have_dmapi=true ], [ have_dmapi=false ])
+    AC_SUBST(have_dmapi)
+  ])
+
 AC_DEFUN([AC_PACKAGE_NEED_ATTR_XATTR_H],
   [ AC_CHECK_HEADERS([attr/xattr.h])
     if test "$ac_cv_header_attr_xattr_h" != "yes"; then
index 0c1656b..32a2496 100644 (file)
@@ -61,6 +61,7 @@ in
 
                AC_PACKAGE_WANT_GDBM
                AC_PACKAGE_WANT_AIO
+               AC_PACKAGE_WANT_DMAPI
                ;;
 esac
 
index 1449aac..ae8c608 100644 (file)
@@ -50,6 +50,7 @@ RPM_VERSION     = @rpm_version@
 ENABLE_SHARED = @enable_shared@
 HAVE_DB = @have_db@
 HAVE_AIO = @have_aio@
+HAVE_DMAPI = @have_dmapi@
 HAVE_ATTR_LIST = @have_attr_list@
 
 GCCFLAGS = -funsigned-char -fno-strict-aliasing -Wall