From 7de9f07b0fc3729679ad2678ce1a04aed88e0f7f Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 31 May 2012 18:42:31 +0000 Subject: [PATCH] -test for nss.h --- configure.ac | 12 ++++++++++++ src/gns/Makefile.am | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2cc522bf6..a861bd409 100644 --- a/configure.ac +++ b/configure.ac @@ -339,6 +339,18 @@ else fi + +AC_CHECK_HEADERS([nss.h],[nss=true],[nss=false]) +if test x$nss = xnss +then + AM_CONDITIONAL(HAVE_GLIBCNSS, false) + AC_MSG_WARN([No GNU libc nss header, will not build NSS plugin]) +else + AM_CONDITIONAL(HAVE_GLIBCNSS, true) +fi + + + # test for kvm and kstat (for CPU stats under BSD/Solaris) AC_CHECK_LIB([kvm],[kvm_open]) AC_CHECK_LIB([kstat],[kstat_open]) diff --git a/src/gns/Makefile.am b/src/gns/Makefile.am index 1146950d8..2e28a6a90 100644 --- a/src/gns/Makefile.am +++ b/src/gns/Makefile.am @@ -1,6 +1,10 @@ INCLUDES = -I$(top_srcdir)/src/include -SUBDIRS = . nss +if HAVE_GLIBCNSS +NSS_SUBDIR = nss +endif + +SUBDIRS = . $(NSS_SUBDIR) if MINGW WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols -- 2.25.1