From 9488b26ca5b7ea763db4e210b311bcf3f04233ca Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 2 Dec 2020 15:41:53 +0100 Subject: Add build time option to make PROJ_LIB env var tested last (fixes #2399) If PROJ is built with the PROJ_LIB_ENV_VAR_TRIED_LAST CMake option / --enable-proj-lib-env-var-tried-last configure switch, then the hard-wired path ($prefix/share/proj) will be tried before looking at the environment PROJ_LIB. --- configure.ac | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 33f8cc0c..cc138aaa 100644 --- a/configure.ac +++ b/configure.ac @@ -321,6 +321,19 @@ AC_SUBST(CURL_LIBS,$CURL_LIBS) AC_SUBST(CURL_ENABLED_FLAGS,$CURL_ENABLED_FLAGS) AM_CONDITIONAL(HAVE_CURL, [test "x$FOUND_CURL" = "xyes"]) + +dnl --------------------------------------------------------------------------- +dnl proj-lib-env-var-tried-last +dnl --------------------------------------------------------------------------- + +AC_ARG_ENABLE(proj-lib-env-var-tried-last, + AS_HELP_STRING([--enable-proj-lib-env-var-tried-last], + [Whether the PROJ_LIB environment variable should be tried after the hardcoded location [default=no]])) + +if test "x$enable_proj_lib_env_var_tried_last" = "xyes"; then + AC_SUBST(PROJ_LIB_ENV_VAR_TRIED_LAST_FLAGS,-DPROJ_LIB_ENV_VAR_TRIED_LAST) +fi + dnl --------------------------------------------------------------------------- dnl Check for external Google Test dnl --------------------------------------------------------------------------- -- cgit v1.2.3