From 089ba385aff8ed3f53bb92464cc842c6c00a90f6 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 3 Jun 2009 14:11:37 +0200 Subject: 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 --- source4/torture/libnetapi/config.m4 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'source4/torture/libnetapi') 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 -- cgit