diff options
author | Thorsten Kukuk <kukuk@suse.com> | 2023-04-06 14:44:07 +0200 |
---|---|---|
committer | Thorsten Kukuk <5908016+thkukuk@users.noreply.github.com> | 2023-04-06 16:05:04 +0200 |
commit | 4ce09656536911d9048519b8ee18e53353c9cae8 (patch) | |
tree | 6553ae931ad895a0cd9d50bdc3a2b074037770dd /configure.ac | |
parent | 9c0965b188b972867a62a3b947aa446a3ee3badd (diff) | |
download | pam-4ce09656536911d9048519b8ee18e53353c9cae8.tar.gz pam-4ce09656536911d9048519b8ee18e53353c9cae8.tar.bz2 pam-4ce09656536911d9048519b8ee18e53353c9cae8.zip |
configure: Disable NIS if header files are missing
configure.ac: Disable NIS if RPC or YP header files are missing
modules/pam_unix/support.c: Use HAVE_NIS to check for header file presence
modules/pam_unix/pam_unix_passwd.c: Use HAVE_NIS, too
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 8844eb35..f50484d9 100644 --- a/configure.ac +++ b/configure.ac @@ -459,7 +459,6 @@ AC_SUBST(LIBDB) AC_ARG_ENABLE([nis], AS_HELP_STRING([--disable-nis], [Disable building NIS/YP support in pam_unix])) -AM_CONDITIONAL([HAVE_NIS], [test "x$enable_nis" != "xno"]) AS_IF([test "x$enable_nis" != "xno"], [ old_CFLAGS=$CFLAGS @@ -482,7 +481,9 @@ AS_IF([test "x$enable_nis" != "xno"], [ AC_CHECK_FUNCS([yp_get_default_domain yperr_string yp_master yp_bind yp_match yp_unbind]) AC_CHECK_FUNCS([getrpcport rpcb_getaddr]) - AC_CHECK_HEADERS([rpc/rpc.h rpcsvc/ypclnt.h rpcsvc/yp_prot.h]) + AC_CHECK_HEADER([rpc/rpc.h], , [enable_nis=no]) + AC_CHECK_HEADER([rpcsvc/ypclnt.h], , [enable_nis=no]) + AC_CHECK_HEADER([rpcsvc/yp_prot.h], , [enable_nis=no]) AC_CHECK_DECLS([getrpcport], , , [ #if HAVE_RPC_RPC_H # include <rpc/rpc.h> @@ -496,6 +497,11 @@ AS_IF([test "x$enable_nis" != "xno"], [ AC_SUBST([NIS_CFLAGS]) AC_SUBST([NIS_LIBS]) +AM_CONDITIONAL([HAVE_NIS], [test "x$enable_nis" != "xno"]) +if test "x$enable_nis" != "xno" ; then + AC_DEFINE([HAVE_NIS], 1, + [Defines that NIS should be used]) +fi AC_ARG_ENABLE([usergroups], AS_HELP_STRING([--enable-usergroups], [sets the usergroups option default to enabled]), |