summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorChad MILLER <chad@mysql.com>2008-10-06 11:35:21 -0400
committerChad MILLER <chad@mysql.com>2008-10-06 11:35:21 -0400
commit5cee4d7cf6c4bac0c8c4ac86f5f15357f7c1dbea (patch)
tree48791d19c21c421207733b59c0e0c5c97a018bbb /configure.in
parent7e59ecb11070e85d56119c86b626bab872facef8 (diff)
downloadmariadb-git-5cee4d7cf6c4bac0c8c4ac86f5f15357f7c1dbea.tar.gz
Fix autoconf substitution and evaluation of a string inside single quotes
so that if the substitution contains single-quotes, the program will fail.
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in19
1 files changed, 10 insertions, 9 deletions
diff --git a/configure.in b/configure.in
index ecfb7e0a1fd..85021ba8dde 100644
--- a/configure.in
+++ b/configure.in
@@ -507,40 +507,41 @@ AC_SUBST(ICHECK)
# Look for PS usage. We use double dollar-signs in FIND_PROC because this
# value is written to a makefile, which interprets away one level of
# dollar-signs. So, interpretation stages are m4 and then shell in autoconf,
-# then Make, then shell.
+# then Make, then shell. The autoconf substitution uses single quotes, so
+# no unprotected single quotes should appear in the expression.
AC_PATH_PROG(PS, ps, ps)
AC_MSG_CHECKING("how to check if pid exists")
PS=$ac_cv_path_PS
# Linux style
if $PS wwwp $$ 2> /dev/null | grep -- "$0" > /dev/null
then
- FIND_PROC="$PS wwwp \$\$PID | grep -v ' grep' | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
+ FIND_PROC="$PS wwwp \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
# Solaris
elif $PS -fp $$ 2> /dev/null | grep -- $0 > /dev/null
then
- FIND_PROC="$PS -p \$\$PID | grep -v ' grep' | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
+ FIND_PROC="$PS -p \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
# BSD style
elif $PS -uaxww 2> /dev/null | grep -- $0 > /dev/null
then
- FIND_PROC="$PS -uaxww | grep -v ' grep' | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
+ FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
# SysV style
elif $PS -ef 2> /dev/null | grep -- $0 > /dev/null
then
- FIND_PROC="$PS -ef | grep -v ' grep' | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
+ FIND_PROC="$PS -ef | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
# Do anybody use this?
elif $PS $$ 2> /dev/null | grep -- $0 > /dev/null
then
- FIND_PROC="$PS \$\$PID | grep -v ' grep' | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
+ FIND_PROC="$PS \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
else
case $SYSTEM_TYPE in
*freebsd*|*dragonfly*)
- FIND_PROC="$PS p \$\$PID | grep -v ' grep' | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
+ FIND_PROC="$PS p \$\$PID | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" > /dev/null"
;;
*darwin*)
- FIND_PROC="$PS -uaxww | grep -v ' grep' | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
+ FIND_PROC="$PS -uaxww | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
;;
*cygwin*)
- FIND_PROC="$PS -e | grep -v ' grep' | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
+ FIND_PROC="$PS -e | grep -v \" grep\" | grep -v mysqld_safe | grep -- \"\$\$MYSQLD\" | grep \" \$\$PID \" > /dev/null"
;;
*netware*)
FIND_PROC=