R-alpha: Fortran Survey

Ross Ihaka (ihaka@stat.auckland.ac.nz)
Fri, 1 Nov 1996 09:56:15 +1300 (NZDT)


From: Ross Ihaka <ihaka@stat.auckland.ac.nz>
Date: Fri, 1 Nov 1996 09:56:15 +1300 (NZDT)
Message-Id: <199610312056.JAA21203@stat11.stat.auckland.ac.nz>
To: r-testers@stat.math.ethz.ch
Subject: R-alpha: Fortran Survey

I have been looking (again) at the problem of linking Fortran code
into R.  This is a nasty can of worms, especially on platforms like
hp-sux which don't use standard unix f77 linkage conventions.  Even
(some versions of) vanilla SunOS seem to have math library library
problems at link time.  On the other hand, on platforms which do
support a cc/f77 link it would be very nice for us (and you) to have
access to fortran.  So I propose the following:

We will supply internal C/Fortan applications code in two forms
mixed C/Fortran and C-only, these being provided in separate
directories (appl and applc).  The latter being created by running
f2c on any Fortran in the former and including just enough of the
f2c libraries to create a working R.

				     src
				      |
	  +-------+-------+------+----+----+------------
	  |	  |	  |	 |	    |
	appl	applc	main	math	graphics	...

By default, R will come configured to use the C-only library and will
only require a C compiler to install.  There will also be a
configuration option which "switches on" Fortran, and an attempt will be
made to find and use the system Fortran compiler.

Configuration now takes place using GNU autoconfigure so almost all
details are hidden from the user.  Switching on fortran will be a
matter of editing a file called "config.site" at the top level
and changing the line
	F77=no
to
	F77=
or if your compiler has a weird name (i.e. not one of f77, g77 or fc),
you could have
	F77=ftn
or whatever name is approporiate.

The price of this is an inflated source distribution with original
fortran and f2c-d copies of any fortran source.

Does this seem like an acceptable solution?
	Ross
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- To (un)subscribe, send
subscribe	or	unsubscribe
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-