1 ###############################
2 # start SMB_EXT_LIB_NETAPI
3 # check for netapi.h and -lnetapi
7 AS_HELP_STRING([--enable-netapi],[Turn on netapi support (default=auto)]),
8 [if test x$enable_netapi = xno; then
13 #if test x$use_netapi = xauto && pkg-config --exists netapi; then
14 # SMB_EXT_LIB_FROM_PKGCONFIG(NETAPI, netapi < 0.1,
19 SMB_ENABLE(TORTURE_LIBNETAPI,NO)
20 if test x$use_netapi != xno; then
21 AC_CHECK_HEADERS(netapi.h)
22 AC_CHECK_LIB_EXT(netapi, NETAPI_LIBS, libnetapi_init)
23 AC_CHECK_LIB_EXT(netapi, NETAPI_LIBS, NetUserModalsGet)
24 AC_CHECK_LIB_EXT(netapi, NETAPI_LIBS, NetUserGetGroups)
25 AC_CHECK_LIB_EXT(netapi, NETAPI_LIBS, NetUserGetInfo)
26 AC_CHECK_LIB_EXT(netapi, NETAPI_LIBS, NetUserSetInfo)
27 if test x"$ac_cv_header_netapi_h" = x"yes" -a x"$ac_cv_lib_ext_netapi_libnetapi_init" = x"yes" -a x"$ac_cv_lib_ext_netapi_NetUserModalsGet" = x"yes" -a x"$ac_cv_lib_ext_netapi_NetUserGetGroups" = x"yes" -a x"$ac_cv_lib_ext_netapi_NetUserGetInfo" = x"yes" -a x"$ac_cv_lib_ext_netapi_NetUserSetInfo" = x"yes";then
28 AC_DEFINE(ENABLE_LIBNETAPI,1,[Whether we have libnetapi on the host system])
29 SMB_ENABLE(NETAPI,YES)
30 SMB_ENABLE(TORTURE_LIBNETAPI,YES)
32 if test x$use_netapi != xauto; then
33 AC_MSG_ERROR([--enable-netapi: libnetapi not found])
36 SMB_EXT_LIB(NETAPI, $NETAPI_LIBS)