From 3b917f1d971d034cc758ceb5e215edb59afd9105 Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 22 Feb 2012 15:48:37 -0500 Subject: Eliminate build-time requirement for nscd We will now use the autodetected location if available, or else fall back to a value provided by --with-nscd in configure and finally resort to a hard-coded default of /usr/sbin/nscd. --- contrib/sssd.spec.in | 1 - src/conf_macros.m4 | 15 ++++++++------- src/external/nscd.m4 | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index ae01bffe1..27a13bb09 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -95,7 +95,6 @@ BuildRequires: libsemanage-devel BuildRequires: bind-utils BuildRequires: keyutils-libs-devel BuildRequires: libnl-devel -BuildRequires: nscd BuildRequires: gettext-devel BuildRequires: pkgconfig BuildRequires: findutils diff --git a/src/conf_macros.m4 b/src/conf_macros.m4 index a54dd7f04..145cdd795 100644 --- a/src/conf_macros.m4 +++ b/src/conf_macros.m4 @@ -277,16 +277,17 @@ AC_DEFUN([WITH_TEST_DIR], AC_DEFUN([WITH_NSCD], [ AC_ARG_WITH([nscd], - [AC_HELP_STRING([--with-nscd], - [Whether to attempt to flush nscd cache after local domain operations [yes]] + [AC_HELP_STRING([--with-nscd=PATH], + [Path to nscd binary to attempt to flush nscd cache after local domain operations [/usr/sbin/nscd]] ) - ], - [], - with_nscd=yes + ] ) - if test x"$with_nscd" = xyes; then - AC_DEFINE_UNQUOTED(HAVE_NSCD, 1, [flush nscd cache after local domain operations]) + NSCD_PATH="/usr/sbin/nscd" + if test x"$with_nscd" != x; then + NSCD_PATH=$with_nscd + AC_SUBST(NSCD_PATH) fi + AC_DEFINE_UNQUOTED(HAVE_NSCD, $NSCD_PATH, [flush nscd cache after local domain operations]) ]) AC_DEFUN([WITH_SEMANAGE], diff --git a/src/external/nscd.m4 b/src/external/nscd.m4 index f9f54c582..d0f129166 100644 --- a/src/external/nscd.m4 +++ b/src/external/nscd.m4 @@ -1,9 +1,9 @@ -AC_PATH_PROG(NSCD, nscd) +AC_PATH_PROG(NSCD, nscd, $NSCD_PATH) AC_MSG_CHECKING(for nscd) +AC_DEFINE_UNQUOTED([NSCD_PATH], "$NSCD", [The path to nscd, if available]) + if test -x "$NSCD"; then - AC_DEFINE_UNQUOTED([NSCD_PATH], "$NSCD", [The path to nscd, if available]) AC_MSG_RESULT(yes) else - AC_MSG_RESULT(no. Manipulating nscd cache will not be available.) + AC_MSG_RESULT([not installed, assuming standard location]) fi - -- cgit