diff options
-rw-r--r-- | configure.in | 26 |
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 | |||
1362 | dnl end if for PATH_TO_SWAPINFO | 1362 | dnl end if for PATH_TO_SWAPINFO |
1363 | fi | 1363 | fi |
1364 | 1364 | ||
1365 | AC_PATH_PROG(PATH_TO_SWAPCTL,swapctl,,[$PATH:/sbin]) | ||
1366 | if (test -n "$PATH_TO_SWAPCTL") | ||
1367 | then | ||
1368 | AC_MSG_CHECKING([for $PATH_TO_SWAPCTL format]) | ||
1369 | if [$PATH_TO_SWAPCTL -l 2>&1 >/dev/null] | ||
1370 | then | ||
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 | ||
1387 | fi | ||
1388 | dnl end if for PATH_TO_SWAPCTL | ||
1389 | fi | ||
1390 | |||
1365 | if test "x$ac_cv_have_swap" != "x" | 1391 | if test "x$ac_cv_have_swap" != "x" |
1366 | then | 1392 | then |
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]) |