lib/socket: use LIBREPLACE_NETWORK instead of EXT_SOCKET and EXT_NSL
authorStefan Metzmacher <metze@samba.org>
Tue, 18 Mar 2008 13:59:10 +0000 (14:59 +0100)
committerStefan Metzmacher <metze@samba.org>
Tue, 18 Mar 2008 14:59:22 +0000 (15:59 +0100)
The configure checks are also in libreplace now.

metze

source/lib/socket/config.m4
source/lib/socket/config.mk

index a713090c6da2450b732696a8e99efb75f9637526..b40002b32114c699e8392c8a0c104f469b28c6f7 100644 (file)
@@ -11,50 +11,6 @@ if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
     AC_DEFINE(HAVE_SOCK_SIN_LEN,1,[Whether the sockaddr_in struct has a sin_len property])
 fi
 
-# The following test taken from the cvs sources
-# If we can't find connect, try looking in -lsocket, -lnsl, and -linet.
-# The Irix 5 libc.so has connect and gethostbyname, but Irix 5 also has
-# libsocket.so which has a bad implementation of gethostbyname (it
-# only looks in /etc/hosts), so we only look for -lsocket if we need
-# it.
-AC_CHECK_FUNCS(connect)
-if test x"$ac_cv_func_connect" = x"no"; then
-    AC_CHECK_LIB_EXT(nsl_s, SOCKET_LIBS, connect)
-    AC_CHECK_LIB_EXT(nsl, SOCKET_LIBS, connect)
-    AC_CHECK_LIB_EXT(socket, SOCKET_LIBS, connect)
-    AC_CHECK_LIB_EXT(inet, SOCKET_LIBS, connect)
-    SMB_ENABLE(EXT_SOCKET,YES)
-    dnl We can't just call AC_CHECK_FUNCS(connect) here, because the value
-    dnl has been cached.
-    if test x"$ac_cv_lib_ext_nsl_s_connect" = x"yes" ||
-       test x"$ac_cv_lib_ext_nsl_connect" = x"yes" ||
-       test x"$ac_cv_lib_ext_socket_connect" = x"yes" ||
-       test x"$ac_cv_lib_ext_inet_connect" = x"yes"; then
-        AC_DEFINE(HAVE_CONNECT,1,[Whether the system has connect()])
-    else
-       AC_MSG_ERROR([no connect() function available!])
-    fi
-fi
-
-SMB_EXT_LIB(EXT_SOCKET,[${SOCKET_LIBS}],[${SOCKET_CFLAGS}],[${SOCKET_CPPFLAGS}],[${SOCKET_LDFLAGS}])
-
-AC_CHECK_FUNCS(gethostbyname)
-if test x"$ac_cv_func_gethostbyname" = x"no"; then
-    AC_CHECK_LIB_EXT(nsl_s, NSL_LIBS, gethostbyname)
-    AC_CHECK_LIB_EXT(nsl, NSL_LIBS, gethostbyname)
-    AC_CHECK_LIB_EXT(socket, NSL_LIBS, gethostbyname)
-    SMB_ENABLE(EXT_NSL,YES)
-    dnl We can't just call AC_CHECK_FUNCS(gethostbyname) here, because the value
-    dnl has been cached.
-    if test x"$ac_cv_lib_ext_nsl_s_gethostbyname" != x"yes" &&
-       test x"$ac_cv_lib_ext_nsl_gethostbyname" != x"yes" &&
-       test x"$ac_cv_lib_ext_socket_gethostbyname" != x"yes"; then
-               AC_MSG_ERROR([no gethostbyname() function available!])
-    fi
-fi
-
-SMB_EXT_LIB(EXT_NSL,[${NSL_LIBS}],[],[],[])
-
 ############################################
 # check for unix domain sockets
 AC_CACHE_CHECK([for unix domain sockets],samba_cv_unixsocket, [
index 5a7a62d8aeeaaeb22715b4722af55bfe93a0814f..777882f6e06930540cd95f14eaf542f9824a9200 100644 (file)
@@ -5,7 +5,7 @@ PRIVATE_PROTO_HEADER = netif_proto.h
 OBJ_FILES = \
                interface.o \
                netif.o
-PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL EXT_SOCKET EXT_NSL
+PRIVATE_DEPENDENCIES = LIBSAMBA-UTIL LIBREPLACE_NETWORK
 # End SUBSYSTEM LIBNETIF
 ##############################
 
@@ -16,7 +16,7 @@ SUBSYSTEM = samba-socket
 OUTPUT_TYPE = MERGED_OBJ
 OBJ_FILES = \
                socket_ip.o
-PRIVATE_DEPENDENCIES = EXT_SOCKET EXT_NSL LIBSAMBA-ERRORS 
+PRIVATE_DEPENDENCIES = LIBSAMBA-ERRORS LIBREPLACE_NETWORK
 # End MODULE socket_ip
 ################################################
 
@@ -27,7 +27,7 @@ SUBSYSTEM = samba-socket
 OUTPUT_TYPE = MERGED_OBJ
 OBJ_FILES = \
                socket_unix.o
-PRIVATE_DEPENDENCIES = EXT_SOCKET EXT_NSL
+PRIVATE_DEPENDENCIES = LIBREPLACE_NETWORK
 # End MODULE socket_unix
 ################################################