0003-fix-static-link-uuid.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. configure: use pkg-config to find libuuid
  2. In some conditions, libuuid may be linked with -lintl. This can be the
  3. case on uClibc when locales are enabled.
  4. When doing a shared link, this dependency is automatically pulled in via
  5. a DT_NEEDED ELF tag
  6. For a static link, there is no such mechanism to pull in dependent
  7. libraries.
  8. Currently, the check for libuuid is done with AC_CHECK_LIB, but this
  9. does not handle dependencies, and thus a stattic build fails.
  10. Use pkg-config to find libuuid, that automatically pulls in the
  11. dependencies of libuuid, if any.
  12. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  13. ---
  14. Note: of course, that relies on the fact that libuuid installs a proper
  15. .pc file; a patch will be submitted upstream shortly.
  16. But even considering the current situation, where libuuid does not
  17. provide a proper .pc file (yet), this patch does not change the
  18. behaviour we've had so far; it is a bet on the future! ;-)
  19. diff -durN parted-3.1.orig/configure.ac parted-3.1/configure.ac
  20. --- parted-3.1.orig/configure.ac 2014-11-29 16:27:49.520560137 +0100
  21. +++ parted-3.1/configure.ac 2014-11-29 16:32:50.799702049 +0100
  22. @@ -313,16 +313,7 @@
  23. AC_SUBST([DL_LIBS])
  24. dnl Check for libuuid
  25. -UUID_LIBS=""
  26. -AC_CHECK_LIB([uuid], [uuid_generate], [UUID_LIBS="-luuid"],
  27. - [AC_MSG_ERROR(dnl
  28. -[GNU Parted requires libuuid - a part of the util-linux-ng package (but
  29. -usually distributed separately in libuuid-devel, uuid-dev or similar)
  30. -This can probably be found on your distribution's CD or FTP site or at:
  31. - http://userweb.kernel.org/~kzak/util-linux-ng/
  32. -Note: originally, libuuid was part of the e2fsprogs package. Later, it
  33. -moved to util-linux-ng-2.16, and that package is now the preferred source.])])
  34. -AC_SUBST([UUID_LIBS])
  35. +PKG_CHECK_MODULES([UUID],[uuid])
  36. dnl Check for libdevmapper
  37. DM_LIBS=