From 73cf4157b58f6e779ab3c93b1eef54b077447dc7 Mon Sep 17 00:00:00 2001 From: Jon Trulson Date: Fri, 17 Dec 2021 17:39:34 -0700 Subject: [PATCH] configure: don't try PAM support on anything other than Linux and NetBSD It's not supported on OpenBSD and and FreeBSD, though maybe in the future...? --- cde/configure.ac | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/cde/configure.ac b/cde/configure.ac index be5ea149a..3c5ad06c6 100644 --- a/cde/configure.ac +++ b/cde/configure.ac @@ -80,6 +80,9 @@ dnl other things as we go along. EXTRA_LIBS="" EXTRA_INCS="" +# pam currently only works on netbsd (9.2 tested) and linux +supports_pam=no + case "${host_os}" in linux*) build_linux=yes @@ -87,6 +90,7 @@ case "${host_os}" in OSMINORVERSION=15 SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -D_POSIX_SOURCE \ -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_SVID_SOURCE" + supports_pam=yes ;; freebsd*) build_freebsd=yes @@ -108,6 +112,7 @@ case "${host_os}" in bsd=yes OSMAJORVERSION=8 OSMINORVERSION=0 + supports_pam=yes ;; solaris*|sun*) build_solaris=yes @@ -461,9 +466,14 @@ dnl iconv AM_ICONV dnl figure out pam support - -AC_CHECK_LIB(pam, pam_start, +dnl Right now this only works on linux and netbsd (9.2 tested) +if test "$supports_pam" = "yes" +then + AC_CHECK_LIB(pam, pam_start, [SOURCE_CPP_DEFINES="${SOURCE_CPP_DEFINES} -DHAS_PAM_LIBRARY"]) +else + AC_CHECK_LIB(pam, NOTSUPPORTED) +fi AM_CONDITIONAL([HAS_PAM_LIBRARY], [test "x$ac_cv_lib_pam_pam_start" = "xyes"])