cvs: php4 /ext/java Makefile.frag config.m4
| From: | Jani Taskinen | Date: | Sun, 14 Apr 2002 00:40:35 +0000 |
| Subject: | cvs: php4 /ext/java Makefile.frag config.m4 | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-11123@lists.php.net to get a copy of this message | ||
sniper Sat Apr 13 20:40:35 2002 EDT
Modified files:
/php4/ext/java Makefile.frag config.m4
Log:
- Use the correct javac/jar binaries.
Index: php4/ext/java/Makefile.frag
diff -u php4/ext/java/Makefile.frag:1.1 php4/ext/java/Makefile.frag:1.2
--- php4/ext/java/Makefile.frag:1.1 Sun Mar 31 10:41:23 2002
+++ php4/ext/java/Makefile.frag Sat Apr 13 20:40:35 2002
@@ -5,7 +5,7 @@
$(mkinstalldirs) $(srcdir)/net/php
@cp $(srcdir)/reflect.java $(srcdir)/net/php
@echo library=php_java > $(srcdir)/net/php/reflect.properties
- javac $(srcdir)/net/php/reflect.java
+ $(JAVA_C) $(srcdir)/net/php/reflect.java
@test ! -f reflect.class || mv reflect.class $(srcdir)/net/php # bug in KJC javac
$(JAVA_JAR) $(srcdir)/php_java.jar $(srcdir)/net/php/*.class $(srcdir)/net/php/*.properties
@rm $(srcdir)/net/php/reflect.*
Index: php4/ext/java/config.m4
diff -u php4/ext/java/config.m4:1.29 php4/ext/java/config.m4:1.30
--- php4/ext/java/config.m4:1.29 Sun Mar 31 10:41:23 2002
+++ php4/ext/java/config.m4 Sat Apr 13 20:40:35 2002
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.29 2002/03/31 15:41:23 sniper Exp $
+dnl $Id: config.m4,v 1.30 2002/04/14 00:40:35 sniper Exp $
dnl
PHP_ARG_WITH(java, for JAVA support,
@@ -15,15 +15,26 @@
HP-UX) java_libext=libjava.sl ;;
esac
- # substitute zip for systems which don't have jar in the PATH
- if JAVA_JAR=
which jar 2>/dev/null; then
- JAVA_JAR="$JAVA_JAR cf"
+ if test "$withval" = "yes"; then
+ if JAVA_JAR=which jar 2>/dev/null; then
+ JAVA_JAR="$JAVA_JAR cf"
+ else
+ JAVA_JAR=
+ fi
+ withval=cd \dirname \\\which javac\\\\/..;pwd
else
+ test -x $withval/bin/jar && JAVA_JAR="$withval/bin/jar cf"
+ fi
+
+ # substitute zip for systems which don't have jar
+ if test -z "$JAVA_JAR"; then
JAVA_JAR='zip -q0'
fi
- if test "$PHP_JAVA" = "yes"; then
- PHP_JAVA=cd \dirname \\\which javac\\\\/..;pwd
+ if test -x $withval/bin/javac; then
+ JAVA_C=$withval/bin/javac
+ else
+ AC_MSG_ERROR([Can not find the javac binary under $withval/bin/])
fi
if test -d $PHP_JAVA/lib/kaffe; then
@@ -109,6 +120,7 @@
PHP_SUBST(JAVA_CLASSPATH)
PHP_SUBST(JAVA_JAR)
+ PHP_SUBST(JAVA_C)
PHP_ADD_MAKEFILE_FRAGMENT
fi