summaryrefslogtreecommitdiff
path: root/source4/lib
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-01-13 17:32:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:02 -0500
commitc582cb23f784546dd47cd0847f1a6d7269bd9bd6 (patch)
tree1407a53c4a80046a659af3417446eaa3cfa9ee68 /source4/lib
parent23aa4becf20ae8a1384bad7d819745d7c38b211b (diff)
downloadsamba-c582cb23f784546dd47cd0847f1a6d7269bd9bd6.tar.gz
samba-c582cb23f784546dd47cd0847f1a6d7269bd9bd6.tar.bz2
samba-c582cb23f784546dd47cd0847f1a6d7269bd9bd6.zip
r12911: try to fix bug #3365
metze (This used to be commit e70ca698cea901a66f7201c16bb3ba1faa7e7289)
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
################################################