diff options
author | Dan McGee <dan@archlinux.org> | 2010-11-16 20:12:26 -0600 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-12-12 20:31:51 -0600 |
commit | ec136784d4328b4c75f622c08273cf9dc6cac40f (patch) | |
tree | 645ba47c7ce525e5b21c792b19b649668e0dbf9c /configure.ac | |
parent | 24684a616ed46c635a2236873c8168b9153b5bc1 (diff) | |
download | pacman-ec136784d4328b4c75f622c08273cf9dc6cac40f.tar.xz |
Refactor statfs/statvfs type check
Turn it into a configure-type typedef, which allows us to reduce the
amount of duplicated code and clean up some #ifdef magic in the code
itself. Adjust some of the other defined checks to look at the headers
available rather than trying to pull in the right ones based on
configure checks.
Signed-off-by: Dan McGee <dan@archlinux.org>
Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac index 56e1ed88..473b2906 100644 --- a/configure.ac +++ b/configure.ac @@ -191,27 +191,11 @@ AC_FUNC_FORK AC_FUNC_GETMNTENT AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_FUNC_MKTIME -AC_CHECK_FUNCS([geteuid realpath regcomp strcasecmp \ +AC_CHECK_FUNCS([geteuid getmntinfo realpath regcomp strcasecmp \ strndup strrchr strsep swprintf \ wcwidth uname]) - -# Checks for getmntinfo and determines whether it uses statfs or statvfs -AC_CHECK_FUNC(getmntinfo, - [AC_MSG_CHECKING(parameter style for getmntinfo) - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -# include <sys/param.h> -# include <sys/mount.h> -#if HAVE_SYS_UCRED_H -#include <sys/ucred.h> -#endif -extern int getmntinfo (struct statfs **, int); - ]], [])], - [AC_DEFINE(HAVE_GETMNTINFO_STATFS, [], [getmntinfo uses statfs]) - AC_MSG_RESULT(statfs)], - [AC_DEFINE(HAVE_GETMNTINFO_STATVFS, [], [getmntinfo uses statvfs]) - AC_MSG_RESULT(statvfs)]) - ]) - +# For the diskspace code +FS_STATS_TYPE # Enable large file support if available AC_SYS_LARGEFILE |