Robert Schwebel <[EMAIL PROTECTED]> writes:

> is it possible to let LSH run without libnsl?

Depends on the system. The gethostbyname function and some friends are
needed. On Solaris one has to link with libnsl explicitly.

It seems recent glibc versions also have a libnsl too.

> Hmm, it seems that I have I thought it would be a part of glibc but
> couldn't find the source...

On my debian system:

  $ dpkg -S /lib/libnsl-2.2.5.so
  libc6: /lib/libnsl-2.2.5.so

So I guess it's glibc. Checking the glibc source, it seems it
corresponds to the glibc/nis directory. So then it shouldn't be needed
for lsh. Try the below patch, it should make lsh not link with libnsl
unless it's really needed.

*** configure.ac.~1.17.~        Wed Oct  2 18:33:38 2002
--- configure.ac        Wed Oct  2 21:08:09 2002
***************
*** 441,450 ****

  AC_CHECK_LIB(crypt, crypt)
  AC_CHECK_LIB(xnet, inet_addr)
- AC_CHECK_LIB(nsl, gethostbyname)
  AC_CHECK_LIB(socket, setsockopt)
  # logwtmp is also in libutil
  AC_CHECK_LIB(util, openpty)

  # This macro is new in autoconf-2.13
  AC_SEARCH_LIBS(syslog, bsd socket inet, [AC_DEFINE(HAVE_SYSLOG)])
--- 441,452 ----

  AC_CHECK_LIB(crypt, crypt)
  AC_CHECK_LIB(xnet, inet_addr)
  AC_CHECK_LIB(socket, setsockopt)
  # logwtmp is also in libutil
  AC_CHECK_LIB(util, openpty)
+
+ # glibc has a nis-library "libnsl", which we don't need.
+ AC_SEARCH_LIBS(gethostbyname, nsl)

  # This macro is new in autoconf-2.13
  AC_SEARCH_LIBS(syslog, bsd socket inet, [AC_DEFINE(HAVE_SYSLOG)])


/Niels
_______________________________________________
lsh-bugs mailing list
[EMAIL PROTECTED]
http://lists.lysator.liu.se/mailman/listinfo/lsh-bugs

Reply via email to