lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1215 - in nss-pam-ldapd: . nss

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1215 - in nss-pam-ldapd: . nss



Author: arthur
Date: Sat Sep 25 23:50:29 2010
New Revision: 1215
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1215

Log:
have a way to limit which NSS maps should be built

Modified:
   nss-pam-ldapd/configure.ac
   nss-pam-ldapd/nss/Makefile.am

Modified: nss-pam-ldapd/configure.ac
==============================================================================
--- nss-pam-ldapd/configure.ac  Fri Sep 24 15:04:06 2010        (r1214)
+++ nss-pam-ldapd/configure.ac  Sat Sep 25 23:50:29 2010        (r1215)
@@ -207,6 +207,12 @@
 AC_DEFINE_UNQUOTED(NSS_LDAP_SONAME,"$NSS_LDAP_SONAME",[The SONAME of the NSS 
library module.])
 AC_SUBST(NSS_LDAP_SONAME)
 
+# check which modules should be build
+AC_ARG_WITH(nss-ldap-maps,
+            AS_HELP_STRING([--with-nss-ldap-maps=MAP LIST],
+                           [comma separated list of NSS maps to build 
@<:@all@:>@]),
+            ,[ with_nss_ldap_maps="all" ])
+
 # checks for availability of header files
 AC_CHECK_HEADERS([ctype.h strings.h pthread.h fcntl.h limits.h])
 AC_CHECK_HEADERS([nss.h nss_common.h grp.h shadow.h aliases.h netdb.h 
rpc/rpcent.h])
@@ -319,6 +325,16 @@
       #include <nss_common.h>
       #endif])
 
+  # check which module source files to use
+  AC_MSG_CHECKING([which NSS maps to build])
+  if test "x$with_nss_ldap_maps" = "xall"
+  then
+    
with_nss_ldap_maps="aliases,ethers,group,hosts,netgroup,networks,passwd,protocols,rpc,services,shadow"
+  fi
+  AC_MSG_RESULT($with_nss_ldap_maps)
+  NSS_MODULE_OBJS="`echo "$with_nss_ldap_maps" | sed 's/,/ /g;s/  
*\|$/.$(OBJEXT) /g'`"
+  AC_SUBST(NSS_MODULE_OBJS)
+
   # restore CFLAGS and LIBS
   CFLAGS="$nss_save_CFLAGS"
   LIBS="$nss_save_LIBS"

Modified: nss-pam-ldapd/nss/Makefile.am
==============================================================================
--- nss-pam-ldapd/nss/Makefile.am       Fri Sep 24 15:04:06 2010        (r1214)
+++ nss-pam-ldapd/nss/Makefile.am       Sat Sep 25 23:50:29 2010        (r1215)
@@ -26,15 +26,16 @@
 
 nss_ldap_so_SOURCES = common.c common.h prototypes.h \
                       ../nslcd.h ../common/nslcd-prot.h \
-                      ../compat/attrs.h \
-                      aliases.c ethers.c group.c hosts.c netgroup.c \
-                      networks.c passwd.c protocols.c rpc.c services.c \
-                      shadow.c
+                      ../compat/attrs.h
+EXTRA_nss_ldap_so_SOURCES = aliases.c ethers.c group.c hosts.c netgroup.c \
+                            networks.c passwd.c protocols.c rpc.c services.c \
+                            shadow.c
 nss_ldap_so_LDFLAGS = -shared -Wl,-h,$(NSS_LDAP_SONAME)
 if HAVE_VERSION_SCRIPT_FLAG
 nss_ldap_so_LDFLAGS += $(VERSION_SCRIPT_FLAG)\$(srcdir)/nss_ldap.map
 endif
-nss_ldap_so_LDADD = ../common/libtio.a ../common/libprot.a
+nss_ldap_so_LDADD = ../common/libtio.a ../common/libprot.a $(NSS_MODULE_OBJS)
+nss_ldap_so_DEPENDENCIES = $(NSS_MODULE_OBJS)
 
 EXTRA_DIST = nss_ldap.map
 
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits