[Xapian-discuss] java bindings 1.0.0 - jni.h not found

Olly Betts olly at survex.com
Thu May 31 11:27:11 BST 2007


On Thu, May 31, 2007 at 09:48:21AM +0100, James Aylett wrote:
> Could we rewrite the test so that in the jni.h fallback (which is what
> will almost always actually find the appropriate CFLAGS) we first
> check `test -f path/include/jni.h` then try compile as normal, and if
> that fails on *linux* we try compile with -I path/include/linux as
> well?

That only fixes this for Linux, and all the world isn't Linux.  The Sun
webpage someone posted a link to hints that other possible values
include "solaris" and "win32", but sadly it doesn't enumerate all the
possible values.

This almost makes me think that Sun are deliberately making it harder to
compile JNI stuff to push a "pure Java" agenda.  After all jni.h could
easily be written to avoid users having to worry about this at all since
the compiler knows the target platform:

#if defined __linux__
# include <linux/jni_md.h>
#elif defined [...]
#endif

Cheers,
    Olly



More information about the Xapian-discuss mailing list