statfs() detection for wxGetDiskSpace
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
31
configure.in
31
configure.in
@@ -2822,6 +2822,35 @@ fi
|
|||||||
dnl check for vfork() (even if it's the same as fork() in modern Unices)
|
dnl check for vfork() (even if it's the same as fork() in modern Unices)
|
||||||
AC_CHECK_FUNCS(vfork)
|
AC_CHECK_FUNCS(vfork)
|
||||||
|
|
||||||
|
dnl get the library function to use for wxGetDiskSpace()
|
||||||
|
AC_CACHE_CHECK(for statfs, wx_cv_func_statfs,
|
||||||
|
AC_TRY_COMPILE(
|
||||||
|
[
|
||||||
|
#include <sys/vfs.h>
|
||||||
|
],
|
||||||
|
[
|
||||||
|
long l;
|
||||||
|
struct statfs fs;
|
||||||
|
statfs("/", &fs);
|
||||||
|
l = fs.f_bsize;
|
||||||
|
l += fs.f_blocks;
|
||||||
|
l += fs.f_bavail;
|
||||||
|
],
|
||||||
|
[
|
||||||
|
wx_cv_func_statfs=yes
|
||||||
|
],
|
||||||
|
[
|
||||||
|
wx_cv_func_statfs=no
|
||||||
|
]
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if test "$wx_cv_func_statfs" = "yes"; then
|
||||||
|
AC_DEFINE(HAVE_STATFS)
|
||||||
|
else
|
||||||
|
AC_MSG_WARN([wxGetDiskSpace() function won't work without statfs()])
|
||||||
|
fi
|
||||||
|
|
||||||
dnl check for fcntl() or at least flock() needed by Unix implementation of
|
dnl check for fcntl() or at least flock() needed by Unix implementation of
|
||||||
dnl wxSingleInstanceChecker
|
dnl wxSingleInstanceChecker
|
||||||
if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then
|
if test "$wxUSE_SNGLINST_CHECKER" = "yes"; then
|
||||||
@@ -3571,7 +3600,7 @@ if test "$wxUSE_STREAMS" = "yes" ; then
|
|||||||
AC_DEFINE(wxUSE_STREAMS)
|
AC_DEFINE(wxUSE_STREAMS)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl ------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl time/date functions
|
dnl time/date functions
|
||||||
dnl ------------------------------------------------------------------------
|
dnl ------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -861,6 +861,9 @@
|
|||||||
/* Define if you have shl_load() */
|
/* Define if you have shl_load() */
|
||||||
#undef HAVE_SHL_LOAD
|
#undef HAVE_SHL_LOAD
|
||||||
|
|
||||||
|
/* define if you have statfs function */
|
||||||
|
#undef HAVE_STATFS
|
||||||
|
|
||||||
/* Define if you have strptime() */
|
/* Define if you have strptime() */
|
||||||
#undef HAVE_STRPTIME
|
#undef HAVE_STRPTIME
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user