From c7a15e63886fdf7f189e79a4efc4c0d6e4e28be9 Mon Sep 17 00:00:00 2001 From: Markus Fischer Date: Sat, 11 May 2002 03:11:46 +0000 Subject: [PATCH] - Fail gracefully and not just bail out with an error message from dirname because no argument was given. --- ext/java/config.m4 | 6 ++++++ ext/rpc/java/config.m4 | 6 ++++++ 2 files changed, 12 insertions(+) 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" -- 2.50.1