libtool
[Top][All Lists]
Advanced

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

Re: MacOSX and autoconf/automake/libtool


From: Don Anderson
Subject: Re: MacOSX and autoconf/automake/libtool
Date: Wed, 22 May 2002 10:05:55 -0400 (EDT)

address@hidden wrote on May 16:
 > 
 > Today's Topics:
 > 
 >    1. MacOSX and autoconf/automake/libtool (Erik de Castro Lopo)
 > 
 > --__--__--
 > 
 > Message: 1
 > Date: Thu, 16 May 2002 14:27:26 +1000
 > From: Erik de Castro Lopo <address@hidden>
 > To: address@hidden
 > Subject: MacOSX and autoconf/automake/libtool
 > Organization: Erik Conspiracy Secret Labs
 > 
 > Hi People,
 > 
 > I am the author of an LGPL library which is supposed to run on
 > Unix, Win32, MacOS and others. While a do have access to two 
 > different Unixen, I do not have access to Win32 or more 
 > importantly MacOS.
 > 
 > I also run Debian and since upgrading to their Woody release
 > (libtool went from 1.3 to 1.4) I have been unable to generate 
 > tarballs which compile on the latest release of MacOSX.
 > 
 > It seems that libtool is not setting the right compiler flags.
 > 
 > I am currently using:
 > 
 >    autoconf 2.13 (have also tried 2.53)
 >    automake 1.5  (have also tried 1.4)
 >    libtool 1.4.2a
 > 
 > It seems that there is some stuff about libtool and MacOSX here:
 > 
 >     http://fink.sourceforge.net/doc/porting/libtool.php
 > 
 > Can anybody offer any advice on how to generate a tarball that will
 > compile correctly on MacOSX?
 > 
 > Regards,
 > Erik
 > -- 

I was able to build a library I could link against (a .dylib) just
fine.  I think you need an up to date version of OS X.  On the one I
tried, ./config.guess produces: powerpc-apple-darwin5.4 .  I think we
discovered that once we got the newer OS, libtool 1.4.2 started mostly
working.

If you want to create a dynamically loaded object (.so), rather than
just a library you can link against (.dylib), I just learned a few
more things and can offer some suggestions.

First, to create a .so, you must use the libtool -module flag.  That's
in the libtool doc, but it isn't necessary on so many systems that
it's easy to miss.

Second, to get the .so's to be linked right you need the -module to
actually set the -bundle flag for ld.  There's a quoting problem in
libtool.  The symptom is:
  ./libtool: parse error: condition expected: xyes = [3190]

I have a short patch for 1.4.2 if anyone needs it; the real fix is
already in the CVS tree for libtool.

Finally, if you happen to need a .jnilib (a .so that can be loadable
by Java as a JNI), you need some way to produce an output file that
ends in .jnilib.  Libtool can't do this yet; but you can workaround in
Java by using System.load() rather than System.loadLibrary().

- 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]