r6621: Warn when the user is trying to use socket wrapper
authorJelmer Vernooij <jelmer@samba.org>
Thu, 5 May 2005 11:33:10 +0000 (11:33 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:16:31 +0000 (13:16 -0500)
while it is not compiled in.

source/build/smb_build/makefile.pm
source/lib/socket_wrapper/config.m4

index 98d70f6c1c0c4ff8f32f20ed6c074d876bc056da..ed06e7265d64305b20260aa05e5c5cf132053231 100644 (file)
@@ -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
index 69024c869db422b20e4bbb017e946bda6958ba91..dc4523a8cf34ef82a993a9d4726709dcfef2ea03 100644 (file)
@@ -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)