- Fail gracefully and not just bail out with an error message from dirname

because no argument was given.
This commit is contained in:
Markus Fischer 2002-05-11 03:11:46 +00:00
parent f314d24d03
commit c7a15e6388
2 changed files with 12 additions and 0 deletions

View file

@ -21,6 +21,12 @@ if test "$PHP_JAVA" != "no"; then
else else
JAVA_JAR= JAVA_JAR=
fi 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` PHP_JAVA=`cd \`dirname \\\`which javac\\\`\`/..;pwd`
else else
test -x $PHP_JAVA/bin/jar && JAVA_JAR="$PHP_JAVA/bin/jar cf" test -x $PHP_JAVA/bin/jar && JAVA_JAR="$PHP_JAVA/bin/jar cf"

View file

@ -21,6 +21,12 @@ if test "$PHP_JAVA" != "no"; then
else else
JAVA_JAR= JAVA_JAR=
fi 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` PHP_JAVA=`cd \`dirname \\\`which javac\\\`\`/..;pwd`
else else
test -x $PHP_JAVA/bin/jar && JAVA_JAR="$PHP_JAVA/bin/jar cf" test -x $PHP_JAVA/bin/jar && JAVA_JAR="$PHP_JAVA/bin/jar cf"