Index: /trunk/zoo-kernel/Makefile.in
===================================================================
--- /trunk/zoo-kernel/Makefile.in	(revision 76)
+++ /trunk/zoo-kernel/Makefile.in	(revision 77)
@@ -1,2 +1,8 @@
+OS:=$(shell uname -s)
+ifeq ($(OS),Darwin)
+	MACOS_LD_FLAGS=-lintl -framework SystemConfiguration -framework CoreFoundation
+	MACOS_CFLAGS=-arch i386 -arch ppc -arch x86_64
+endif
+
 JAVACFLAGS=@JAVA_CPPFLAGS@
 JAVALDFLAGS=@JAVA_LDFLAGS@
@@ -4,5 +10,5 @@
 JAVA_FILE=@JAVA_FILE@
 
-CFLAGS=-I../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF
+CFLAGS=${MACOS_CFLAGS} -I../thirds/cgic206 -I. -DLINUX_FREE_ISSUE #-DDEBUG #-DDEBUG_SERVICE_CONF
 
 PHPCFLAGS=@PHP_CPPFLAGS@
@@ -91,5 +97,5 @@
 zoo_loader.cgi: zoo_loader.c zoo_service_loader.o  ulinet.o service.h lex.sr.o service_conf.tab.o service_conf.y ulinet.o main_conf_read.tab.o lex.cr.o service_internal.o ${PYTHON_FILE}   ${PHP_FILE} ${JAVA_FILE} ${JS_FILE} ${PERL_FILE}
 	g++ -g -O2 -Wall ${JSCFLAGS} ${PHPCFLAGS}  ${PERLCFLAGS}   ${JAVACFLAGS} ${XML2CFLAGS} ${PYTHONCFLAGS} ${CFLAGS} -c zoo_loader.c  -fno-common -DPIC -o zoo_loader.o
-	g++  ${JSCFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${JAVACFLAGS} ${PYTHONCFLAGS} ${CFLAGS} zoo_loader.o zoo_service_loader.o service_internal.o ${PYTHON_FILE}  ${PERL_FILE} ${PHP_FILE}  ${JS_FILE} ${JAVA_FILE} ulinet.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o -o zoo_loader.cgi -lcurl -L../thirds/cgic206 -lcgic -lcurl ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS}  ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS} -lfcgi -lcrypto
+	g++  ${JSCFLAGS} ${GDAL_CFLAGS} ${XML2CFLAGS} ${PHPCFLAGS} ${PERLCFLAGS} ${JAVACFLAGS} ${PYTHONCFLAGS} ${CFLAGS} zoo_loader.o zoo_service_loader.o service_internal.o ${PYTHON_FILE}  ${PERL_FILE} ${PHP_FILE}  ${JS_FILE} ${JAVA_FILE} ulinet.o lex.cr.o lex.sr.o service_conf.tab.o main_conf_read.tab.o -o zoo_loader.cgi -lcurl -L../thirds/cgic206 -lcgic -lcurl ${GDAL_LIBS} ${XML2LDFLAGS} ${PYTHONLDFLAGS} ${PERLLDFLAGS}  ${PHPLDFLAGS} ${JAVALDFLAGS} ${JSLDFLAGS} -lfcgi -lcrypto ${MACOS_LD_FLAGS}
 
 install:
Index: /trunk/zoo-kernel/configure.ac
===================================================================
--- /trunk/zoo-kernel/configure.ac	(revision 76)
+++ /trunk/zoo-kernel/configure.ac	(revision 77)
@@ -1,6 +1,3 @@
-#AC_PREREQ([2.63])
-AC_INIT([ZOO Kernel], [0.0.1], [bugs@zoo-project.org])
-#AM_INIT_AUTOMAKE
-#AC_CONFIG_HEADERS([config.h])
+AC_INIT([ZOO Kernel], [1.2.0], [bugs@zoo-project.org])
 
 # Checks for programs.
@@ -70,7 +67,4 @@
 AC_SUBST([GDAL_LIBS])
 
-
-
-
 # ===========================================================================
 # Detect if libxml2 is installed
@@ -102,5 +96,4 @@
 fi
 
-
 # Extract the linker and include flags 
 XML2_LDFLAGS=`$XML2CONFIG --libs`
@@ -121,13 +114,7 @@
 AC_SUBST([XML2_LDFLAGS])
 
-
-
-
 # ===========================================================================
 # Detect if python is installed
 # ===========================================================================
-
-
-
 
 AC_ARG_WITH([python], 
@@ -176,7 +163,4 @@
 # ===========================================================================
 
-
-
-
 AC_ARG_WITH([php], 
 	[AS_HELP_STRING([--with-php=PATH], [To enabled php support or specify an alternative directory for php installation,  disabled by default])], 
@@ -220,9 +204,7 @@
 AC_SUBST([PHP_FILE])
 
-
 # ===========================================================================
 # Detect if perl is installed
 # ===========================================================================
-
 
 AC_ARG_WITH([perl], 
@@ -266,6 +248,4 @@
 # ===========================================================================
 
-
-
 AC_ARG_WITH([java], 
 	[AS_HELP_STRING([--with-java=PATH], [To enabled java support, specify a JDK_HOME,  disabled by default])], 
@@ -285,12 +265,19 @@
 		AC_MSG_ERROR([you must specify a parameter to --with-java, e.g. --with-java=/path/to/java])
 	fi
+
 	# Extract the linker and include flags
-	if test -d "$JDKHOME/jre/lib/i386";
-	then
-		JAVA_LDFLAGS="-L$JDKHOME/jre/lib/i386/client/ -ljvm -lpthread"
-		JAVA_CPPFLAGS="-I$JDKHOME/include -I$JDKHOME/include/linux"
-	else
-		JAVA_LDFLAGS="-L$JDKHOME/jre/lib/amd64/client/ -ljvm -lpthread"
-                JAVA_CPPFLAGS="-I$JDKHOME/include -I$JDKHOME/include/linux"
+	if test "x$JDKHOME" = "xmacos";
+	then
+		JAVA_LDFLAGS="-framework JavaVM"
+		JAVA_CPPFLAGS="-I/Developer//SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers/"
+	else
+		if test -d "$JDKHOME/jre/lib/i386";
+		then
+			JAVA_LDFLAGS="-L$JDKHOME/jre/lib/i386/client/ -ljvm -lpthread"
+			JAVA_CPPFLAGS="-I$JDKHOME/include -I$JDKHOME/include/linux"
+		else
+			JAVA_LDFLAGS="-L$JDKHOME/jre/lib/amd64/client/ -ljvm -lpthread"
+			JAVA_CPPFLAGS="-I$JDKHOME/include -I$JDKHOME/include/linux"
+		fi
 	fi
 
@@ -304,7 +291,8 @@
 	LIBS_SAVE="$LIBS"
 	LIBS="$JAVA_LDFLAGS"
-	# Shouldn't we get java here rather than java5 :) ??
-	AC_CHECK_LIB([jvm], [JNI_CreateJavaVM], [], [AC_MSG_ERROR([could not find libjava])], [])
-	#AC_CHECK_LIB([jvm], [main], [], [AC_MSG_ERROR([could not find libjava])], [])
+	if test "x$JDKHOME" != "xmacos";
+	then
+		AC_CHECK_LIB([jvm], [JNI_CreateJavaVM], [], [AC_MSG_ERROR([could not find libjava])], [])
+	fi
 
 	AC_SUBST([JAVA_CPPFLAGS])
@@ -314,8 +302,4 @@
 AC_SUBST([JAVA_ENABLED])
 AC_SUBST([JAVA_FILE])
-
-
-
-
 
 # ===========================================================================
@@ -359,5 +343,4 @@
         CPPFLAGS="$JS_CPPFLAGS"
 
-
 	#AC_CHECK_HEADERS([jsapi.h],
         #                [], [AC_MSG_ERROR([could not find headers include related to libjs])])
@@ -376,9 +359,4 @@
 AC_SUBST([JS_FILE])
 
-
-
-
-
-
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
