summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorNathan Scott <nathans@sgi.com>2004-09-30 14:48:51 +0000
committerNathan Scott <nathans@sgi.com>2004-09-30 14:48:51 +0000
commitd0b5d2750bf8e710fff541aa06602e2ebd4e8e07 (patch)
tree1dfca412d1ff21a6671ed4a2046397c844e6201c /m4
parent8715fe28cd740d59189bec0ba42f655da826767e (diff)
Keep userspace packaging in sync; update srcdiff to grok moved dmapi source.
Merge of xfs-cmds-melb:slinx:19608a by kenmcd.
Diffstat (limited to 'm4')
-rw-r--r--m4/Makefile1
-rw-r--r--m4/package_libcdev.m467
-rw-r--r--m4/package_uuiddev.m49
3 files changed, 73 insertions, 4 deletions
diff --git a/m4/Makefile b/m4/Makefile
index 08f83e19..87bbbbc3 100644
--- a/m4/Makefile
+++ b/m4/Makefile
@@ -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
index 00000000..d612da27
--- /dev/null
+++ b/m4/package_libcdev.m4
@@ -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)
+ ])
diff --git a/m4/package_uuiddev.m4 b/m4/package_uuiddev.m4
index 71c9d57b..2fd8af17 100644
--- a/m4/package_uuiddev.m4
+++ b/m4/package_uuiddev.m4
@@ -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
])