Re: [Rd] Can configure.ac detect 64 bit R?

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed, 06 Jun 2007 14:05:25 +0100 (BST)

On Tue, 5 Jun 2007, jhallman_at_frb.gov wrote:

> My fame package has to link to the libchli.so that comes with FAME.
> However, FAME is now supplying both 32 and 64 bit versions of the
> library. The 32-bit version is $FAME/hli/libchli.so while the 64-bit
> version is $FAME/hli/64/libchli.so. To set the right flags, it seems
> that I need to know, from within configure.ac, whether the R
> installation is 32 bit or 64 bit. Is there a way to detect this?

That sort of differentiation is highly OS-specific. If FAME is indeed doing this on all OSes it will cause considerable confusion. It is more normal to have the 'standard' version in .../lib and the others in .../lib/32 or .../lib/sparcv9, or to use lib and lib64 or ....

And I will assume from now on that you mean a Unix-alike.

Next, on any decent OS you don't need to know, as it will choose the appropriate DSO from those it can find of that name. So just having -L$FAME/hli/64 -L$FAME/hli should suffice.

However, if despite all that you want to know, yes of course configure.ac can detect it. Several possibilities include:

Of these the second is most direct (and the slowest and needs R >= 2.5.0).

-- 
Brian D. Ripley,                  ripley_at_stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Wed 06 Jun 2007 - 13:08:03 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 06 Jun 2007 - 13:34:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.