OSGeo / libgeotiff

Official repository of the libgeotiff project
180 stars 69 forks source link

configure.ac: use pkg-config to find proj dependency #24

Closed ffontaine closed 4 years ago

ffontaine commented 4 years ago

Use pkg-config to retrieve proj and its static dependencies such as -lstdc++

Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com

rouault commented 4 years ago

What is the behaviour with this commit if pkg-config itself is not found ?

ffontaine commented 4 years ago

I assume that PKG_CHECK_MODULES will return PROJ_FOUND=no and current behavior will be used as fallback.

A call to PKG_PROG_PKG_CONFIG could be added but PKG_CHECK_MODULES is already used for discovering tiff.

However, this PR is useful only if https://github.com/OSGeo/PROJ/pull/1664 is also merged. As stated in the other PR, the other available option, on buildroot side, is to disable libgeotiff for static builds.

rouault commented 4 years ago

PKG_CHECK_MODULES is already used for discovering tiff.

yes, but as a fallback. Would you mind testing your pull request by temporarily renaming the pkg-config binary ?

ffontaine commented 4 years ago

OK, I finally found some time to test my PR with pkg-config binary renamed into "pkg-config-save". In this case, pkg-config is not found (as expected) and proj is found through the current mechanism (through AC_CHECK_LIB).