| 1 |
# Determine whether ps is posix or bsd. |
| 2 |
# AC_PATH_PROG(PS, ps) |
| 3 |
#AC_CACHE_CHECK([for POSIX or BSD ps syntax], ac_cv_prog_ps_syntax, [ |
| 4 |
if $PS ax -o rss > /dev/null 2>&1; then |
| 5 |
ac_cv_prog_ps_ax=yes |
| 6 |
else |
| 7 |
ac_cv_prog_ps_ax=no |
| 8 |
fi |
| 9 |
if $PS -ef -o rss > /dev/null 2>&1; then |
| 10 |
ac_cv_prog_ps_ef=yes |
| 11 |
else |
| 12 |
ac_cv_prog_ps_ef=no |
| 13 |
fi |
| 14 |
if test "$ac_cv_prog_ps_ax" = yes; then |
| 15 |
ac_cv_prog_ps_syntax=BSD |
| 16 |
else |
| 17 |
if test "$ac_cv_prog_ps_ef" = yes; then |
| 18 |
ac_cv_prog_ps_syntax=POSIX |
| 19 |
else |
| 20 |
AC_MSG_ERROR(Could not determine ps syntax) |
| 21 |
fi |
| 22 |
fi |
| 23 |
]) |
| 24 |
|
| 25 |
if (UNIX) |
| 26 |
if(NOT ps_cmd) |
| 27 |
find_program(ps_cmd "ps") |
| 28 |
endif(NOT ps_cmd) |
| 29 |
|
| 30 |
|
| 31 |
if(ps_cmd) |
| 32 |
execute_process(COMMAND "${ps_cmd}") |