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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
$NetBSD: patch-configure.ac,v 1.6 2022/03/23 21:16:44 wiz Exp $
Do not include system paths in R_LD_LIBRARY_PATH.
NetBSD, FreeBSD, DragonFly, Darwin and Solaris fixes
--- configure.ac.orig 2019-06-08 08:57:35.738653089 +0000
+++ configure.ac
@@ -33,6 +33,7 @@ m4_define([R_VERSION],
AC_INIT([R],[R_VERSION],[https://bugs.r-project.org],[R],[https://www.r-project.org])
AC_CONFIG_SRCDIR([src/include/Defn.h])
AC_CONFIG_AUX_DIR([tools])
+AC_CONFIG_MACRO_DIR([m4])
### * Information on the package.
@@ -290,7 +291,7 @@ AC_ARG_ENABLE([BLAS-shlib],
## As from R 3.2.0 split up -L... and -lR
if test "${want_R_shlib}" = yes; then
- LIBR0="-L\"\$(R_HOME)/lib\$(R_ARCH)\""
+ LIBR0="@COMPILER_RPATH_FLAG@${prefix}/lib/R/lib\$(R_ARCH) -L\"\$(R_HOME)/lib\$(R_ARCH)\""
LIBR1=-lR
else
LIBR0=
@@ -709,7 +710,7 @@ case "${host_os}" in
## Not so bad in later versions of Darwin,
## where DYLD_FALLBACK_LIBRARY_PATH is used (see below).
;;
- *)
+ donotuse*)
for arg in ${LDFLAGS}; do
case "${arg}" in
-L*)
@@ -1276,7 +1277,7 @@ rm -f libconftest${DYLIB_EXT} conftest.c
fpicflags="${darwin_pic}"
shlib_cxxldflags="${shlib_ldflags}"
;;
- freebsd*)
+ freebsd*|dragonfly*)
## maybe this needs to depend on the compiler:
## -export-dynamic used to work, but does not with clang.
## Seems FreeBSD has used the GNU linker since at least 3.0 (Oct 1998)
@@ -1365,6 +1366,12 @@ dnl ;;
;;
netbsd*)
## See the comments about FreeBSD
+ fpicflags="-fPIC"
+ case "${host_cpu}" in
+ powerpc*)
+ cpicflags="-fPIC"
+ ;;
+ esac
if ${CPP} - -dM < /dev/null | grep __ELF__ >/dev/null ; then
main_ldflags="-Wl,--export-dynamic"
shlib_ldflags="-shared"
@@ -1401,22 +1408,22 @@ dnl ;;
solaris*)
## SPARC has only an 8k global object table, 1024 entries on 64-bit,
## so need PIC not pic. They are the same on other Solaris platforms.
- shlib_ldflags="-G"
- shlib_cxxldflags="-G"
if test "${GCC}" = yes; then
+ shlib_ldflags="-shared"
+ shlib_cxxldflags="-shared"
cpicflags="-fPIC"
ld=`${CC} -print-prog-name=ld`
ldoutput=`${ld} -v 2>&1 | grep GNU`
if test -n "${ldoutput}"; then
main_ldflags="-Wl,-export-dynamic"
- shlib_ldflags="-shared"
- shlib_cxxldflags="-shared"
else
## it seems gcc c 4.6.2 needs this with Solaris linker
shlib_ldflags="-shared"
shlib_cxxldflags="-shared"
fi
else
+ shlib_ldflags="-G"
+ shlib_cxxldflags="-G"
cpicflags="-KPIC"
if test "`basename ${CXX}`" = "CC" ; then
## Forte version 7 needs -lCstd: Forte 6 does not.
@@ -1495,7 +1502,7 @@ fi
: ${CXXPICFLAGS="${cxxpicflags}"}
if test -n "${CXX}" -a -z "${CXXPICFLAGS}"; then
case "${host_os}" in
- aix*|mingw*)
+ aix*|mingw*|darwin*)
;;
*)
warn_cxxpicflags="I could not determine CXXPICFLAGS."
@@ -1555,8 +1562,10 @@ dnl ;;
MAJR_VERSION=`echo "${PACKAGE_VERSION}" | sed -e "s/[[\.]][[1-9]]$/.0/"`
LIBR_LDFLAGS="-install_name libR.dylib -compatibility_version ${MAJR_VERSION} -current_version ${PACKAGE_VERSION} -headerpad_max_install_names"
RLAPACK_LDFLAGS="-install_name libRlapack.dylib -compatibility_version ${MAJR_VERSION} -current_version ${PACKAGE_VERSION} -headerpad_max_install_names"
+ LIBR_LDFLAGS="-install_name ${PREFIX}/lib/R/lib/libR.dylib -compatibility_version ${MAJR_VERSION} -current_version ${PACKAGE_VERSION} -headerpad_max_install_names"
+ RLAPACK_LDFLAGS="-install_name ${PREFIX}/lib/R/lib/libRlapack.dylib -compatibility_version ${MAJR_VERSION} -current_version ${PACKAGE_VERSION} -headerpad_max_install_names"
## don't use version in libRblas so we can replace it with any BLAS implementation
- RBLAS_LDFLAGS="-install_name libRblas.dylib -headerpad_max_install_names"
+ RBLAS_LDFLAGS="-install_name ${PREFIX}/lib/R/lib/libRblas.dylib -headerpad_max_install_names"
;;
dnl hpux*)
dnl ## Needs to avoid embedding a relative path ../../../bin.
@@ -2482,7 +2491,7 @@ case "${host_os}" in
r_ld_library_defaults="/usr/lib64:/lib64:/usr/lib:/lib"
;;
solaris*)
- r_ld_library_defaults="/usr/lib:/lib"
+ r_ld_library_defaults="/usr/lib:/lib:/usr/lib/amd64:/lib/amd64:/usr/lib/64:/lib/64"
;;
*)
r_ld_library_defaults=
|