* acinclude.m4 (MC_WITH_VFS): Don't link with libnsl

unnecessarily.
	* configure.ac: Simplified detection of the necessary libraries
	for socket() and gethostbyname().

	Patch provided by Tomasz Kloczko at 2005-06-15 on mc-devel.
This commit is contained in:
Roland Illig 2005-07-03 11:50:30 +00:00
parent fb43472e27
commit 2aae4390da
3 changed files with 11 additions and 26 deletions

View File

@ -1,3 +1,12 @@
2005-07-03 Roland Illig <roland.illig@gmx.de>
* acinclude.m4 (MC_WITH_VFS): Don't link with libnsl
unnecessarily.
* configure.ac: Simplified detection of the necessary libraries
for socket() and gethostbyname().
Patch provided by Tomasz Kloczko at 2005-06-15 on mc-devel.
2005-06-21 Pavel Roskin <proski@gnu.org>
* lib/mc.ext.in: Support opening for 7-Zip archives.

View File

@ -144,7 +144,6 @@ AC_DEFUN([MC_WITH_VFS],[
if test "x$enable_netcode" != xno; then
dnl FIXME: network checks should probably be in their own macro.
AC_CHECK_LIB(nsl, main)
AC_SEARCH_LIBS(socket, [xnet bsd socket inet], [have_socket=yes])
if test x$have_socket = xyes; then
AC_SEARCH_LIBS(gethostbyname, [bsd socket inet netinet])

View File

@ -294,31 +294,8 @@ dnl
dnl Network related functions
dnl
AC_CHECK_LIB(nsl, t_accept)
AC_CHECK_LIB(socket, socket)
have_socket=no
AC_CHECK_FUNCS(socket, have_socket=yes)
if test $have_socket = no; then
# socket is not in the default libraries. See if it's in some other.
for lib in bsd socket inet; do
AC_CHECK_LIB($lib, socket, [
LIBS="$LIBS -l$lib"
have_socket=yes
AC_DEFINE(HAVE_SOCKET)
break])
done
fi
have_gethostbyname=no
AC_CHECK_FUNC(gethostbyname, [have_gethostbyname=yes])
if test $have_gethostbyname = no; then
# gethostbyname is not in the default libraries. See if it's in some other.
for lib in bsd socket inet; do
AC_CHECK_LIB([$lib], [gethostbyname],
[LIBS="$LIBS -l$lib"; have_gethostbyname=yes; break])
done
fi
AC_SEARCH_LIBS([socket], [socket])
AC_SEARCH_LIBS([gethostbyname], [nsl])
dnl
dnl Sequent wants getprocessstats