jani            Mon Apr 20 15:02:50 2009 UTC

  Modified files:              
    /php-src/scripts    phpize.in 
  Log:
  - Added path sanity check (autotools + libtool do not cope with whitespace..)
  
http://cvs.php.net/viewvc.cgi/php-src/scripts/phpize.in?r1=1.34&r2=1.35&diff_format=u
Index: php-src/scripts/phpize.in
diff -u php-src/scripts/phpize.in:1.34 php-src/scripts/phpize.in:1.35
--- php-src/scripts/phpize.in:1.34      Fri Jun 29 01:09:54 2007
+++ php-src/scripts/phpize.in   Mon Apr 20 15:02:49 2009
@@ -80,6 +80,24 @@
 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,7 +121,7 @@
   test -z "$PHP_AUTOCONF" && PHP_AUTOCONF=autoconf
   test -z "$PHP_AUTOHEADER" && PHP_AUTOHEADER=autoheader
   
-  if ! test -x $PHP_AUTOCONF && ! 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. Then, rerun this script.
@@ -111,7 +129,7 @@
 EOF
     exit 1
   fi
-  if ! test -x $PHP_AUTOHEADER && ! 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. Then, rerun this script.



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to