List:NDB Connectors« Previous MessageNext Message »
From:Monty Taylor Date:October 24 2007 4:46am
Subject:Re: java m4 issue
View as plain text  

Jim Dowling wrote:
> Hi Monty,
> 
> For some reason unknown to me, the following code fails in 
> ac_prog_java_works.m4 (i commented out the if-statement to get it to work):
> 
> dnl if AC_TRY_COMMAND($JAVA $JAVAFLAGS $TEST) >/dev/null 2>&1; then
>  ac_cv_prog_java_works=yes
> dnl else
> dnl  echo "configure: failed program was:" >&AC_FD_CC
> dnl  cat $JAVA_TEST >&AC_FD_CC
> dnl  AC_MSG_ERROR(The Java VM $JAVA failed (see config.log, check the 
> CLASSPATH?))
> dnl fi
> 
> I have a 1.6 jdk installed in /usr/java/jdk-1.6, and I have set 
> JAVA_HOME to this directory.
> I'm not sure the above m4 code is reliable for recognizing all java 
> platforms.

I agree. Antony has a new java.m4 module he's using to do some JNI stuff 
with the server that it on my list to merge in.

Ok... I've now merged in the new java.m4... (the mail server was down 
for a bit, so I got this taken care of) Give it a new try. It should 
find java based on your JAVA_HOME now. It does not, as of now, work with 
an argument to --with-java, so it's just an on/off switch for now.

> On another note, there's no check for the ndb headers, so you can run 
> configure on the mysql binaries sucessfully (I did this by mistake!). A 
> check for the existence of the headers would do the trick here.
> I got it to build (for java). However, when you build from source, the 
> include and lib files and in placed sub-directories lib/mysql/* and 
> include/mysql/* .
> I had a switch for that in my old configure.ac file. You may want to add 
> the switch "--mysql-built-from-source" or something like that, then set 
> the include and lib directories to be the lib/mysql and include/mysql 
> directories.

Mmm. Good call, I need to do a check for the headers. I've put that in 
now. It's not _looking_ for it, but it will at least error if it doens't 
find it.

On other, it _should_ still work if the mysql_configure returns the 
right stuff. (Of course, mysql_config sucks, so it's probably broken.) 
But I'll give it a shot and a look at that macro.

Let me know if this all works better for you now.

Monty
Thread
java m4 issueJim Dowling23 Oct
  • Re: java m4 issueMonty Taylor24 Oct