[Rd] standardized add-on package configuration

Torsten Hothorn Torsten.Hothorn@rzmail.uni-erlangen.de
Wed, 15 Nov 2000 16:53:06 +0100 (MET)


On Wed, 15 Nov 2000, Kurt Hornik wrote:

> Several add-on packages (e.g., most DBMS ones, XML, ...) come with a
> configure script which tries to find headers and libraries required by
> the package.  I was wondering whether we could/should standardize how
> this is done.

IMO the main problem is that header files and libraries are not in
/usr/include or /usr/lib but, for example, for mysql in
/usr/local/mysql/{include,lib} by default. A package should build without
interaction if headers and libs are in their default place. 

> 
> In what follows, suppose package FOO needs functionality BAR.
> 
> * One approach would be via command-line arguments to configure.  There
>   seems to be no standard for this.  GNOME uses
> 
> 	--with-FOO-prefix
> 	--with-FOO-exec-prefix
> 
>   in several of its components.  However, this, assumes that the GNU
>   standards are followed in the sense that headers go into
> 
> 	FOO-prefix/include
> 
>   and libs go into
> 
> 	FOO-exec-prefix/lib
> 
>   which might not necessarily be the case.
> 
>   Alternatively, we could have
> 
> 	--with-FOO-libraries
> 	--with-FOO-libs
> 
>   and
> 
> 	--with-FOO-includes
> 	--with-FOO-headers
> 
>   (one of each only, of course).

Can one define default values here?

> 
> * The other possibility would be via environment variables, such as
>   CPPFLAGS and LIBS or maybe FOO_CPPFLAGS and FOO_LIBS.  (E.g., for
>   package XML we would use LIBXML_CPPFLAGS and LIBXML_LIBS.)
> 
> I think the simplest solution would be via CPPFLAGS and LIBS because it
> is not package-specific.  So installation would happen via
> 
> 	CPPFLAGS=... LIBS=... R CMD INSTALL /path/to/pkg.tar.gz

Maybe it is possible to check if CPPFLAGS is empty (replace it with a
default value) or not (try to build the package and give an error message
if it failed, pointing to the appropriate environment variable)?

> 
> (did not check if this works now).
> 
> Now I did not check all packages, so is there something I may be
> overlooking?
> 
> (Once we agree on a standard, I would like to document it in R-exts.)
> 
> -k
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
> Send "info", "help", or "[un]subscribe"
> (in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
> 

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._