One more patch up towards OSX compatibility...

# it compiles now with the ObjC files (Finlay Doobie rocks the casbah)
This commit is contained in:
Dan Kalowsky 2002-08-21 01:41:22 +00:00
parent be1e23cbc9
commit a832091a2c
4 changed files with 38 additions and 46 deletions

View file

@ -33,21 +33,18 @@ AC_DEFUN(JAVA_FIND_JAR, [
AC_DEFUN(JAVA_FIND_C, [
AC_MSG_CHECKING([Java C location])
if test "$PHP_JAVA" = "yes"; then
JAVA_C=`which javac`
if test -z "$JAVA_C"; then
else
dnl
dnl we will auto assume that the bin directory is underneath
dnl the user provided directory, and it includes the javac
dnl directory.
dnl We've been given a path to use, so use it
dnl
if test -z "$PHP_JAVA" != "yes"; then
if test -x $PHP_JAVA/bin/javac; then
JAVA_C=$PHP_JAVA/bin/javac
else
AC_MSG_ERROR([Unable to locate $PHP_JAVA/bin])
fi
fi
fi
if test -z "$JAVA_C"; 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,
@ -151,9 +148,10 @@ if test "$PHP_JAVA" != "no"; then
if test "$platform" = "Darwin"; then
AC_CHECK_HEADERS([JavaVM/JavaVM.h])
AC_CHECK_HEADERS([JavaVM/jni.h])
JAVA_CLASSPATH=/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar
dnl JAVA_CLASSPATH=/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar
PHP_CHECK_FRAMEWORK("JavaVM", JNI_CreateJavaVM,[AC_DEFINE(HAVE_JAVA,1,[ ])])
PHP_ADD_FRAMEWORK("JavaVM")
JAVA_CFLAGS="-x objective-c"
else
JAVA_CHECK_LIB()
AC_DEFINE(HAVE_JAVA,1,[ ])

View file

@ -34,10 +34,8 @@
#include "php_ini.h"
#include "php_globals.h"
/* #if defined(__MacOSX__) */
#if HAVE_JAVAVM_JAVAVM_H
#include <JavaVM/JavaVM.h>
#define JAVALIB "libjvm.dylib"
#define JNI_12
#else
#include <jni.h>

View file

@ -33,21 +33,18 @@ AC_DEFUN(JAVA_FIND_JAR, [
AC_DEFUN(JAVA_FIND_C, [
AC_MSG_CHECKING([Java C location])
if test "$PHP_JAVA" = "yes"; then
JAVA_C=`which javac`
if test -z "$JAVA_C"; then
else
dnl
dnl we will auto assume that the bin directory is underneath
dnl the user provided directory, and it includes the javac
dnl directory.
dnl We've been given a path to use, so use it
dnl
if test -z "$PHP_JAVA" != "yes"; then
if test -x $PHP_JAVA/bin/javac; then
JAVA_C=$PHP_JAVA/bin/javac
else
AC_MSG_ERROR([Unable to locate $PHP_JAVA/bin])
fi
fi
fi
if test -z "$JAVA_C"; 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,
@ -151,9 +148,10 @@ if test "$PHP_JAVA" != "no"; then
if test "$platform" = "Darwin"; then
AC_CHECK_HEADERS([JavaVM/JavaVM.h])
AC_CHECK_HEADERS([JavaVM/jni.h])
JAVA_CLASSPATH=/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar
dnl JAVA_CLASSPATH=/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar
PHP_CHECK_FRAMEWORK("JavaVM", JNI_CreateJavaVM,[AC_DEFINE(HAVE_JAVA,1,[ ])])
PHP_ADD_FRAMEWORK("JavaVM")
JAVA_CFLAGS="-x objective-c"
else
JAVA_CHECK_LIB()
AC_DEFINE(HAVE_JAVA,1,[ ])

View file

@ -34,10 +34,8 @@
#include "php_ini.h"
#include "php_globals.h"
/* #if defined(__MacOSX__) */
#if HAVE_JAVAVM_JAVAVM_H
#include <JavaVM/JavaVM.h>
#define JAVALIB "libjvm.dylib"
#define JNI_12
#else
#include <jni.h>