summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorFabrice Fontaine <fontaine.fabrice@gmail.com>2021-06-15 07:13:56 +0200
committerFabrice Fontaine <fontaine.fabrice@gmail.com>2021-06-15 13:41:04 +0200
commitfe1307512fb8892b5ceb3d884c793af8dbd4c16a (patch)
treef28184a73511081d52416e8dd4ef6c688a2a094b /configure.ac
parentb4f0e2e1f7a18169938eedeff8180e0c75473bb5 (diff)
configure.ac: fix build with libxcrypt and uclibc-ng
Fix the following build failure with libxcrypt and uclibc-ng: ld: unix_chkpwd-passverify.o: in function `verify_pwd_hash': passverify.c:(.text+0xab4): undefined reference to `crypt_checksalt' Fixes: - http://autobuild.buildroot.org/results/65d68b7c9c7de1c7cb0f941ff9982f93a49a56f8 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac16
1 files changed, 12 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 7a4b2e86..e9c57345 100644
--- a/configure.ac
+++ b/configure.ac
@@ -362,10 +362,18 @@ AC_SUBST(LIBAUDIT)
AC_CHECK_HEADERS(crypt.h)
BACKUP_LIBS=$LIBS
-AC_SEARCH_LIBS([crypt],[crypt])
-case "$ac_cv_search_crypt" in
- -l*) LIBCRYPT="$ac_cv_search_crypt" ;;
- *) LIBCRYPT="" ;;
+LIBCRYPT=""
+AC_SEARCH_LIBS([crypt_gensalt_rn],[crypt])
+case "$ac_cv_search_crypt_gensalt_rn" in
+ -l*) LIBCRYPT="$ac_cv_search_crypt_gensalt_rn" ;;
+ no) AC_SEARCH_LIBS([crypt_r],[crypt])
+ case "$ac_cv_search_crypt_r" in
+ -l*) LIBCRYPT="$ac_cv_search_crypt_r" ;;
+ no ) AC_SEARCH_LIBS([crypt],[crypt])
+ case "$ac_cv_search_crypt" in
+ -l*) LIBCRYPT="$ac_cv_search_crypt" ;;
+ esac ;;
+ esac ;;
esac
AC_CHECK_FUNCS([crypt_r])
LIBS=$BACKUP_LIBS