summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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