xfs
[Top] [All Lists]

[PATCH] xfstests: Check for xlog_assign_lsn in xfs headers

To: xfs mailing list <xfs@xxxxxxxxxxx>
Subject: [PATCH] xfstests: Check for xlog_assign_lsn in xfs headers
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Wed, 03 Jun 2009 13:47:27 -0500
User-agent: Thunderbird 2.0.0.21 (X11/20090320)
Check for xlog_assign_lsn in xfs headers

Checking for libxfs.h isn't enough; some debian installs
have libxfs.h but no xlog_assign_lsn, and the loggen build still
fails.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
Tested-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
---

diff --git a/aclocal.m4 b/aclocal.m4
index ac616d1..8a61e39 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -421,6 +421,13 @@ AC_DEFUN([AC_PACKAGE_WANT_XFS_LIBXFS_H],
     AC_SUBST(have_libxfs)
   ])
 
+AC_DEFUN([AC_PACKAGE_WANT_XLOG_ASSIGN_LSN],
+  [
+    AC_CHECK_DECL(xlog_assign_lsn,
+      [ have_xlog_assign_lsn=true ], [ have_xlog_assign_lsn=false ],
+      [[#include <xfs/libxfs.h>]])
+  ])
+
 AC_DEFUN([AC_PACKAGE_NEED_XFS_XQM_H],
   [ AC_CHECK_HEADERS([xfs/xqm.h])
     if test "$ac_cv_header_xfs_xqm_h" != "yes"; then
diff --git a/configure.in b/configure.in
index 210a91e..6c2afe7 100644
--- a/configure.in
+++ b/configure.in
@@ -46,6 +46,7 @@ in
                AC_MULTILIB($enable_lib64)
                AC_PACKAGE_NEED_XFS_XFS_H
                AC_PACKAGE_WANT_XFS_LIBXFS_H
+               AC_PACKAGE_WANT_XLOG_ASSIGN_LSN
                AC_PACKAGE_NEED_XFS_XQM_H
                AC_PACKAGE_NEED_XFSCTL_MACRO
                AC_PACKAGE_NEED_XFS_HANDLE_H
diff --git a/include/builddefs.in b/include/builddefs.in
index e8f4b6b..7827ed5 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -15,6 +15,7 @@ CFLAGS = @CFLAGS@
 CPPFLAGS = @CPPFLAGS@
 
 HAVE_LIBXFS = @have_libxfs@
+HAVE_XLOG_ASSIGN_LSN = @have_xlog_assign_lsn@
 LIBXFS = @libxfs@
 LIBACL = @libacl@
 LIBATTR = @libattr@
diff --git a/m4/package_xfslibs.m4 b/m4/package_xfslibs.m4
index 903e4a7..870882f 100644
--- a/m4/package_xfslibs.m4
+++ b/m4/package_xfslibs.m4
@@ -13,6 +13,14 @@ AC_DEFUN([AC_PACKAGE_WANT_LIBXFS_H],
     AC_SUBST(have_libxfs)
   ])
 
+AC_DEFUN([AC_PACKAGE_WANT_XLOG_ASSIGN_LSN],
+  [
+    AC_CHECK_DECL(xlog_assign_lsn,
+      [ have_xlog_assign_lsn=true ], [ have_xlog_assign_lsn=false ],
+      [[#include <xfs/libxfs.h>]])
+    AC_SUBST(have_have_xlog_assign_lsn)
+  ])
+
 AC_DEFUN([AC_PACKAGE_NEED_XFS_XQM_H],
   [ AC_CHECK_HEADERS([xfs/xqm.h])
     if test "$ac_cv_header_xfs_xqm_h" != "yes"; then
diff --git a/src/Makefile b/src/Makefile
index 515e16e..7b01754 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -17,7 +17,7 @@ LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize \
        fs_perms testx looptest locktest unwritten_mmap \
        bulkstat_unlink_test bulkstat_unlink_test_modified t_dir_offset
 
-ifeq ($(HAVE_LIBXFS), true)
+ifeq ($(HAVE_XLOG_ASSIGN_LSN), true)
 LINUX_TARGETS += loggen
 endif
 




<Prev in Thread] Current Thread [Next in Thread>