[Mono-list] Mono embedding issue

Robert Jordan robertj at gmx.net
Thu Oct 12 07:32:19 EDT 2006


Andreas Färber wrote:
> Am 12.10.2006 um 08:03 schrieb Massimiliano Mantione:
> 
>> On Wed, 2006-10-11 at 23:49 +0200, Andreas Färber wrote:
>>> So far I have only tried to compile Mono under Cygwin on Windows,
>>> where I had instructions from the Wiki, including specific
>>> instructions and a script for the dependencies; if anyone would tell
>>> me how to go about it on OS X without ruining my existing Mono
>>> installation I'd be willing to give it a try.
>> I have never used OS X, but the standard way of hacking Mono without
>> touching the official Mono installation is choosing a custom prefix.
>>
>> I mean, you download the sources, and when running ./configure (or
>> ./autogen.sh if you work from svn) specify the --prefix option.
>> The choice of prefix is arbitrary, as long as it does not overlap
>> the officially installed one. I prefer working with prefixes on my
>> own home (like "/home/massi/mono") so I never need root permissions
>> to install the custom mono, and therefore I have no chances to mess
>> things up.
> 
> That's a great hint! Using a user-specific prefix it won't be able to  
> access /usr/bin.
> 
> What about Mono's dependencies? Is it sufficient to have Mono  
> installed, or do I need additional glib and pkg-config stuff? Any  
> other command line arguments or environment variables necessary for  
> it to find the headers and libraries?

Supposing your new Mono prefix will be ~/mono:

mkdir ~/mono
cp -rp /Library/Frameworks/Mono.framework/Libraries ~/mono/lib

After that adjust the "prefix" entry of all ~/mono/lib/pkgconfig/*.pc
files and configure the Mono sources you (optimally) got from SVN with:

PKG_CONFIG_PATH=~/mono/lib/pkgconfig ./configure --prefix=~/mono

Robert



More information about the Mono-list mailing list