summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJani Taskinen <jani@php.net>2009-04-20 15:03:21 +0000
committerJani Taskinen <jani@php.net>2009-04-20 15:03:21 +0000
commit8393525511ba3ec5d60ffc0f7bcdcf83bc050c80 (patch)
treed646a437309ee5b623fa9c09662d9efa6684cedc /scripts
parent3b90499884f31016fc60a2e5aebd55af19fd59a4 (diff)
downloadphp-git-8393525511ba3ec5d60ffc0f7bcdcf83bc050c80.tar.gz
MFH:- Added path sanity check (autotools + libtool do not cope with whitespace..)
Diffstat (limited to 'scripts')
-rw-r--r--scripts/phpize.in30
1 files changed, 24 insertions, 6 deletions
diff --git a/scripts/phpize.in b/scripts/phpize.in
index 35f7dc7272..3adb8c8da4 100644
--- a/scripts/phpize.in
+++ b/scripts/phpize.in
@@ -80,6 +80,24 @@ Cannot find build files at '$phpdir'. Please check your PHP installation.
EOF
exit 1
fi
+
+ case "$phpdir" in
+ *\ * | *\ *)
+ cat <<EOF
+Invalid source path '$phpdir'. Whitespace is not allowed in source path.
+
+EOF
+ exit 1;;
+ esac
+
+ case "$builddir" in
+ *\ * | *\ *)
+ cat <<EOF
+Invalid build path '$builddir'. Whitespace is not allowed in build path.
+
+EOF
+ exit 1;;
+ esac
}
phpize_check_shtool()
@@ -103,18 +121,18 @@ phpize_check_autotools()
test -z "$PHP_AUTOCONF" && PHP_AUTOCONF=autoconf
test -z "$PHP_AUTOHEADER" && PHP_AUTOHEADER=autoheader
- if test ! -x "`$php_shtool path $PHP_AUTOCONF`"; then
+ if ! test -x "$PHP_AUTOCONF" && ! test -x "`$php_shtool path $PHP_AUTOCONF`"; then
cat <<EOF
-Cannot find autoconf. Please check your autoconf installation and the \$PHP_AUTOCONF
-environment variable is set correctly and then rerun this script.
+Cannot find autoconf. Please check your autoconf installation and the
+\$PHP_AUTOCONF environment variable. Then, rerun this script.
EOF
exit 1
fi
- if test ! -x "`$php_shtool path $PHP_AUTOHEADER`"; then
+ if ! test -x "$PHP_AUTOHEADER" && ! test -x "`$php_shtool path $PHP_AUTOHEADER`"; then
cat <<EOF
-Cannot find autoheader. Please check your autoconf installation and the \$PHP_AUTOHEADER
-environment variable is set correctly and then rerun this script.
+Cannot find autoheader. Please check your autoconf installation and the
+\$PHP_AUTOHEADER environment variable. Then, rerun this script.
EOF
exit 1