about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2007-11-24 01:56:49 +0000
committerClint Adams <clint@users.sourceforge.net>2007-11-24 01:56:49 +0000
commit70a13864ce8538ed36774512839eea56b4b06778 (patch)
tree862c4de1255260e374e26b98667e44879386106a
parentecfc1fc1e69736362548c711a8da9606ff786dd5 (diff)
downloadzsh-70a13864ce8538ed36774512839eea56b4b06778.tar.gz
zsh-70a13864ce8538ed36774512839eea56b4b06778.tar.xz
zsh-70a13864ce8538ed36774512839eea56b4b06778.zip
24118: only link against libnsl if we have NIS and need it for yp_all, or if we need it for getpwnam.
-rw-r--r--ChangeLog5
-rw-r--r--configure.ac8
2 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c1ff42e3..1f41a8fbb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-11-24  Clint Adams  <clint@zsh.org>
+
+	* 24118: configure.ac: only link against libnsl if we have NIS and
+	need it for yp_all, or if we need it for getpwnam.
+
 2007-11-23  Clint Adams  <clint@zsh.org>
 
 	* Markus Waldeck: 24117: Completion/Unix/Command/_uname:
diff --git a/configure.ac b/configure.ac
index 47ffce5af..9f5fd20bb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -769,10 +769,7 @@ case $LIBS in
   AC_DEFINE(ZSH_IGNORE_NCURSES) ;;
 esac
 
-dnl Some systems (Solaris 2.x, Linux Redhat 5.x) require
-dnl libnsl (Network Services Library) to find yp_all
-
-AC_SEARCH_LIBS(yp_all, nsl)
+AC_SEARCH_LIBS(getpwnam, nsl)
 
 dnl I am told that told that unicos reqire these for nis_list
 if test `echo $host_os | sed 's/^\(unicos\).*/\1/'` = unicos; then
@@ -1747,6 +1744,9 @@ AC_CACHE_CHECK(for NIS, zsh_cv_sys_nis,
 zsh_cv_sys_nis=yes || zsh_cv_sys_nis=no])
 if test x$zsh_cv_sys_nis = xyes; then
   AC_DEFINE(HAVE_NIS)
+dnl Some systems (Solaris 2.x, Linux Redhat 5.x) require
+dnl libnsl (Network Services Library) to find yp_all
+  AC_SEARCH_LIBS(yp_all, nsl)
 fi
 
 dnl -----------------