diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2020-04-27 01:40:25 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2020-04-27 01:40:25 +0000 |
commit | 275eaa0a17dbefb18e48d8b649aa3156d892cbcc (patch) | |
tree | 1c0871af7dfa90e18cb8a1a46fcf8145ff25688d /configure.ac | |
parent | ae2ccf5053b171dff644dd339338b0fde00f83a2 (diff) | |
download | pam-275eaa0a17dbefb18e48d8b649aa3156d892cbcc.tar.gz pam-275eaa0a17dbefb18e48d8b649aa3156d892cbcc.tar.bz2 pam-275eaa0a17dbefb18e48d8b649aa3156d892cbcc.zip |
configure: fix dlopen check
* configure.ac: Check for the library providing dlopen using
AC_SEARCH_LIBS instead of AC_CHECK_LIB to handle the case when
dlopen is a part of libc.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 090e45fa..91b68838 100644 --- a/configure.ac +++ b/configure.ac @@ -364,8 +364,15 @@ if test x$pam_xauth_path != x ; then [Additional path of xauth executable]) fi -dnl Checks for the existence of libdl - on BSD and Tru64 its part of libc -AC_CHECK_LIB([dl], [dlopen], LIBDL="-ldl", LIBDL="") +dnl Checks for the existence of libdl - in musl its a part of libc +saved_LIBS="$LIBS" +AC_SEARCH_LIBS([dlopen], [dl]) +LIBS="$saved_LIBS" +case "$ac_cv_search_dlopen" in + no) AC_MSG_FAILURE([failed to find dlopen]) ;; + -l*) LIBDL="$ac_cv_search_dlopen" ;; + *) LIBDL= ;; +esac AC_SUBST(LIBDL) # Check for cracklib |