libxfs.h is really only needed for the loggen test;
authorEric Sandeen <sandeen@sandeen.net>
Tue, 2 Jun 2009 20:36:13 +0000 (15:36 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 2 Jun 2009 20:36:13 +0000 (15:36 -0500)
make it config-time optional.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
044
aclocal.m4
configure.in
include/builddefs.in
m4/package_xfslibs.m4
src/Makefile

diff --git a/044 b/044
index 17d080c..80631ba 100755 (executable)
--- a/044
+++ b/044
@@ -126,6 +126,8 @@ _filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs1
 [ $lversion -ne 1 ] && \
     _notrun "Cannot run this test yet using MKFS_OPTIONS specified"
 
+[ $here/src/loggen ] || _notrun "loggen not built, skipping test"
+
 _check_mount
 _check_require_logdev
 
index 6cc5dce..ac616d1 100644 (file)
@@ -416,15 +416,9 @@ AC_DEFUN([AC_PACKAGE_NEED_XFS_XFS_H],
     fi
   ])
 
-AC_DEFUN([AC_PACKAGE_NEED_XFS_LIBXFS_H],
-  [ AC_CHECK_HEADERS([xfs/libxfs.h])
-    if test "$ac_cv_header_xfs_libxfs_h" != "yes"; then
-        echo
-        echo 'FATAL ERROR: cannot find a valid <xfs/libxfs.h> header file.'
-        echo 'Install or upgrade the XFS development package.'
-        echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
-        exit 1
-    fi
+AC_DEFUN([AC_PACKAGE_WANT_XFS_LIBXFS_H],
+  [ AC_CHECK_HEADERS([xfs/libxfs.h], [ have_libxfs=true ], [ have_libxfs=false ])
+    AC_SUBST(have_libxfs)
   ])
 
 AC_DEFUN([AC_PACKAGE_NEED_XFS_XQM_H],
index f087454..210a91e 100644 (file)
@@ -45,7 +45,7 @@ in
        *)
                AC_MULTILIB($enable_lib64)
                AC_PACKAGE_NEED_XFS_XFS_H
-               AC_PACKAGE_NEED_XFS_LIBXFS_H
+               AC_PACKAGE_WANT_XFS_LIBXFS_H
                AC_PACKAGE_NEED_XFS_XQM_H
                AC_PACKAGE_NEED_XFSCTL_MACRO
                AC_PACKAGE_NEED_XFS_HANDLE_H
index 636f632..e8f4b6b 100644 (file)
@@ -14,6 +14,7 @@ LOADERFLAGS = @LDFLAGS@
 CFLAGS = @CFLAGS@
 CPPFLAGS = @CPPFLAGS@
 
+HAVE_LIBXFS = @have_libxfs@
 LIBXFS = @libxfs@
 LIBACL = @libacl@
 LIBATTR = @libattr@
index 2c8d694..903e4a7 100644 (file)
@@ -8,14 +8,9 @@ AC_DEFUN([AC_PACKAGE_NEED_XFS_XFS_H],
     fi
   ])
 
-AC_DEFUN([AC_PACKAGE_NEED_XFS_LIBXFS_H],
-  [ AC_CHECK_HEADERS([xfs/libxfs.h])
-    if test "$ac_cv_header_xfs_libxfs_h" != "yes"; then
-        echo
-        echo 'FATAL ERROR: cannot find a valid <xfs/libxfs.h> header file.'
-        echo 'Run "make install-qa" from the xfsprogs source.'
-        exit 1
-    fi
+AC_DEFUN([AC_PACKAGE_WANT_LIBXFS_H],
+  [ AC_CHECK_HEADERS([xfs/libxfs.h], [ have_libxfs=true ], [ have_libxfs=false ])
+    AC_SUBST(have_libxfs)
   ])
 
 AC_DEFUN([AC_PACKAGE_NEED_XFS_XQM_H],
index 634e1b3..2a09488 100644 (file)
@@ -12,11 +12,15 @@ TARGETS = dirstress fill fill2 getpagesize holes lstat64 \
        godown resvtest writemod makeextents itrash rename \
        multi_open_unlink dmiperf unwritten_sync genhashnames
 
-LINUX_TARGETS = loggen xfsctl bstat t_mtab getdevicesize \
+LINUX_TARGETS = xfsctl bstat t_mtab getdevicesize \
        preallo_rw_pattern_reader preallo_rw_pattern_writer ftrunc trunc \
        fs_perms testx looptest locktest unwritten_mmap \
        bulkstat_unlink_test bulkstat_unlink_test_modified t_dir_offset
 
+ifeq ($(HAVE_LIBXFS), true)
+LINUX_TARGETS += loggen
+endif
+
 IRIX_TARGETS = open_unlink
 
 ifeq ($(PKG_PLATFORM),linux)