[R-SIG-Mac] configure.in on Mac

cstrato cstrato at aon.at
Tue Jul 31 20:12:00 CEST 2007


Dear Simon

Simon Urbanek wrote:
>
> On Jul 28, 2007, at 7:02 AM, cstrato wrote:
>
>> I would like to add to my configure.in file the following commands,
>> which should only be checked on Mac OS X:
>>
>>    if test -z "${DYLD_LIBRARY_PATH}"; then
>>       echo ""
>>       echo "${R_PACKAGE_NAME} configuration error:"
>>       echo ""
>>       exit 1
>>    fi
>>
>> However, these commands should only be executed on a Mac.
>> What do I need to do to be able to test if the configure.in file is
>> executed
>> on a Mac?
>> I tried to use ${R_ARCH} but this returns an empty string.
>>
>
> R_ARCH has nothing to do with a Mac anyway. Try something like
> OS=`uname`
> if test "${OS}" = Darwin; then
> ..
> fi

Thank you for this tip, this works nicely.

>
> However, I hope you know what you're doing - setting DYLD_LIBRARY_PATH 
> is highly dangerous and often breaks the system, so the check should 
> be rather the other way round ;). Usually, if you require it, then 
> you're doing something wrong.. (or the author of the dependent 
> library...).
>

My package (which BTW I have already submitted to BioC) depends on the 
ROOT C++ framework (http://root.cern.ch/), which requires setting 
DYLD_LIBRARY_PATH on Mac. For this reason I want to check if the user 
has set it. (Although using ROOT for many years, I have never 
experienced any problems setting this variable.)

> Cheers,
> Simon
>

Best regards
Christian
>
>
>



More information about the R-SIG-Mac mailing list