@ Added Zend OO syntax overloading support for Java components
#
# My lawyer made me do this:
#
Users of PHP are hereby granted a non-exclusive, irrevocable, world-wide,
royalty-free, non-transferable license to use, execute, prepare derivative
works of, and distribute (internally and externally, and including derivative
works) the code accompanying this license as part of, and integrated into PHP.
WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
AND ANY WARRANTY OF NON-INFRINGEMENT. THE ENTIRE RISK ARISING OUT OF THE USE
OR PERFORMANCE OF THIS CODE REMAINS WITH USERS OF PHP. The owner of this code
represents and warrants that it is legally entitled to grant the above license.
1999-11-09 20:02:22 +08:00
|
|
|
# $Id$
|
|
|
|
# config.m4 for extension java
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for Java support)
|
|
|
|
AC_ARG_WITH(java,
|
|
|
|
[ --with-java[=DIR] Include Java support. DIR is the base install
|
|
|
|
directory for the JDK. This extension can only
|
|
|
|
be built as a shared dl.],
|
|
|
|
[
|
|
|
|
if test "$withval" != "no"; then
|
|
|
|
JAVA_SHARED="libphp_java.la"
|
|
|
|
|
2000-01-28 18:53:06 +08:00
|
|
|
# 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
|
|
|
|
|
@ Added Zend OO syntax overloading support for Java components
#
# My lawyer made me do this:
#
Users of PHP are hereby granted a non-exclusive, irrevocable, world-wide,
royalty-free, non-transferable license to use, execute, prepare derivative
works of, and distribute (internally and externally, and including derivative
works) the code accompanying this license as part of, and integrated into PHP.
WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
AND ANY WARRANTY OF NON-INFRINGEMENT. THE ENTIRE RISK ARISING OUT OF THE USE
OR PERFORMANCE OF THIS CODE REMAINS WITH USERS OF PHP. The owner of this code
represents and warrants that it is legally entitled to grant the above license.
1999-11-09 20:02:22 +08:00
|
|
|
if test "$withval" = "yes"; then
|
|
|
|
if test -d /usr/local/lib/kaffe; then
|
|
|
|
JAVA_CFLAGS="-DKAFFE"
|
|
|
|
JAVA_INCLUDE=-I/usr/local/include/kaffe
|
1999-11-29 23:36:25 +08:00
|
|
|
JAVA_CLASSPATH=/usr/local/share/kaffe/Klasses.jar
|
@ Added Zend OO syntax overloading support for Java components
#
# My lawyer made me do this:
#
Users of PHP are hereby granted a non-exclusive, irrevocable, world-wide,
royalty-free, non-transferable license to use, execute, prepare derivative
works of, and distribute (internally and externally, and including derivative
works) the code accompanying this license as part of, and integrated into PHP.
WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
AND ANY WARRANTY OF NON-INFRINGEMENT. THE ENTIRE RISK ARISING OUT OF THE USE
OR PERFORMANCE OF THIS CODE REMAINS WITH USERS OF PHP. The owner of this code
represents and warrants that it is legally entitled to grant the above license.
1999-11-09 20:02:22 +08:00
|
|
|
elif test -d /usr/lib/kaffe; then
|
|
|
|
JAVA_CFLAGS="-DKAFFE"
|
|
|
|
JAVA_INCLUDE=-I/usr/include/kaffe
|
1999-11-29 23:36:25 +08:00
|
|
|
JAVA_CLASSPATH=/usr/share/kaffe/Klasses.jar
|
@ Added Zend OO syntax overloading support for Java components
#
# My lawyer made me do this:
#
Users of PHP are hereby granted a non-exclusive, irrevocable, world-wide,
royalty-free, non-transferable license to use, execute, prepare derivative
works of, and distribute (internally and externally, and including derivative
works) the code accompanying this license as part of, and integrated into PHP.
WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
AND ANY WARRANTY OF NON-INFRINGEMENT. THE ENTIRE RISK ARISING OUT OF THE USE
OR PERFORMANCE OF THIS CODE REMAINS WITH USERS OF PHP. The owner of this code
represents and warrants that it is legally entitled to grant the above license.
1999-11-09 20:02:22 +08:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_MSG_ERROR(unable to find Java VM libraries)
|
|
|
|
fi
|
2000-01-28 18:53:06 +08:00
|
|
|
|
|
|
|
# accomodate old versions of kaffe which don't support jar
|
|
|
|
if kaffe -version 2>&1 | grep 1.0b > /dev/null; then
|
|
|
|
JAVA_JAR='zip -q0'
|
|
|
|
fi
|
|
|
|
|
@ Added Zend OO syntax overloading support for Java components
#
# My lawyer made me do this:
#
Users of PHP are hereby granted a non-exclusive, irrevocable, world-wide,
royalty-free, non-transferable license to use, execute, prepare derivative
works of, and distribute (internally and externally, and including derivative
works) the code accompanying this license as part of, and integrated into PHP.
WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
AND ANY WARRANTY OF NON-INFRINGEMENT. THE ENTIRE RISK ARISING OUT OF THE USE
OR PERFORMANCE OF THIS CODE REMAINS WITH USERS OF PHP. The owner of this code
represents and warrants that it is legally entitled to grant the above license.
1999-11-09 20:02:22 +08:00
|
|
|
else
|
|
|
|
if test -f $withval/lib/libjava.so; then
|
|
|
|
JAVA_INCLUDE="-I$withval/include"
|
|
|
|
test -f $withval/lib/classes.zip && JAVA_CFLAGS="-DJNI_11"
|
|
|
|
test -f $withval/lib/jvm.jar && JAVA_CFLAGS="-DJNI_12"
|
1999-11-29 23:36:25 +08:00
|
|
|
test -f $withval/lib/classes.zip && JAVA_CLASSPATH="$withval/lib/classes.zip"
|
|
|
|
test -f $withval/lib/jvm.jar && JAVA_CLASSPATH="$withval/lib/jvm.jar"
|
@ Added Zend OO syntax overloading support for Java components
#
# My lawyer made me do this:
#
Users of PHP are hereby granted a non-exclusive, irrevocable, world-wide,
royalty-free, non-transferable license to use, execute, prepare derivative
works of, and distribute (internally and externally, and including derivative
works) the code accompanying this license as part of, and integrated into PHP.
WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
AND ANY WARRANTY OF NON-INFRINGEMENT. THE ENTIRE RISK ARISING OUT OF THE USE
OR PERFORMANCE OF THIS CODE REMAINS WITH USERS OF PHP. The owner of this code
represents and warrants that it is legally entitled to grant the above license.
1999-11-09 20:02:22 +08:00
|
|
|
for i in $JAVA_INCLUDE/*; do
|
|
|
|
test -f $i/jni_md.h && JAVA_INCLUDE="$JAVA_INCLUDE $i"
|
|
|
|
done
|
|
|
|
else
|
|
|
|
for i in `find $withval -type d`; do
|
|
|
|
test -f $i/jni.h && JAVA_INCLUDE="-I$i"
|
|
|
|
test -f $i/jni_md.h && JAVA_INCLUDE="$JAVA_INCLUDE -I$i"
|
|
|
|
test -f $i/classes.zip && JAVA_CFLAGS="-DJNI_11"
|
|
|
|
test -f $i/jvm.jar && JAVA_CFLAGS="-DJNI_12"
|
1999-11-29 23:36:25 +08:00
|
|
|
test -f $i/classes.zip && JAVA_CLASSPATH="$i/classes.zip"
|
|
|
|
test -f $i/jvm.jar && JAVA_CLASSPATH="$i/jvm.jar"
|
@ Added Zend OO syntax overloading support for Java components
#
# My lawyer made me do this:
#
Users of PHP are hereby granted a non-exclusive, irrevocable, world-wide,
royalty-free, non-transferable license to use, execute, prepare derivative
works of, and distribute (internally and externally, and including derivative
works) the code accompanying this license as part of, and integrated into PHP.
WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
AND ANY WARRANTY OF NON-INFRINGEMENT. THE ENTIRE RISK ARISING OUT OF THE USE
OR PERFORMANCE OF THIS CODE REMAINS WITH USERS OF PHP. The owner of this code
represents and warrants that it is legally entitled to grant the above license.
1999-11-09 20:02:22 +08:00
|
|
|
done
|
|
|
|
if test -z "$JAVA_INCLUDE"; then
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_MSG_ERROR(unable to find Java VM libraries)
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
1999-12-30 12:52:19 +08:00
|
|
|
AC_DEFINE(HAVE_JAVA,1,[ ])
|
2000-01-30 01:53:58 +08:00
|
|
|
if test "$PHP_SAPI" != "servlet"; then
|
|
|
|
PHP_EXTENSION(java, shared)
|
|
|
|
fi
|
@ Added Zend OO syntax overloading support for Java components
#
# My lawyer made me do this:
#
Users of PHP are hereby granted a non-exclusive, irrevocable, world-wide,
royalty-free, non-transferable license to use, execute, prepare derivative
works of, and distribute (internally and externally, and including derivative
works) the code accompanying this license as part of, and integrated into PHP.
WARRANTY OF ANY KIND EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTY OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
AND ANY WARRANTY OF NON-INFRINGEMENT. THE ENTIRE RISK ARISING OUT OF THE USE
OR PERFORMANCE OF THIS CODE REMAINS WITH USERS OF PHP. The owner of this code
represents and warrants that it is legally entitled to grant the above license.
1999-11-09 20:02:22 +08:00
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
|
|
|
|
1999-12-30 10:59:53 +08:00
|
|
|
PHP_SUBST(JAVA_CFLAGS)
|
|
|
|
PHP_SUBST(JAVA_CLASSPATH)
|
|
|
|
PHP_SUBST(JAVA_INCLUDE)
|
|
|
|
PHP_SUBST(JAVA_SHARED)
|
2000-01-19 22:45:26 +08:00
|
|
|
PHP_SUBST(JAVA_JAR)
|
1999-11-10 01:32:05 +08:00
|
|
|
|