automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Example on JNI compilation


From: Peter O'Gorman
Subject: Re: Example on JNI compilation
Date: Mon, 20 Apr 2009 16:49:07 -0500
User-agent: Thunderbird 2.0.0.19 (X11/20090105)

John Calcote wrote:
> On 4/18/2009 3:08 PM, LCID Fire wrote:
>> I'm currently stuck with compiling a JNI library, which java does not
>> recognize. I'm not too sure about what options I have to provide to
>> automake and which are already builtin. Does anybody know an example
>> of how a jni lib is built using automake?
> There are basically two steps to building JNI libraries:

Note that on Mac OS X 10.4 and earlier, java will not load modules that
do not have a ".jnilib" extension, so you should add somewhere in
configure.ac, something like:

case $host_os in
*-darwin*)
   JNI_EXTRA_LDFLAGS="-shrext .jnilib" ;;
esac
AC_SUBST(JNI_EXTRA_LDFLAGS)

then in your Makefile.am you can have:
mylib_la_LDFLAGS = -module -avoid-version $(JNI_EXTRA_LDFLAGS)

Peter
-- 
Peter O'Gorman
http://pogma.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]