libtool
[Top][All Lists]
Advanced

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

libtool and JNI libraries on Mac OS X


From: Don Anderson
Subject: libtool and JNI libraries on Mac OS X
Date: Tue, 21 May 2002 17:09:45 -0400 (EDT)

Hello,

I work with Sleepycat Software (makers of Berkeley DB).  We build Java
native libraries (loadable modules written in C using the JNI APIs)
using libtool for various target platforms.

In fielding reports from folks porting to OS X we see that the Java
runtime there requires native libraries to have a .jnilib extension,
instead of .so, which is what we get with libtool (using -module).  Of
course, just renaming the resulting .so doesn't work because of
SONAME.  I believe to accommodate OS X with their Java runtime, we
need to have some way to switch to a different extension.  I was
of a libtool option:

   --moduleext=.jnilib

but to add this to libtool correctly requires every line in libtool.m4
with 'library_names_spec=' to be touched.  That's a lot of changes,
the vast majority of which I cannot test.  Maybe safer would be
a step after library_names_spec is set, and does:

   library_names_spec='${libname}${value_of_module_ext_option} 
'"$library_names_spec"

That is, effectively making libfoo.jnilib be created and have any
other names link to it.  I think that works.  Or am I missing a better
way to solve this problem?  I'd be glad to make this change and test
it on OS X if you all agree it's the right approach.

- Don

-- 

        =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
        Don Anderson                    address@hidden
        Sleepycat Software Inc.         +1-978-287-4781
        118 Tower Rd.                   http://www.sleepycat.com
        Lincoln, MA 01773




reply via email to

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