The R Project SVN R

Rev

Rev 11515 | Rev 31770 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
11515 hornik 1
#! /bin/sh
2
##
3
## ${R_HOME}/bin/LINK
11144 hornik 4
 
20002 hornik 5
revision='$Revision: 1.6 $'
11515 hornik 6
version=`set - ${revision}; echo ${2}`
7
version="R linker front end ${version}
8
 
9
Copyright (C) 2000 The R Core Development Team.
10
This is free software; see the GNU General Public Licence version 2
11
or later for copying conditions.  There is NO warranty."
12
 
13
usage="Usage: R CMD LINK [options] linkcmd
14
 
15
Perform the specified linkcmd by passing it through GNU libtool and
16
setting a few useful R-related options.  Use in particular when creating
17
executables linked against the R shared library, in which case linkcmd
20002 hornik 18
must contain '-lR' but need not specify its library path.
11515 hornik 19
 
20
Options:
21
  -h, --help            print short help message and exit
22
  -v, --version         print version info and exit
23
 
24
Currently only is useful when creating executables, and only works if
25
the C compiler is used for linking.  If FORTRAN code is to be linked, it
26
needs to be manually ensured that the linker flags for the FORTRAN 77
27
intrinsic and run-time libraries are present.  C++ is not supported
28
(yet).
29
 
30
Report bugs to <r-bugs@r-project.org>."
31
 
32
args=
33
while test -n "${1}"; do
34
  case ${1} in
35
    -h|--help)
36
      echo "${usage}"; exit 0 ;;
37
    -v|--version)
38
      echo "${version}"; exit 0 ;;
39
    *)
40
      args="${args} ${1}" ;;
41
  esac
42
  shift
43
done
44
 
11204 hornik 45
if test -z "${R_HOME}"; then
46
  echo "Fatal error: R_HOME was not set"
47
  exit 1
48
fi
11144 hornik 49
 
11515 hornik 50
## FIXME: should be `lib' eventually
11204 hornik 51
Rexeclibdir=${R_HOME}/bin
11515 hornik 52
## </FIXME>
11204 hornik 53
linkopts="-avoid-version -rpath ${Rexeclibdir}"
11144 hornik 54
 
11515 hornik 55
exec ${R_HOME}/bin/libtool --mode=link ${args} ${linkopts}
11204 hornik 56
 
57
### Local Variables: ***
58
### mode: sh ***
59
### sh-indentation: 2 ***
60
### End: ***