From: Reece Dunn (msclrhd_at_[hidden])
Date: 2006-06-13 08:48:16
Chad Carr wrote:
> I am attempting to build a pam module that works on OS X and cannot
> figure out for the life of me how to get the -bundle option to link.dll
> in the darwin toolset. Indeed, the -dynamiclib option appears to be
> hardcoded in the toolset, so unless there is some kind of modifier that
> will allow dynamic libraries to be used in a pam context, I appear to be
> on the path to writing my own generator.
> Can anyone tell me a possible solution to this problem? I am using
You will need to modify the darwin toolset:
(1) At the top, somewhere after the imports (just below the
"feature framework : : free ;" line), add:
feature mac-bundle : no yes : propagated ;
This will allow you to write:
lib mybundle : source.cpp : <mac-bundle>yes ;
lib mydll : source2.cpp ;
where, for mydll, mac-bundle will default to no.
(2) Remove the -dynamiclib part of the darwin link.dll action.
(3) You now need to map the mac-bundle feature to darwin options.
You can do this by adding the following lines just below
"# flags darwin.link.dll OPTIONS : -Wl,-v ;":
flags darwin.link.dll OPTIONS : <mac-bundle>no : -dynamiclib ;
flags darwin.link.dll OPTIONS : <mac-bundle>yes : -bundle ;
Then you are ready to go :).
Q: Is the -dynamic option passed to the compiler when building a
DLL (the "flags darwin.compile OPTIONS <link>shared : -dynamic ;"
line) needed when producing a bundle?
A: Yes -- then leave it as it is.
A: No -- replace that line with:
flags darwin.compile OPTIONS <link>shared/<mac-bundle>no : -dynamic ;
Express yourself instantly with MSN Messenger! Download today it's FREE!
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk