0002-configure.ac-use-pkg-config-to-find-proj-dependency.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. From 33937e2861fda87dc314378bf87db2c766c37a6b Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Wed, 9 Oct 2019 15:11:34 +0200
  4. Subject: [PATCH] configure.ac: use pkg-config to find proj dependency
  5. Use pkg-config to retrieve proj and its static dependencies such as
  6. -lstdc++
  7. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  8. [Upstream status: https://github.com/OSGeo/libgeotiff/pull/24]
  9. ---
  10. libgeotiff/configure.ac | 9 ++++++---
  11. 1 file changed, 6 insertions(+), 3 deletions(-)
  12. diff --git a/configure.ac b/libgeotiff/configure.ac
  13. index c3395d5..f7a8f28 100644
  14. --- a/configure.ac
  15. +++ b/configure.ac
  16. @@ -246,9 +246,12 @@ if test "x$with_proj" = "xno" ; then
  17. else
  18. if test "x$with_proj" = "xyes" -o "x$with_proj" = "x"; then
  19. - ORIG_LIBS="$LIBS"
  20. - LIBS="-lproj $ORIG_LIBS"
  21. - AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
  22. + PKG_CHECK_MODULES(PROJ, proj, [LIBS="$LIBS $PROJ_LIBS" PROJ_FOUND=yes], [PROJ_FOUND=no])
  23. + if test "$PROJ_FOUND" = "no"; then
  24. + ORIG_LIBS="$LIBS"
  25. + LIBS="-lproj $ORIG_LIBS"
  26. + AC_CHECK_LIB(proj,proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
  27. + fi
  28. if test "$PROJ_FOUND" = "no"; then
  29. AC_CHECK_LIB(proj,internal_proj_create_from_wkt,PROJ_FOUND=yes,PROJ_FOUND=no,)
  30. if test "$PROJ_FOUND" = "yes"; then
  31. --
  32. 2.23.0