summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.in26
1 files changed, 26 insertions, 0 deletions
diff --git a/configure.in b/configure.in
index 28d159e..e207d95 100644
--- a/configure.in
+++ b/configure.in
@@ -1362,6 +1362,32 @@ fi
1362dnl end if for PATH_TO_SWAPINFO 1362dnl end if for PATH_TO_SWAPINFO
1363fi 1363fi
1364 1364
1365AC_PATH_PROG(PATH_TO_SWAPCTL,swapctl,,[$PATH:/sbin])
1366if (test -n "$PATH_TO_SWAPCTL")
1367then
1368AC_MSG_CHECKING([for $PATH_TO_SWAPCTL format])
1369if [$PATH_TO_SWAPCTL -l 2>&1 >/dev/null]
1370then
1371 ac_cv_have_swap=yes
1372 ac_cv_swap_command="$PATH_TO_SWAPCTL -l"
1373 if [$PATH_TO_SWAPCTL -l 2>/dev/null | \
1374 egrep -i "^Device +1K-blocks +Used +Avail +Capacity +Priority" >/dev/null ]
1375 then
1376 ac_cv_swap_format=["%*s %llu %*d %llu %*d"]
1377 ac_cv_swap_conv=1024
1378 AC_MSG_RESULT([using 1K BSD format swapctl])
1379
1380 elif [$PATH_TO_SWAPCTL -l 2>/dev/null | \
1381 egrep -i "^Device +512-blocks +Used +Avail +Capacity +Priority" >/dev/null ]
1382 then
1383 ac_cv_swap_format=["%*s %llu %*d %llu %*d"]
1384 ac_cv_swap_conv=2048
1385 AC_MSG_RESULT([using 512 byte BSD format swapctl])
1386 fi
1387fi
1388dnl end if for PATH_TO_SWAPCTL
1389fi
1390
1365if test "x$ac_cv_have_swap" != "x" 1391if test "x$ac_cv_have_swap" != "x"
1366then 1392then
1367 AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found]) 1393 AC_DEFINE(HAVE_SWAP,1,[Define if swap/swapinfo command is found])