r-quantities / units

Measurement units for R
https://r-quantities.github.io/units
175 stars 28 forks source link

Installation fails on MacPorts #195

Closed mjwoods closed 5 years ago

mjwoods commented 5 years ago

When I tried to install this package under MacPorts, the configure script found udunits2/udunits2.h, but the compilation failed. A closer look revealed that the compiler was searching for /usr/include/udunits2/udunits2.h, whereas MacPorts stores the actual header in /opt/local/include/udunits2/udunits2.h.

In configure.ac, the AC_CHECK_HEADER macro searches for headers in the default locations used by the compiler. If udunits2/udunits2.h is found, configure.ac assumes that the headers are stored under /usr/include. This will cause problems on any system with header files stored outside /usr/include (such as MacPorts).