]> granicus.if.org Git - libtirpc/commitdiff
No longer require NIS.
authorNick Alcock <nick.alcock@oracle.com>
Thu, 26 Apr 2012 19:38:56 +0000 (15:38 -0400)
committerSteve Dickson <steved@redhat.com>
Thu, 26 Apr 2012 19:54:02 +0000 (15:54 -0400)
From: Nick Alcock <nick.alcock@oracle.com>

NIS is deader than the proverbial dodo, and eglibc allows you to compile
it out entirely.  Though libtirpc can work with NIS, it works perfectly
well if NIS is not in the libc, thanks to nsswitch (acting as if NIS
is there but empty).

However, when NIS is not compiled into eglibc, libnsl is not present.
So check for it at configure time, and include it via LIBS if available.
(I suspect this LIBS-inclusion will have no effect, and we don't even
need to check for NIS at compile time, but I have no NIS-capable systems to
test this on.)

Signed-off-by: Nick Alcock <nick.alcock@oracle.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
configure.ac
src/Makefile.am

index 97c6f2c081c50a3dc9aa05980b9f8fe4a9edeb5e..7ff80a4f1b9151ccfbed125780ae3e7df3fa4a96 100644 (file)
@@ -23,6 +23,7 @@ AC_HEADER_DIRENT
 AC_PREFIX_DEFAULT(/usr)
 AC_CHECK_HEADERS([arpa/inet.h fcntl.h libintl.h limits.h locale.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/param.h sys/socket.h sys/time.h syslog.h unistd.h])
 AC_CHECK_LIB([pthread], [pthread_create])
+AC_CHECK_LIB([nsl], [yp_get_default_domain])
 
 
 AC_CONFIG_FILES([Makefile src/Makefile man/Makefile doc/Makefile])
index 509cf613337858257c24a24a3c96326750c8769d..66350f5f74a948bd461a95d43ee67c660f0106cb 100644 (file)
@@ -40,7 +40,7 @@ lib_LTLIBRARIES = libtirpc.la
 # release number of your package. This is an abuse that only fosters
 # misunderstanding of the purpose of library versions."
 #
-libtirpc_la_LDFLAGS = -lnsl -lpthread -version-info 1:10:0
+libtirpc_la_LDFLAGS = -lpthread -version-info 1:10:0
 
 libtirpc_la_SOURCES = auth_none.c auth_unix.c authunix_prot.c bindresvport.c clnt_bcast.c \
         clnt_dg.c clnt_generic.c clnt_perror.c clnt_raw.c clnt_simple.c \