automake
[Top][All Lists]
Advanced

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

Re: non-libtool, cross-platform libraries


From: Guido Draheim
Subject: Re: non-libtool, cross-platform libraries
Date: Tue, 25 Sep 2001 22:57:38 +0200

> David Carter wrote:
> 
> I need to build a non-libtool dynamically-loaded library, on windows and on 
> HP/UX, from c++ sources.
> 
> This library needs to be built as "foo.dll" on windows, "foo.so" on HP/UX.
> 
> I don't think I can use libtool, since the resulting dll/so needs to be used 
> by non-libtool-aware vendor software (iPlanet's
> webserver, to be precise).
> 
> My maintainer platform is Cygwin, just to make things a little more 
> interesting. However, the windows dll is built with
> "-mno-cygwin", and linked against the mingw c++ std library.
> 
> I've stumbled over the naming of the primary to use. I can't use:
> 
> lib_LIBRARIES    = foo.dll
> foo_dll_SOURCES    = foo.cpp
> 
> for example. And automake will not accept a variable in place of the "dll", 
> so I can't use @DL_EXT@ or similar.
> 
> Any suggestions on how to do this within the automake/autoconf framework? I 
> think it could be made to work using
> AM_CONDITIONAL, and repeating the entire lib_LIBRARIES for "foo.dll" & 
> "foo.so", but that doesn't feel right.
> 

use automake and lib_LTLIBRARIES = foo.la
then read the section about .la libraries - this is a linker script 
understood by libtool' which in turn will instruct it to build a .dll
on windows and a .so on most unix platforms. Oh, and read the stuff
about -module -avoid-version for anything that should be installed as
a module. (damn, one day I have to write that dllmaker guide....)

HTH, and please don't confuse the "libtool" lib-linker-tool and the 
"libltdl" dl-loader library being shipped and supported by libtool.
on win32 and hpux the "libltdl" would just wrap the native (!!) dl-load 
facility that "libtool" will build objects for - being .dll/.so files.

I wonder if there had been no automake-examples for that webservers
module stuff. Or didn't you look anyway?
cheers,
-- guido                            Edel sei der Mensch, hilfreich und gut
GCS/E/S/P C++$++++ ULHS L++w- N++@ d(+-) s+a- r+@>+++ y++ 5++X- (geekcode)



reply via email to

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