-test for nss.h
authorChristian Grothoff <christian@grothoff.org>
Thu, 31 May 2012 18:42:31 +0000 (18:42 +0000)
committerChristian Grothoff <christian@grothoff.org>
Thu, 31 May 2012 18:42:31 +0000 (18:42 +0000)
configure.ac
src/gns/Makefile.am

index 2cc522bf6ab7af81af8216b84e20156812e49a83..a861bd40979bd9d00d9f6182c9ccfdb8a0559785 100644 (file)
@@ -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])
index 1146950d82e98a095196715a2e974f719a81fd92..2e28a6a905c0dbd35220a544aa73f93aabba67e9 100644 (file)
@@ -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