diff options
author | Allan McRae <allan@archlinux.org> | 2010-11-16 16:15:21 +1000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2010-12-12 20:29:43 -0600 |
commit | f4e9deb6d74614ac427b37513359d91588dd1542 (patch) | |
tree | 3f707d2046a12ee0808a3e0cbd3eed8a1d036767 /configure.ac | |
parent | adb10c3ab244cc00eb863d5b036fa7bdd76f8152 (diff) | |
download | pacman-f4e9deb6d74614ac427b37513359d91588dd1542.tar.xz |
Add function for listing system mount points
Add a mount_point_list() function that attempts to portably obtain
a list of system mount points and a struct to hold needed mount point
information.
Abort the transaction if we are unable to determine the mount points.
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index a8987a48..cf023002 100644 --- a/configure.ac +++ b/configure.ac @@ -169,7 +169,9 @@ AS_IF([test "x$with_fetch" != "xno"], AM_CONDITIONAL([HAVE_LIBFETCH], [test "x$ac_cv_lib_fetch_fetchParseURL" = "xyes"]) # Checks for header files. -AC_CHECK_HEADERS([fcntl.h glob.h libintl.h limits.h locale.h string.h strings.h sys/ioctl.h sys/param.h sys/statvfs.h sys/syslimits.h sys/time.h syslog.h wchar.h]) +AC_CHECK_HEADERS([fcntl.h glob.h libintl.h limits.h locale.h mntent.h string.h strings.h \ + sys/ioctl.h sys/mount.h sys/param.h sys/statvfs.h sys/syslimits.h \ + sys/time.h sys/types.h sys/ucred.h syslog.h wchar.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_INLINE @@ -183,12 +185,30 @@ AC_STRUCT_DIRENT_D_TYPE # Checks for library functions. AC_FUNC_FORK +AC_FUNC_GETMNTENT AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK AC_FUNC_MKTIME AC_CHECK_FUNCS([geteuid 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)]) + ]) + # Enable large file support if available AC_SYS_LARGEFILE |