summaryrefslogtreecommitdiff
path: root/ext/java
diff options
context:
space:
mode:
authorSam Ruby <rubys@php.net>2000-01-19 14:45:26 +0000
committerSam Ruby <rubys@php.net>2000-01-19 14:45:26 +0000
commite6c203832ebf5e96eb58a3c8bf4c19753524dd68 (patch)
tree238a4ad5aa2736a0a277b920964f79b86f2a305e /ext/java
parentfb6a1b8b83e30ad07c765227f361f96179eb94e4 (diff)
downloadphp-git-e6c203832ebf5e96eb58a3c8bf4c19753524dd68.tar.gz
First step to restoring the ability to build Java support on Unix:
1) Restore the ability to build CGI as a shared library 2) Correct make dependency rule so that the jar files are included 3) Search for jar executable, and use it, if found Left TODO: actually build the shared libraries
Diffstat (limited to 'ext/java')
-rw-r--r--ext/java/Makefile.in7
-rw-r--r--ext/java/config.m49
2 files changed, 11 insertions, 5 deletions
diff --git a/ext/java/Makefile.in b/ext/java/Makefile.in
index 9f8488e1b1..f0fa6c4032 100644
--- a/ext/java/Makefile.in
+++ b/ext/java/Makefile.in
@@ -4,16 +4,15 @@ topsrcdir = @topsrcdir@
srcdir = @srcdir@
VPATH = @srcdir@
-LTLIBRARY_NAME = libjava.la
+LTLIBRARY_NAME = libphp_java.la
LTLIBRARY_SOURCES = java.c
-LTLIBRARY_LIBADD = $(JAVA_LFLAGS)
+LTLIBRARY_DEPENDENCIES = php_java.jar
EXTRA_CFLAGS = $(JAVA_CFLAGS)
EXTRA_INCLUDES = $(JAVA_INCLUDE)
include $(topsrcdir)/build/ltlib.mk
-phplib_DATA=php_java.jar
php_java.jar : reflect.java
@test -e net || mkdir net
@test -e net/php || mkdir net/php
@@ -21,7 +20,7 @@ php_java.jar : reflect.java
@echo library=php4>net/php/reflect.properties
javac net/php/reflect.java
@test ! -f reflect.class || mv reflect.class net/php # bug in KJC javac
- zip -q0 php_java.jar net/php/*.class net/php/*.properties
+ $(JAVA_JAR) php_java.jar net/php/*.class net/php/*.properties
@rm net/php/reflect.*
@rmdir net/php
@rmdir net
diff --git a/ext/java/config.m4 b/ext/java/config.m4
index f0fdd80297..3c1295ab9c 100644
--- a/ext/java/config.m4
+++ b/ext/java/config.m4
@@ -49,6 +49,13 @@ AC_ARG_WITH(java,
fi
fi
+ # 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"
+ else
+ JAVA_JAR='zip -q0'
+ fi
+
AC_DEFINE(HAVE_JAVA,1,[ ])
PHP_EXTENSION(java, shared)
PHP_BUILD_SHARED
@@ -64,5 +71,5 @@ PHP_SUBST(JAVA_CFLAGS)
PHP_SUBST(JAVA_CLASSPATH)
PHP_SUBST(JAVA_INCLUDE)
PHP_SUBST(JAVA_SHARED)
-PHP_SUBST(JAVA_LFLAGS)
+PHP_SUBST(JAVA_JAR)