]> granicus.if.org Git - php/commitdiff
- Fail gracefully and not just bail out with an error message from dirname
authorMarkus Fischer <mfischer@php.net>
Sat, 11 May 2002 03:11:46 +0000 (03:11 +0000)
committerMarkus Fischer <mfischer@php.net>
Sat, 11 May 2002 03:11:46 +0000 (03:11 +0000)
  because no argument was given.

ext/java/config.m4
ext/rpc/java/config.m4

index fba422696a39a30e21991aa34f0f9b2648947673..6ad4afbed4d930eb4c2ddd68eb69ee3cd9e1c597 100644 (file)
@@ -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"
index fba422696a39a30e21991aa34f0f9b2648947673..6ad4afbed4d930eb4c2ddd68eb69ee3cd9e1c597 100644 (file)
@@ -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"