summaryrefslogtreecommitdiff
path: root/source4/torture/libnetapi
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2009-06-03 14:11:37 +0200
committerStefan Metzmacher <metze@samba.org>2009-06-03 14:12:36 +0200
commit089ba385aff8ed3f53bb92464cc842c6c00a90f6 (patch)
treeb92a1be4283e4d65bb6fa860a8ebf0b091dec7ea /source4/torture/libnetapi
parent71fcd5bf6400da04cb181b6f43a9353617811bef (diff)
downloadsamba-089ba385aff8ed3f53bb92464cc842c6c00a90f6.tar.gz
samba-089ba385aff8ed3f53bb92464cc842c6c00a90f6.tar.bz2
samba-089ba385aff8ed3f53bb92464cc842c6c00a90f6.zip
s4:torture/libnetapi: fix netapi detection
We need to set SMB_ENABLE(TORTURE_LIBNETAPI,NO) first to overwrite the default of YES for MODULES and then only set it to YES if netapi was found. metze
Diffstat (limited to 'source4/torture/libnetapi')
-rw-r--r--source4/torture/libnetapi/config.m410
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/torture/libnetapi/config.m4 b/source4/torture/libnetapi/config.m4
index 43724908ca..fadef6981c 100644
--- a/source4/torture/libnetapi/config.m4
+++ b/source4/torture/libnetapi/config.m4
@@ -4,7 +4,7 @@
use_netapi=auto
AC_ARG_ENABLE(netapi,
-AS_HELP_STRING([--enable-netapi],[Turn on netapi support (default=yes)]),
+AS_HELP_STRING([--enable-netapi],[Turn on netapi support (default=auto)]),
[if test x$enable_netapi = xno; then
use_netapi=no
fi])
@@ -16,13 +16,17 @@ AS_HELP_STRING([--enable-netapi],[Turn on netapi support (default=yes)]),
# [use_netapi=no])
#fi
-if test x$use_netapi = xauto; then
+SMB_ENABLE(TORTURE_LIBNETAPI,NO)
+if test x$use_netapi != xno; then
AC_CHECK_HEADERS(netapi.h)
AC_CHECK_LIB_EXT(netapi, NETAPI_LIBS, libnetapi_init)
if test x"$ac_cv_header_netapi_h" = x"yes" -a x"$ac_cv_lib_ext_netapi_libnetapi_init" = x"yes";then
SMB_ENABLE(NETAPI,YES)
+ SMB_ENABLE(TORTURE_LIBNETAPI,YES)
else
- SMB_ENABLE(TORTURE_LIBNETAPI,NO)
+ if test x$use_netapi != xauto; then
+ AC_MSG_ERROR([--enable-netapi: libnetapi not found])
+ fi
fi
SMB_EXT_LIB(NETAPI, $NETAPI_LIBS)
fi