[PATCH/submitted,02/10] sim: ppc: move struct statfs to top-level
Checks
Commit Message
---
sim/config.h.in | 3 +++
sim/configure | 51 +++++++++++++++++++++++++++++++++++++--
sim/m4/sim_ac_platform.m4 | 24 ++++++++++++++++++
sim/ppc/config.in | 3 ---
sim/ppc/configure | 44 ---------------------------------
sim/ppc/configure.ac | 24 ------------------
6 files changed, 76 insertions(+), 73 deletions(-)
@@ -134,6 +134,30 @@ AC_CHECK_TYPES(socklen_t, [], [],
])
AC_CHECK_TYPES([long long])
+dnl Check for struct statfs.
+AC_CACHE_CHECK([for struct statfs],
+ [sim_cv_struct_statfs],
+ [AC_TRY_COMPILE([
+#include <sys/types.h>
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+#ifdef HAVE_SYS_MOUNT_H
+#include <sys/mount.h>
+#endif
+#ifdef HAVE_SYS_VFS_H
+#include <sys/vfs.h>
+#endif
+#ifdef HAVE_SYS_STATFS_H
+#include <sys/statfs.h>
+#endif], [
+ struct statfs s;
+], [sim_cv_struct_statfs="yes"], [sim_cv_struct_statfs="no"])])
+AS_IF([test x"sim_cv_struct_statfs" = x"yes"], [dnl
+ AC_DEFINE(HAVE_STRUCT_STATFS, 1,
+ [Define if struct statfs is defined in <sys/mount.h>])
+])
+
dnl Some System V related checks.
AC_CACHE_CHECK([if union semun defined],
[sim_cv_has_union_semun],
@@ -358,30 +358,6 @@ else
ac_cv_termio_cline=no
fi
-dnl Check for struct statfs
-AC_MSG_CHECKING(for struct statfs)
-AC_CACHE_VAL(ac_cv_struct_statfs,
-[AC_TRY_COMPILE([#include <sys/types.h>
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
-#ifdef HAVE_SYS_MOUNT_H
-#include <sys/mount.h>
-#endif
-#ifdef HAVE_SYS_VFS_H
-#include <sys/vfs.h>
-#endif
-#ifdef HAVE_SYS_STATFS_H
-#include <sys/statfs.h>
-#endif],
-[static struct statfs s;],
-ac_cv_struct_statfs=yes, ac_cv_struct_statfs=no)])
-AC_MSG_RESULT($ac_cv_struct_statfs)
-if test $ac_cv_struct_statfs = yes; then
- AC_DEFINE(HAVE_STRUCT_STATFS, 1,
- [Define if struct statfs is defined in <sys/mount.h>])
-fi
-
AC_SUBST(sim_line_nr)
AC_SUBST(sim_opcode)
AC_SUBST(sim_switch)