You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.2 KiB

  1. From aef363c7e8e942224e6cffc4398366c6e5d31749 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Thu, 11 Jun 2020 00:04:32 +0200
  4. Subject: [PATCH] configure.ac: fix build failure when crypt() does not require
  5. libcrypt
  6. Since commit 522246d20e4cd92fadc2d760228cb7e78cbeb4c5, the build fails
  7. if "none required" is returned by AC_SEARCH_LIBS for libcrypt.
  8. Resolves: https://github.com/linux-pam/linux-pam/pull/235
  9. Fixes: http://autobuild.buildroot.org/results/92b3dd7c984d2b843ac9aacacd69eec99f28743e
  10. Fixes: v1.4.0~228 ("Use cached 'crypt' library result correctly")
  11. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  12. ---
  13. configure.ac | 6 +++++-
  14. 1 file changed, 5 insertions(+), 1 deletion(-)
  15. diff --git a/configure.ac b/configure.ac
  16. index ea08a7a3..c1862ea7 100644
  17. --- a/configure.ac
  18. +++ b/configure.ac
  19. @@ -428,7 +428,11 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" = "xyes"],
  20. [crypt_libs="crypt"])
  21. BACKUP_LIBS=$LIBS
  22. -AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="${ac_cv_search_crypt}", LIBCRYPT="")
  23. +AC_SEARCH_LIBS([crypt],[$crypt_libs])
  24. +case "$ac_cv_search_crypt" in
  25. + -l*) LIBCRYPT="$ac_cv_search_crypt" ;;
  26. + *) LIBCRYPT="" ;;
  27. +esac
  28. AC_CHECK_FUNCS(crypt_r crypt_gensalt_r)
  29. LIBS=$BACKUP_LIBS
  30. AC_SUBST(LIBCRYPT)