summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0bd9615)
raw | patch | inline | side by side (parent: 0bd9615)
author | Ton Voon <tonvoon@users.sourceforge.net> | |
Wed, 18 Aug 2004 20:36:07 +0000 (20:36 +0000) | ||
committer | Ton Voon <tonvoon@users.sourceforge.net> | |
Wed, 18 Aug 2004 20:36:07 +0000 (20:36 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@887 f882894a-f735-0410-b71e-b25c423dba1c
configure.in | patch | blob | history |
diff --git a/configure.in b/configure.in
index 28d159e7a50132396a0304e16b4791c4cff82611..e207d95bcde5d3f5cc8e00d2c82855f60af04b32 100644 (file)
--- a/configure.in
+++ b/configure.in
dnl end if for PATH_TO_SWAPINFO
fi
+AC_PATH_PROG(PATH_TO_SWAPCTL,swapctl,,[$PATH:/sbin])
+if (test -n "$PATH_TO_SWAPCTL")
+then
+AC_MSG_CHECKING([for $PATH_TO_SWAPCTL format])
+if [$PATH_TO_SWAPCTL -l 2>&1 >/dev/null]
+then
+ ac_cv_have_swap=yes
+ ac_cv_swap_command="$PATH_TO_SWAPCTL -l"
+ if [$PATH_TO_SWAPCTL -l 2>/dev/null | \
+ egrep -i "^Device +1K-blocks +Used +Avail +Capacity +Priority" >/dev/null ]
+ then
+ ac_cv_swap_format=["%*s %llu %*d %llu %*d"]
+ ac_cv_swap_conv=1024
+ AC_MSG_RESULT([using 1K BSD format swapctl])
+
+ elif [$PATH_TO_SWAPCTL -l 2>/dev/null | \
+ egrep -i "^Device +512-blocks +Used +Avail +Capacity +Priority" >/dev/null ]
+ then
+ ac_cv_swap_format=["%*s %llu %*d %llu %*d"]
+ ac_cv_swap_conv=2048
+ AC_MSG_RESULT([using 512 byte BSD format swapctl])
+ fi
+fi
+dnl end if for PATH_TO_SWAPCTL
+fi
+
if test "x$ac_cv_have_swap" != "x"
then
AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found])