r-spatial / lwgeom

bindings to the liblwgeom library
https://r-spatial.github.io/lwgeom/
58 stars 23 forks source link

Problem installing lwgeom from source for non-standard location of libraries #78

Closed cmarquardt closed 2 years ago

cmarquardt commented 2 years ago

Hello,

I had problems installing lwgeom from the CRAN source code package with R v4.1 under MacOS Catalina 10.15.7 using Homebrew's llvm (v13.0.1). The reason is that during the configuration part, some of the test programs (proj_conf_test.c or proj_conf_test.cc generated by configure) could not be compiled succesfully. The reason for that, in turn, was that my libproj is installed in a non-standard place. When compiling the test programs, the required linker flags were missing although the correct ones would have been available in the LDFLAGS Makefile variable inherited from the R configuration.

Adding ${LDFLAGS} to all lines in configure.ac where a proj_conf_test.c or .cc is compiled fixed the problem for me; see the corresponding pull request.