1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

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...?
This commit is contained in:
Jon Trulson 2021-12-17 17:39:34 -07:00
parent 3c95af9871
commit 73cf4157b5

View file

@ -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
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"])