diff options
author | Fabrice Fontaine <fontaine.fabrice@gmail.com> | 2020-06-11 00:04:32 +0200 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2020-06-11 06:06:25 +0000 |
commit | aef363c7e8e942224e6cffc4398366c6e5d31749 (patch) | |
tree | 5bb62704cd569395839397e623d2b0ffddadedbc | |
parent | 6e319bc0af1ea3a58f5165beadb56855ec1c8844 (diff) | |
download | pam-aef363c7e8e942224e6cffc4398366c6e5d31749.tar.gz pam-aef363c7e8e942224e6cffc4398366c6e5d31749.tar.bz2 pam-aef363c7e8e942224e6cffc4398366c6e5d31749.zip |
configure.ac: fix build failure when crypt() does not require libcrypt
Since commit 522246d20e4cd92fadc2d760228cb7e78cbeb4c5, the build fails
if "none required" is returned by AC_SEARCH_LIBS for libcrypt.
Resolves: https://github.com/linux-pam/linux-pam/pull/235
Fixes: http://autobuild.buildroot.org/results/92b3dd7c984d2b843ac9aacacd69eec99f28743e
Fixes: v1.4.0~228 ("Use cached 'crypt' library result correctly")
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
-rw-r--r-- | configure.ac | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index ea08a7a3..c1862ea7 100644 --- a/configure.ac +++ b/configure.ac @@ -428,7 +428,11 @@ AS_IF([test "x$ac_cv_header_xcrypt_h" = "xyes"], [crypt_libs="crypt"]) BACKUP_LIBS=$LIBS -AC_SEARCH_LIBS([crypt],[$crypt_libs], LIBCRYPT="${ac_cv_search_crypt}", LIBCRYPT="") +AC_SEARCH_LIBS([crypt],[$crypt_libs]) +case "$ac_cv_search_crypt" in + -l*) LIBCRYPT="$ac_cv_search_crypt" ;; + *) LIBCRYPT="" ;; +esac AC_CHECK_FUNCS(crypt_r crypt_gensalt_r) LIBS=$BACKUP_LIBS AC_SUBST(LIBCRYPT) |