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

[commits] r2948 - in /trunk/libc: ChangeLog.eglibc nis/Makefile nscd/Makefile nscd/nis_hash.c option-groups.def option-groups.defaults



Author: jimb
Date: Thu Jul 26 04:59:00 2007
New Revision: 2948

Log:
Implement the OPTION_EGLIBC_NIS option group.
* option-groups.def (OPTION_EGLIBC_NIS): New entry.
* option-groups.defaults (OPTION_EGLIBC_NIS): Initialize.
* nis/Makefile (services-y, extra-libs-y): Use OPTION_EGLIBC_NIS 
as the condition.
* nscd/Makefile: If OPTION_EGLIBC_NIS is not enabled, don't try to
link against libnsl.so; link our own copy of nis_hash.c directly
into nscd.
* nscd/nis_hash.c: New file.

Added:
    trunk/libc/nscd/nis_hash.c
Modified:
    trunk/libc/ChangeLog.eglibc
    trunk/libc/nis/Makefile
    trunk/libc/nscd/Makefile
    trunk/libc/option-groups.def
    trunk/libc/option-groups.defaults

Modified: trunk/libc/ChangeLog.eglibc
==============================================================================
--- trunk/libc/ChangeLog.eglibc (original)
+++ trunk/libc/ChangeLog.eglibc Thu Jul 26 04:59:00 2007
@@ -1,4 +1,14 @@
 2007-07-26  Jim Blandy  <jimb@xxxxxxxxxxxxxxxx>
+
+	Implement the OPTION_EGLIBC_NIS option group.
+	* option-groups.def (OPTION_EGLIBC_NIS): New entry.
+	* option-groups.defaults (OPTION_EGLIBC_NIS): Initialize.
+	* nis/Makefile (services-y, extra-libs-y): Use OPTION_EGLIBC_NIS 
+	as the condition.
+	* nscd/Makefile: If OPTION_EGLIBC_NIS is not enabled, don't try to
+	link against libnsl.so; link our own copy of nis_hash.c directly
+	into nscd.
+	* nscd/nis_hash.c: New file.
 
 	* nptl/tst-tls6.sh: Remove bashisms.
 

Modified: trunk/libc/nis/Makefile
==============================================================================
--- trunk/libc/nis/Makefile (original)
+++ trunk/libc/nis/Makefile Thu Jul 26 04:59:00 2007
@@ -37,11 +37,11 @@
 # Specify rules for the nss_* modules.
 # The 'compat' module includes nis support, and the 'nss' directory
 # includes a bare-bones "files" library, so we'll include 'compat' in
-# OPTION_EGLIBC_INET.
+# OPTION_EGLIBC_NIS.
 services-y		:=
-services-$(OPTION_EGLIBC_INET) += nis nisplus compat
+services-$(OPTION_EGLIBC_NIS) += nis nisplus compat
 
-extra-libs-$(OPTION_EGLIBC_INET) += libnsl
+extra-libs-$(OPTION_EGLIBC_NIS) += libnsl
 extra-libs-y		+= $(services-y:%=libnss_%)
 
 # These libraries will be built in the `others' pass rather than

Modified: trunk/libc/nscd/Makefile
==============================================================================
--- trunk/libc/nscd/Makefile (original)
+++ trunk/libc/nscd/Makefile Thu Jul 26 04:59:00 2007
@@ -39,7 +39,11 @@
 		getsrvbynm_r getsrvbypt_r servicescache \
 		dbg_log nscd_conf nscd_stat cache mem nscd_setup_thread \
 		xmalloc xstrdup aicache initgrcache gai
-
+ifneq (y,$(OPTION_EGLIBC_NIS))
+# If we haven't build libnsl.so, then we'll need to include our
+# own copy of nis_hash.
+nscd-modules += nis_hash
+endif
 ifeq ($(have-thread-library),yes)
 
 ifneq (yesyes,$(have-fpie)$(build-shared))
@@ -81,7 +85,8 @@
 
 distribute := nscd.h nscd-client.h dbg_log.h \
 	      $(addsuffix .c, $(filter-out xmalloc,$(all-nscd-modules))) \
-	      nscd.conf nscd.init nscd_proto.h nscd-types.h
+	      nscd.conf nscd.init nscd_proto.h nscd-types.h \
+	      nis_hash.c
 
 include ../Rules
 
@@ -147,9 +152,15 @@
 $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o)
 
 ifeq ($(build-shared),yes)
-$(objpfx)nscd: $(common-objpfx)rt/librt.so $(shared-thread-library) \
-	       $(common-objpfx)nis/libnsl.so
+$(objpfx)nscd: $(common-objpfx)rt/librt.so $(shared-thread-library)
 else
-$(objpfx)nscd: $(common-objpfx)rt/librt.a $(static-thread-library) \
-	       $(common-objpfx)nis/libnsl.a
+$(objpfx)nscd: $(common-objpfx)rt/librt.a $(static-thread-library)
 endif
+
+ifeq (y,$(OPTION_EGLIBC_NIS))
+ifeq ($(build-shared),yes)
+$(objpfx)nscd: $(common-objpfx)nis/libnsl.so
+else
+$(objpfx)nscd: $(common-objpfx)nis/libnsl.a
+endif
+endif

Added: trunk/libc/nscd/nis_hash.c
==============================================================================
--- trunk/libc/nscd/nis_hash.c (added)
+++ trunk/libc/nscd/nis_hash.c Thu Jul 26 04:59:00 2007
@@ -1,0 +1,3 @@
+/* If OPTION_EGLIBC_NIS is disabled, nscd can't get this from libnsl.so;
+   we need our own copy.  */
+#include "../nis/nis_hash.c"

Modified: trunk/libc/option-groups.def
==============================================================================
--- trunk/libc/option-groups.def (original)
+++ trunk/libc/option-groups.def Thu Jul 26 04:59:00 2007
@@ -288,6 +288,18 @@
        group; if you disable OPTION_EGLIBC_LOCALE_CODE, you must also
        disable OPTION_EGLIBC_CATGETS.
 
+config OPTION_EGLIBC_NIS
+   bool "Support for NIS, NIS+, and the special 'compat' services."
+   depends OPTION_EGLIBC_INET
+   help
+       This option group includes the NIS, NIS+, and 'compat' Name
+       Service Switch service libraries.  When it is disabled, those
+       services libraries are not installed; you should remove any
+       references to them from your 'nsswitch.conf' file.
+
+       This option group depends on the OPTION_EGLIBC_INET option
+       group; you must enable that to enable this option group.
+
 config OPTION_EGLIBC_NSSWITCH
    bool "Name service switch (nsswitch) support"
    help

Modified: trunk/libc/option-groups.defaults
==============================================================================
--- trunk/libc/option-groups.defaults (original)
+++ trunk/libc/option-groups.defaults Thu Jul 26 04:59:00 2007
@@ -14,5 +14,6 @@
 OPTION_EGLIBC_LIBM = y
 OPTION_EGLIBC_LOCALES = y
 OPTION_EGLIBC_LOCALE_CODE = y
+OPTION_EGLIBC_NIS = y
 OPTION_EGLIBC_NSSWITCH = y
 OPTION_POSIX_REGEXP = y