aboutsummaryrefslogtreecommitdiffstats
path: root/m4/macros/check_fhandle.m4
diff options
context:
space:
mode:
Diffstat (limited to 'm4/macros/check_fhandle.m4')
-rw-r--r--m4/macros/check_fhandle.m425
1 files changed, 25 insertions, 0 deletions
diff --git a/m4/macros/check_fhandle.m4 b/m4/macros/check_fhandle.m4
new file mode 100644
index 000000000000..f2a9c09e6095
--- /dev/null
+++ b/m4/macros/check_fhandle.m4
@@ -0,0 +1,25 @@
+dnl ######################################################################
+dnl Find if type 'fhandle' exists
+AC_DEFUN([AMU_CHECK_FHANDLE],
+[
+AC_CACHE_CHECK(if plain fhandle type exists,
+ac_cv_have_fhandle,
+[
+# try to compile a program which may have a definition for the type
+# set to a default value
+ac_cv_have_fhandle=no
+# look for "struct nfs_fh"
+if test "$ac_cv_have_fhandle" = no
+then
+AC_TRY_COMPILE_NFS(
+[ fhandle a;
+], ac_cv_have_fhandle=yes, ac_cv_have_fhandle=no)
+fi
+
+])
+if test "$ac_cv_have_fhandle" != no
+then
+ AC_DEFINE(HAVE_FHANDLE)
+fi
+])
+dnl ======================================================================