diff options
author | Tobias Stoeckmann <tobias@stoeckmann.org> | 2024-03-03 22:20:41 +0100 |
---|---|---|
committer | Dmitry V. Levin <ldv@strace.io> | 2024-03-03 21:20:41 +0000 |
commit | ac9965e29a1a4827c8ed28b7c73f972b4f15959f (patch) | |
tree | 50a7a6ad510357ff2ed773027023c5b98a54a076 | |
parent | dc370deab4752c264c20e16684d02692532c351b (diff) | |
download | pam-ac9965e29a1a4827c8ed28b7c73f972b4f15959f.tar.gz pam-ac9965e29a1a4827c8ed28b7c73f972b4f15959f.tar.bz2 pam-ac9965e29a1a4827c8ed28b7c73f972b4f15959f.zip |
build: fail if requested nis headers are missing
Failing if a feature is directly requested is default by now.
Do the same for --enable-nis=yes.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
-rw-r--r-- | configure.ac | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index 41fc5c6b..c1683f0c 100644 --- a/configure.ac +++ b/configure.ac @@ -475,9 +475,10 @@ fi AC_SUBST(LIBDB) AC_ARG_ENABLE([nis], - AS_HELP_STRING([--disable-nis], [Disable building NIS/YP support in pam_unix])) + AS_HELP_STRING([--disable-nis], [Disable building NIS/YP support in pam_unix]), + WITH_NIS=$enableval, WITH_NIS=check) -AS_IF([test "x$enable_nis" != "xno"], [ +if test "$WITH_NIS" != "no" ; then old_CFLAGS=$CFLAGS old_CPPFLAGS=$CPPFLAGS old_LIBS=$LIBS @@ -510,7 +511,7 @@ AS_IF([test "x$enable_nis" != "xno"], [ CFLAGS="$old_CFLAGS" CPPFLAGS="$old_CPPFLAGS" LIBS="$old_LIBS" -]) +fi AC_SUBST([NIS_CFLAGS]) AC_SUBST([NIS_LIBS]) @@ -518,6 +519,8 @@ 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]) +elif test "$WITH_NIS" = "yes" ; then + AC_MSG_ERROR([NIS/YP support not available]) fi AC_ARG_ENABLE([usergroups], |