From e527699dddca41e3af6c1872e851405a4f5212a0 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 16 Nov 2010 16:30:33 +1000 Subject: Add functions to calculate approximate disk usage by packages Two helper function are added to calculate the disk usage from packages that are either currently installed on the system or from a package archive. Some minor approximations have been made: 1. Size for directories is not considered when removing a package from the filesystem to avoid multiple counting across packages. Also, these are reported to take zero size while installing. 2. Symlinks are reported to contribute zero size towards removal as libarchive reports them to have zero size for install. 3. Package data files (.PKGINFO, .INSTALL, .CHANGELOG) are counted towards usage on dbpath on install, but their size is not counted on package removal. 4. No handling of extra size needed for .pacsave/.pacnew files. Signed-off-by: Allan McRae Signed-off-by: Dan McGee --- configure.ac | 3 +++ 1 file changed, 3 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index cf023002..56e1ed88 100644 --- a/configure.ac +++ b/configure.ac @@ -133,6 +133,9 @@ AC_PATH_PROGS([BASH_SHELL], [bash bash4 bash3], [false]) AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT_VERSION(0.13.1) +# Check for lm +AC_CHECK_LIB([m], [ceil]) + # Check for libarchive AC_CHECK_LIB([archive], [archive_read_data], , AC_MSG_ERROR([libarchive is needed to compile pacman!])) -- cgit v1.2.3-70-g09d2