Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: strange hanging behaviour

On Aug 30, 10:37pm, Andrew Gallagher wrote:
} Subject: Re: strange hanging behaviour
} The [3.0.6] ./configure script didn't find the function yp_all
} properly. It turns out that this is because it doesn't actually
} _look_ for yp_all - it looks for getdomainname and assumes yp_all is
} available once getdomainname is found. Unfortunately (for whatever
} reason) on my system getdomainname is found easily but yp_all has to
} be got from libnsl.

Aha.  That would explain one of the patches I found in RedHat's .src.rpm
for zsh 3.0.5; their patch simply brute-forced linkage with -lnsl, for no
reason PWS or I could fathom.  I don't run NIS on any of my linux boxes,
so I've never noticed the lack of yp.

yp_all is only used if HAVE_NIS is defined and HAVE_NIS_PLUS is not; but
configure.in is not organized to discover NIS until long after it has
tested for most library linkages, so I think I'll just ask you to try the
patch below and tell me how it goes.  If you don't have autoconf and
autoheader available, drop me a note and I'll send you the (biggish) diffs
for the configure script and config.h.in file.

The relevant fragment of output on my system is

checking for library containing getdomainname... none required
checking for library containing yp_all... -lnsl

} Is this just my server's fault (which I could easily believe!) or does
} RH Linux do this to other people?

I think it probably does it to everybody.

I'm not entirely happy with this patch, as it will link with -lnsl even
when HAVE_NIS is not defined -- configure.in ought to be reordered to see
whether zsh wants a particular function at all before trying to find out
what library it's in.

Index: configure.in
@@ -372,11 +372,9 @@
 dnl Some systems (Solaris 2.x) require libnsl (Network Services Library)
-dnl to find getdomainname and yp_all
-if test $ac_cv_func_getdomainname = no; then
-  AC_CHECK_LIB(nsl, getdomainname)
+dnl to find getdomainname and yp_all; Linux requires it for yp_all only.
+AC_SEARCH_LIBS(getdomainname, nsl)
+AC_SEARCH_LIBS(yp_all, 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

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Messages sorted by: Reverse Date, Date, Thread, Author