check for missing statfs() prototype (happens at least under AIX 4)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-08-23 23:12:37 +00:00
parent c5035065a8
commit 84ae7ca4f6
5 changed files with 84 additions and 18 deletions

View File

@@ -4135,10 +4135,10 @@ AC_CACHE_CHECK(for statfs, wx_cv_func_statfs,
AC_TRY_COMPILE(
[
#if defined(__BSD__)
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/param.h>
#include <sys/mount.h>
#else
#include <sys/vfs.h>
#include <sys/vfs.h>
#endif
],
[
@@ -4149,16 +4149,37 @@ AC_CACHE_CHECK(for statfs, wx_cv_func_statfs,
l += fs.f_blocks;
l += fs.f_bavail;
],
[
wx_cv_func_statfs=yes
],
[
wx_cv_func_statfs=no
]
wx_cv_func_statfs=yes,
wx_cv_func_statfs=no
)
)
if test "$wx_cv_func_statfs" = "yes"; then
dnl check whether we have its dcelaration too: some systems (AIX 4) lack it
AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_CACHE_CHECK(for statfs declaration, wx_cv_func_statfs_decl,
[
#if defined(__BSD__)
#include <sys/param.h>
#include <sys/mount.h>
#else
#include <sys/vfs.h>
#endif
],
[
struct statfs fs;
statfs("", &fs);
],
wx_cv_func_statfs_decl=yes,
wx_cv_func_statfs_decl=no
)
AC_LANG_RESTORE
if test "$wx_cv_func_statfs_decl" = "yes"; then
AC_DEFINE(HAVE_STATFS_DECL)
fi
wx_cv_type_statvfs_t="struct statfs"
AC_DEFINE(HAVE_STATFS)
else