0002-configure-fix-detection-of-libcrypt.patch 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. From 8996503f6c55e55f326ab11c18278954ad7abaf3 Mon Sep 17 00:00:00 2001
  2. From: "Yann E. MORIN" <yann.morin.1998@free.fr>
  3. Date: Tue, 27 Dec 2016 11:21:57 +0100
  4. Subject: [PATCH] configure: fix detection of libcrypt
  5. The crypt() function is searched in two locations: -lcrypt and the
  6. standard C library.
  7. The result of the former is stored in the LIBCRYPT 'scheme' while that
  8. of the latter is stored in the 'SYSCRYPT' scheme.
  9. However, the check for mandatory modules looks at the CRYPT 'scheme',
  10. and thus concludes that crypt is missing when it was successfully found.
  11. Fix that by also storing the result of either check in the 'CRYPT'
  12. scheme.
  13. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  14. ---
  15. configure | 2 ++
  16. configure.ac | 2 ++
  17. 2 files changed, 4 insertions(+)
  18. diff --git a/configure.ac b/configure.ac
  19. index 121dd93..d459ff5 100644
  20. --- a/configure.ac
  21. +++ b/configure.ac
  22. @@ -2406,10 +2406,12 @@ AC_CHECK_FUNC([crypt], [SYSCRYPT=true], [SYSCRYPT=""])
  23. if test "x$LIBCRYPT_LIB" != "x" ; then
  24. CRYPT_LIB="$LIBCRYPT_LIB"
  25. CRYPT_INCLUDE="$LIBCRYPT_INCLUDE"
  26. + PBX_CRYPT=1
  27. AC_DEFINE([HAVE_CRYPT], [1], [Define to 1 if you have the 'crypt' function.])
  28. elif test "x$SYSCRYPT" != "x" ; then
  29. CRYPT_LIB=""
  30. CRYPT_INCLUDE=""
  31. + PBX_CRYPT=1
  32. AC_DEFINE([HAVE_CRYPT], [1], [Define to 1 if you have the 'crypt' function.])
  33. fi
  34. --
  35. 2.7.4