summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-27 10:32:49 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:02 -0500
commitd345bab9c0ea4838c31c502d769e042936ce980b (patch)
tree3bf2839e9248a5456462f9f8fed0d1640354cb04 /source4/lib
parent4d024ddfb52504644313dfcb4ab0f97d07f83c29 (diff)
downloadsamba-d345bab9c0ea4838c31c502d769e042936ce980b.tar.gz
samba-d345bab9c0ea4838c31c502d769e042936ce980b.tar.bz2
samba-d345bab9c0ea4838c31c502d769e042936ce980b.zip
r10531: (hopefully) improve detection of socket-related functions in external libraries
(This used to be commit 20a1aba500c64dc530271a96af8d557bc54af960)
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/socket/config.m423
-rw-r--r--source4/lib/socket/config.mk3
2 files changed, 4 insertions, 22 deletions
diff --git a/source4/lib/socket/config.m4 b/source4/lib/socket/config.m4
index daa85803dc..01cd28baa3 100644
--- a/source4/lib/socket/config.m4
+++ b/source4/lib/socket/config.m4
@@ -18,32 +18,17 @@ fi
# it.
AC_CHECK_FUNCS(connect)
if test x"$ac_cv_func_connect" = x"no"; then
- case "$LIBS $SOCKET_LIBS" in
- *-lnsl*) ;;
- *) AC_CHECK_LIB_EXT(nsl_s, SOCKET_LIBS, printf) ;;
- esac
- case "$LIBS $SOCKET_LIBS" in
- *-lnsl*) ;;
- *) AC_CHECK_LIB_EXT(nsl, SOCKET_LIBS, printf) ;;
- esac
- case "$LIBS $SOCKET_LIBS" in
- *-lsocket*) ;;
- *) AC_CHECK_LIB_EXT(socket, SOCKET_LIBS, connect) ;;
- esac
- case "$LIBS $SOCKET_LIBS" in
- *-linet*) ;;
- *) AC_CHECK_LIB_EXT(inet, SOCKET_LIBS, connect) ;;
- esac
+ AC_CHECK_LIB(nsl_s, printf)
+ AC_CHECK_LIB(nsl, printf)
+ AC_CHECK_LIB(socket, connect)
+ AC_CHECK_LIB_EXT(inet, connect)
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_socket_connect" = x"yes" ||
test x"$ac_cv_lib_ext_inet_connect" = x"yes"; then
- # ac_cv_func_connect=yes
- # don't! it would cause AC_CHECK_FUNC to succeed next time configure is run
AC_DEFINE(HAVE_CONNECT,1,[Whether the system has connect()])
fi
fi
-SMB_EXT_LIB(SOCKET,[${SOCKET_LIBS}],[${SOCKET_CFLAGS}],[${SOCKET_CPPFLAGS}],[${SOCKET_LDFLAGS}])
############################################
# check for unix domain sockets
diff --git a/source4/lib/socket/config.mk b/source4/lib/socket/config.mk
index e007b01725..13fe584373 100644
--- a/source4/lib/socket/config.mk
+++ b/source4/lib/socket/config.mk
@@ -6,7 +6,6 @@ SUBSYSTEM = SOCKET
INIT_OBJ_FILES = \
lib/socket/socket_ipv4.o
NOPROTO=YES
-REQUIRED_SUBSYSTEMS = EXT_LIB_SOCKET
# End MODULE socket_ipv4
################################################
@@ -17,7 +16,6 @@ SUBSYSTEM = SOCKET
INIT_OBJ_FILES = \
lib/socket/socket_ipv6.o
NOPROTO=YES
-REQUIRED_SUBSYSTEMS = EXT_LIB_SOCKET
# End MODULE socket_ipv6
################################################
@@ -28,7 +26,6 @@ SUBSYSTEM = SOCKET
INIT_OBJ_FILES = \
lib/socket/socket_unix.o
NOPROTO=YES
-REQUIRED_SUBSYSTEMS = EXT_LIB_SOCKET
# End MODULE socket_unix
################################################