mirror of
https://github.com/php/php-src.git
synced 2025-08-20 09:24:05 +02:00
- Fail gracefully and not just bail out with an error message from dirname
because no argument was given.
This commit is contained in:
parent
f314d24d03
commit
c7a15e6388
2 changed files with 12 additions and 0 deletions
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue