File: configure

package info (click to toggle)
r-cran-bigmemory 4.6.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 648 kB
  • sloc: cpp: 4,930; ansic: 131; sh: 13; makefile: 2
file content (42 lines) | stat: -rwxr-xr-x 1,127 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
####################################################################
# configure for package bigmemory
# John W. Emerson and Michael Kane
#
# Sun Studio toolchain not completely BOOST-compatible (the
# fault of BOOST, not R-Project).  There will be no locking
# of the shared counters, but the chance of a problem is very
# small.  Hopefully BOOST will catch up, soon.

FLAGS="PKG_CPPFLAGS=-I../inst/include"

LIBS=""

echo "  checking for Sun Studio compiler..."
CC=`${R_HOME}/bin/R CMD config CC`
cmd=`echo $CC | grep -E 'suncc'`
if test -n "$cmd"; then
  echo "yes"
  FLAGS="${FLAGS} -DINTERLOCKED_EXCHANGE_HACK"
else
  echo "no"
fi

echo "  checking for OS..."
if test `uname` = "Linux" ; then
  echo "Linux"
  FLAGS="${FLAGS} -DLINUX"
  LIBS="PKG_LIBS=-lrt -lm"
#  LIBS="PKG_LIBS=-lrt -lm -luuid"
elif test `uname` = "SunOS" ; then
  echo "Solaris"
  LIBS="PKG_LIBS=-lrt -lm -luuid"
elif test `uname` = "Darwin" ; then
  echo "Darwin"
  FLAGS="${FLAGS} -DDARWIN -DLENGTH_HACK"
else
  echo "Other:" `uname`
fi

echo "${FLAGS}" > src/Makevars
echo "${LIBS}" >> src/Makevars
echo "PKG_CXXFLAGS=-fsigned-char" >> src/Makevars