Skip to content
Prev 25377 / 63424 Next

extending package with function calling an Objective Caml program

On Wed, 20 Jun 2007, Tamara Steijger wrote:

            
It is possible, and the information is in 'Writing R Extensions'.

You would need to use configure to test if an OCaml compiler was 
installed, a src/Makefile to arrange to compile the executable and put it 
under inst/ so it would get installed.

Having said that, the chances that an R user would have an OCaml compiler 
installed seem to me to be very low, and it might be better to arrange to 
distribute pre-compiled versions of your package for platforms for which 
you can build it: preferably i686 and x86_64 Linux, Windows and MacOS X.

A variation on the last approach is to include prebuilt executables in the 
source package, and get configure to choose the right one to be installed 
if no OCaml compiler was found.