summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-05-05 11:33:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:16:31 -0500
commit6b68d5eb7b4fecc923dc1c0ab6f387c525f46b7c (patch)
tree1fb62fbe6c0362013c9232dc05427192d1f24ec3 /source4
parentf597d6df59ece653c9a7c18cfb11b16e7e58b907 (diff)
downloadsamba-6b68d5eb7b4fecc923dc1c0ab6f387c525f46b7c.tar.gz
samba-6b68d5eb7b4fecc923dc1c0ab6f387c525f46b7c.tar.bz2
samba-6b68d5eb7b4fecc923dc1c0ab6f387c525f46b7c.zip
r6621: Warn when the user is trying to use socket wrapper
while it is not compiled in. (This used to be commit d63086918ba79307089b3992dc7ed8fc8c6d18a8)
Diffstat (limited to 'source4')
-rw-r--r--source4/build/smb_build/makefile.pm5
-rw-r--r--source4/lib/socket_wrapper/config.m43
2 files changed, 8 insertions, 0 deletions
diff --git a/source4/build/smb_build/makefile.pm b/source4/build/smb_build/makefile.pm
index 98d70f6c1c..ed06e7265d 100644
--- a/source4/build/smb_build/makefile.pm
+++ b/source4/build/smb_build/makefile.pm
@@ -154,7 +154,12 @@ test: @DEFAULT_TEST_TARGET@
test-swrap: all
export SOCKET_WRAPPER_DIR=.
+ifeq (@HAVE_SOCKET_WRAPPER@,yes)
./script/tests/selftest.sh `pwd`/prefix-test
+else
+ echo "Socket wrapper not built in, unable to run test-swrap"
+ exit 1
+endif
test-noswrap: all
./script/tests/selftest.sh `pwd`/prefix-test
diff --git a/source4/lib/socket_wrapper/config.m4 b/source4/lib/socket_wrapper/config.m4
index 69024c869d..dc4523a8cf 100644
--- a/source4/lib/socket_wrapper/config.m4
+++ b/source4/lib/socket_wrapper/config.m4
@@ -2,6 +2,7 @@ AC_ARG_ENABLE(socket-wrapper,
[ --enable-socket-wrapper Turn on socket wrapper library (default=no)])
DEFAULT_TEST_TARGET=test-noswrap
+HAVE_SOCKET_WRAPPER=no
if eval "test x$developer = xyes"; then
enable_socket_wrapper=yes
@@ -10,6 +11,8 @@ fi
if eval "test x$enable_socket_wrapper = xyes"; then
AC_DEFINE(SOCKET_WRAPPER,1,[Use socket wrapper library])
DEFAULT_TEST_TARGET=test-swrap
+ HAVE_SOCKET_WRAPPER=yes
fi
AC_SUBST(DEFAULT_TEST_TARGET)
+AC_SUBST(HAVE_SOCKET_WRAPPER)