[R-SIG-Mac] configure.in on Mac
Simon Urbanek
simon.urbanek at r-project.org
Tue Jul 31 01:45:48 CEST 2007
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
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...).
Cheers,
Simon
More information about the R-SIG-Mac
mailing list