summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib')
-rw-r--r--source4/lib/socket/config.m413
-rw-r--r--source4/lib/socket/config.mk3
2 files changed, 12 insertions, 4 deletions
diff --git a/source4/lib/socket/config.m4 b/source4/lib/socket/config.m4
index e95b88f23f..1d1d66c1a1 100644
--- a/source4/lib/socket/config.m4
+++ b/source4/lib/socket/config.m4
@@ -18,18 +18,23 @@ fi
# it.
AC_CHECK_FUNCS(connect)
if test x"$ac_cv_func_connect" = x"no"; then
- AC_CHECK_LIB(nsl_s, printf)
- AC_CHECK_LIB(nsl, printf)
- AC_CHECK_LIB(socket, connect)
- AC_CHECK_LIB_EXT(inet, connect)
+ AC_CHECK_LIB(nsl_s, SOCKET_LIBS, printf)
+ AC_CHECK_LIB(nsl, SOCKET_LIBS, printf)
+ AC_CHECK_LIB(socket, SOCKET_LIBS, connect)
+ AC_CHECK_LIB(inet, SOCKET_LIBS, connect)
+ SMB_EXT_LIB_ENABLE(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_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(SOCKET,[${SOCKET_LIBS}],[${SOCKET_CFLAGS}],[${SOCKET_CPPFLAGS}],[${SOCKET_LDFLAGS}])
+
############################################
# check for unix domain sockets
AC_CACHE_CHECK([for unix domain sockets],samba_cv_unixsocket, [
diff --git a/source4/lib/socket/config.mk b/source4/lib/socket/config.mk
index ad555522a3..c76c91ba8c 100644
--- a/source4/lib/socket/config.mk
+++ b/source4/lib/socket/config.mk
@@ -7,6 +7,7 @@ OUTPUT_TYPE = MERGEDOBJ
OBJ_FILES = \
socket_ipv4.o
NOPROTO=YES
+REQUIRED_SUBSYSTEMS = EXT_LIB_SOCKET
# End MODULE socket_ipv4
################################################
@@ -18,6 +19,7 @@ OUTPUT_TYPE = MERGEDOBJ
OBJ_FILES = \
socket_ipv6.o
NOPROTO=YES
+REQUIRED_SUBSYSTEMS = EXT_LIB_SOCKET
# End MODULE socket_ipv6
################################################
@@ -29,6 +31,7 @@ OUTPUT_TYPE = MERGEDOBJ
OBJ_FILES = \
socket_unix.o
NOPROTO=YES
+REQUIRED_SUBSYSTEMS = EXT_LIB_SOCKET
# End MODULE socket_unix
################################################