On 10/3/05, Jeremy Herbison <[EMAIL PROTECTED]> wrote:
> Running ./configure --prefix=/usr gives the following:
>
> checking for java... java
> checking jni.h usability... no
> checking jni.h presence... no
> checking for jni.h... no
> configure: WARNING: Unable to find header jni.h. The Java packages will
> not be built
>
>
> jni.h is located in /usr/jdk/include, and of course configure won't know
> that. But if I run:
>
> CPPFLAGS="-I/usr/jdk/include" ./configure --prefix=/usr

Well, I downloaded graphviz, and their macro for finding java is
pretty stupid.  First, they don't check for JAVA_HOME, which most
packages do.  Second, they assume that the java includes files are in
your standard include directory (/usr/include) or something you pass
to CPPFLAGS.  Third, the conftest fails because jni.h includes a file
which is in a subdirectory and must be added to CPPFLAGS.  Fourth,
they null out JAVA_INCLUDES and JAVA_LIBS in configure, and they're
not added to CPPFLAGS or LDFLAGS for the test, anyway.  Basically,
they've assumed that you have all the java headers and libraries
flattened into /usr/include and /usr/lib.

I tested this on a Solaris system, so I'm not sure what the jdk looks
like on Linux, but I think the makeup's the same.  Here's the layout:

[01:34 PM [EMAIL PROTECTED] ls -R $JAVA_HOME/include
/usr/nikola/pkgs/j2sdk/.current/include:
jawt.h  jni.h  jvmdi.h  jvmpi.h  solaris

/usr/nikola/pkgs/j2sdk/.current/include/solaris:
jawt_md.h  jni_md.h

jni.h includes jni_md.h which, on solaris, is in
$JAVA_HOME/include/solaris.  So, you can force configure to find your
headers if you want, but I don't think it will compile unless you hack
up the Makefiles a bit.  Anyway, if you want to give it a shot, try
this command

CPPFLAGS="-I/usr/jdk/include -I/usr/jdk/include/linux" ./configure ...

I think then it will find the headers and confirm them, but I doubt
they'll work for what it's worth.

Dan
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to