configure.in: only add -lnsl when needed
dpkg-shlibdeps: warning: dependency on libnsl.so.1 [..]
(they use none of its symbols).
As shown via commit 2b14234abc
(dpkg-shlibdeps: warning: dependency on libnsl.so.1) and the
following revert of that commit, we cannot simply drop
the AC_CHECK_LIB(nsl). Although -lnsl is indeed unneeded
when glibc is used, some platforms (e.g. Solaris) need it.
Use AC_SEARCH_LIBS instead to only link when the library exports
a particular symbol.
This commit is contained in:
parent
6e8cf51bb2
commit
20276f7cc9
|
@ -131,9 +131,11 @@ AC_CHECK_MEMBER([struct sockaddr_in.sin_len], AC_DEFINE(HAVE_sockaddr_in_len),,
|
|||
|
||||
# -- Libraries --
|
||||
|
||||
# A/UX needs this.
|
||||
AC_CHECK_LIB(UTIL,memmove)
|
||||
# needed on solaris. GNU libc also has a libnsl, but we do not need it.
|
||||
AC_SEARCH_LIBS(gethostbyname,nsl)
|
||||
AC_CHECK_LIB(socket,bind)
|
||||
AC_CHECK_LIB(nsl,gethostent)
|
||||
|
||||
# -- Functions --
|
||||
|
||||
|
|
Loading…
Reference in New Issue