Keep userspace packaging in sync; update srcdiff to grok moved dmapi source.
authorNathan Scott <nathans@sgi.com>
Thu, 30 Sep 2004 14:48:51 +0000 (14:48 +0000)
committerNathan Scott <nathans@sgi.com>
Thu, 30 Sep 2004 14:48:51 +0000 (14:48 +0000)
Merge of xfs-cmds-melb:slinx:19608a by kenmcd.

aclocal.m4
m4/Makefile
m4/package_libcdev.m4 [new file with mode: 0644]
m4/package_uuiddev.m4
tools/srcdiff

index ca3241fbed924cb69318f7e1cf9e1f5ce487df1f..7a3e5c200a6bbd911208391a054825f51fcae276 100644 (file)
@@ -186,13 +186,14 @@ AC_DEFUN([AC_PACKAGE_UTILITIES],
   ])
 
 AC_DEFUN([AC_PACKAGE_NEED_UUID_H],
-  [ AC_CHECK_HEADERS(uuid.h)
-    if test $ac_cv_header_uuid_h = no; then
-       AC_CHECK_HEADERS(uuid/uuid.h,, [
+  [ AC_CHECK_HEADERS([uuid.h sys/uuid.h uuid/uuid.h])
+    if test $ac_cv_header_uuid_h = no -a \
+           $ac_cv_header_sys_uuid_h = no -a \
+           $ac_cv_header_uuid_uuid_h = no; then
        echo
        echo 'FATAL ERROR: could not find a valid UUID header.'
        echo 'Install the Universally Unique Identifiers development package.'
-       exit 1])
+       exit 1
     fi
   ])
 
index 08f83e198f751544418d8ca0ec40c18167ff7ff3..87bbbbc309fe202bbdbe25165724e82f56adaf66 100644 (file)
@@ -40,6 +40,7 @@ LSRCFILES = \
        package_attrdev.m4 \
        package_dmapidev.m4 \
        package_globals.m4 \
+       package_libcdev.m4 \
        package_ncurses.m4 \
        package_pthread.m4 \
        package_types.m4 \
diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
new file mode 100644 (file)
index 0000000..d612da2
--- /dev/null
@@ -0,0 +1,67 @@
+# 
+# Check if we have a working fadvise system call
+# 
+AC_DEFUN([AC_HAVE_FADVISE],
+  [ AC_MSG_CHECKING([for fadvise ])
+    AC_TRY_COMPILE([
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <fcntl.h>
+    ], [
+       posix_fadvise(0, 1, 0, 0);
+    ], have_fadvise=yes
+       AC_MSG_RESULT(yes),
+       AC_MSG_RESULT(no))
+    AC_SUBST(have_fadvise)
+  ])
+
+# 
+# Check if we have a working madvise system call
+# 
+AC_DEFUN([AC_HAVE_MADVISE],
+  [ AC_MSG_CHECKING([for madvise ])
+    AC_TRY_COMPILE([
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <sys/mman.h>
+    ], [
+       posix_madvise(0, 0, MADV_NORMAL);
+    ], have_madvise=yes
+       AC_MSG_RESULT(yes),
+       AC_MSG_RESULT(no))
+    AC_SUBST(have_madvise)
+  ])
+
+# 
+# Check if we have a working mincore system call
+# 
+AC_DEFUN([AC_HAVE_MINCORE],
+  [ AC_MSG_CHECKING([for mincore ])
+    AC_TRY_COMPILE([
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <sys/mman.h>
+    ], [
+       mincore(0, 0, 0);
+    ], have_mincore=yes
+       AC_MSG_RESULT(yes),
+       AC_MSG_RESULT(no))
+    AC_SUBST(have_mincore)
+  ])
+
+# 
+# Check if we have a working sendfile system call
+# 
+AC_DEFUN([AC_HAVE_SENDFILE],
+  [ AC_MSG_CHECKING([for sendfile ])
+    AC_TRY_COMPILE([
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <sys/sendfile.h>
+    ], [
+         sendfile(0, 0, 0, 0);
+    ], have_sendfile=yes
+       AC_MSG_RESULT(yes),
+       AC_MSG_RESULT(no))
+    AC_SUBST(have_sendfile)
+  ])
index 71c9d57bd85192357fb3a9d3dd3298bb6eb53eb1..2fd8af170c2242cc7453fbc74cf1e19558c1f63d 100644 (file)
@@ -1,11 +1,12 @@
 AC_DEFUN([AC_PACKAGE_NEED_UUID_H],
-  [ AC_CHECK_HEADERS(uuid.h)
-    if test $ac_cv_header_uuid_h = no; then
-       AC_CHECK_HEADERS(uuid/uuid.h,, [
+  [ AC_CHECK_HEADERS([uuid.h sys/uuid.h uuid/uuid.h])
+    if test $ac_cv_header_uuid_h = no -a \
+           $ac_cv_header_sys_uuid_h = no -a \
+           $ac_cv_header_uuid_uuid_h = no; then
        echo
        echo 'FATAL ERROR: could not find a valid UUID header.'
        echo 'Install the Universally Unique Identifiers development package.'
-       exit 1])
+       exit 1
     fi
   ])
 
index e825a6047e952ce091ecc79a46b60452806b0077..5adebbad8357baff8180978bd3a843398d4ea884 100755 (executable)
@@ -25,7 +25,9 @@ use strict;
 
 die "WORKAREA not set" unless defined $ENV{'WORKAREA'};
 die "KWORKAREA not set" unless defined $ENV{'KWORKAREA'};
+die "DMWORKAREA not set" unless defined $ENV{'DMWORKAREA'};
 chdir $ENV{'WORKAREA'};
+my $dmworkarea = $ENV{'DMWORKAREA'};
 my $kworkarea = $ENV{'KWORKAREA'};
 my $xdiff = $ENV{'XDIFF'};
 my $quiet = 0;
@@ -35,6 +37,7 @@ if ( ! -f "$kworkarea/xfs_fs.h" ) {
        $kworkarea .= '/fs/xfs';
        die "Cannot find XFS in KWORKAREA" unless -f "$kworkarea/xfs_fs.h";
 }
+die "Cannot find DMAPI in DMWORKAREA" unless -f "$dmworkarea/dmapi.h";
 
 foreach (@ARGV) {
        if (/^-q$/) {
@@ -109,8 +112,8 @@ print "\n=== Checking headers ===\n";
 foreach (@difflist) {
        straightdiff $_, 'xfsprogs/include', "$kworkarea";
 }
-straightdiff 'dmapi_kern.h', 'dmapi/include', "$kworkarea/dmapi";
-straightdiff 'dmapi.h', 'dmapi/include', "$kworkarea/dmapi";
+straightdiff 'dmapi_kern.h', 'dmapi/include', "$dmworkarea";
+straightdiff 'dmapi.h', 'dmapi/include', "$dmworkarea";
 
 # 
 # setstate