From: Markus Fischer Date: Sat, 11 May 2002 03:11:46 +0000 (+0000) Subject: - Fail gracefully and not just bail out with an error message from dirname X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~132 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c7a15e63886fdf7f189e79a4efc4c0d6e4e28be9;p=php - Fail gracefully and not just bail out with an error message from dirname because no argument was given. --- diff --git a/ext/java/config.m4 b/ext/java/config.m4 index fba422696a..6ad4afbed4 100644 --- a/ext/java/config.m4 +++ b/ext/java/config.m4 @@ -21,6 +21,12 @@ if test "$PHP_JAVA" != "no"; then else JAVA_JAR= fi + PHP_JAVAC=`which javac` + if test -z "$PHP_JAVAC"; then + AC_MSG_ERROR([Unable to locate the javac binary in your system path +Either adjust your Java installation or provide the Java installation path, +e.g. --with-java=/java expecting /java/bin/ to contain the binaries]) + fi PHP_JAVA=`cd \`dirname \\\`which javac\\\`\`/..;pwd` else test -x $PHP_JAVA/bin/jar && JAVA_JAR="$PHP_JAVA/bin/jar cf" diff --git a/ext/rpc/java/config.m4 b/ext/rpc/java/config.m4 index fba422696a..6ad4afbed4 100644 --- a/ext/rpc/java/config.m4 +++ b/ext/rpc/java/config.m4 @@ -21,6 +21,12 @@ if test "$PHP_JAVA" != "no"; then else JAVA_JAR= fi + PHP_JAVAC=`which javac` + if test -z "$PHP_JAVAC"; then + AC_MSG_ERROR([Unable to locate the javac binary in your system path +Either adjust your Java installation or provide the Java installation path, +e.g. --with-java=/java expecting /java/bin/ to contain the binaries]) + fi PHP_JAVA=`cd \`dirname \\\`which javac\\\`\`/..;pwd` else test -x $PHP_JAVA/bin/jar && JAVA_JAR="$PHP_JAVA/bin/jar cf"