done
-for ac_hdr in fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h
+for ac_hdr in fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h sys/vfs.h sys/statfs.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
ac_cv_termio_cline=no
fi
+echo $ac_n "checking for struct statfs""... $ac_c" 1>&6
+echo "configure:4614: checking for struct statfs" >&5
+if eval "test \"`echo '$''{'ac_cv_struct_statfs'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4619 "configure"
+#include "confdefs.h"
+#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
+int main() {
+static struct statfs s;
+; return 0; }
+EOF
+if { (eval echo configure:4638: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ rm -rf conftest*
+ ac_cv_struct_statfs=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ ac_cv_struct_statfs=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_struct_statfs" 1>&6
+if test $ac_cv_struct_statfs = yes; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_STATFS 1
+EOF
+
+fi
+
sim_devzero=""
echo $ac_n "checking for /dev/zero""... $ac_c" 1>&6
-echo "configure:4615: checking for /dev/zero" >&5
+echo "configure:4660: checking for /dev/zero" >&5
if eval "test \"`echo '$''{'ac_cv_devzero'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_devzero=no
else
cat > conftest.$ac_ext <<EOF
-#line 4623 "configure"
+#line 4668 "configure"
#include "confdefs.h"
#include <fcntl.h>
main () {
return 0;
}
EOF
-if { (eval echo configure:4642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_devzero=yes
else
fi
echo $ac_n "checking for common simulator directory""... $ac_c" 1>&6
-echo "configure:4664: checking for common simulator directory" >&5
+echo "configure:4709: checking for common simulator directory" >&5
if test -f "${srcdir}/../common/callback.c"; then
echo "$ac_t""yes" 1>&6
sim_callback="callback.o targ-map.o"
fi
echo $ac_n "checking for common simulator directory fpu implementation""... $ac_c" 1>&6
-echo "configure:4676: checking for common simulator directory fpu implementation" >&5
+echo "configure:4721: checking for common simulator directory fpu implementation" >&5
if test -f "${srcdir}/../common/sim-fpu.c"; then
echo "$ac_t""yes" 1>&6
sim_fpu_cflags="-DHAVE_COMMON_FPU -I../common -I${srcdir}/../common"
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:4688: checking for Cygwin environment" >&5
+echo "configure:4733: checking for Cygwin environment" >&5
if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4693 "configure"
+#line 4738 "configure"
#include "confdefs.h"
int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:4704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4749: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:4721: checking for mingw32 environment" >&5
+echo "configure:4766: checking for mingw32 environment" >&5
if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4726 "configure"
+#line 4771 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:4733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4752: checking for executable suffix" >&5
+echo "configure:4797: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:4762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:4807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
*.c | *.o | *.obj | *.ilk | *.pdb) ;;
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4791: checking for $ac_word" >&5
+echo "configure:4836: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
AC_CHECK_FUNCS(access cfgetispeed cfgetospeed cfsetispeed cfsetospeed chdir chmod chown dup dup2 fchmod fchown fcntl fstat fstatfs getdirentries getegid geteuid getgid getpid getppid getrusage gettimeofday getuid ioctl kill link lseek lstat mkdir pipe readlink rmdir setreuid setregid stat sigprocmask stat symlink tcgetattr tcsetattr tcsendbreak tcdrain tcflush tcflow tcgetpgrp tcsetpgrp time umask unlink)
-AC_CHECK_HEADERS(fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h)
+AC_CHECK_HEADERS(fcntl.h stdlib.h string.h strings.h sys/ioctl.h sys/mount.h sys/param.h sys/resource.h sys/stat.h sys/termio.h sys/termios.h sys/time.h sys/times.h sys/types.h time.h unistd.h sys/vfs.h sys/statfs.h)
AC_HEADER_DIRENT
dnl Figure out what type of termio/termios support there is
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
+
dnl Figure out if /dev/zero exists or not
sim_devzero=""
AC_MSG_CHECKING(for /dev/zero)