aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorhuaixv <44743118+huaixv@users.noreply.github.com>2021-03-25 21:40:59 +0800
committerhuaixv <44743118+huaixv@users.noreply.github.com>2021-03-25 21:40:59 +0800
commitc0cd8a68dc3d922733b5c455ecc3bfc23a76f042 (patch)
tree223a9f72d0cacb965057d6a2457e12067546a861 /configure
parenta31ac28aff73dafa41c9968452df95647cf0ae8c (diff)
downloadspike-c0cd8a68dc3d922733b5c455ecc3bfc23a76f042.zip
spike-c0cd8a68dc3d922733b5c455ecc3bfc23a76f042.tar.gz
spike-c0cd8a68dc3d922733b5c455ecc3bfc23a76f042.tar.bz2
Add `statx` syscall
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure66
1 files changed, 66 insertions, 0 deletions
diff --git a/configure b/configure
index 82feebb..e51a251 100755
--- a/configure
+++ b/configure
@@ -1748,6 +1748,63 @@ fi
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_link
+
+# ac_fn_cxx_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ------------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+ac_fn_cxx_check_member ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+$as_echo_n "checking for $2.$3... " >&6; }
+if eval \${$4+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ eval "$4=yes"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+ eval "$4=yes"
+else
+ eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$4
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_cxx_check_member
cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -4699,6 +4756,15 @@ else
fi
+ac_fn_cxx_check_member "$LINENO" "struct statx" "stx_mnt_id" "ac_cv_member_struct_statx_stx_mnt_id" "$ac_includes_default"
+if test "x$ac_cv_member_struct_statx_stx_mnt_id" = xyes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STATX_MNT_ID 1
+_ACEOF
+
+fi
+