blob: 336e80e0b759e9330e51b1483216a60bf807937b [file] [log] [blame]
Thomas Petazzoni24b27152010-12-22 14:07:08 +01001Patch borrowed from
2http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/mysql/files/configure-ps-cache-check.patch
3
4It allows to specify through ac_cv_FIND_PROC how ps should be used on
5the target to find the PID of a program.
6
7Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8
9---
10 configure.in | 9 +++++----
11 1 file changed, 5 insertions(+), 4 deletions(-)
12
13Index: mysql-5.1.53/configure.in
14===================================================================
15--- mysql-5.1.53.orig/configure.in
16+++ mysql-5.1.53/configure.in
17@@ -462,8 +462,8 @@
18 # then Make, then shell. The autoconf substitution uses single quotes, so
19 # no unprotected single quotes should appear in the expression.
20 AC_PATH_PROG(PS, ps, ps)
21-AC_MSG_CHECKING("how to check if pid exists")
22-PS=$ac_cv_path_PS
23+AC_CACHE_CHECK([how to check if pid exists], [ac_cv_FIND_PROC],
24+[
25 # Linux style
26 if $PS wwwp $$ 2> /dev/null | grep -- "$0" > /dev/null
27 then
28@@ -502,8 +502,9 @@
29 AC_MSG_ERROR([Could not find the right ps and/or grep switches. Which OS is this? See the Installation chapter in the Reference Manual.])
30 esac
31 fi
32-AC_SUBST(FIND_PROC)
33-AC_MSG_RESULT("$FIND_PROC")
34+ac_cv_FIND_PROC="$FIND_PROC"
35+])
36+AC_SUBST([FIND_PROC], [$ac_cv_FIND_PROC])
37
38 # Check if a pid is valid
39 AC_PATH_PROG(KILL, kill, kill)