1 | ###############################
|
---|
2 | # start SMB_EXT_LIB_NETAPI
|
---|
3 | # check for netapi.h and -lnetapi
|
---|
4 |
|
---|
5 | use_netapi=auto
|
---|
6 | AC_ARG_ENABLE(netapi,
|
---|
7 | AS_HELP_STRING([--enable-netapi],[Turn on netapi support (default=auto)]),
|
---|
8 | [if test x$enable_netapi = xno; then
|
---|
9 | use_netapi=no
|
---|
10 | fi])
|
---|
11 |
|
---|
12 |
|
---|
13 | #if test x$use_netapi = xauto && pkg-config --exists netapi; then
|
---|
14 | # SMB_EXT_LIB_FROM_PKGCONFIG(NETAPI, netapi < 0.1,
|
---|
15 | # [use_netapi=yes],
|
---|
16 | # [use_netapi=no])
|
---|
17 | #fi
|
---|
18 |
|
---|
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)
|
---|
31 | else
|
---|
32 | if test x$use_netapi != xauto; then
|
---|
33 | AC_MSG_ERROR([--enable-netapi: libnetapi not found])
|
---|
34 | fi
|
---|
35 | fi
|
---|
36 | SMB_EXT_LIB(NETAPI, $NETAPI_LIBS)
|
---|
37 | fi
|
---|